QElectroTech  0.8-dev
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>

Inherits QDialog.

Collaboration diagram for PotentialSelectorDialog:
Collaboration graph

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 parent_undo for parameter If parent_undo 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 parent_undo 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

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.
Here is the call graph for this function:

◆ 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
Here is the call graph for this function:

◆ ~PotentialSelectorDialog()

PotentialSelectorDialog::~PotentialSelectorDialog ( )
override

Member Function Documentation

◆ buildWidget()

void PotentialSelectorDialog::buildWidget ( )
private

PotentialSelectorDialog::buildWidget Build the dialog.

Here is the caller graph for this function:

◆ chosenProperties()

ConductorProperties PotentialSelectorDialog::chosenProperties ( QList< ConductorProperties list,
QWidget *  parent = nullptr 
)
static
Here is the caller graph for this function:

◆ on_buttonBox_accepted

void PotentialSelectorDialog::on_buttonBox_accepted ( )
privateslot

PotentialSelectorDialog::on_buttonBox_accepted Action when user click on OK button.

Here is the call graph for this function:

Member Data Documentation

◆ m_conductor

Conductor* PotentialSelectorDialog::m_conductor
private

◆ m_conductors_to_change

QList<Conductor *> PotentialSelectorDialog::m_conductors_to_change
private

◆ m_parent_undo

QUndoCommand* PotentialSelectorDialog::m_parent_undo
private

◆ m_potential_selector

AbstractPotentialSelector* PotentialSelectorDialog::m_potential_selector
private

◆ m_properties_list

QList<ConductorProperties> PotentialSelectorDialog::m_properties_list
private

◆ m_report

Element* PotentialSelectorDialog::m_report
private

◆ m_selected

int PotentialSelectorDialog::m_selected = 0
private

◆ m_sequential_num

autonum::sequentialNumbers PotentialSelectorDialog::m_sequential_num
private

◆ ui

Ui::PotentialSelectorDialog* PotentialSelectorDialog::ui
private

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