|
SETestKCL
1.0.
|
#include <qcustomplot.h>


Public Member Functions | |
| QCPLayoutGrid () | |
| virtual | ~QCPLayoutGrid () |
| int | rowCount () const |
| int | columnCount () const |
| QList< double > | columnStretchFactors () const |
| QList< double > | rowStretchFactors () const |
| int | columnSpacing () const |
| int | rowSpacing () const |
| void | setColumnStretchFactor (int column, double factor) |
| void | setColumnStretchFactors (const QList< double > &factors) |
| void | setRowStretchFactor (int row, double factor) |
| void | setRowStretchFactors (const QList< double > &factors) |
| void | setColumnSpacing (int pixels) |
| void | setRowSpacing (int pixels) |
| virtual void | updateLayout () |
| virtual int | elementCount () const |
| virtual QCPLayoutElement * | elementAt (int index) const |
| virtual QCPLayoutElement * | takeAt (int index) |
| virtual bool | take (QCPLayoutElement *element) |
| virtual QList< QCPLayoutElement * > | elements (bool recursive) const |
| virtual void | simplify () |
| virtual QSize | minimumSizeHint () const |
| virtual QSize | maximumSizeHint () const |
| QCPLayoutElement * | element (int row, int column) const |
| bool | addElement (int row, int column, QCPLayoutElement *element) |
| bool | hasElement (int row, int column) |
| void | expandTo (int newRowCount, int newColumnCount) |
| void | insertRow (int newIndex) |
| void | insertColumn (int newIndex) |
Public Member Functions inherited from QCPLayout | |
| QCPLayout () | |
| virtual void | update (UpdatePhase phase) |
| bool | removeAt (int index) |
| bool | remove (QCPLayoutElement *element) |
| void | clear () |
Public Member Functions inherited from QCPLayoutElement | |
| QCPLayoutElement (QCustomPlot *parentPlot=0) | |
| virtual | ~QCPLayoutElement () |
| QCPLayout * | layout () const |
| QRect | rect () const |
| QRect | outerRect () const |
| QMargins | margins () const |
| QMargins | minimumMargins () const |
| QCP::MarginSides | autoMargins () const |
| QSize | minimumSize () const |
| QSize | maximumSize () const |
| QCPMarginGroup * | marginGroup (QCP::MarginSide side) const |
| QHash< QCP::MarginSide, QCPMarginGroup * > | marginGroups () const |
| void | setOuterRect (const QRect &rect) |
| void | setMargins (const QMargins &margins) |
| void | setMinimumMargins (const QMargins &margins) |
| void | setAutoMargins (QCP::MarginSides sides) |
| void | setMinimumSize (const QSize &size) |
| void | setMinimumSize (int width, int height) |
| void | setMaximumSize (const QSize &size) |
| void | setMaximumSize (int width, int height) |
| void | setMarginGroup (QCP::MarginSides sides, QCPMarginGroup *group) |
| virtual double | selectTest (const QPointF &pos, bool onlySelectable, QVariant *details=0) const |
Public Member Functions inherited from QCPLayerable | |
| QCPLayerable (QCustomPlot *plot, QString targetLayer=QString(), QCPLayerable *parentLayerable=0) | |
| ~QCPLayerable () | |
| bool | visible () const |
| QCustomPlot * | parentPlot () const |
| QCPLayerable * | parentLayerable () const |
| QCPLayer * | layer () const |
| bool | antialiased () const |
| void | setVisible (bool on) |
| Q_SLOT bool | setLayer (QCPLayer *layer) |
| bool | setLayer (const QString &layerName) |
| void | setAntialiased (bool enabled) |
| bool | realVisibility () const |
Protected Member Functions | |
| void | getMinimumRowColSizes (QVector< int > *minColWidths, QVector< int > *minRowHeights) const |
| void | getMaximumRowColSizes (QVector< int > *maxColWidths, QVector< int > *maxRowHeights) const |
Protected Member Functions inherited from QCPLayout | |
| void | sizeConstraintsChanged () const |
| void | adoptElement (QCPLayoutElement *el) |
| void | releaseElement (QCPLayoutElement *el) |
| QVector< int > | getSectionSizes (QVector< int > maxSizes, QVector< int > minSizes, QVector< double > stretchFactors, int totalSize) const |
Protected Member Functions inherited from QCPLayoutElement | |
| virtual int | calculateAutoMargin (QCP::MarginSide side) |
| virtual void | mousePressEvent (QMouseEvent *event) |
| virtual void | mouseMoveEvent (QMouseEvent *event) |
| virtual void | mouseReleaseEvent (QMouseEvent *event) |
| virtual void | mouseDoubleClickEvent (QMouseEvent *event) |
| virtual void | wheelEvent (QWheelEvent *event) |
| virtual void | applyDefaultAntialiasingHint (QCPPainter *painter) const |
| virtual void | draw (QCPPainter *painter) |
| virtual void | parentPlotInitialized (QCustomPlot *parentPlot) |
Protected Member Functions inherited from QCPLayerable | |
| virtual QCP::Interaction | selectionCategory () const |
| virtual QRect | clipRect () const |
| virtual void | selectEvent (QMouseEvent *event, bool additive, const QVariant &details, bool *selectionStateChanged) |
| virtual void | deselectEvent (bool *selectionStateChanged) |
| void | initializeParentPlot (QCustomPlot *parentPlot) |
| void | setParentLayerable (QCPLayerable *parentLayerable) |
| bool | moveToLayer (QCPLayer *layer, bool prepend) |
| void | applyAntialiasingHint (QCPPainter *painter, bool localAntialiased, QCP::AntialiasedElement overrideElement) const |
Protected Attributes | |
| QList< QList< QCPLayoutElement * > > | mElements |
| QList< double > | mColumnStretchFactors |
| QList< double > | mRowStretchFactors |
| int | mColumnSpacing |
| int | mRowSpacing |
Protected Attributes inherited from QCPLayoutElement | |
| QCPLayout * | mParentLayout |
| QSize | mMinimumSize |
| QSize | mMaximumSize |
| QRect | mRect |
| QRect | mOuterRect |
| QMargins | mMargins |
| QMargins | mMinimumMargins |
| QCP::MarginSides | mAutoMargins |
| QHash< QCP::MarginSide, QCPMarginGroup * > | mMarginGroups |
Protected Attributes inherited from QCPLayerable | |
| bool | mVisible |
| QCustomPlot * | mParentPlot |
| QPointer< QCPLayerable > | mParentLayerable |
| QCPLayer * | mLayer |
| bool | mAntialiased |
Additional Inherited Members | |
Public Types inherited from QCPLayoutElement | |
| enum | UpdatePhase { upPreparation, upMargins, upLayout } |
Signals inherited from QCPLayerable | |
| void | layerChanged (QCPLayer *newLayer) |
A layout that arranges child elements in a grid.
Elements are laid out in a grid with configurable stretch factors (setColumnStretchFactor, setRowStretchFactor) and spacing (setColumnSpacing, setRowSpacing).
Elements can be added to cells via addElement. The grid is expanded if the specified row or column doesn't exist yet. Whether a cell contains a valid layout element can be checked with hasElement, that element can be retrieved with element. If rows and columns that only have empty cells shall be removed, call simplify. Removal of elements is either done by just adding the element to a different layout or by using the QCPLayout interface take or remove.
Row and column insertion can be performed with insertRow and insertColumn.
Definition at line 757 of file qcustomplot.h.
|
explicit |
Creates an instance of QCPLayoutGrid and sets default values.
Definition at line 2483 of file qcustomplot.cpp.
|
virtual |
Definition at line 2489 of file qcustomplot.cpp.
References QCPLayout::clear().
| bool addElement | ( | int | row, |
| int | column, | ||
| QCPLayoutElement * | element | ||
| ) |
Adds the element to cell with row and column. If element is already in a layout, it is first removed from there. If row or column don't exist yet, the layout is expanded accordingly.
Returns true if the element was added successfully, i.e. if the cell at row and column didn't already have an element.
Definition at line 2554 of file qcustomplot.cpp.
References QCPLayout::adoptElement(), element(), expandTo(), hasElement(), QCPLayoutElement::layout(), mElements, and QCPLayout::take().
Referenced by QCPLegend::addItem(), and QCustomPlot::QCustomPlot().
| int columnCount | ( | ) | const |
Returns the number of columns in the layout.
Definition at line 2536 of file qcustomplot.cpp.
References mElements.
Referenced by elementAt(), elementCount(), elements(), expandTo(), getMaximumRowColSizes(), getMinimumRowColSizes(), hasElement(), insertColumn(), insertRow(), maximumSizeHint(), minimumSizeHint(), setColumnStretchFactor(), simplify(), takeAt(), and updateLayout().
|
inline |
Definition at line 777 of file qcustomplot.h.
|
inline |
Definition at line 775 of file qcustomplot.h.
| QCPLayoutElement * element | ( | int | row, |
| int | column | ||
| ) | const |
Returns the element in the cell in row and column.
Returns 0 if either the row/column is invalid or if the cell is empty. In those cases, a qDebug message is printed. To check whether a cell exists and isn't empty, use hasElement.
Definition at line 2504 of file qcustomplot.cpp.
References mElements.
Referenced by addElement(), and take().
|
virtual |
Returns the element in the cell with the given index. If index is invalid, returns 0.
Note that even if index is valid, the respective cell may be empty in some layouts (e.g. QCPLayoutGrid), so this function may return 0 in those cases. You may use this function to check whether a cell is empty or not.
Implements QCPLayout.
Definition at line 2828 of file qcustomplot.cpp.
References columnCount(), elementCount(), and mElements.
Referenced by QCPLegend::item(), take(), and takeAt().
|
virtual |
Returns the number of elements/cells in the layout.
Implements QCPLayout.
Definition at line 2822 of file qcustomplot.cpp.
References columnCount(), and rowCount().
Referenced by elementAt(), QCPLegend::itemCount(), and take().
|
virtual |
Returns a list of all child elements in this layout element. If recursive is true, all sub-child elements are included in the list, too.
Reimplemented from QCPLayout.
Definition at line 2871 of file qcustomplot.cpp.
References columnCount(), mElements, and rowCount().
| void expandTo | ( | int | newRowCount, |
| int | newColumnCount | ||
| ) |
Expands the layout to have newRowCount rows and newColumnCount columns. So the last valid row index will be newRowCount-1, the last valid column index will be newColumnCount-1.
If the current column/row count is already larger or equal to newColumnCount/newRowCount, this function does nothing in that dimension.
Newly created cells are empty, new rows and columns have the stretch factor 1.
Note that upon a call to addElement, the layout is expanded automatically to contain the specified row and column, using this function.
Definition at line 2723 of file qcustomplot.cpp.
References columnCount(), mColumnStretchFactors, mElements, mRowStretchFactors, and rowCount().
Referenced by addElement(), insertColumn(), and insertRow().
|
protected |
Definition at line 3022 of file qcustomplot.cpp.
References columnCount(), mElements, and rowCount().
Referenced by maximumSizeHint(), and updateLayout().
|
protected |
Definition at line 2988 of file qcustomplot.cpp.
References columnCount(), mElements, and rowCount().
Referenced by minimumSizeHint(), and updateLayout().
| bool hasElement | ( | int | row, |
| int | column | ||
| ) |
Returns whether the cell at row and column exists and contains a valid element, i.e. isn't empty.
Definition at line 2579 of file qcustomplot.cpp.
References columnCount(), mElements, and rowCount().
Referenced by addElement().
| void insertColumn | ( | int | newIndex | ) |
Inserts a new column with empty cells at the column index newIndex. Valid values for newIndex range from 0 (inserts a row at the left) to rowCount (appends a row at the right).
Definition at line 2774 of file qcustomplot.cpp.
References columnCount(), expandTo(), mColumnStretchFactors, mElements, and rowCount().
| void insertRow | ( | int | newIndex | ) |
Inserts a new row with empty cells at the row index newIndex. Valid values for newIndex range from 0 (inserts a row at the top) to rowCount (appends a row at the bottom).
Definition at line 2748 of file qcustomplot.cpp.
References columnCount(), expandTo(), mElements, mRowStretchFactors, and rowCount().
|
virtual |
Returns the maximum size this layout element (the inner rect) may be expanded to.
if a maximum size (setMaximumSize) was not set manually, parent layouts consult this function to determine the maximum allowed size of this layout element. (A manual maximum size is considered set if it is smaller than Qt's QWIDGETSIZE_MAX.)
Reimplemented from QCPLayoutElement.
Definition at line 2961 of file qcustomplot.cpp.
References columnCount(), getMaximumRowColSizes(), mColumnSpacing, QCPLayoutElement::mMargins, mRowSpacing, and rowCount().
|
virtual |
Returns the minimum size this layout element (the inner rect) may be compressed to.
if a minimum size (setMinimumSize) was not set manually, parent layouts consult this function to determine the minimum allowed size of this layout element. (A manual minimum size is considered set if it is non-zero.)
Reimplemented from QCPLayoutElement.
Definition at line 2946 of file qcustomplot.cpp.
References columnCount(), getMinimumRowColSizes(), mColumnSpacing, QCPLayoutElement::mMargins, mRowSpacing, and rowCount().
Referenced by QCustomPlot::minimumSizeHint(), and QCustomPlot::sizeHint().
| int rowCount | ( | ) | const |
Returns the number of rows in the layout.
Definition at line 2526 of file qcustomplot.cpp.
References mElements.
Referenced by QCPLegend::addItem(), elementCount(), elements(), expandTo(), getMaximumRowColSizes(), getMinimumRowColSizes(), hasElement(), insertColumn(), insertRow(), maximumSizeHint(), minimumSizeHint(), setRowStretchFactor(), simplify(), and updateLayout().
|
inline |
Definition at line 778 of file qcustomplot.h.
|
inline |
Definition at line 776 of file qcustomplot.h.
| void setColumnSpacing | ( | int | pixels | ) |
Sets the gap that is left blank between columns to pixels.
Definition at line 2694 of file qcustomplot.cpp.
References mColumnSpacing.
Referenced by QCPLegend::QCPLegend().
| void setColumnStretchFactor | ( | int | column, |
| double | factor | ||
| ) |
Sets the stretch factor of column.
Stretch factors control the relative sizes of rows and columns. Cells will not be resized beyond their minimum and maximum widths/heights (QCPLayoutElement::setMinimumSize, QCPLayoutElement::setMaximumSize), regardless of the stretch factor.
The default stretch factor of newly created rows/columns is 1.
Definition at line 2598 of file qcustomplot.cpp.
References columnCount(), and mColumnStretchFactors.
| void setColumnStretchFactors | ( | const QList< double > & | factors | ) |
Sets the stretch factors of all columns. factors must have the size columnCount.
Stretch factors control the relative sizes of rows and columns. Cells will not be resized beyond their minimum and maximum widths/heights (QCPLayoutElement::setMinimumSize, QCPLayoutElement::setMaximumSize), regardless of the stretch factor.
The default stretch factor of newly created rows/columns is 1.
Definition at line 2621 of file qcustomplot.cpp.
References mColumnStretchFactors.
| void setRowSpacing | ( | int | pixels | ) |
Sets the gap that is left blank between rows to pixels.
Definition at line 2704 of file qcustomplot.cpp.
References mRowSpacing.
Referenced by QCPLegend::QCPLegend().
| void setRowStretchFactor | ( | int | row, |
| double | factor | ||
| ) |
Sets the stretch factor of row.
Stretch factors control the relative sizes of rows and columns. Cells will not be resized beyond their minimum and maximum widths/heights (QCPLayoutElement::setMinimumSize, QCPLayoutElement::setMaximumSize), regardless of the stretch factor.
The default stretch factor of newly created rows/columns is 1.
Definition at line 2649 of file qcustomplot.cpp.
References mRowStretchFactors, and rowCount().
| void setRowStretchFactors | ( | const QList< double > & | factors | ) |
Sets the stretch factors of all rows. factors must have the size rowCount.
Stretch factors control the relative sizes of rows and columns. Cells will not be resized beyond their minimum and maximum widths/heights (QCPLayoutElement::setMinimumSize, QCPLayoutElement::setMaximumSize), regardless of the stretch factor.
The default stretch factor of newly created rows/columns is 1.
Definition at line 2672 of file qcustomplot.cpp.
References mRowStretchFactors.
|
virtual |
Simplifies the layout by collapsing rows and columns which only contain empty cells.
Reimplemented from QCPLayout.
Definition at line 2901 of file qcustomplot.cpp.
References columnCount(), mColumnStretchFactors, mElements, mRowStretchFactors, QCPLayout::removeAt(), and rowCount().
Referenced by QCPLegend::removeItem().
|
virtual |
Removes the specified element from the layout and returns true on success.
If the element isn't in this layout, returns false.
Note that some layouts don't remove the respective cell right away but leave an empty cell after successful removal of the layout element. To collapse empty cells, use simplify.
Implements QCPLayout.
Definition at line 2852 of file qcustomplot.cpp.
References element(), elementAt(), elementCount(), and takeAt().
|
virtual |
Removes the element with the given index from the layout and returns it.
If the index is invalid or the cell with that index is empty, returns 0.
Note that some layouts don't remove the respective cell right away but leave an empty cell after successful removal of the layout element. To collapse empty cells, use simplify.
Implements QCPLayout.
Definition at line 2837 of file qcustomplot.cpp.
References columnCount(), elementAt(), mElements, and QCPLayout::releaseElement().
Referenced by take().
|
virtual |
Reimplemented from QCPLayout.
Definition at line 2793 of file qcustomplot.cpp.
References columnCount(), getMaximumRowColSizes(), getMinimumRowColSizes(), QCPLayout::getSectionSizes(), mColumnSpacing, mColumnStretchFactors, mElements, QCPLayoutElement::mRect, mRowSpacing, mRowStretchFactors, and rowCount().
|
protected |
Definition at line 812 of file qcustomplot.h.
Referenced by maximumSizeHint(), minimumSizeHint(), setColumnSpacing(), and updateLayout().
|
protected |
Definition at line 810 of file qcustomplot.h.
Referenced by expandTo(), insertColumn(), setColumnStretchFactor(), setColumnStretchFactors(), simplify(), and updateLayout().
|
protected |
Definition at line 809 of file qcustomplot.h.
Referenced by addElement(), columnCount(), element(), elementAt(), elements(), expandTo(), getMaximumRowColSizes(), getMinimumRowColSizes(), hasElement(), insertColumn(), insertRow(), rowCount(), simplify(), takeAt(), and updateLayout().
|
protected |
Definition at line 812 of file qcustomplot.h.
Referenced by maximumSizeHint(), minimumSizeHint(), setRowSpacing(), and updateLayout().
|
protected |
Definition at line 811 of file qcustomplot.h.
Referenced by expandTo(), insertRow(), setRowStretchFactor(), setRowStretchFactors(), simplify(), and updateLayout().
1.8.5