diff --git a/sources/titleblock/templatecellwidget.cpp b/sources/titleblock/templatecellwidget.cpp index a5147444c..e8a02683f 100644 --- a/sources/titleblock/templatecellwidget.cpp +++ b/sources/titleblock/templatecellwidget.cpp @@ -59,7 +59,7 @@ void TitleBlockTemplateCellWidget::initWidgets() { name_input_ = new QLineEdit(); // widgets specific to empty cells - empty_label_ = new QLabel(tr("Attention : les bordures des cellules vides n'apparaissent pas lors du rendu final sur le folio.")); + empty_label_ = new QLabel(tr("Attention : les bordures des cellules vides n'apparaissent pas lors du rendu final sur le folio.")); // widgets specific to logo cells logo_label_ = new QLabel(tr("Logo")); diff --git a/sources/titleblock/templatecellwidget.h b/sources/titleblock/templatecellwidget.h index 18d40de2f..5a1f7762e 100644 --- a/sources/titleblock/templatecellwidget.h +++ b/sources/titleblock/templatecellwidget.h @@ -25,6 +25,7 @@ class TitleBlockCell; class NamesList; /** + @brief The TitleBlockTemplateCellWidget class This class implements an edition widget for cells that compose a title block template. */ @@ -33,86 +34,91 @@ class TitleBlockTemplateCellWidget : public QWidget { // constructor, destructor public: - TitleBlockTemplateCellWidget(TitleBlockTemplate * = nullptr, QWidget * = nullptr); - ~TitleBlockTemplateCellWidget() override; + TitleBlockTemplateCellWidget(TitleBlockTemplate * = nullptr, + QWidget * = nullptr); + ~TitleBlockTemplateCellWidget() override; private: - TitleBlockTemplateCellWidget(const TitleBlockTemplateCellWidget &); + TitleBlockTemplateCellWidget( + const TitleBlockTemplateCellWidget &); // attributes private: - /// is the template read-only? - bool read_only_; - QLabel *cell_type_label_; - QComboBox *cell_type_input_; - - QLabel *empty_label_; - - QLabel *logo_label_; - QComboBox *logo_input_; - QPushButton *add_logo_input_; - - QLabel *name_label_; - QLineEdit *name_input_; - QCheckBox *label_checkbox_; - QLineEdit *label_input_; - QPushButton *label_edit_; - QLabel *value_label_; - QLineEdit *value_input_; - QPushButton *value_edit_; - QLabel *align_label_; - QLabel *horiz_align_label_; - QComboBox *horiz_align_input_; - QHash horiz_align_indexes_; - QLabel *vert_align_label_; - QComboBox *vert_align_input_; - QHash vert_align_indexes_; - QLabel *font_size_label_; - QSpinBox *font_size_input_; - QCheckBox *font_adjust_input_; - QVBoxLayout *cell_editor_layout_; - QHBoxLayout *cell_editor_type_and_name_layout_; - QGridLayout *cell_editor_text_layout_; - QHBoxLayout *cell_editor_image_layout_; - - TitleBlockCell *edited_cell_; + /// is the template read-only? + bool read_only_; + QLabel *cell_type_label_; + QComboBox *cell_type_input_; + + QLabel *empty_label_; + + QLabel *logo_label_; + QComboBox *logo_input_; + QPushButton *add_logo_input_; + + QLabel *name_label_; + QLineEdit *name_input_; + QCheckBox *label_checkbox_; + QLineEdit *label_input_; + QPushButton *label_edit_; + QLabel *value_label_; + QLineEdit *value_input_; + QPushButton *value_edit_; + QLabel *align_label_; + QLabel *horiz_align_label_; + QComboBox *horiz_align_input_; + QHash horiz_align_indexes_; + QLabel *vert_align_label_; + QComboBox *vert_align_input_; + QHash vert_align_indexes_; + QLabel *font_size_label_; + QSpinBox *font_size_input_; + QCheckBox *font_adjust_input_; + QVBoxLayout *cell_editor_layout_; + QHBoxLayout *cell_editor_type_and_name_layout_; + QGridLayout *cell_editor_text_layout_; + QHBoxLayout *cell_editor_image_layout_; + + TitleBlockCell *edited_cell_; // methods public: - int horizontalAlignment() const; - int verticalAlignment() const; - int alignment() const; - bool isReadOnly() const; + int horizontalAlignment() const; + int verticalAlignment() const; + int alignment() const; + bool isReadOnly() const; protected: - void editTranslatableValue(NamesList &, const QString &, const QString &) const; - void emitModification(const QString &, const QVariant &) const; - QString defaultVariablesString() const; - QString labelValueInformationString() const; + void editTranslatableValue(NamesList &, + const QString &, + const QString &) const; + void emitModification(const QString &, + const QVariant &) const; + QString defaultVariablesString() const; + QString labelValueInformationString() const; private: - void initWidgets(); + void initWidgets(); public slots: - void updateFormType(int); - void edit(TitleBlockCell *); - void editType(); - void editName(); - void editLabelDisplayed(); - void editLabel(); - void editValue(); - void editAlignment(); - void editFontSize(); - void editAdjust(); - void editLogo(); - void updateLogosComboBox(const TitleBlockTemplate *); - void setReadOnly(bool); + void updateFormType(int); + void edit(TitleBlockCell *); + void editType(); + void editName(); + void editLabelDisplayed(); + void editLabel(); + void editValue(); + void editAlignment(); + void editFontSize(); + void editAdjust(); + void editLogo(); + void updateLogosComboBox(const TitleBlockTemplate *); + void setReadOnly(bool); private slots: signals: - void logoEditionRequested(); - void cellModified(ModifyTitleBlockCellCommand *) const; + void logoEditionRequested(); + void cellModified(ModifyTitleBlockCellCommand *) const; }; #endif diff --git a/sources/titleblock/templateview.cpp b/sources/titleblock/templateview.cpp index 773a6c0d7..dc5d6cf94 100644 --- a/sources/titleblock/templateview.cpp +++ b/sources/titleblock/templateview.cpp @@ -422,7 +422,7 @@ void TitleBlockTemplateView::drawBackground(QPainter *painter, const QRectF &rec @return the selected logical cells, not including the spanned ones. */ QList TitleBlockTemplateView::selectedCells() const { - return(selectedCellsSet().cells(false).values()); + return(selectedCellsSet().cells(false).values()); } /**