|
| KplScene (const QSizeF &size=QSizeF(21, 14.8), QObject *parent=0) |
| Constructor. More...
|
|
| ~KplScene () |
| Destructor. More...
|
|
bool | exportImage (const QUrl &url, bool boundingBox=true) |
| Exports as image file. More...
|
|
void | insertItem (QGraphicsItem *item, int z=-1) |
| Inserts a plot item and makes it a child item of a framelike item, if a framelike item with lower z value exists and the inserted item is no framelike item itself. More...
|
|
QList< QGraphicsItem * > | items (Qt::SortOrder order) const |
| Returns ordered list of items. More...
|
|
QPointF | map (const QPointF &p) const |
| Maps from cm to pixel units. More...
|
|
QPointF | mapInv (const QPointF &p) const |
| Maps from pixel to cm units. More...
|
|
const QTransform & | matrix () const |
| Returns matrix for transformation from cm to pixel units. More...
|
|
void | print (QPrinter *printer) |
| Prints plot. More...
|
|
bool | readData (const QUrl &url, ArrayItem::DecimalCharacter decimalChar=ArrayItem::Point, bool autoPathHeader=false, bool autoNorm=true, bool logX=false, bool logY=false, double x0=4, double y0=3, double width=15, double height=10, unsigned colorFrame=0, unsigned colorGrid=0, unsigned colorData=0, FrameItem::GridMode gridMode=FrameItem::AxesWithLabels, const QString &xText="x", const QString &yText="y", const QString &header="", double relSize=1, int colX=0, int colY=1, int colErr=2, bool errorBars=false, KplItem::Symbol symbol=KplItem::SolidLine) |
| Opens a data file. More...
|
|
bool | readPlo (const QUrl &url, QWidget *window=0) |
| Reads plot file, initializes items and adds them to the scene. More...
|
|
bool | savePlo (const QUrl &url, bool absolute=true, char format= 'g', int precision=6) const |
| Saves all plot items at URL. More...
|
|
bool | savePS (const QUrl &url=QUrl(), bool landscape=false, bool boundingBox=true) |
| Generates PostScript file. More...
|
|
const QSizeF | size () const |
| Returns scene size in cm units. More...
|
|
void | setDashOffsets () const |
| Sets offsets for dashed lines. More...
|
|
void | setProperties (QGraphicsItem *item) const |
| Sets item properties according to transformation matrix. More...
|
|
void | setSize (const QSizeF &size) |
| Sets scene size and transformation matrix. More...
|
|
QPointF | steps (int z=-1) const |
| Returns user unit steps for one pixel steps. More...
|
|
void | updatePos (QGraphicsItem *item) |
| Emits signal positionChanged. More...
|
|
| QGraphicsScene (QObject *parent) |
|
| QGraphicsScene (const QRectF &sceneRect, QObject *parent) |
|
| QGraphicsScene (qreal x, qreal y, qreal width, qreal height, QObject *parent) |
|
QRectF | sceneRect () const |
|
qreal | width () const |
|
qreal | height () const |
|
void | setSceneRect (const QRectF &rect) |
|
void | setSceneRect (qreal x, qreal y, qreal w, qreal h) |
|
void | render (QPainter *painter, const QRectF &target, const QRectF &source, Qt::AspectRatioMode aspectRatioMode) |
|
ItemIndexMethod | itemIndexMethod () const |
|
void | setItemIndexMethod (ItemIndexMethod method) |
|
bool | isSortCacheEnabled () const |
|
void | setSortCacheEnabled (bool enabled) |
|
int | bspTreeDepth () const |
|
void | setBspTreeDepth (int depth) |
|
QRectF | itemsBoundingRect () const |
|
QList< QGraphicsItem * > | items (Qt::SortOrder order) const |
|
QList< QGraphicsItem * > | items (const QPointF &pos, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform) const |
|
QList< QGraphicsItem * > | items (const QRectF &rect, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform) const |
|
QList< QGraphicsItem * > | items (const QPolygonF &polygon, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform) const |
|
QList< QGraphicsItem * > | items (const QPainterPath &path, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform) const |
|
QList< QGraphicsItem * > | collidingItems (const QGraphicsItem *item, Qt::ItemSelectionMode mode) const |
|
QGraphicsItem * | itemAt (const QPointF &position) const |
|
QGraphicsItem * | itemAt (const QPointF &position, const QTransform &deviceTransform) const |
|
QList< QGraphicsItem * > | items (qreal x, qreal y, qreal w, qreal h, Qt::ItemSelectionMode mode) const |
|
QList< QGraphicsItem * > | items (qreal x, qreal y, qreal w, qreal h, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform) const |
|
QGraphicsItem * | itemAt (qreal x, qreal y) const |
|
QGraphicsItem * | itemAt (qreal x, qreal y, const QTransform &deviceTransform) const |
|
QList< QGraphicsItem * > | selectedItems () const |
|
QPainterPath | selectionArea () const |
|
void | setSelectionArea (const QPainterPath &path, const QTransform &deviceTransform) |
|
void | setSelectionArea (const QPainterPath &path, Qt::ItemSelectionMode mode, const QTransform &deviceTransform) |
|
void | setSelectionArea (const QPainterPath &path, Qt::ItemSelectionOperation selectionOperation, Qt::ItemSelectionMode mode, const QTransform &deviceTransform) |
|
QGraphicsItemGroup * | createItemGroup (const QList< QGraphicsItem * > &items) |
|
void | destroyItemGroup (QGraphicsItemGroup *group) |
|
void | addItem (QGraphicsItem *item) |
|
QGraphicsEllipseItem * | addEllipse (const QRectF &rect, const QPen &pen, const QBrush &brush) |
|
QGraphicsLineItem * | addLine (const QLineF &line, const QPen &pen) |
|
QGraphicsPathItem * | addPath (const QPainterPath &path, const QPen &pen, const QBrush &brush) |
|
QGraphicsPixmapItem * | addPixmap (const QPixmap &pixmap) |
|
QGraphicsPolygonItem * | addPolygon (const QPolygonF &polygon, const QPen &pen, const QBrush &brush) |
|
QGraphicsRectItem * | addRect (const QRectF &rect, const QPen &pen, const QBrush &brush) |
|
QGraphicsTextItem * | addText (const QString &text, const QFont &font) |
|
QGraphicsSimpleTextItem * | addSimpleText (const QString &text, const QFont &font) |
|
QGraphicsProxyWidget * | addWidget (QWidget *widget, Qt::WindowFlags wFlags) |
|
QGraphicsEllipseItem * | addEllipse (qreal x, qreal y, qreal w, qreal h, const QPen &pen, const QBrush &brush) |
|
QGraphicsLineItem * | addLine (qreal x1, qreal y1, qreal x2, qreal y2, const QPen &pen) |
|
QGraphicsRectItem * | addRect (qreal x, qreal y, qreal w, qreal h, const QPen &pen, const QBrush &brush) |
|
void | removeItem (QGraphicsItem *item) |
|
QGraphicsItem * | focusItem () const |
|
void | setFocusItem (QGraphicsItem *item, Qt::FocusReason focusReason) |
|
bool | hasFocus () const |
|
void | setFocus (Qt::FocusReason focusReason) |
|
void | clearFocus () |
|
void | setStickyFocus (bool enabled) |
|
bool | stickyFocus () const |
|
QGraphicsItem * | mouseGrabberItem () const |
|
QBrush | backgroundBrush () const |
|
void | setBackgroundBrush (const QBrush &brush) |
|
QBrush | foregroundBrush () const |
|
void | setForegroundBrush (const QBrush &brush) |
|
virtual QVariant | inputMethodQuery (Qt::InputMethodQuery query) const |
|
QList< QGraphicsView * > | views () const |
|
void | update (qreal x, qreal y, qreal w, qreal h) |
|
void | invalidate (qreal x, qreal y, qreal w, qreal h, SceneLayers layers) |
|
QStyle * | style () const |
|
void | setStyle (QStyle *style) |
|
QFont | font () const |
|
void | setFont (const QFont &font) |
|
QPalette | palette () const |
|
void | setPalette (const QPalette &palette) |
|
bool | isActive () const |
|
QGraphicsItem * | activePanel () const |
|
void | setActivePanel (QGraphicsItem *item) |
|
QGraphicsWidget * | activeWindow () const |
|
void | setActiveWindow (QGraphicsWidget *widget) |
|
bool | sendEvent (QGraphicsItem *item, QEvent *event) |
|
qreal | minimumRenderSize () const |
|
void | setMinimumRenderSize (qreal minSize) |
|
void | update (const QRectF &rect) |
|
void | invalidate (const QRectF &rect, SceneLayers layers) |
|
void | advance () |
|
void | clearSelection () |
|
void | clear () |
|
void | changed (const QList< QRectF > ®ion) |
|
void | sceneRectChanged (const QRectF &rect) |
|
void | selectionChanged () |
|
void | focusItemChanged (QGraphicsItem *newFocusItem, QGraphicsItem *oldFocusItem, Qt::FocusReason reason) |
|
| QObject (QObject *parent) |
|
virtual const QMetaObject * | metaObject () const |
|
QString | objectName () const |
|
void | setObjectName (const QString &name) |
|
bool | isWidgetType () const |
|
bool | isWindowType () const |
|
bool | signalsBlocked () const |
|
bool | blockSignals (bool block) |
|
QThread * | thread () const |
|
void | moveToThread (QThread *targetThread) |
|
int | startTimer (int interval, Qt::TimerType timerType) |
|
void | killTimer (int id) |
|
T | findChild (const QString &name, Qt::FindChildOptions options) const |
|
QList< T > | findChildren (const QString &name, Qt::FindChildOptions options) const |
|
QList< T > | findChildren (const QRegExp ®Exp, Qt::FindChildOptions options) const |
|
QList< T > | findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const |
|
const QObjectList & | children () const |
|
void | setParent (QObject *parent) |
|
void | installEventFilter (QObject *filterObj) |
|
void | removeEventFilter (QObject *obj) |
|
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
|
bool | disconnect (const char *signal, const QObject *receiver, const char *method) const |
|
bool | disconnect (const QObject *receiver, const char *method) const |
|
void | dumpObjectTree () |
|
void | dumpObjectInfo () |
|
bool | setProperty (const char *name, const QVariant &value) |
|
QVariant | property (const char *name) const |
|
QList< QByteArray > | dynamicPropertyNames () const |
|
void | destroyed (QObject *obj) |
|
void | objectNameChanged (const QString &objectName) |
|
QObject * | parent () const |
|
bool | inherits (const char *className) const |
|
void | deleteLater () |
|
|
static bool | framelike (int type) |
| Checks if type of an item is that of a FrameItem or an item inheriting from FrameItem. More...
|
|
static bool | readPlo (const QUrl &url, QList< QGraphicsItem * > &list, QWidget *window=0, unsigned colorFrame=0, unsigned colorGrid=0, unsigned colorData=0, KplItem::Symbol symbol=KplItem::OpenCircle, double x0=4, double y0=3, double width=15, double height=10, FrameItem::GridMode gridMode=FrameItem::AxesWithLabels, int colX=0, int colY=0, int colErr=0, bool errorBars=false) |
| Reads plot file and initializes plot items. More...
|
|
static bool | savePlo (const QUrl &url, const QList< QGraphicsItem * > &list, bool absolute=true, char format= 'g', int precision=6) |
| Saves plot items of a given list at URL. More...
|
|
QString | tr (const char *sourceText, const char *disambiguation, int n) |
|
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
|
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
|
QMetaObject::Connection | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
|
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type) |
|
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, Functor functor) |
|
QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type) |
|
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
|
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
|
bool | disconnect (const QMetaObject::Connection &connection) |
|
bool | disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method) |
|
Kpl graphics scene class.
The methods readData, readPlo and insertItem can be used to populate the scene with plot items. The methods print and savePS allow to print and to export as PostScript file, respectively.
- Author
- Werner Stille