qTox  Version: nightly | Commit: bc751c8e1cac455f9690654fcfe0f560d2d7dfdd
searchsettingsform.h
Go to the documentation of this file.
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 #pragma once
21 
22 #include <QWidget>
23 #include "src/widget/searchtypes.h"
24 
25 namespace Ui {
26 class SearchSettingsForm;
27 }
28 
29 class SearchSettingsForm : public QWidget
30 {
31  Q_OBJECT
32 
33 public:
34  explicit SearchSettingsForm(QWidget *parent = nullptr);
36 
38  void reloadTheme();
39 
40 private:
41  Ui::SearchSettingsForm *ui;
42  QDate startDate;
43  bool isUpdate{false};
44 
45  void updateStartDateLabel();
46  void setUpdate(const bool isUpdate);
47 
48 private slots:
49  void onStartSearchSelected(const int index);
50  void onRegisterClicked(const bool checked);
51  void onWordsOnlyClicked(const bool checked);
52  void onRegularClicked(const bool checked);
53  void onChoiceDate();
54 
55 signals:
56  void updateSettings(const bool isUpdate);
57 };
SearchSettingsForm::onWordsOnlyClicked
void onWordsOnlyClicked(const bool checked)
Definition: searchsettingsform.cpp:148
SearchSettingsForm::onChoiceDate
void onChoiceDate()
Definition: searchsettingsform.cpp:166
SearchSettingsForm::onStartSearchSelected
void onStartSearchSelected(const int index)
Definition: searchsettingsform.cpp:117
SearchSettingsForm::ui
Ui::SearchSettingsForm * ui
Definition: searchsettingsform.h:41
ParameterSearch
Definition: searchtypes.h:47
SearchSettingsForm::onRegularClicked
void onRegularClicked(const bool checked)
Definition: searchsettingsform.cpp:157
searchtypes.h
SearchSettingsForm::reloadTheme
void reloadTheme()
Definition: searchsettingsform.cpp:100
SearchSettingsForm::SearchSettingsForm
SearchSettingsForm(QWidget *parent=nullptr)
Definition: searchsettingsform.cpp:26
Ui
Definition: filetransferwidget.h:30
SearchSettingsForm::getParameterSearch
ParameterSearch getParameterSearch()
Definition: searchsettingsform.cpp:57
SearchSettingsForm::setUpdate
void setUpdate(const bool isUpdate)
Definition: searchsettingsform.cpp:111
SearchSettingsForm::isUpdate
bool isUpdate
Definition: searchsettingsform.h:43
SearchSettingsForm::onRegisterClicked
void onRegisterClicked(const bool checked)
Definition: searchsettingsform.cpp:142
SearchSettingsForm
Definition: searchsettingsform.h:29
SearchSettingsForm::updateStartDateLabel
void updateStartDateLabel()
Definition: searchsettingsform.cpp:106
SearchSettingsForm::startDate
QDate startDate
Definition: searchsettingsform.h:42
SearchSettingsForm::~SearchSettingsForm
~SearchSettingsForm()
Definition: searchsettingsform.cpp:52
SearchSettingsForm::updateSettings
void updateSettings(const bool isUpdate)