QElectroTech
0.70
sources
titleblock
templatecellwidget.h
Go to the documentation of this file.
1
/*
2
Copyright 2006-2019 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_CELL_WIDGET_H
19
#define TITLEBLOCK_SLASH_TEMPLATE_CELL_WIDGET_H
20
#include <QtWidgets>
21
#include "
qet.h
"
22
class
ModifyTitleBlockCellCommand
;
23
class
TitleBlockTemplate
;
24
class
TitleBlockCell
;
25
class
NamesList
;
26
31
class
TitleBlockTemplateCellWidget
:
public
QWidget {
32
Q_OBJECT
33
34
// constructor, destructor
35
public
:
36
TitleBlockTemplateCellWidget
(
TitleBlockTemplate
* =
nullptr
, QWidget * =
nullptr
);
37
~TitleBlockTemplateCellWidget
()
override
;
38
private
:
39
TitleBlockTemplateCellWidget
(
const
TitleBlockTemplateCellWidget
&);
40
41
// attributes
42
private
:
44
bool
read_only_
;
45
QLabel *
cell_type_label_
;
46
QComboBox *
cell_type_input_
;
47
48
QLabel *
empty_label_
;
49
50
QLabel *
logo_label_
;
51
QComboBox *
logo_input_
;
52
QPushButton *
add_logo_input_
;
53
54
QLabel *
name_label_
;
55
QLineEdit *
name_input_
;
56
QCheckBox *
label_checkbox_
;
57
QLineEdit *
label_input_
;
58
QPushButton *
label_edit_
;
59
QLabel *
value_label_
;
60
QLineEdit *
value_input_
;
61
QPushButton *
value_edit_
;
62
QLabel *
align_label_
;
63
QLabel *
horiz_align_label_
;
64
QComboBox *
horiz_align_input_
;
65
QHash<int, int>
horiz_align_indexes_
;
66
QLabel *
vert_align_label_
;
67
QComboBox *
vert_align_input_
;
68
QHash<int, int>
vert_align_indexes_
;
69
QLabel *
font_size_label_
;
70
QSpinBox *
font_size_input_
;
71
QCheckBox *
font_adjust_input_
;
72
QVBoxLayout *
cell_editor_layout_
;
73
QHBoxLayout *
cell_editor_type_and_name_layout_
;
74
QGridLayout *
cell_editor_text_layout_
;
75
QHBoxLayout *
cell_editor_image_layout_
;
76
77
TitleBlockCell
*
edited_cell_
;
78
79
// methods
80
public
:
81
int
horizontalAlignment
()
const
;
82
int
verticalAlignment
()
const
;
83
int
alignment
()
const
;
84
bool
isReadOnly
()
const
;
85
86
protected
:
87
void
editTranslatableValue
(
NamesList
&,
const
QString &,
const
QString &)
const
;
88
void
emitModification
(
const
QString &,
const
QVariant &)
const
;
89
QString
defaultVariablesString
()
const
;
90
QString
labelValueInformationString
()
const
;
91
92
private
:
93
void
initWidgets
();
94
95
public
slots:
96
void
updateFormType
(
int
);
97
void
edit
(
TitleBlockCell
*);
98
void
editType
();
99
void
editName
();
100
void
editLabelDisplayed
();
101
void
editLabel
();
102
void
editValue
();
103
void
editAlignment
();
104
void
editFontSize
();
105
void
editAdjust
();
106
void
editLogo
();
107
void
updateLogosComboBox
(
const
TitleBlockTemplate
*);
108
void
setReadOnly
(
bool
);
109
110
private
slots:
111
112
113
signals:
114
void
logoEditionRequested
();
115
void
cellModified
(
ModifyTitleBlockCellCommand
*)
const
;
116
};
117
118
#endif
TitleBlockTemplateCellWidget::edited_cell_
TitleBlockCell * edited_cell_
Definition:
templatecellwidget.h:77
TitleBlockTemplateCellWidget::editAlignment
void editAlignment()
Definition:
templatecellwidget.cpp:268
TitleBlockTemplateCellWidget::initWidgets
void initWidgets()
Definition:
templatecellwidget.cpp:49
TitleBlockTemplateCellWidget::horiz_align_input_
QComboBox * horiz_align_input_
Definition:
templatecellwidget.h:64
TitleBlockTemplateCellWidget::editType
void editType()
Definition:
templatecellwidget.cpp:224
TitleBlockTemplateCellWidget::align_label_
QLabel * align_label_
Definition:
templatecellwidget.h:62
TitleBlockTemplateCellWidget::name_input_
QLineEdit * name_input_
Definition:
templatecellwidget.h:55
TitleBlockTemplateCellWidget::value_edit_
QPushButton * value_edit_
Definition:
templatecellwidget.h:61
TitleBlockTemplateCellWidget::add_logo_input_
QPushButton * add_logo_input_
Definition:
templatecellwidget.h:52
TitleBlockTemplateCellWidget::font_size_input_
QSpinBox * font_size_input_
Definition:
templatecellwidget.h:70
TitleBlockTemplateCellWidget::editAdjust
void editAdjust()
Definition:
templatecellwidget.cpp:284
TitleBlockTemplateCellWidget::emitModification
void emitModification(const QString &, const QVariant &) const
Definition:
templatecellwidget.cpp:403
TitleBlockTemplateCellWidget::cell_editor_type_and_name_layout_
QHBoxLayout * cell_editor_type_and_name_layout_
Definition:
templatecellwidget.h:73
TitleBlockTemplateCellWidget::value_label_
QLabel * value_label_
Definition:
templatecellwidget.h:59
TitleBlockTemplateCellWidget::horiz_align_indexes_
QHash< int, int > horiz_align_indexes_
Definition:
templatecellwidget.h:65
TitleBlockTemplateCellWidget::cell_editor_image_layout_
QHBoxLayout * cell_editor_image_layout_
Definition:
templatecellwidget.h:75
NamesList
Definition:
nameslist.h:29
TitleBlockTemplate
Definition:
titleblocktemplate.h:34
TitleBlockCell
Definition:
titleblockcell.h:26
TitleBlockTemplateCellWidget::cell_editor_layout_
QVBoxLayout * cell_editor_layout_
Definition:
templatecellwidget.h:72
TitleBlockTemplateCellWidget::logo_label_
QLabel * logo_label_
Definition:
templatecellwidget.h:50
TitleBlockTemplateCellWidget::empty_label_
QLabel * empty_label_
Definition:
templatecellwidget.h:48
TitleBlockTemplateCellWidget::label_checkbox_
QCheckBox * label_checkbox_
Definition:
templatecellwidget.h:56
TitleBlockTemplateCellWidget::vert_align_indexes_
QHash< int, int > vert_align_indexes_
Definition:
templatecellwidget.h:68
TitleBlockTemplateCellWidget::alignment
int alignment() const
Definition:
templatecellwidget.cpp:360
TitleBlockTemplateCellWidget::labelValueInformationString
QString labelValueInformationString() const
Definition:
templatecellwidget.cpp:454
TitleBlockTemplateCellWidget::font_size_label_
QLabel * font_size_label_
Definition:
templatecellwidget.h:69
TitleBlockTemplateCellWidget::logo_input_
QComboBox * logo_input_
Definition:
templatecellwidget.h:51
TitleBlockTemplateCellWidget::verticalAlignment
int verticalAlignment() const
Definition:
templatecellwidget.cpp:353
TitleBlockTemplateCellWidget::editLogo
void editLogo()
Definition:
templatecellwidget.cpp:292
ModifyTitleBlockCellCommand
Definition:
templatecommands.h:33
TitleBlockTemplateCellWidget::editLabel
void editLabel()
Definition:
templatecellwidget.cpp:248
TitleBlockTemplateCellWidget::editLabelDisplayed
void editLabelDisplayed()
Definition:
templatecellwidget.cpp:240
TitleBlockTemplateCellWidget::cell_editor_text_layout_
QGridLayout * cell_editor_text_layout_
Definition:
templatecellwidget.h:74
TitleBlockTemplateCellWidget::editValue
void editValue()
Definition:
templatecellwidget.cpp:258
TitleBlockTemplateCellWidget::vert_align_input_
QComboBox * vert_align_input_
Definition:
templatecellwidget.h:67
TitleBlockTemplateCellWidget::label_edit_
QPushButton * label_edit_
Definition:
templatecellwidget.h:58
TitleBlockTemplateCellWidget::vert_align_label_
QLabel * vert_align_label_
Definition:
templatecellwidget.h:66
TitleBlockTemplateCellWidget::name_label_
QLabel * name_label_
Definition:
templatecellwidget.h:54
qet.h
TitleBlockTemplateCellWidget::cell_type_input_
QComboBox * cell_type_input_
Definition:
templatecellwidget.h:46
TitleBlockTemplateCellWidget::label_input_
QLineEdit * label_input_
Definition:
templatecellwidget.h:57
TitleBlockTemplateCellWidget::edit
void edit(TitleBlockCell *)
Definition:
templatecellwidget.cpp:199
TitleBlockTemplateCellWidget::defaultVariablesString
QString defaultVariablesString() const
Definition:
templatecellwidget.cpp:422
TitleBlockTemplateCellWidget::isReadOnly
bool isReadOnly() const
Definition:
templatecellwidget.cpp:367
TitleBlockTemplateCellWidget::logoEditionRequested
void logoEditionRequested()
TitleBlockTemplateCellWidget::cell_type_label_
QLabel * cell_type_label_
Definition:
templatecellwidget.h:45
TitleBlockTemplateCellWidget::cellModified
void cellModified(ModifyTitleBlockCellCommand *) const
TitleBlockTemplateCellWidget::updateLogosComboBox
void updateLogosComboBox(const TitleBlockTemplate *)
Definition:
templatecellwidget.cpp:300
TitleBlockTemplateCellWidget::editFontSize
void editFontSize()
Definition:
templatecellwidget.cpp:276
TitleBlockTemplateCellWidget::updateFormType
void updateFormType(int)
Definition:
templatecellwidget.cpp:162
TitleBlockTemplateCellWidget::setReadOnly
void setReadOnly(bool)
Definition:
templatecellwidget.cpp:325
TitleBlockTemplateCellWidget::~TitleBlockTemplateCellWidget
~TitleBlockTemplateCellWidget() override
Definition:
templatecellwidget.cpp:43
TitleBlockTemplateCellWidget::value_input_
QLineEdit * value_input_
Definition:
templatecellwidget.h:60
TitleBlockTemplateCellWidget::TitleBlockTemplateCellWidget
TitleBlockTemplateCellWidget(TitleBlockTemplate *=nullptr, QWidget *=nullptr)
Definition:
templatecellwidget.cpp:32
TitleBlockTemplateCellWidget::horizontalAlignment
int horizontalAlignment() const
Definition:
templatecellwidget.cpp:345
TitleBlockTemplateCellWidget::horiz_align_label_
QLabel * horiz_align_label_
Definition:
templatecellwidget.h:63
TitleBlockTemplateCellWidget::editTranslatableValue
void editTranslatableValue(NamesList &, const QString &, const QString &) const
Definition:
templatecellwidget.cpp:379
TitleBlockTemplateCellWidget::editName
void editName()
Definition:
templatecellwidget.cpp:232
TitleBlockTemplateCellWidget::font_adjust_input_
QCheckBox * font_adjust_input_
Definition:
templatecellwidget.h:71
TitleBlockTemplateCellWidget::read_only_
bool read_only_
is the template read-only?
Definition:
templatecellwidget.h:44
TitleBlockTemplateCellWidget
Definition:
templatecellwidget.h:31
Generated by
1.8.15