QElectroTech  0.8-dev
Public Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
IntegrationMoveTitleBlockTemplatesHandler Class Reference

#include <integrationmovetemplateshandler.h>

Inheritance diagram for IntegrationMoveTitleBlockTemplatesHandler:
Inheritance graph
Collaboration diagram for IntegrationMoveTitleBlockTemplatesHandler:
Collaboration graph

Public Member Functions

 IntegrationMoveTitleBlockTemplatesHandler (QWidget *=nullptr)
 
 ~IntegrationMoveTitleBlockTemplatesHandler () override
 
QET::Action templateAlreadyExists (const TitleBlockTemplateLocation &src, const TitleBlockTemplateLocation &dst) override
 
QET::Action errorWithATemplate (const TitleBlockTemplateLocation &, const QString &) override
 
QString nameForRenamingOperation () override
 
- Public Member Functions inherited from MoveTitleBlockTemplatesHandler
 MoveTitleBlockTemplatesHandler (QObject *=nullptr)
 
 ~MoveTitleBlockTemplatesHandler () override
 

Private Slots

void correctRadioButtons ()
 

Private Member Functions

 IntegrationMoveTitleBlockTemplatesHandler (const IntegrationMoveTitleBlockTemplatesHandler &)
 
QString dateString () const
 
QString newNameForTemplate (const TitleBlockTemplateLocation &)
 
QET::Action askUser (const TitleBlockTemplateLocation &, const TitleBlockTemplateLocation &)
 
void initDialog ()
 
void radioButtonleftMargin (QRadioButton *)
 

Private Attributes

QWidget * parent_widget_
 Widget used as parent to display dialogs. More...
 
QString rename_
 Name to be used when renaming a title block template. More...
 
QDialog * integ_dialog_
 Dialog in case of conflict when integrating a title block template. More...
 
QLabel * dialog_label_
 
QVBoxLayout * dialog_vlayout_
 
QGridLayout * dialog_glayout
 
QDialogButtonBox * buttons_
 
QRadioButton * use_existing_template_
 Radio button the user may click to use the existing template and stop the integration. More...
 
QRadioButton * integrate_new_template_
 Radio button the user may click to integrate the template. More...
 
QRadioButton * erase_template_
 Radio button the user may click for the integrated template to erase the existing one. More...
 
QRadioButton * integrate_both_
 
QButtonGroup * button_group1_
 
QButtonGroup * button_group2_
 

Detailed Description

This class implements the interface defined by MoveTitleBlockTemplatesHandler to ease the integration of title block templates from files-based collections into projects.

Constructor & Destructor Documentation

◆ IntegrationMoveTitleBlockTemplatesHandler() [1/2]

IntegrationMoveTitleBlockTemplatesHandler::IntegrationMoveTitleBlockTemplatesHandler ( QWidget *  parent = nullptr)

Constructor

Parameters
parentQwidget used as parent when showing the user dialog.

◆ ~IntegrationMoveTitleBlockTemplatesHandler()

IntegrationMoveTitleBlockTemplatesHandler::~IntegrationMoveTitleBlockTemplatesHandler ( )
override

Destructor

◆ IntegrationMoveTitleBlockTemplatesHandler() [2/2]

IntegrationMoveTitleBlockTemplatesHandler::IntegrationMoveTitleBlockTemplatesHandler ( const IntegrationMoveTitleBlockTemplatesHandler )
private

Member Function Documentation

◆ askUser()

QET::Action IntegrationMoveTitleBlockTemplatesHandler::askUser ( const TitleBlockTemplateLocation src,
const TitleBlockTemplateLocation dst 
)
private

Ask the use whether they wish to erase the already existing template, rename it or cancel the operation.

Parameters
srcSource title block template
dstTarget title block template
Returns
the user answer
Here is the call graph for this function:
Here is the caller graph for this function:

◆ correctRadioButtons

void IntegrationMoveTitleBlockTemplatesHandler::correctRadioButtons ( )
privateslot

Ensure the dialog remains consistent.

Here is the caller graph for this function:

◆ dateString()

QString IntegrationMoveTitleBlockTemplatesHandler::dateString ( ) const
private
Returns
the current date with a filename-friendly format
Here is the caller graph for this function:

◆ errorWithATemplate()

QET::Action IntegrationMoveTitleBlockTemplatesHandler::errorWithATemplate ( const TitleBlockTemplateLocation tbt,
const QString &  message 
)
overridevirtual

Display an error message related to a specific title block template.

Parameters
tbtProblematic title block template
messageError message.

Implements MoveTitleBlockTemplatesHandler.

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

◆ initDialog()

void IntegrationMoveTitleBlockTemplatesHandler::initDialog ( )
private

Initialize the user dialog.

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

◆ nameForRenamingOperation()

QString IntegrationMoveTitleBlockTemplatesHandler::nameForRenamingOperation ( )
overridevirtual
Returns
the name to be used when this object returns QET::Rename
See also
QET::Action

Implements MoveTitleBlockTemplatesHandler.

◆ newNameForTemplate()

QString IntegrationMoveTitleBlockTemplatesHandler::newNameForTemplate ( const TitleBlockTemplateLocation tbt)
private
Parameters
tbtA title block template location
Returns
a name to be used in order to duplicate the title block template. This name is based on the current date.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ radioButtonleftMargin()

void IntegrationMoveTitleBlockTemplatesHandler::radioButtonleftMargin ( QRadioButton *  button)
private

Increase the left margin of a radiob utton.

Parameters
buttonRadio button
Here is the caller graph for this function:

◆ templateAlreadyExists()

QET::Action IntegrationMoveTitleBlockTemplatesHandler::templateAlreadyExists ( const TitleBlockTemplateLocation src,
const TitleBlockTemplateLocation dst 
)
overridevirtual
Parameters
srcSource template
dstTarget template
Returns
the action to be done if the target template already exists

Implements MoveTitleBlockTemplatesHandler.

Here is the call graph for this function:

Member Data Documentation

◆ button_group1_

QButtonGroup* IntegrationMoveTitleBlockTemplatesHandler::button_group1_
private

◆ button_group2_

QButtonGroup* IntegrationMoveTitleBlockTemplatesHandler::button_group2_
private

◆ buttons_

QDialogButtonBox* IntegrationMoveTitleBlockTemplatesHandler::buttons_
private

◆ dialog_glayout

QGridLayout* IntegrationMoveTitleBlockTemplatesHandler::dialog_glayout
private

◆ dialog_label_

QLabel* IntegrationMoveTitleBlockTemplatesHandler::dialog_label_
private

◆ dialog_vlayout_

QVBoxLayout* IntegrationMoveTitleBlockTemplatesHandler::dialog_vlayout_
private

◆ erase_template_

QRadioButton* IntegrationMoveTitleBlockTemplatesHandler::erase_template_
private

Radio button the user may click for the integrated template to erase the existing one.

◆ integ_dialog_

QDialog* IntegrationMoveTitleBlockTemplatesHandler::integ_dialog_
private

Dialog in case of conflict when integrating a title block template.

◆ integrate_both_

QRadioButton* IntegrationMoveTitleBlockTemplatesHandler::integrate_both_
private

◆ integrate_new_template_

QRadioButton* IntegrationMoveTitleBlockTemplatesHandler::integrate_new_template_
private

Radio button the user may click to integrate the template.

◆ parent_widget_

QWidget* IntegrationMoveTitleBlockTemplatesHandler::parent_widget_
private

Widget used as parent to display dialogs.

◆ rename_

QString IntegrationMoveTitleBlockTemplatesHandler::rename_
private

Name to be used when renaming a title block template.

◆ use_existing_template_

QRadioButton* IntegrationMoveTitleBlockTemplatesHandler::use_existing_template_
private

Radio button the user may click to use the existing template and stop the integration.


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