QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
titleblockpropertieswidget.h
Go to the documentation of this file.
1/*
2 Copyright 2006-2024 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 TITLEBLOCKPROPERTIESWIDGET_H
19#define TITLEBLOCKPROPERTIESWIDGET_H
20
21#include "../autoNum/numerotationcontext.h"
22#include "../qet.h"
23#include "../qetproject.h"
24#include "../titleblockproperties.h"
26
27#include <QWidget>
28
30class QETProject;
31class QMenu;
33
34namespace Ui {
36}
37
38class TitleBlockPropertiesWidget : public QWidget
39{
40 Q_OBJECT
41
42 public:
44 const TitleBlockProperties &titleblock = TitleBlockProperties(),
45 bool current_date = false,
46 QETProject *project = nullptr,
47 QWidget *parent = nullptr);
49 TitleBlockTemplatesCollection *tbt_collection,
50 const TitleBlockProperties &titleblock = TitleBlockProperties(),
51 bool current_date = false,
52 QETProject *project = nullptr,
53 QWidget *parent = nullptr);
55 QList <TitleBlockTemplatesCollection *> tbt_collection,
56 const TitleBlockProperties &titleblock = TitleBlockProperties(),
57 bool current_date = false,
58 QETProject *project = nullptr,
59 QWidget *parent = nullptr);
61
64 TitleBlockProperties propertiesAutoNum(QString autoNum) const;
68 QString autoNum);
69
70 void setTitleBlockTemplatesVisible(const bool &visible);
71 void setReadOnly (const bool &ro);
72
73 private:
74 void addCollection (
75 TitleBlockTemplatesCollection *tbt_collection);
76 QString currentTitleBlockTemplateName () const;
77 void initDialog(const bool &current_date, QETProject *project);
78 int getIndexFor (const QString &tbt_name,
79 const QET::QetCollection collection) const;
80
81 private slots:
84 void updateTemplateList();
88
89 signals:
90 void set_auto_page_num() const;
91 void openAutoNumFolioEditor (QString);
92
93 private:
94 Ui::TitleBlockPropertiesWidget *ui;
97 QMenu *m_tbt_menu;
98 QList <TitleBlockTemplatesCollection *> m_tbt_collection_list;
99 QList <QET::QetCollection> m_map_index_to_collection_type;
100 QList <QString> keys_2;
101};
102
103#endif // TITLEBLOCKPROPERTIESWIDGET_H
Definition diagramcontextwidget.h:30
Definition numerotationcontext.h:31
Definition qetproject.h:62
Definition titleblockproperties.h:29
Definition titleblockpropertieswidget.h:39
void setReadOnly(const bool &ro)
TitleBlockPropertiesWidget::setReadOnly if true, this widget is disable.
Definition titleblockpropertieswidget.cpp:283
void on_m_edit_autofolionum_pb_clicked()
TitleBlockPropertiesWidget::on_m_edit_autofolionum_pb_clicked Open Auto Folio Num dialog.
Definition titleblockpropertieswidget.cpp:479
DiagramContextWidget * m_dcw
Definition titleblockpropertieswidget.h:95
void set_auto_page_num() const
QAction * m_tbt_edit
Definition titleblockpropertieswidget.h:96
TitleBlockTemplateLocation currentTitleBlockLocation() const
Definition titleblockpropertieswidget.cpp:253
TitleBlockProperties properties() const
TitleBlockPropertiesWidget::properties.
Definition titleblockpropertieswidget.cpp:172
void duplicateCurrentTitleBlockTemplate()
Definition titleblockpropertieswidget.cpp:390
void changeCurrentTitleBlockTemplate(int)
TitleBlockPropertiesWidget::changeCurrentTitleBlockTemplate Load the additional field of title block ...
Definition titleblockpropertieswidget.cpp:441
void initDialog(const bool &current_date, QETProject *project)
TitleBlockPropertiesWidget::initDialog Init this dialog.
Definition titleblockpropertieswidget.cpp:318
void editCurrentTitleBlockTemplate()
Definition titleblockpropertieswidget.cpp:385
QMenu * m_tbt_menu
Definition titleblockpropertieswidget.h:97
~TitleBlockPropertiesWidget() override
TitleBlockPropertiesWidget::~TitleBlockPropertiesWidget destructor.
Definition titleblockpropertieswidget.cpp:105
void setTitleBlockTemplatesVisible(const bool &visible)
TitleBlockPropertiesWidget::setTitleBlockTemplatesVisible if true, title block template combo box and...
Definition titleblockpropertieswidget.cpp:271
QString currentTitleBlockTemplateName() const
TitleBlockPropertiesWidget::currentTitleBlockTemplateName.
Definition titleblockpropertieswidget.cpp:291
void openAutoNumFolioEditor(QString)
void addCollection(TitleBlockTemplatesCollection *tbt_collection)
TitleBlockPropertiesWidget::addCollection add a collection of title block available in the combo box.
Definition titleblockpropertieswidget.cpp:304
int getIndexFor(const QString &tbt_name, const QET::QetCollection collection) const
TitleBlockPropertiesWidget::getIndexFor Find the index of the combo box for the title block tbt_name ...
Definition titleblockpropertieswidget.cpp:373
void on_m_date_now_pb_clicked()
TitleBlockPropertiesWidget::on_m_date_now_pb_clicked Set the date to current date.
Definition titleblockpropertieswidget.cpp:470
Ui::TitleBlockPropertiesWidget * ui
Definition titleblockpropertieswidget.h:94
QList< TitleBlockTemplatesCollection * > m_tbt_collection_list
Definition titleblockpropertieswidget.h:98
void setPropertiesWithAutoNum(const TitleBlockProperties &properties, QString autoNum)
void updateTemplateList()
TitleBlockPropertiesWidget::updateTemplateList Update the title block template list available in the ...
Definition titleblockpropertieswidget.cpp:399
void setProperties(const TitleBlockProperties &properties)
TitleBlockPropertiesWidget::setProperties.
Definition titleblockpropertieswidget.cpp:114
QAction * m_tbt_duplicate
Definition titleblockpropertieswidget.h:96
QList< QET::QetCollection > m_map_index_to_collection_type
Definition titleblockpropertieswidget.h:99
TitleBlockProperties propertiesAutoNum(QString autoNum) const
TitleBlockPropertiesWidget::properties.
Definition titleblockpropertieswidget.cpp:214
QList< QString > keys_2
Definition titleblockpropertieswidget.h:100
Definition templatelocation.h:29
Definition templatescollection.h:35
QetCollection
Enum used to specify the origin of a collection of thing (title block, element etc....
Definition qet.h:148
Definition autonumberingdockwidget.h:26