Workspace 6.21.5
|
Tree widget that supports sorting by clicking on a column header as well as dragging items from row to row. More...
#include <Workspace/Presentation/sortondemandtreewidget.h>
Signals | |
void | itemMoved (int, int) |
void | itemsMoved (QList< int >, QList< int >) |
void | modified () |
Public Member Functions | |
SortOnDemandTreeWidget (QWidget *parent=nullptr) | |
int | rowHeight (int row) const |
Returns the current height of the nominated row. | |
void | setDragPixmap (const QPixmap &pixmap) |
Sets pixmap as the pixmap used to represent the data in a drag and drop operation. | |
void | setNoEditColumnList (QList< int > noEditColumnList) |
A list of columns that should be read-only, others will be editable by default. | |
void | setSortableColumnList (QList< int > sortableColumnList) |
a list of columns that should be sorted alphabetically when the user clicks on the column header | |
void | setSortingOnDemandEnabled (bool value) |
Protected Slots | |
void | customSortByColumn (int column) |
Protected Member Functions | |
void | dragEnterEvent (QDragEnterEvent *event) override |
void | dropEvent (QDropEvent *event) override |
void | startDrag (Qt::DropActions supportedActions) override |
Drag drop support is limited to passsing data types supported by the tree-widget default handlers. To pass pointers as user data, use reinterpret_cast to pass them as uLongLong, for example:
SortOnDemandTreeWidget | ( | QWidget * | parent = nullptr | ) |
|
protectedslot |
Sorts the data alphabetically by the text in the given row.
Returns without sorting if the column is not in sortableColumnList_ **
|
overrideprotected |
|
overrideprotected |
|
signal |
|
signal |
|
signal |
int rowHeight | ( | int | row | ) | const |
void setDragPixmap | ( | const QPixmap & | pixmap | ) |
void setNoEditColumnList | ( | QList< int > | noEditColumnList | ) |
void setSortableColumnList | ( | QList< int > | sortableColumnList | ) |
void setSortingOnDemandEnabled | ( | bool | value | ) |
Enables sorting by clicking on the column header Initially false. Set this to true once the tree has been populated. If this is true during the widget creation process then the the list will be sorted automatically before the user has a chance to look at it **
|
overrideprotected |