summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-sheet/sortdlg.h
Side-by-side diff
Diffstat (limited to 'noncore/apps/opie-sheet/sortdlg.h') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-sheet/sortdlg.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/noncore/apps/opie-sheet/sortdlg.h b/noncore/apps/opie-sheet/sortdlg.h
new file mode 100644
index 0000000..2c99f02
--- a/dev/null
+++ b/noncore/apps/opie-sheet/sortdlg.h
@@ -0,0 +1,45 @@
+#ifndef SORTDLG_H
+#define SORTDLG_H
+
+#include <qdialog.h>
+#include <qtabwidget.h>
+#include <qlayout.h>
+#include <qcombobox.h>
+#include <qcheckbox.h>
+#include <qpushbutton.h>
+#include <qvbuttongroup.h>
+#include "sheet.h"
+
+class SortDialog: public QDialog
+{
+ Q_OBJECT
+
+ // QT objects
+ QBoxLayout *box;
+ QTabWidget *tabs;
+ QWidget *widgetSort, *widgetOptions;
+ QVButtonGroup *groupOrderA, *groupOrderB, *groupOrderC, *groupDirection;
+ QCheckBox *checkCase;
+ QComboBox *comboFieldA, *comboFieldB, *comboFieldC;
+
+ // Other objects & variables
+ int row1, col1, row2, col2, direction;
+ Sheet *sheet;
+
+ // Private functions
+ QVButtonGroup *createOrderButtons(int y);
+ QComboBox *createFieldCombo(const QString &caption, int y);
+ void fillFieldCombo(QComboBox *combo);
+ int compareItems(QTableItem *item1, QTableItem *item2, int descending=0, bool caseSensitive=TRUE);
+
+ private slots:
+ void directionChanged(int id);
+
+ public:
+ SortDialog(QWidget *parent=0);
+ ~SortDialog();
+
+ int exec(Sheet *s);
+};
+
+#endif