QElectroTech
0.70
|
#include <templatelocationsaver.h>
Public Member Functions | |
TitleBlockTemplateLocationSaver (const TitleBlockTemplateLocation &, QWidget *=nullptr) | |
~TitleBlockTemplateLocationSaver () override | |
![]() | |
TitleBlockTemplateLocationChooser (const TitleBlockTemplateLocation &, QWidget *=nullptr) | |
~TitleBlockTemplateLocationChooser () override | |
virtual TitleBlockTemplateLocation | location () const |
virtual TitleBlockTemplatesCollection * | collection () const |
Protected Slots | |
void | updateTemplates () override |
virtual void | updateNewName () |
![]() | |
virtual void | updateCollections () |
virtual void | updateTemplates () |
Protected Attributes | |
QLineEdit * | new_name_ |
New template name textfield. More... | |
![]() | |
QFormLayout * | form_layout_ |
QComboBox * | collections_ |
QHash< int, TitleBlockTemplatesCollection * > | collections_index_ |
Collections index within the combo box. More... | |
QComboBox * | templates_ |
Existing templates combo box. More... | |
Private Member Functions | |
TitleBlockTemplateLocationSaver (const TitleBlockTemplateLocationSaver &) | |
QString | name () const override |
void | setLocation (const TitleBlockTemplateLocation &) override |
void | init () |
Additional Inherited Members | |
![]() | |
void | init () |
virtual int | indexForCollection (TitleBlockTemplatesCollection *) const |
This class is a widget that allows the user to choose a target title block template, with the intention to save it. Therefore, compared to a TitleBlockTemplateLocationChooser, it includes an extra field for the user to set the name of the new template if needed.
Definition at line 30 of file templatelocationsaver.h.
TitleBlockTemplateLocationSaver::TitleBlockTemplateLocationSaver | ( | const TitleBlockTemplateLocation & | location, |
QWidget * | parent = nullptr |
||
) |
Constructor
location | Initial location displayed by the widget |
widget | Parent QWidget |
Definition at line 28 of file templatelocationsaver.cpp.
References init(), TitleBlockTemplateLocationChooser::location(), and setLocation().
|
override |
Destructor
Definition at line 41 of file templatelocationsaver.cpp.
|
private |
|
private |
Initialize this widget.
location | Initial location displayed by the widget |
Definition at line 76 of file templatelocationsaver.cpp.
References TitleBlockTemplateLocationChooser::form_layout_, new_name_, TitleBlockTemplateLocationChooser::templates_, QET::Icons::tr, updateNewName(), and updateTemplates().
Referenced by TitleBlockTemplateLocationSaver().
|
overrideprivatevirtual |
Reimplemented from TitleBlockTemplateLocationChooser.
Definition at line 47 of file templatelocationsaver.cpp.
References new_name_, and TitleBlockTemplateLocationChooser::templates_.
|
overrideprivatevirtual |
Set the location displayed by this widget
location | to be displayed by this widget |
Reimplemented from TitleBlockTemplateLocationChooser.
Definition at line 56 of file templatelocationsaver.cpp.
References TitleBlockTemplateLocationChooser::collections_, TitleBlockTemplateLocationChooser::indexForCollection(), TitleBlockTemplateLocationChooser::location(), TitleBlockTemplateLocation::name(), TitleBlockTemplateLocation::parentCollection(), and TitleBlockTemplateLocationChooser::templates_.
Referenced by TitleBlockTemplateLocationSaver().
|
protectedvirtualslot |
Enable or diable the "new name" text field depending of the selected template.
Definition at line 101 of file templatelocationsaver.cpp.
References new_name_, and TitleBlockTemplateLocationChooser::templates_.
Referenced by init(), and updateTemplates().
|
overrideprotectedslot |
Update the templates list according to the selected collection.
Definition at line 86 of file templatelocationsaver.cpp.
References TitleBlockTemplateLocationChooser::collection(), TitleBlockTemplateLocationChooser::templates_, QET::Icons::tr, updateNewName(), and TitleBlockTemplateLocationChooser::updateTemplates().
Referenced by init().
|
protected |
New template name textfield.
Definition at line 53 of file templatelocationsaver.h.
Referenced by init(), name(), and updateNewName().