QElectroTech  0.70
integrationmovetemplateshandler.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_INTEGRATION_MOVE_TEMPLATES_HANDLER_H
19 #define TITLEBLOCK_SLASH_INTEGRATION_MOVE_TEMPLATES_HANDLER_H
20 #include "movetemplateshandler.h"
21 #include <QtWidgets>
28  Q_OBJECT
29 
30  // constructors, destructor
31  public:
32  IntegrationMoveTitleBlockTemplatesHandler(QWidget * = nullptr);
34  private:
36 
37  // methods
38  public:
40  QET::Action errorWithATemplate(const TitleBlockTemplateLocation &, const QString &) override;
41  QString nameForRenamingOperation() override;
42 
43  private:
44  QString dateString() const;
47  void initDialog();
48  void radioButtonleftMargin(QRadioButton *);
49 
50  private slots:
51  void correctRadioButtons();
52 
53  // attributes
54  private:
55  QWidget *parent_widget_;
56  QString rename_;
57  QDialog *integ_dialog_;
58  QLabel *dialog_label_;
59  QVBoxLayout *dialog_vlayout_;
60  QGridLayout *dialog_glayout;
61  QDialogButtonBox *buttons_;
62  QRadioButton *use_existing_template_;
63  QRadioButton *integrate_new_template_;
64  QRadioButton *erase_template_;
65  /*
66  Radio button the user may click for the integrated template to be
67  automatically renamed in order to be stored along with the existing one.
68  */
69  QRadioButton *integrate_both_;
70  QButtonGroup *button_group1_;
71  QButtonGroup *button_group2_;
72 };
73 #endif
QRadioButton * use_existing_template_
Radio button the user may click to use the existing template and stop the integration.
QET::Action askUser(const TitleBlockTemplateLocation &, const TitleBlockTemplateLocation &)
Action
Definition: qet.h:125
QRadioButton * integrate_new_template_
Radio button the user may click to integrate the template.
QString newNameForTemplate(const TitleBlockTemplateLocation &)
QET::Action errorWithATemplate(const TitleBlockTemplateLocation &, const QString &) override
QRadioButton * erase_template_
Radio button the user may click for the integrated template to erase the existing one...
QDialog * integ_dialog_
Dialog in case of conflict when integrating a title block template.
QString rename_
Name to be used when renaming a title block template.
QET::Action templateAlreadyExists(const TitleBlockTemplateLocation &src, const TitleBlockTemplateLocation &dst) override
QWidget * parent_widget_
Widget used as parent to display dialogs.