QElectroTech  0.70
Public Member Functions | Static Public Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
PotentialSelectorDialog Class Reference

The PotentialSelectorDialog class This dialog is used when user try to connect two existing potential together. The dialog ask to user to make a choice between the properties of the two existing potential, to apply it for the new potential. More...

#include <potentialselectordialog.h>

Public Member Functions

 PotentialSelectorDialog (Conductor *conductor, QUndoCommand *parent_undo=nullptr, QWidget *parent=nullptr)
 PotentialSelectorDialog::PotentialSelectorDialog Constructor when we link two potentiels together, with a conductor. More...
 
 PotentialSelectorDialog (Element *report, QUndoCommand *parent_undo=nullptr, QWidget *parent=nullptr)
 PotentialSelectorDialog::PotentialSelectorDialog Constructor when we link two potentiels together, with a folio report. More...
 
 ~PotentialSelectorDialog () override
 

Static Public Member Functions

static ConductorProperties chosenProperties (QList< ConductorProperties > list, QWidget *parent=nullptr)
 

Private Slots

void on_buttonBox_accepted ()
 PotentialSelectorDialog::on_buttonBox_accepted Action when user click on OK button. More...
 

Private Member Functions

void buildWidget ()
 PotentialSelectorDialog::buildWidget Build the dialog. More...
 

Private Attributes

Ui::PotentialSelectorDialog * ui
 
Conductorm_conductor
 
Elementm_report
 
QUndoCommand * m_parent_undo
 
autonum::sequentialNumbers m_sequential_num
 
AbstractPotentialSelectorm_potential_selector
 
QList< ConductorPropertiesm_properties_list
 
QList< Conductor * > m_conductors_to_change
 
int m_selected = 0
 

Detailed Description

The PotentialSelectorDialog class This dialog is used when user try to connect two existing potential together. The dialog ask to user to make a choice between the properties of the two existing potential, to apply it for the new potential.

Each constructor have a QUndoCommand for parameter If isn't null, when user click on OK button, the dialog will use the parent-undo as parent of the undo command that describe the changes. If is null, the created undo-command is push to the undo stack of the parent diagram of a conductor in potential. else we apply the change without a QUndoCommand.

the static function chosenProperties, open a dialog who ask user to make a choice between the given properties

Definition at line 60 of file potentialselectordialog.h.

Constructor & Destructor Documentation

◆ PotentialSelectorDialog() [1/2]

PotentialSelectorDialog::PotentialSelectorDialog ( Conductor conductor,
QUndoCommand *  parent_undo = nullptr,
QWidget *  parent = nullptr 
)
explicit

PotentialSelectorDialog::PotentialSelectorDialog Constructor when we link two potentiels together, with a conductor.

Parameters
conductor: the new conductor who connect to existing potential
parent_undo: undo parent to use.
parent: parent widget.

Definition at line 220 of file potentialselectordialog.cpp.

References buildWidget(), m_potential_selector, and ui.

◆ PotentialSelectorDialog() [2/2]

PotentialSelectorDialog::PotentialSelectorDialog ( Element report,
QUndoCommand *  parent_undo = nullptr,
QWidget *  parent = nullptr 
)
explicit

PotentialSelectorDialog::PotentialSelectorDialog Constructor when we link two potentiels together, with a folio report.

Parameters
report: one of the report used to link the potentials (report must be linked to another report)
parent_undo: undo parent to use
parent: parent widget

Definition at line 239 of file potentialselectordialog.cpp.

References buildWidget(), m_potential_selector, and ui.

◆ ~PotentialSelectorDialog()

PotentialSelectorDialog::~PotentialSelectorDialog ( )
override

Definition at line 251 of file potentialselectordialog.cpp.

References m_potential_selector, and ui.

Member Function Documentation

◆ buildWidget()

void PotentialSelectorDialog::buildWidget ( )
private

◆ chosenProperties()

ConductorProperties PotentialSelectorDialog::chosenProperties ( QList< ConductorProperties list,
QWidget *  parent = nullptr 
)
static

Definition at line 169 of file potentialselectordialog.cpp.

References QET::Icons::tr.

Referenced by ConductorCreator::setUpPropertieToUse().

◆ on_buttonBox_accepted

void PotentialSelectorDialog::on_buttonBox_accepted ( )
privateslot

Member Data Documentation

◆ m_conductor

Conductor* PotentialSelectorDialog::m_conductor
private

Definition at line 81 of file potentialselectordialog.h.

Referenced by on_buttonBox_accepted().

◆ m_conductors_to_change

QList<Conductor *> PotentialSelectorDialog::m_conductors_to_change
private

Definition at line 87 of file potentialselectordialog.h.

Referenced by buildWidget(), and on_buttonBox_accepted().

◆ m_parent_undo

QUndoCommand* PotentialSelectorDialog::m_parent_undo
private

Definition at line 83 of file potentialselectordialog.h.

Referenced by on_buttonBox_accepted().

◆ m_potential_selector

AbstractPotentialSelector* PotentialSelectorDialog::m_potential_selector
private

◆ m_properties_list

QList<ConductorProperties> PotentialSelectorDialog::m_properties_list
private

Definition at line 86 of file potentialselectordialog.h.

Referenced by buildWidget(), and on_buttonBox_accepted().

◆ m_report

Element* PotentialSelectorDialog::m_report
private

Definition at line 82 of file potentialselectordialog.h.

Referenced by on_buttonBox_accepted().

◆ m_selected

int PotentialSelectorDialog::m_selected = 0
private

Definition at line 88 of file potentialselectordialog.h.

◆ m_sequential_num

autonum::sequentialNumbers PotentialSelectorDialog::m_sequential_num
private

Definition at line 84 of file potentialselectordialog.h.

Referenced by buildWidget(), and on_buttonBox_accepted().

◆ ui

Ui::PotentialSelectorDialog* PotentialSelectorDialog::ui
private

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