[qet] [2014] Add function to have the possibility to sort the table.

[ Thread Index | Date Index | More lists.tuxfamily.org/qet Archives ]


Revision: 2014
Author:   cfdev
Date:     2013-01-27 17:34:34 +0100 (Sun, 27 Jan 2013)
Log Message:
-----------
Add function to have the possibility to sort the table.

Modified Paths:
--------------
    trunk/sources/diagramcontextwidget.cpp
    trunk/sources/diagramcontextwidget.h

Modified: trunk/sources/diagramcontextwidget.cpp
===================================================================
--- trunk/sources/diagramcontextwidget.cpp	2013-01-27 15:48:14 UTC (rev 2013)
+++ trunk/sources/diagramcontextwidget.cpp	2013-01-27 16:34:34 UTC (rev 2014)
@@ -172,3 +172,12 @@
 	vlayout0 -> addWidget(table_);
 	setLayout(vlayout0);
 }
+
+/**
+	Set Sorting on the table.
+*/
+void DiagramContextWidget::setSorting(bool enable, int column, Qt::SortOrder order ) {
+	table_ -> setSortingEnabled(enable);
+	table_ -> sortByColumn(column, order);
+}
+

Modified: trunk/sources/diagramcontextwidget.h
===================================================================
--- trunk/sources/diagramcontextwidget.h	2013-01-27 15:48:14 UTC (rev 2013)
+++ trunk/sources/diagramcontextwidget.h	2013-01-27 16:34:34 UTC (rev 2014)
@@ -23,6 +23,7 @@
 	DiagramContext context() const;
 	void setContext(const DiagramContext &);
 	int nameLessRowsCount() const;
+	void setSorting(bool enable, int column, Qt::SortOrder order );
 	
 	signals:
 	


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/