00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 #ifndef SORTDLG_H
00035 #define SORTDLG_H
00036
00037 #include "sheet.h"
00038
00039
00040 #include <qdialog.h>
00041 #include <qtabwidget.h>
00042 #include <qlayout.h>
00043 #include <qcombobox.h>
00044 #include <qcheckbox.h>
00045 #include <qpushbutton.h>
00046 #include <qvbuttongroup.h>
00047
00048 class SortDialog: public QDialog
00049 {
00050 Q_OBJECT
00051
00052
00053 QBoxLayout *box;
00054 QTabWidget *tabs;
00055 QWidget *widgetSort, *widgetOptions;
00056 QVButtonGroup *groupOrderA, *groupOrderB, *groupOrderC, *groupDirection;
00057 QCheckBox *checkCase;
00058 QComboBox *comboFieldA, *comboFieldB, *comboFieldC;
00059
00060
00061 int row1, col1, row2, col2, direction;
00062 Sheet *sheet;
00063
00064
00065 QVButtonGroup *createOrderButtons(int y);
00066 QComboBox *createFieldCombo(const QString &caption, int y);
00067 void fillFieldCombo(QComboBox *combo);
00068 int compareItems(QTableItem *item1, QTableItem *item2, int descending=0, bool caseSensitive=TRUE);
00069
00070 private slots:
00071 void directionChanged(int id);
00072
00073 public:
00074 SortDialog(QWidget *parent=0);
00075 ~SortDialog();
00076
00077 int exec(Sheet *s);
00078 };
00079
00080 #endif