QElectroTech  0.8-dev
templatelocationsaver.h
Go to the documentation of this file.
1 /*
2  Copyright 2006-2020 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_LOCATION_SAVER_H
19 #define TITLEBLOCK_SLASH_LOCATION_SAVER_H
20 #include <QtWidgets>
22 class TitleBlockTemplateCollection;
23 
31  Q_OBJECT
32  // Constructor, destructor
33  public:
35  QWidget * = nullptr);
37  private:
39 
40  // methods
41  QString name() const override;
42  void setLocation(const TitleBlockTemplateLocation &) override;
43 
44  private:
45  void init();
46 
47  // slots
48  protected slots:
49  void updateTemplates() override;
50  virtual void updateNewName();
51 
52  // attributes
53  protected:
54  QLineEdit *new_name_;
55 };
56 #endif
TitleBlockTemplateLocationChooser::form_layout_
QFormLayout * form_layout_
Definition: templatelocationchooser.h:57
templatelocationsaver.h
TitleBlockTemplateLocationChooser::templates_
QComboBox * templates_
Existing templates combo box.
Definition: templatelocationchooser.h:61
TitleBlockTemplateLocationSaver::new_name_
QLineEdit * new_name_
New template name textfield.
Definition: templatelocationsaver.h:54
TitleBlockTemplateLocationSaver::setLocation
void setLocation(const TitleBlockTemplateLocation &) override
Definition: templatelocationsaver.cpp:57
TitleBlockTemplateLocationChooser::updateTemplates
virtual void updateTemplates()
Definition: templatelocationchooser.cpp:141
TitleBlockTemplateLocationSaver::init
void init()
Definition: templatelocationsaver.cpp:77
TitleBlockTemplateLocationSaver
Definition: templatelocationsaver.h:30
TitleBlockTemplateLocationChooser::location
virtual TitleBlockTemplateLocation location() const
Definition: templatelocationchooser.cpp:48
TitleBlockTemplateLocationSaver::TitleBlockTemplateLocationSaver
TitleBlockTemplateLocationSaver(const TitleBlockTemplateLocation &, QWidget *=nullptr)
TitleBlockTemplateLocationSaver::TitleBlockTemplateLocationSaver Constructor.
Definition: templatelocationsaver.cpp:29
TitleBlockTemplateLocationSaver::TitleBlockTemplateLocationSaver
TitleBlockTemplateLocationSaver(const TitleBlockTemplateLocationSaver &)
TitleBlockTemplateLocationChooser::collection
virtual TitleBlockTemplatesCollection * collection() const
Definition: templatelocationchooser.cpp:55
TitleBlockTemplateLocationChooser
Definition: templatelocationchooser.h:28
TitleBlockTemplateLocationChooser::collections_
QComboBox * collections_
Definition: templatelocationchooser.h:58
qetapp.h
TitleBlockTemplateLocationSaver::updateNewName
virtual void updateNewName()
Definition: templatelocationsaver.cpp:102
TitleBlockTemplateLocationSaver::~TitleBlockTemplateLocationSaver
~TitleBlockTemplateLocationSaver() override
Definition: templatelocationsaver.cpp:42
TitleBlockTemplateLocationSaver::name
QString name() const override
Definition: templatelocationsaver.cpp:48
templatelocationchooser.h
TitleBlockTemplateLocation
Definition: templatelocation.h:29
templatescollection.h
TitleBlockTemplateLocationSaver::updateTemplates
void updateTemplates() override
Definition: templatelocationsaver.cpp:87
qetproject.h
TitleBlockTemplateLocationChooser::indexForCollection
virtual int indexForCollection(TitleBlockTemplatesCollection *) const
TitleBlockTemplateLocationChooser::indexForCollection.
Definition: templatelocationchooser.cpp:113
TitleBlockTemplateLocation::parentCollection
TitleBlockTemplatesCollection * parentCollection() const
Definition: templatelocation.cpp:57
TitleBlockTemplatesCollection
Definition: templatescollection.h:34
QET::Icons::tr
QIcon tr
Definition: qeticons.cpp:206
TitleBlockTemplateLocation::name
QString name() const
Definition: templatelocation.cpp:73