QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
templatelocationchooser.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_LOCATION_CHOOSER_H
19#define TITLEBLOCK_SLASH_LOCATION_CHOOSER_H
20#include <QtWidgets>
21#include "templatelocation.h"
22class TitleBlockTemplateCollection;
23
28class TitleBlockTemplateLocationChooser : public QWidget {
29 Q_OBJECT
30 // Constructor, destructor
31 public:
33 QWidget * = nullptr);
35 private:
38
39 // methods
40 public:
43 virtual QString name() const;
44 virtual void setLocation(const TitleBlockTemplateLocation &);
45
46 protected:
47 void init();
49
50 // slots
51 protected slots:
52 virtual void updateCollections();
53 virtual void updateTemplates();
54
55 // attributes
56 protected:
57 QFormLayout *form_layout_;
58 QComboBox *collections_;
60 QHash<int, TitleBlockTemplatesCollection *> collections_index_;
61 QComboBox *templates_;
62};
63#endif
Definition templatelocationchooser.h:28
virtual QString name() const
Definition templatelocationchooser.cpp:66
virtual int indexForCollection(TitleBlockTemplatesCollection *) const
TitleBlockTemplateLocationChooser::indexForCollection.
Definition templatelocationchooser.cpp:121
virtual TitleBlockTemplateLocation location() const
Definition templatelocationchooser.cpp:50
QComboBox * templates_
Existing templates combo box.
Definition templatelocationchooser.h:61
QHash< int, TitleBlockTemplatesCollection * > collections_index_
Collections index within the combo box.
Definition templatelocationchooser.h:60
virtual void setLocation(const TitleBlockTemplateLocation &)
Definition templatelocationchooser.cpp:76
QComboBox * collections_
Definition templatelocationchooser.h:58
virtual void updateCollections()
Definition templatelocationchooser.cpp:132
~TitleBlockTemplateLocationChooser() override
Definition templatelocationchooser.cpp:43
QFormLayout * form_layout_
Definition templatelocationchooser.h:57
void init()
Definition templatelocationchooser.cpp:95
virtual TitleBlockTemplatesCollection * collection() const
Definition templatelocationchooser.cpp:58
TitleBlockTemplateLocationChooser(const TitleBlockTemplateLocationChooser &)
virtual void updateTemplates()
Definition templatelocationchooser.cpp:151
Definition templatelocation.h:29
Definition templatescollection.h:35