QElectroTech  0.8-dev
addtabledialog.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 ADDTABLEDIALOG_H
19 #define ADDTABLEDIALOG_H
20 
21 #include <QDialog>
22 
23 #include "qetapp.h"
24 
25 namespace Ui {
26 class AddTableDialog;
27 }
28 
37 class AddTableDialog : public QDialog
38 {
39  Q_OBJECT
40 
41  public:
42  explicit AddTableDialog(QWidget *content_widget, QWidget *parent = nullptr);
44 
45  void setQueryWidget(QWidget *widget);
46  bool adjustTableToFolio() const;
47  bool addNewTableToNewDiagram() const;
48 
49  QString tableName() const;
50 
51  QMargins headerMargins() const;
52  Qt::Alignment headerAlignment() const;
53  QFont headerFont() const;
54 
55  QMargins tableMargins() const;
56  Qt::Alignment tableAlignment() const;
57  QFont tableFont() const;
58  QWidget *contentWidget() const;
59 
60  private slots:
65  void saveConfig();
66  void loadConfig();
67  void fillSavedQuery();
68 
69  private:
70  Ui::AddTableDialog *ui;
71 
72  QWidget *m_content_widget = nullptr;
73 
74  QMargins m_header_margins = QMargins(5,5,10,5),
75  m_table_margins = QMargins(5,5,10,5);
76 
79 
80  QString m_identifier;
81 
82 };
83 
84 #endif // ADDTABLEDIALOG_H
addtabledialog.h
marginseditdialog.h
ConfigSaveLoaderWidget::loadClicked
void loadClicked()
AddTableDialog::headerMargins
QMargins headerMargins() const
AddTableDialog::headerMargins.
Definition: addtabledialog.cpp:92
AddTableDialog
The AddTableDialog class Provide a dialog used to edit the properties of table befor adding to a diag...
Definition: addtabledialog.h:38
AddTableDialog::headerAlignment
Qt::Alignment headerAlignment() const
AddTableDialog::headerAlignment.
Definition: addtabledialog.cpp:100
AddTableDialog::m_header_margins
QMargins m_header_margins
Definition: addtabledialog.h:74
AddTableDialog::tableFont
QFont tableFont() const
AddTableDialog::tableFont.
Definition: addtabledialog.cpp:148
MarginsEditDialog::getMargins
static QMargins getMargins(QMargins margins=QMargins(), bool *accepted=nullptr, QWidget *parent=nullptr)
MarginsEditDialog::getMargins.
Definition: marginseditdialog.cpp:54
AddTableDialog::saveConfig
void saveConfig()
Definition: addtabledialog.cpp:193
AddTableDialog::tableMargins
QMargins tableMargins() const
AddTableDialog::tableMargins.
Definition: addtabledialog.cpp:124
AddTableDialog::on_m_edit_header_margins_pb_clicked
void on_m_edit_header_margins_pb_clicked()
Definition: addtabledialog.cpp:177
AddTableDialog::~AddTableDialog
~AddTableDialog()
AddTableDialog::~AddNomenclatureDialog.
Definition: addtabledialog.cpp:51
elementquerywidget.h
qetapp.h
AddTableDialog::on_m_table_font_pb_clicked
void on_m_table_font_pb_clicked()
Definition: addtabledialog.cpp:167
AddTableDialog::fillSavedQuery
void fillSavedQuery()
Definition: addtabledialog.cpp:288
AddTableDialog::on_m_table_margins_pb_clicked
void on_m_table_margins_pb_clicked()
Definition: addtabledialog.cpp:185
AddTableDialog::tableAlignment
Qt::Alignment tableAlignment() const
AddTableDialog::tableAlignment.
Definition: addtabledialog.cpp:132
AddTableDialog::headerFont
QFont headerFont() const
AddTableDialog::headerFont.
Definition: addtabledialog.cpp:116
QETUtils::marginsToString
QString marginsToString(const QMargins &margins)
QETUtils::marginsToString.
Definition: qetutils.cpp:27
AddTableDialog::m_identifier
QString m_identifier
Definition: addtabledialog.h:80
AddTableDialog::setQueryWidget
void setQueryWidget(QWidget *widget)
AddTableDialog::setQueryWidget Not implemented yet.
Definition: addtabledialog.cpp:60
AddTableDialog::m_header_font
QFont m_header_font
Definition: addtabledialog.h:77
QET::Icons::it
QIcon it
Definition: qeticons.cpp:196
Ui
Definition: autonumberingdockwidget.h:25
AddTableDialog::m_content_widget
QWidget * m_content_widget
Definition: addtabledialog.h:72
qetutils.h
QETUtils::marginsFromString
QMargins marginsFromString(const QString &string)
QETUtils::marginsFromString.
Definition: qetutils.cpp:46
AddTableDialog::ui
Ui::AddTableDialog * ui
Definition: addtabledialog.h:70
AddTableDialog::contentWidget
QWidget * contentWidget() const
Definition: addtabledialog.cpp:152
AddTableDialog::m_table_margins
QMargins m_table_margins
Definition: addtabledialog.h:75
AddTableDialog::tableName
QString tableName() const
AddTableDialog::tableName.
Definition: addtabledialog.cpp:84
QETApp::diagramTextsFont
static QFont diagramTextsFont(qreal=-1.0)
QETApp::diagramTextsFont The font to use By default the font is "sans Serif" and size 9.
Definition: qetapp.cpp:1111
AddTableDialog::on_m_header_font_pb_clicked
void on_m_header_font_pb_clicked()
Definition: addtabledialog.cpp:156
AddTableDialog::AddTableDialog
AddTableDialog(QWidget *content_widget, QWidget *parent=nullptr)
AddTableDialog::AddTableDialog.
Definition: addtabledialog.cpp:32
ConfigSaveLoaderWidget::saveClicked
void saveClicked()
AddTableDialog::addNewTableToNewDiagram
bool addNewTableToNewDiagram() const
AddTableDialog::addNewTableToNewDiagram.
Definition: addtabledialog.cpp:76
QET::Icons::tr
QIcon tr
Definition: qeticons.cpp:206
AddTableDialog::loadConfig
void loadConfig()
Definition: addtabledialog.cpp:233
AddTableDialog::adjustTableToFolio
bool adjustTableToFolio() const
AddTableDialog::adjustTableToFolio.
Definition: addtabledialog.cpp:68
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
AddTableDialog::m_table_font
QFont m_table_font
Definition: addtabledialog.h:78