delay a few things on startup, such as setting the visibility mode, which ensures...
[personal-kdebase.git] / apps / kfind / kftabdlg.h
blob789d5ac4c8566b4a02e6364ecdc409db17fb728c
1 /***********************************************************************
3 * kftabdlg.h
5 ***********************************************************************/
7 #ifndef KFTABDLG_H
8 #define KFTABDLG_H
10 #include <QtGui/QTabWidget>
11 #include <QtGui/QValidator> // for KDigitValidator
13 #include <kurl.h>
14 #include <kmimetype.h>
16 #include "kdatecombo.h"
18 class QButtonGroup;
19 class QPushButton;
20 class QRadioButton;
21 class QCheckBox;
22 class QLineEdit;
23 class QString;
24 class QDate;
25 class QRegExp;
26 class QDialog;
27 class QComboBox;
28 class QSpinBox;
29 class QLabel;
30 class KLineEdit;
32 class KfDirDialog;
34 class KfindTabWidget: public QTabWidget
36 Q_OBJECT
38 public:
39 KfindTabWidget(QWidget * parent = 0);
40 virtual ~KfindTabWidget();
41 void initMimeTypes();
42 void initSpecialMimeTypes();
43 void setQuery(class KQuery * query);
44 void setDefaults();
46 void beginSearch();
47 void endSearch();
48 void loadHistory();
49 void saveHistory();
50 bool isSearchRecursive();
52 void setURL( const KUrl & url );
54 virtual QSize sizeHint() const;
56 public Q_SLOTS:
57 void setFocus();
59 private Q_SLOTS:
60 void getDirectory();
61 void fixLayout();
62 void slotSizeBoxChanged(int);
63 void slotEditRegExp();
65 Q_SIGNALS:
66 void startSearch();
68 protected:
69 public:
70 QComboBox *nameBox;
71 QComboBox *dirBox;
72 // for first page
73 QCheckBox *subdirsCb;
74 QCheckBox *useLocateCb;
75 // for third page
76 QComboBox *typeBox;
77 KLineEdit * textEdit;
78 QCheckBox *caseSensCb;
79 QComboBox *m_usernameBox;
80 QComboBox *m_groupBox;
81 //for fourth page
82 QLineEdit *metainfoEdit;
83 QLineEdit *metainfokeyEdit;
85 private:
86 bool isDateValid();
88 QString date2String(const QDate &);
89 QDate &string2Date(const QString &, QDate * );
91 QWidget *pages[3];
93 //1st page
94 QPushButton *browseB;
96 KfDirDialog *dirselector;
98 //2nd page
99 QCheckBox *findCreated;
100 QComboBox *betweenType;
101 QLabel *andL;
102 QButtonGroup *bg;
103 QRadioButton *rb[2];
104 KDateCombo * fromDate;
105 KDateCombo * toDate;
106 QSpinBox *timeBox;
108 //3rd page
109 QComboBox *sizeBox;
110 QComboBox *sizeUnitBox;
111 QSpinBox *sizeEdit;
112 QCheckBox *caseContextCb;
113 QCheckBox *binaryContextCb;
114 QCheckBox *regexpContentCb;
115 QDialog *regExpDialog;
117 KUrl m_url;
119 KMimeType::List m_types;
120 QStringList m_ImageTypes;
121 QStringList m_VideoTypes;
122 QStringList m_AudioTypes;
125 class KDigitValidator : public QValidator
127 Q_OBJECT
129 public:
130 KDigitValidator(QWidget * parent);
131 ~KDigitValidator();
133 QValidator::State validate(QString & input, int &) const;
135 private:
136 QRegExp *r;
139 #endif