QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
templatelogomanager.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 TITLEBLOCK_SLASH_TEMPLATE_LOGO_MANAGER
19#define TITLEBLOCK_SLASH_TEMPLATE_LOGO_MANAGER
20#include <QtWidgets>
22
27class TitleBlockTemplateLogoManager : public QWidget {
28 Q_OBJECT
29 // Constructor, destructor
30 public:
33
34 // methods
35 public:
36 QString currentLogo() const;
37 bool isReadOnly() const;
38 void setReadOnly(bool);
39
40 signals:
42
43 protected:
45
46 private:
47 void initWidgets();
48 void fillView();
49 QSize iconsize() const;
50 QString confirmLogoName(const QString &);
51
52 private slots:
53 void updateLogoInformations(QListWidgetItem *, QListWidgetItem *);
54 void addLogo();
55 void exportLogo();
56 void removeLogo();
57 void renameLogo();
58
59 // attributes
60 private:
62 QVBoxLayout *vlayout0_, *vlayout1_;
63 QHBoxLayout *hlayout0_, *hlayout1_;
64 QLabel *logos_label_;
65 QListWidget *logos_view_;
66 QPushButton *add_button_;
67 QPushButton *export_button_;
68 QPushButton *delete_button_;
69 QGroupBox *logo_box_;
71 QLineEdit *logo_name_;
72 QPushButton *rename_button_;
73 QLabel *logo_type_;
74 QDialogButtonBox *buttons_;
77};
78#endif
The TitleBlockTemplate class This class represents an title block template for an electric diagram....
Definition titleblocktemplate.h:37
Definition templatelogomanager.h:27
void logosChanged(const TitleBlockTemplate *)
QPushButton * export_button_
button to export an embedded logo
Definition templatelogomanager.h:67
void exportLogo()
Definition templatelogomanager.cpp:308
QPushButton * delete_button_
button to delete an embedded logo
Definition templatelogomanager.h:68
QString currentLogo() const
Definition templatelogomanager.cpp:49
QPushButton * add_button_
button to add a new logo
Definition templatelogomanager.h:66
QVBoxLayout * vlayout0_
Definition templatelogomanager.h:62
void setReadOnly(bool)
Definition templatelogomanager.cpp:390
QString confirmLogoName(const QString &)
Definition templatelogomanager.cpp:190
QLabel * logo_name_label_
"name:" label
Definition templatelogomanager.h:70
void emitLogosChangedSignal()
Definition templatelogomanager.cpp:71
void renameLogo()
Definition templatelogomanager.cpp:346
void removeLogo()
Definition templatelogomanager.cpp:332
QHBoxLayout * hlayout1_
horizontal layouts
Definition templatelogomanager.h:63
QDir open_dialog_dir_
last opened directory
Definition templatelogomanager.h:75
QLineEdit * logo_name_
current logo name
Definition templatelogomanager.h:71
QHBoxLayout * hlayout0_
Definition templatelogomanager.h:63
QListWidget * logos_view_
area showing the logos
Definition templatelogomanager.h:65
bool isReadOnly() const
Definition templatelogomanager.cpp:63
~TitleBlockTemplateLogoManager() override
Definition templatelogomanager.cpp:41
void initWidgets()
Definition templatelogomanager.cpp:79
QVBoxLayout * vlayout1_
vertical layouts
Definition templatelogomanager.h:62
QLabel * logo_type_
current logo type
Definition templatelogomanager.h:73
TitleBlockTemplate * managed_template_
title block template which this class manages logos
Definition templatelogomanager.h:61
void fillView()
Definition templatelogomanager.cpp:142
QSize iconsize() const
Definition templatelogomanager.cpp:177
QDialogButtonBox * buttons_
ok/cancel buttons
Definition templatelogomanager.h:74
void updateLogoInformations(QListWidgetItem *, QListWidgetItem *)
Definition templatelogomanager.cpp:256
QLabel * logos_label_
simple displayed label
Definition templatelogomanager.h:64
QGroupBox * logo_box_
current logo properties box
Definition templatelogomanager.h:69
QPushButton * rename_button_
button to rename the current logo
Definition templatelogomanager.h:72
void addLogo()
Definition templatelogomanager.cpp:275
bool read_only_
Whether this logo manager should allow logo edition (renaming, addition, deletion)
Definition templatelogomanager.h:76