QElectroTech
0.8-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 More... | |
QVBoxLayout * | vlayout0_ |
QVBoxLayout * | vlayout1_ |
vertical layouts More... | |
QHBoxLayout * | hlayout0_ |
QHBoxLayout * | hlayout1_ |
horizontal layouts More... | |
QLabel * | logos_label_ |
simple displayed label More... | |
QListWidget * | logos_view_ |
area showing the logos More... | |
QPushButton * | add_button_ |
button to add a new logo More... | |
QPushButton * | export_button_ |
button to export an embedded logo More... | |
QPushButton * | delete_button_ |
button to delete an embedded logo More... | |
QGroupBox * | logo_box_ |
current logo properties box More... | |
QLabel * | logo_name_label_ |
"name:" label More... | |
QLineEdit * | logo_name_ |
current logo name More... | |
QPushButton * | rename_button_ |
button to rename the current logo More... | |
QLabel * | logo_type_ |
current logo type More... | |
QDialogButtonBox * | buttons_ |
ok/cancel buttons More... | |
QDir | open_dialog_dir_ |
last opened directory More... | |
bool | read_only_ |
Whether this logo manager should allow logo edition (renaming, addition, deletion) More... | |
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 |
|
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