1 /*************************************************************************** 2 advancedfilterform.h - description 3 ------------------- 4 begin : 2009 5 copyright : (C) 2009 by Lalescu Liviu 6 email : Please see https://lalescu.ro/liviu/ for details about contacting Liviu Lalescu (in particular, you can find here the e-mail address) 7 ***************************************************************************/ 8 9 /*************************************************************************** 10 * * 11 * This program is free software: you can redistribute it and/or modify * 12 * it under the terms of the GNU Affero General Public License as * 13 * published by the Free Software Foundation, either version 3 of the * 14 * License, or (at your option) any later version. * 15 * * 16 ***************************************************************************/ 17 18 #ifndef ADVANCEDFILTERFORM_H 19 #define ADVANCEDFILTERFORM_H 20 21 #include <QtGlobal> 22 23 #if QT_VERSION >= QT_VERSION_CHECK(5,0,0) 24 #include <QtWidgets> 25 #else 26 #include <QtGui> 27 #endif 28 29 const int ADVANCED_FILTER_MAX_ROWS=8; 30 const int ADVANCED_FILTER_MIN_ROWS=1; 31 32 class AdvancedFilterForm : public QDialog { 33 Q_OBJECT 34 35 public: 36 int rows; 37 38 QRadioButton* allRadio; 39 QRadioButton* anyRadio; 40 41 QCheckBox* caseSensitiveCheckBox; 42 QHBoxLayout* caseSensitiveLayout; 43 44 QPushButton* morePushButton; 45 QPushButton* fewerPushButton; 46 QList<QComboBox*> descrDetDescrComboBoxList; 47 QList<QComboBox*> contNContReNReComboBoxList; 48 QList<QLineEdit*> textLineEditList; 49 QPushButton* resetPushButton; 50 QPushButton* okPushButton; 51 QPushButton* cancelPushButton; 52 53 QVBoxLayout* allAnyLayout; 54 55 QGridLayout* filtersLayout; 56 QHBoxLayout* moreFewerLayout; 57 QHBoxLayout* buttonsLayout; 58 59 QVBoxLayout* layout; 60 61 QString atts; 62 63 public: 64 AdvancedFilterForm(QWidget* parent, bool all, QList<int> descrDetDescr, QList<int> contNCont, QStringList text, bool caseSensitive, const QString& textToSettings); 65 ~AdvancedFilterForm(); 66 67 public slots: 68 void reset(); 69 void more(); 70 void fewer(); 71 }; 72 73 #endif 74