QElectroTech 0.200.1-dev
Loading...
Searching...
No Matches
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.
 PotentialSelectorDialog (Element *report, QUndoCommand *parent_undo=nullptr, QWidget *parent=nullptr)
 PotentialSelectorDialog::PotentialSelectorDialog Constructor when we link two potentiels together, with a folio report.
 ~PotentialSelectorDialog () override

Static Public Member Functions

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

Private Slots

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

Private Member Functions

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

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. If the dialog is cancelled (Cancel button, Escape, or the window's close button) and cancelled is non-null, *cancelled is set to true and an empty ConductorProperties() is returned; callers that care about a real cancellation (as opposed to "no properties to choose from") should check it rather than relying on the returned value alone.

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:
Here is the caller 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,
bool * cancelled = 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: