QElectroTech  0.8-dev
replacefoliowidget.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 REPLACEFOLIOWIDGET_H
19 #define REPLACEFOLIOWIDGET_H
20 
21 #include <QWidget>
22 #include <QDialog>
23 
24 #include "diagramcontext.h"
25 #include "titleblockproperties.h"
26 
28 class QDialogButtonBox;
29 
30 namespace Ui {
31  class ReplaceFolioWidget;
32 }
33 
34 class ReplaceFolioWidget : public QWidget
35 {
36  Q_OBJECT
37 
38  public:
39  explicit ReplaceFolioWidget(QWidget *parent = nullptr);
41 
43  void setTitleBlockProperties (const TitleBlockProperties &properties);
44 
45  private slots:
46  void on_m_title_cb_clicked();
48  void on_m_file_cb_clicked();
49  void on_m_folio_cb_clicked();
50  void on_m_plant_cb_clicked();
51  void on_m_loc_cb_clicked();
53 
54  private:
55  Ui::ReplaceFolioWidget *ui;
57 
58 };
59 
60 class ReplaceFolioDialog : public QDialog
61 {
62  Q_OBJECT
63 
64  public:
65  ReplaceFolioDialog(QWidget *parent = nullptr);
67 
69  void setTitleBlockProperties (const TitleBlockProperties &properties);
70 
71  private:
73  QDialogButtonBox *m_button_box = nullptr;
74 };
75 
76 #endif // REPLACEFOLIOWIDGET_H
ReplaceFolioWidget::m_diagram_context_widget
DiagramContextWidget * m_diagram_context_widget
Definition: replacefoliowidget.h:56
ReplaceFolioDialog::m_widget
ReplaceFolioWidget * m_widget
Definition: replacefoliowidget.h:72
DiagramContextWidget::setContext
void setContext(const DiagramContext &context)
DiagramContextWidget::setContext Load the content from context into this widget.
Definition: diagramcontextwidget.cpp:67
ReplaceFolioDialog::~ReplaceFolioDialog
~ReplaceFolioDialog()
Definition: replacefoliowidget.cpp:136
titleblockproperties.h
ReplaceFolioWidget::on_m_plant_cb_clicked
void on_m_plant_cb_clicked()
Definition: replacefoliowidget.cpp:183
ReplaceFolioWidget::on_m_file_cb_clicked
void on_m_file_cb_clicked()
Definition: replacefoliowidget.cpp:169
ReplaceFolioWidget::on_m_folio_cb_clicked
void on_m_folio_cb_clicked()
Definition: replacefoliowidget.cpp:176
SearchAndReplaceWorker::eraseText
static QString eraseText()
Definition: searchandreplaceworker.h:72
ReplaceFolioDialog
Definition: replacefoliowidget.h:61
TitleBlockProperties::date
QDate date
Date (displayed by the default template)
Definition: titleblockproperties.h:56
ReplaceFolioDialog::ReplaceFolioDialog
ReplaceFolioDialog(QWidget *parent=nullptr)
Definition: replacefoliowidget.cpp:117
TitleBlockProperties::context
DiagramContext context
Container for the additional, user-defined fields.
Definition: titleblockproperties.h:66
replacefoliowidget.h
TitleBlockProperties::title
QString title
Folio title (displayed by the default template)
Definition: titleblockproperties.h:54
DiagramContextWidget
Definition: diagramcontextwidget.h:29
TitleBlockProperties
Definition: titleblockproperties.h:29
DiagramContextWidget::context
DiagramContext context() const
DiagramContextWidget::context.
Definition: diagramcontextwidget.cpp:38
TitleBlockProperties::locmach
QString locmach
Location(displayed by the default template)
Definition: titleblockproperties.h:59
ReplaceFolioWidget::ui
Ui::ReplaceFolioWidget * ui
Definition: replacefoliowidget.h:55
TitleBlockProperties::plant
QString plant
Plant (displayed by the default template)
Definition: titleblockproperties.h:58
ReplaceFolioWidget::~ReplaceFolioWidget
~ReplaceFolioWidget()
Definition: replacefoliowidget.cpp:36
ReplaceFolioWidget
Definition: replacefoliowidget.h:35
TitleBlockProperties::filename
QString filename
Filename (displayed by the default template)
Definition: titleblockproperties.h:57
ReplaceFolioWidget::setTitleBlockProperties
void setTitleBlockProperties(const TitleBlockProperties &properties)
ReplaceFolioWidget::setTitleBlockProperties Set the title block properties edited by this widget.
Definition: replacefoliowidget.cpp:78
SearchAndReplaceWorker
The SearchAndReplaceWorker class This class is the worker use to change properties when use the searc...
Definition: searchandreplaceworker.h:52
ReplaceFolioWidget::ReplaceFolioWidget
ReplaceFolioWidget(QWidget *parent=nullptr)
Definition: replacefoliowidget.cpp:27
Ui
Definition: autonumberingdockwidget.h:25
SearchAndReplaceWorker::eraseDate
static QDate eraseDate()
Definition: searchandreplaceworker.h:74
ReplaceFolioDialog::setTitleBlockProperties
void setTitleBlockProperties(const TitleBlockProperties &properties)
ReplaceFolioDialog::setTitleBlockProperties.
Definition: replacefoliowidget.cpp:151
ReplaceFolioWidget::on_m_loc_cb_clicked
void on_m_loc_cb_clicked()
Definition: replacefoliowidget.cpp:190
TitleBlockProperties::author
QString author
Author of the diagram/folio (displayed by the default template)
Definition: titleblockproperties.h:55
diagramcontextwidget.h
ReplaceFolioWidget::on_m_author_cb_clicked
void on_m_author_cb_clicked()
Definition: replacefoliowidget.cpp:162
TitleBlockProperties::useDate
DateManagement useDate
Wheter to use the date attribute.
Definition: titleblockproperties.h:64
ReplaceFolioWidget::on_m_title_cb_clicked
void on_m_title_cb_clicked()
Definition: replacefoliowidget.cpp:155
diagramcontext.h
searchandreplaceworker.h
ReplaceFolioWidget::titleBlockProperties
TitleBlockProperties titleBlockProperties() const
ReplaceFolioWidget::titleBlockProperties.
Definition: replacefoliowidget.cpp:45
TitleBlockProperties::indexrev
QString indexrev
Revision Index (displayed by the default template)
Definition: titleblockproperties.h:60
ReplaceFolioDialog::titleBlockProperties
TitleBlockProperties titleBlockProperties() const
ReplaceFolioDialog::titleBlockProperties.
Definition: replacefoliowidget.cpp:143
sarw
SearchAndReplaceWorker sarw
Definition: replacefoliowidget.cpp:25
ReplaceFolioDialog::m_button_box
QDialogButtonBox * m_button_box
Definition: replacefoliowidget.h:73
TitleBlockProperties::folio
QString folio
Folio information (displayed by the default template)
Definition: titleblockproperties.h:62
SearchAndReplaceWorker::setupLineEdit
static void setupLineEdit(QLineEdit *l, QCheckBox *cb, QString str)
SearchAndReplaceWorker::setupLineEdit With search and replace, when the variable to edit is a text,...
Definition: searchandreplaceworker.cpp:371
QET::Icons::Cancel
QIcon Cancel
Definition: qeticons.cpp:34
TitleBlockProperties::UseDateValue
@ UseDateValue
use the date attribute
Definition: titleblockproperties.h:35
ReplaceFolioWidget::on_m_indice_cb_clicked
void on_m_indice_cb_clicked()
Definition: replacefoliowidget.cpp:197
TitleBlockProperties::CurrentDate
@ CurrentDate
use the current date
Definition: titleblockproperties.h:36