00001
00002
00003
00004
00005
00006
00007 #ifndef KFTABDLG_H
00008 #define KFTABDLG_H
00009
00010 #include <tqtabwidget.h>
00011 #include <tqvalidator.h>
00012
00013 #include <kurl.h>
00014 #include <kmimetype.h>
00015
00016 #include "kdatecombo.h"
00017
00018 class TQButtonGroup;
00019 class TQPushButton;
00020 class TQRadioButton;
00021 class TQCheckBox;
00022 class TQLineEdit;
00023 class TQString;
00024 class TQDate;
00025 class TQRegExp;
00026 class TQDialog;
00027 class TQComboBox;
00028 class TQSpinBox;
00029
00030 class KfDirDialog;
00031
00032 class KfindTabWidget: public QTabWidget
00033 {
00034 Q_OBJECT
00035
00036 public:
00037 KfindTabWidget(TQWidget * parent = 0, const char *name=0);
00038 virtual ~KfindTabWidget();
00039 void initMimeTypes();
00040 void initSpecialMimeTypes();
00041 void setQuery(class KQuery * query);
00042 void setDefaults();
00043
00044 void beginSearch();
00045 void endSearch();
00046 void loadHistory();
00047 void saveHistory();
00048 bool isSearchRecursive();
00049
00050 void setURL( const KURL & url );
00051
00052 virtual TQSize sizeHint() const;
00053
00054 public slots:
00055 void setFocus();
00056
00057 private slots:
00058 void getDirectory();
00059 void fixLayout();
00060 void slotSizeBoxChanged(int);
00061 void slotEditRegExp();
00062
00063 signals:
00064 void startSearch();
00065
00066 protected:
00067 public:
00068 TQComboBox *nameBox;
00069 TQComboBox *dirBox;
00070
00071 TQCheckBox *subdirsCb;
00072 TQCheckBox *useLocateCb;
00073
00074 TQComboBox *typeBox;
00075 TQLineEdit * textEdit;
00076 TQCheckBox *caseSensCb;
00077 TQComboBox *m_usernameBox;
00078 TQComboBox *m_groupBox;
00079
00080 TQLineEdit *metainfoEdit;
00081 TQLineEdit *metainfokeyEdit;
00082
00083 private:
00084 bool isDateValid();
00085
00086 TQString date2String(const TQDate &);
00087 TQDate &string2Date(const TQString &, TQDate * );
00088
00089 TQWidget *pages[3];
00090
00091
00092 TQPushButton *browseB;
00093
00094 KfDirDialog *dirselector;
00095
00096
00097 TQCheckBox *findCreated;
00098 TQComboBox *betweenType;
00099 TQButtonGroup *bg;
00100 TQRadioButton *rb[2];
00101 KDateCombo * fromDate;
00102 KDateCombo * toDate;
00103 TQSpinBox *timeBox;
00104
00105
00106 TQComboBox *sizeBox;
00107 TQComboBox *sizeUnitBox;
00108 TQSpinBox *sizeEdit;
00109 TQCheckBox *caseContextCb;
00110 TQCheckBox *binaryContextCb;
00111 TQCheckBox *regexpContentCb;
00112 TQDialog *regExpDialog;
00113
00114 KURL m_url;
00115
00116 KMimeType::List m_types;
00117 TQStringList m_ImageTypes;
00118 TQStringList m_VideoTypes;
00119 TQStringList m_AudioTypes;
00120 };
00121
00122 class KDigitValidator : public QValidator
00123 {
00124 Q_OBJECT
00125
00126 public:
00127 KDigitValidator(TQWidget * parent, const char *name = 0 );
00128 ~KDigitValidator();
00129
00130 TQValidator::State validate(TQString & input, int &) const;
00131
00132 private:
00133 TQRegExp *r;
00134 };
00135
00136 #endif