![]() |
QElectroTech 0.100.0-dev
|
#include <templatelogomanager.h>
Inherits QWidget.
Signals | |
void | logosChanged (const TitleBlockTemplate *) |
Public Member Functions | |
TitleBlockTemplateLogoManager (TitleBlockTemplate *, QWidget *=nullptr) | |
~TitleBlockTemplateLogoManager () override | |
QString | currentLogo () const |
bool | isReadOnly () const |
void | setReadOnly (bool) |
Protected Member Functions | |
void | emitLogosChangedSignal () |
Private Slots | |
void | updateLogoInformations (QListWidgetItem *, QListWidgetItem *) |
void | addLogo () |
void | exportLogo () |
void | removeLogo () |
void | renameLogo () |
Private Member Functions | |
void | initWidgets () |
void | fillView () |
QSize | iconsize () const |
QString | confirmLogoName (const QString &) |
Private Attributes | |
TitleBlockTemplate * | managed_template_ |
title block template which this class manages logos | |
QVBoxLayout * | vlayout0_ |
QVBoxLayout * | vlayout1_ |
vertical layouts | |
QHBoxLayout * | hlayout0_ |
QHBoxLayout * | hlayout1_ |
horizontal layouts | |
QLabel * | logos_label_ |
simple displayed label | |
QListWidget * | logos_view_ |
area showing the logos | |
QPushButton * | add_button_ |
button to add a new logo | |
QPushButton * | export_button_ |
button to export an embedded logo | |
QPushButton * | delete_button_ |
button to delete an embedded logo | |
QGroupBox * | logo_box_ |
current logo properties box | |
QLabel * | logo_name_label_ |
"name:" label | |
QLineEdit * | logo_name_ |
current logo name | |
QPushButton * | rename_button_ |
button to rename the current logo | |
QLabel * | logo_type_ |
current logo type | |
QDialogButtonBox * | buttons_ |
ok/cancel buttons | |
QDir | open_dialog_dir_ |
last opened directory | |
bool | read_only_ |
Whether this logo manager should allow logo edition (renaming, addition, deletion) | |
This widget allows users to manage (list, add, edit, delete) logos embedded within a title block template.
TitleBlockTemplateLogoManager::TitleBlockTemplateLogoManager | ( | TitleBlockTemplate * | managed_template, |
QWidget * | parent = nullptr |
||
) |
Constructor
managed_template | Title block template this widget manages logos for. |
parent | Parent QWidget. |
|
override |
Destructor
|
privateslot |
Ask the user for a filepath, and add it as a new logo in the managed template.
|
private |
When adding a logo, it may occur its name is already used by another pre-existing logo. This method asks users whether they want to erase the existing logo, change the initial name or simply cancel the operation.
initial_name | Initial name of the logo to be added |
TODO prevent the user from entering an empty name
QString TitleBlockTemplateLogoManager::currentLogo | ( | ) | const |
|
protected |
Emit the logosChanged() signal.
|
privateslot |
Export the currently selected logo
|
private |
Update the logos display.
|
private |
|
private |
Initialize widgets composing the Logo manager
bool TitleBlockTemplateLogoManager::isReadOnly | ( | ) | const |
|
signal |
|
privateslot |
Delete the currently selected logo.
|
privateslot |
Rename currently selected logo.
void TitleBlockTemplateLogoManager::setReadOnly | ( | bool | read_only | ) |
read_only | Whether this logo manager should allow logo edition (renaming, addition, deletion) |
|
privateslot |
Update the displayed informations relative to the currently selected logo.
current | Newly selected logo item |
previous | Previously selected logo item |
|
private |
button to add a new logo
|
private |
ok/cancel buttons
|
private |
button to delete an embedded logo
|
private |
button to export an embedded logo
|
private |
|
private |
horizontal layouts
|
private |
current logo properties box
|
private |
current logo name
|
private |
"name:" label
|
private |
current logo type
|
private |
simple displayed label
|
private |
area showing the logos
|
private |
title block template which this class manages logos
|
private |
last opened directory
|
private |
Whether this logo manager should allow logo edition (renaming, addition, deletion)
|
private |
button to rename the current logo
|
private |
|
private |
vertical layouts