QElectroTech  0.8-dev
summaryquerywidget.h
Go to the documentation of this file.
1 /*
2  Copyright 2006-2020 The QElectroTech Team
3  This file is part of QElectroTech.
4 
5  QElectroTech is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 2 of the License, or
8  (at your option) any later version.
9 
10  QElectroTech is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
17 */
18 #ifndef SUMMARYQUERYWIDGET_H
19 #define SUMMARYQUERYWIDGET_H
20 
21 #include <QWidget>
22 
23 class QListWidgetItem;
24 
25 namespace Ui {
26 class SummaryQueryWidget;
27 }
28 
29 class SummaryQueryWidget : public QWidget
30 {
31  Q_OBJECT
32 
33  public:
34  explicit SummaryQueryWidget(QWidget *parent = nullptr);
36 
37  static QString modelIdentifier() {return "summary";}
38  QString queryStr() const;
39  void setQuery(const QString &query);
40 
41  private:
42  void setUpItems();
43  void fillSavedQuery();
44  void updateQueryLine();
45  QStringList selectedKeys() const;
46 
47  private slots:
48  void on_m_available_list_itemDoubleClicked(QListWidgetItem *item);
49  void on_m_choosen_list_itemDoubleClicked(QListWidgetItem *item);
50  void on_m_up_pb_clicked();
51  void on_m_add_pb_clicked();
53  void on_m_down_pb_clicked();
55  void reset();
56  void saveConfig();
57  void loadConfig();
58 
59  private:
60  Ui::SummaryQueryWidget *ui;
61  QList <QListWidgetItem *> m_items_list;
62  QString m_custom_query;
63 };
64 
65 #endif // SUMMARYQUERYWIDGET_H
SummaryQueryWidget::selectedKeys
QStringList selectedKeys() const
SummaryQueryWidget::selectedKeys.
Definition: summaryquerywidget.cpp:164
ConfigSaveLoaderWidget::loadClicked
void loadClicked()
SummaryQueryWidget::on_m_down_pb_clicked
void on_m_down_pb_clicked()
SummaryQueryWidget::on_m_down_pb_clicked.
Definition: summaryquerywidget.cpp:242
SummaryQueryWidget::setUpItems
void setUpItems()
SummaryQueryWidget::setUpItems.
Definition: summaryquerywidget.cpp:119
QETApp::diagramTranslatedInfoKey
static QString diagramTranslatedInfoKey(const QString &key)
QETApp::diagramTranslatedInfoKey.
Definition: qetapp.cpp:502
SummaryQueryWidget::fillSavedQuery
void fillSavedQuery()
SummaryQueryWidget::fillSavedQuery Fill the combo box of the saved query.
Definition: summaryquerywidget.cpp:139
SummaryQueryWidget::m_items_list
QList< QListWidgetItem * > m_items_list
Definition: summaryquerywidget.h:61
SummaryQueryWidget::m_custom_query
QString m_custom_query
Definition: summaryquerywidget.h:62
SummaryQueryWidget::reset
void reset()
SummaryQueryWidget::reset Clear this widget aka set to initial state.
Definition: summaryquerywidget.cpp:279
summaryquerywidget.h
qetapp.h
SummaryQueryWidget::queryStr
QString queryStr() const
SummaryQueryWidget::queryStr.
Definition: summaryquerywidget.cpp:53
SummaryQueryWidget::ui
Ui::SummaryQueryWidget * ui
Definition: summaryquerywidget.h:60
SummaryQueryWidget::on_m_remove_pb_clicked
void on_m_remove_pb_clicked()
SummaryQueryWidget::on_m_remove_pb_clicked.
Definition: summaryquerywidget.cpp:230
SummaryQueryWidget
Definition: summaryquerywidget.h:30
QETApp::diagramInfoKeys
static QStringList diagramInfoKeys()
QETApp::diagramInfoKeys.
Definition: qetapp.cpp:480
SummaryQueryWidget::on_m_available_list_itemDoubleClicked
void on_m_available_list_itemDoubleClicked(QListWidgetItem *item)
SummaryQueryWidget::on_m_available_list_itemDoubleClicked.
Definition: summaryquerywidget.cpp:182
SummaryQueryWidget::saveConfig
void saveConfig()
SummaryQueryWidget::saveConfig.
Definition: summaryquerywidget.cpp:291
QET::Icons::it
QIcon it
Definition: qeticons.cpp:196
Ui
Definition: autonumberingdockwidget.h:25
SummaryQueryWidget::on_m_edit_sql_query_cb_clicked
void on_m_edit_sql_query_cb_clicked()
SummaryQueryWidget::on_m_edit_sql_query_cb_clicked.
Definition: summaryquerywidget.cpp:259
SummaryQueryWidget::on_m_up_pb_clicked
void on_m_up_pb_clicked()
SummaryQueryWidget::on_m_up_pb_clicked.
Definition: summaryquerywidget.cpp:201
SummaryQueryWidget::on_m_choosen_list_itemDoubleClicked
void on_m_choosen_list_itemDoubleClicked(QListWidgetItem *item)
SummaryQueryWidget::on_m_choosen_list_itemDoubleClicked.
Definition: summaryquerywidget.cpp:192
SummaryQueryWidget::on_m_add_pb_clicked
void on_m_add_pb_clicked()
SummaryQueryWidget::on_m_add_pb_clicked.
Definition: summaryquerywidget.cpp:218
SummaryQueryWidget::modelIdentifier
static QString modelIdentifier()
Definition: summaryquerywidget.h:37
SummaryQueryWidget::~SummaryQueryWidget
~SummaryQueryWidget()
SummaryQueryWidget::~SummaryQueryWidget.
Definition: summaryquerywidget.cpp:44
SummaryQueryWidget::updateQueryLine
void updateQueryLine()
SummaryQueryWidget::updateQueryLine.
Definition: summaryquerywidget.cpp:156
ConfigSaveLoaderWidget::saveClicked
void saveClicked()
SummaryQueryWidget::SummaryQueryWidget
SummaryQueryWidget(QWidget *parent=nullptr)
SummaryQueryWidget::SummaryQueryWidget.
Definition: summaryquerywidget.cpp:28
QET::Icons::tr
QIcon tr
Definition: qeticons.cpp:206
SummaryQueryWidget::loadConfig
void loadConfig()
SummaryQueryWidget::loadConfig.
Definition: summaryquerywidget.cpp:321
SummaryQueryWidget::setQuery
void setQuery(const QString &query)
SummaryQueryWidget::setQuery.
Definition: summaryquerywidget.cpp:88
QETApp::configDir
static QString configDir()
QETApp::configDir Return the QET configuration folder, i.e. the path to the folder in which QET will ...
Definition: qetapp.cpp:805