Diffstat (limited to 'noncore/apps/opie-sheet/sortdlg.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-sheet/sortdlg.h | 83 |
1 files changed, 52 insertions, 31 deletions
diff --git a/noncore/apps/opie-sheet/sortdlg.h b/noncore/apps/opie-sheet/sortdlg.h index b3699a9..5a1025e 100644 --- a/noncore/apps/opie-sheet/sortdlg.h +++ b/noncore/apps/opie-sheet/sortdlg.h | |||
@@ -1,59 +1,80 @@ | |||
1 | /*************************************************************************** | 1 | /* |
2 | * * | 2 | =. This file is part of the Opie Project |
3 | * This program is free software; you can redistribute it and/or modify * | 3 | .=l. Copyright (C) 2004 Opie Developer Team <opie-devel@handhelds.org> |
4 | * it under the terms of the GNU General Public License as published by * | 4 | .>+-= |
5 | * the Free Software Foundation; either version 2 of the License, or * | 5 | _;:, .> :=|. This program is free software; you can |
6 | * (at your option) any later version. * | 6 | .> <`_, > . <= redistribute it and/or modify it under |
7 | * * | 7 | :`=1 )Y*s>-.-- : the terms of the GNU General Public |
8 | ***************************************************************************/ | 8 | .="- .-=="i, .._ License as published by the Free Software |
9 | - . .-<_> .<> Foundation; either version 2 of the License, | ||
10 | ._= =} : or (at your option) any later version. | ||
11 | .%`+i> _;_. | ||
12 | .i_,=:_. -<s. This program is distributed in the hope that | ||
13 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | ||
14 | : .. .:, . . . without even the implied warranty of | ||
15 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | ||
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | ||
17 | ..}^=.= = ; Library General Public License for more | ||
18 | ++= -. .` .: details. | ||
19 | : = ...= . :.=- | ||
20 | -. .:....=;==+<; You should have received a copy of the GNU | ||
21 | -_. . . )=. = Library General Public License along with | ||
22 | -- :-=` this library; see the file COPYING.LIB. | ||
23 | If not, write to the Free Software Foundation, | ||
24 | Inc., 59 Temple Place - Suite 330, | ||
25 | Boston, MA 02111-1307, USA. | ||
26 | |||
27 | */ | ||
9 | 28 | ||
10 | /* | 29 | /* |
11 | * Opie Sheet (formerly Sheet/Qt) | 30 | * Opie Sheet (formerly Sheet/Qt) |
12 | * by Serdar Ozler <sozler@sitebest.com> | 31 | * by Serdar Ozler <sozler@sitebest.com> |
13 | */ | 32 | */ |
14 | 33 | ||
15 | #ifndef SORTDLG_H | 34 | #ifndef SORTDLG_H |
16 | #define SORTDLG_H | 35 | #define SORTDLG_H |
17 | 36 | ||
37 | #include "sheet.h" | ||
38 | |||
39 | /* QT */ | ||
18 | #include <qdialog.h> | 40 | #include <qdialog.h> |
19 | #include <qtabwidget.h> | 41 | #include <qtabwidget.h> |
20 | #include <qlayout.h> | 42 | #include <qlayout.h> |
21 | #include <qcombobox.h> | 43 | #include <qcombobox.h> |
22 | #include <qcheckbox.h> | 44 | #include <qcheckbox.h> |
23 | #include <qpushbutton.h> | 45 | #include <qpushbutton.h> |
24 | #include <qvbuttongroup.h> | 46 | #include <qvbuttongroup.h> |
25 | #include "sheet.h" | ||
26 | 47 | ||
27 | class SortDialog: public QDialog | 48 | class SortDialog: public QDialog |
28 | { | 49 | { |
29 | Q_OBJECT | 50 | Q_OBJECT |
30 | 51 | ||
31 | // QT objects | 52 | // QT objects |
32 | QBoxLayout *box; | 53 | QBoxLayout *box; |
33 | QTabWidget *tabs; | 54 | QTabWidget *tabs; |
34 | QWidget *widgetSort, *widgetOptions; | 55 | QWidget *widgetSort, *widgetOptions; |
35 | QVButtonGroup *groupOrderA, *groupOrderB, *groupOrderC, *groupDirection; | 56 | QVButtonGroup *groupOrderA, *groupOrderB, *groupOrderC, *groupDirection; |
36 | QCheckBox *checkCase; | 57 | QCheckBox *checkCase; |
37 | QComboBox *comboFieldA, *comboFieldB, *comboFieldC; | 58 | QComboBox *comboFieldA, *comboFieldB, *comboFieldC; |
38 | 59 | ||
39 | // Other objects & variables | 60 | // Other objects & variables |
40 | int row1, col1, row2, col2, direction; | 61 | int row1, col1, row2, col2, direction; |
41 | Sheet *sheet; | 62 | Sheet *sheet; |
42 | 63 | ||
43 | // Private functions | 64 | // Private functions |
44 | QVButtonGroup *createOrderButtons(int y); | 65 | QVButtonGroup *createOrderButtons(int y); |
45 | QComboBox *createFieldCombo(const QString &caption, int y); | 66 | QComboBox *createFieldCombo(const QString &caption, int y); |
46 | void fillFieldCombo(QComboBox *combo); | 67 | void fillFieldCombo(QComboBox *combo); |
47 | int compareItems(QTableItem *item1, QTableItem *item2, int descending=0, bool caseSensitive=TRUE); | 68 | int compareItems(QTableItem *item1, QTableItem *item2, int descending=0, bool caseSensitive=TRUE); |
48 | 69 | ||
49 | private slots: | 70 | private slots: |
50 | void directionChanged(int id); | 71 | void directionChanged(int id); |
51 | 72 | ||
52 | public: | 73 | public: |
53 | SortDialog(QWidget *parent=0); | 74 | SortDialog(QWidget *parent=0); |
54 | ~SortDialog(); | 75 | ~SortDialog(); |
55 | 76 | ||
56 | int exec(Sheet *s); | 77 | int exec(Sheet *s); |
57 | }; | 78 | }; |
58 | 79 | ||
59 | #endif | 80 | #endif |