1 /* 2 kftabdlg.h 3 4 SPDX-License-Identifier: GPL-2.0-or-later 5 6 */ 7 8 #ifndef KFTABDLG_H 9 #define KFTABDLG_H 10 11 #include <QMimeType> 12 #include <QTabWidget> 13 #include <QUrl> 14 15 class KUrlComboBox; 16 class QButtonGroup; 17 class QPushButton; 18 class QRadioButton; 19 class QCheckBox; 20 class KLineEdit; 21 class QString; 22 class QDate; 23 class KDateComboBox; 24 class KComboBox; 25 class QSpinBox; 26 class QLabel; 27 28 class KfDirDialog; 29 30 class KfindTabWidget : public QTabWidget 31 { 32 Q_OBJECT 33 34 public: 35 explicit KfindTabWidget(QWidget *parent = nullptr); 36 ~KfindTabWidget() override; 37 void setQuery(class KQuery *query); 38 void setDefaults(); 39 40 void beginSearch(); 41 void endSearch(); 42 void loadHistory(); 43 void saveHistory(); 44 bool isSearchRecursive(); 45 46 void setURL(const QUrl &url); 47 48 QSize sizeHint() const override; 49 50 public Q_SLOTS: 51 void setFocus(); 52 void slotUpdateDateLabelsForNumber(int value); 53 void slotUpdateDateLabelsForType(int index); 54 void slotUpdateByteComboBox(int value); 55 56 private Q_SLOTS: 57 void getDirectory(); 58 void fixLayout(); 59 void slotSizeBoxChanged(int); 60 61 Q_SIGNALS: 62 void startSearch(); 63 64 protected: 65 public: 66 KComboBox *nameBox; 67 KUrlComboBox *dirBox; 68 // for first page 69 QCheckBox *subdirsCb; 70 QCheckBox *useLocateCb; 71 QCheckBox *hiddenFilesCb; 72 // for third page 73 KComboBox *typeBox; 74 KLineEdit *textEdit; 75 QCheckBox *caseSensCb; 76 KComboBox *m_usernameBox; 77 KComboBox *m_groupBox; 78 //for fourth page 79 KLineEdit *metainfoEdit; 80 KLineEdit *metainfokeyEdit; 81 82 private: 83 bool isDateValid(); 84 void fillDirBox(); 85 86 void updateDateLabels(int type, int value); 87 88 QWidget *pages[3]; 89 90 //1st page 91 QPushButton *browseB; 92 93 KfDirDialog *dirselector; 94 95 //2nd page 96 QCheckBox *findCreated; 97 KComboBox *betweenType; 98 QLabel *andL; 99 QButtonGroup *bg; 100 QRadioButton *rb[2]; 101 KDateComboBox *fromDate; 102 KDateComboBox *toDate; 103 QSpinBox *timeBox; 104 105 //3rd page 106 KComboBox *sizeBox; 107 KComboBox *sizeUnitBox; 108 QSpinBox *sizeEdit; 109 QCheckBox *caseContextCb; 110 QCheckBox *binaryContextCb; 111 112 QUrl m_url; 113 114 QVector<QMimeType> m_types; 115 QStringList m_ImageTypes; 116 QStringList m_VideoTypes; 117 QStringList m_AudioTypes; 118 }; 119 120 #endif 121