1 /* 2 Copyright © 2019 by The qTox Project Contributors 3 4 This file is part of qTox, a Qt-based graphical interface for Tox. 5 6 qTox is libre software: you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation, either version 3 of the License, or 9 (at your option) any later version. 10 11 qTox is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with qTox. If not, see <http://www.gnu.org/licenses/>. 18 */ 19 20 #ifndef SEARCHSETTINGSFORM_H 21 #define SEARCHSETTINGSFORM_H 22 23 #include <QWidget> 24 #include "src/widget/searchtypes.h" 25 26 namespace Ui { 27 class SearchSettingsForm; 28 } 29 30 class SearchSettingsForm : public QWidget 31 { 32 Q_OBJECT 33 34 public: 35 explicit SearchSettingsForm(QWidget *parent = nullptr); 36 ~SearchSettingsForm(); 37 38 ParameterSearch getParameterSearch(); 39 void reloadTheme(); 40 41 private: 42 Ui::SearchSettingsForm *ui; 43 QDate startDate; 44 bool isUpdate{false}; 45 46 void updateStartDateLabel(); 47 void setUpdate(const bool isUpdate); 48 49 private slots: 50 void onStartSearchSelected(const int index); 51 void onRegisterClicked(const bool checked); 52 void onWordsOnlyClicked(const bool checked); 53 void onRegularClicked(const bool checked); 54 void onChoiceDate(); 55 56 signals: 57 void updateSettings(const bool isUpdate); 58 }; 59 60 #endif // SEARCHSETTINGSFORM_H 61