QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
Signals | Public Member Functions | Protected Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
TitleBlockTemplateLogoManager Class Reference

#include <templatelogomanager.h>

Inherits QWidget.

Collaboration diagram for TitleBlockTemplateLogoManager:
Collaboration graph

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

TitleBlockTemplatemanaged_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)
 

Detailed Description

This widget allows users to manage (list, add, edit, delete) logos embedded within a title block template.

Constructor & Destructor Documentation

◆ TitleBlockTemplateLogoManager()

TitleBlockTemplateLogoManager::TitleBlockTemplateLogoManager ( TitleBlockTemplate managed_template,
QWidget *  parent = nullptr 
)

Constructor

Parameters
managed_templateTitle block template this widget manages logos for.
parentParent QWidget.
Here is the call graph for this function:

◆ ~TitleBlockTemplateLogoManager()

TitleBlockTemplateLogoManager::~TitleBlockTemplateLogoManager ( )
override

Destructor

Member Function Documentation

◆ addLogo

void TitleBlockTemplateLogoManager::addLogo ( )
privateslot

Ask the user for a filepath, and add it as a new logo in the managed template.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ confirmLogoName()

QString TitleBlockTemplateLogoManager::confirmLogoName ( const QString &  initial_name)
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.

Parameters
initial_nameInitial name of the logo to be added
Returns
Either a null QString if the user cancelled the operation, or the name to be used when adding the logo.

TODO prevent the user from entering an empty name

Here is the caller graph for this function:

◆ currentLogo()

QString TitleBlockTemplateLogoManager::currentLogo ( ) const
Returns
the name of the currently selected logo, or a null QString if none is selected.
Here is the caller graph for this function:

◆ emitLogosChangedSignal()

void TitleBlockTemplateLogoManager::emitLogosChangedSignal ( )
protected

Emit the logosChanged() signal.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ exportLogo

void TitleBlockTemplateLogoManager::exportLogo ( )
privateslot

Export the currently selected logo

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fillView()

void TitleBlockTemplateLogoManager::fillView ( )
private

Update the logos display.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ iconsize()

QSize TitleBlockTemplateLogoManager::iconsize ( ) const
private
Returns
the icon size to display the logos embedded within the managed template.
Here is the caller graph for this function:

◆ initWidgets()

void TitleBlockTemplateLogoManager::initWidgets ( )
private

Initialize widgets composing the Logo manager

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isReadOnly()

bool TitleBlockTemplateLogoManager::isReadOnly ( ) const
Returns
Whether this logo manager should allow logo edition (renaming, addition, deletion).

◆ logosChanged

void TitleBlockTemplateLogoManager::logosChanged ( const TitleBlockTemplate )
signal
Here is the caller graph for this function:

◆ removeLogo

void TitleBlockTemplateLogoManager::removeLogo ( )
privateslot

Delete the currently selected logo.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ renameLogo

void TitleBlockTemplateLogoManager::renameLogo ( )
privateslot

Rename currently selected logo.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setReadOnly()

void TitleBlockTemplateLogoManager::setReadOnly ( bool  read_only)
Parameters
read_onlyWhether this logo manager should allow logo edition (renaming, addition, deletion)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateLogoInformations

void TitleBlockTemplateLogoManager::updateLogoInformations ( QListWidgetItem *  current,
QListWidgetItem *  previous 
)
privateslot

Update the displayed informations relative to the currently selected logo.

Parameters
currentNewly selected logo item
previousPreviously selected logo item
Here is the caller graph for this function:

Member Data Documentation

◆ add_button_

QPushButton* TitleBlockTemplateLogoManager::add_button_
private

button to add a new logo

◆ buttons_

QDialogButtonBox* TitleBlockTemplateLogoManager::buttons_
private

ok/cancel buttons

◆ delete_button_

QPushButton* TitleBlockTemplateLogoManager::delete_button_
private

button to delete an embedded logo

◆ export_button_

QPushButton* TitleBlockTemplateLogoManager::export_button_
private

button to export an embedded logo

◆ hlayout0_

QHBoxLayout* TitleBlockTemplateLogoManager::hlayout0_
private

◆ hlayout1_

QHBoxLayout * TitleBlockTemplateLogoManager::hlayout1_
private

horizontal layouts

◆ logo_box_

QGroupBox* TitleBlockTemplateLogoManager::logo_box_
private

current logo properties box

◆ logo_name_

QLineEdit* TitleBlockTemplateLogoManager::logo_name_
private

current logo name

◆ logo_name_label_

QLabel* TitleBlockTemplateLogoManager::logo_name_label_
private

"name:" label

◆ logo_type_

QLabel* TitleBlockTemplateLogoManager::logo_type_
private

current logo type

◆ logos_label_

QLabel* TitleBlockTemplateLogoManager::logos_label_
private

simple displayed label

◆ logos_view_

QListWidget* TitleBlockTemplateLogoManager::logos_view_
private

area showing the logos

◆ managed_template_

TitleBlockTemplate* TitleBlockTemplateLogoManager::managed_template_
private

title block template which this class manages logos

◆ open_dialog_dir_

QDir TitleBlockTemplateLogoManager::open_dialog_dir_
private

last opened directory

◆ read_only_

bool TitleBlockTemplateLogoManager::read_only_
private

Whether this logo manager should allow logo edition (renaming, addition, deletion)

◆ rename_button_

QPushButton* TitleBlockTemplateLogoManager::rename_button_
private

button to rename the current logo

◆ vlayout0_

QVBoxLayout* TitleBlockTemplateLogoManager::vlayout0_
private

◆ vlayout1_

QVBoxLayout * TitleBlockTemplateLogoManager::vlayout1_
private

vertical layouts


The documentation for this class was generated from the following files: