mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-18 13:30:34 +01:00
Add function to have the possibility to sort the table.
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2014 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -172,3 +172,12 @@ void DiagramContextWidget::initLayout() {
|
|||||||
vlayout0 -> addWidget(table_);
|
vlayout0 -> addWidget(table_);
|
||||||
setLayout(vlayout0);
|
setLayout(vlayout0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Set Sorting on the table.
|
||||||
|
*/
|
||||||
|
void DiagramContextWidget::setSorting(bool enable, int column, Qt::SortOrder order ) {
|
||||||
|
table_ -> setSortingEnabled(enable);
|
||||||
|
table_ -> sortByColumn(column, order);
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ class DiagramContextWidget : public QWidget {
|
|||||||
DiagramContext context() const;
|
DiagramContext context() const;
|
||||||
void setContext(const DiagramContext &);
|
void setContext(const DiagramContext &);
|
||||||
int nameLessRowsCount() const;
|
int nameLessRowsCount() const;
|
||||||
|
void setSorting(bool enable, int column, Qt::SortOrder order );
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user