QElectroTech  0.70
Public Types | Signals | Public Member Functions | Public Attributes | Private Slots | Private Member Functions | Private Attributes | List of all members
NumPartEditorW Class Reference

#include <numparteditorw.h>

Public Types

enum  type {
  unit, unitfolio, ten, tenfolio,
  hundred, hundredfolio, string, idfolio,
  folio, plant, locmach, elementline,
  elementcolumn, elementprefix
}
 

Signals

void changed ()
 

Public Member Functions

 NumPartEditorW (int type, QWidget *parent=nullptr)
 
 NumPartEditorW (NumerotationContext &, int, int type, QWidget *parent=nullptr)
 
 ~NumPartEditorW () override
 
NumerotationContext toNumContext ()
 NumPartEditorW::toNumContext. More...
 
bool isValid ()
 NumPartEditorW::isValid. More...
 

Public Attributes

type type_
 

Private Slots

void on_type_cb_activated (int)
 NumPartEditorW::on_type_cb_activated Action when user change the type comboBox. More...
 
void on_value_field_textEdited ()
 NumPartEditorW::on_value_field_textChanged emit changed when text changed. More...
 
void on_increase_spinBox_valueChanged (int)
 NumPartEditorW::on_increase_spinBox_valueChanged emit changed when value changed. More...
 
void setType (NumPartEditorW::type t, bool=false)
 NumPartEditorW::setType Set good behavior by type . More...
 

Private Member Functions

void setVisibleItems ()
 
void disableItem (int index)
 
void setCurrentIndex (NumPartEditorW::type)
 NumPartEditorW::setCurrentIndex Set Current Index of type_cb. More...
 

Private Attributes

Ui::NumPartEditorW * ui
 
QValidator * intValidator
 
int m_edited_type = -1
 

Detailed Description

Definition at line 34 of file numparteditorw.h.

Member Enumeration Documentation

◆ type

Enumerator
unit 
unitfolio 
ten 
tenfolio 
hundred 
hundredfolio 
string 
idfolio 
folio 
plant 
locmach 
elementline 
elementcolumn 
elementprefix 

Definition at line 44 of file numparteditorw.h.

Constructor & Destructor Documentation

◆ NumPartEditorW() [1/2]

NumPartEditorW::NumPartEditorW ( int  type,
QWidget *  parent = nullptr 
)
explicit

Constructor

Definition at line 25 of file numparteditorw.cpp.

References setType(), setVisibleItems(), ui, and unit.

◆ NumPartEditorW() [2/2]

NumPartEditorW::NumPartEditorW ( NumerotationContext context,
int  i,
int  type,
QWidget *  parent = nullptr 
)

◆ ~NumPartEditorW()

NumPartEditorW::~NumPartEditorW ( )
override

Destructor

Definition at line 74 of file numparteditorw.cpp.

References intValidator, and ui.

Member Function Documentation

◆ changed

void NumPartEditorW::changed ( )
signal

◆ disableItem()

void NumPartEditorW::disableItem ( int  index)
private

◆ isValid()

bool NumPartEditorW::isValid ( )

NumPartEditorW::isValid.

Returns
true if value field isn't empty or if type is folio

Definition at line 166 of file numparteditorw.cpp.

References elementcolumn, elementline, elementprefix, folio, idfolio, locmach, plant, type_, and ui.

◆ on_increase_spinBox_valueChanged

void NumPartEditorW::on_increase_spinBox_valueChanged ( int  )
privateslot

NumPartEditorW::on_increase_spinBox_valueChanged emit changed when value changed.

Definition at line 221 of file numparteditorw.cpp.

References changed(), and ui.

◆ on_type_cb_activated

void NumPartEditorW::on_type_cb_activated ( int  )
privateslot

◆ on_value_field_textEdited

void NumPartEditorW::on_value_field_textEdited ( )
privateslot

NumPartEditorW::on_value_field_textChanged emit changed when text changed.

Definition at line 213 of file numparteditorw.cpp.

References changed().

◆ setCurrentIndex()

void NumPartEditorW::setCurrentIndex ( NumPartEditorW::type  t)
private

NumPartEditorW::setCurrentIndex Set Current Index of type_cb.

Parameters
t,typeused

Definition at line 292 of file numparteditorw.cpp.

References elementcolumn, elementline, elementprefix, folio, hundred, hundredfolio, idfolio, locmach, plant, ten, tenfolio, QET::Icons::tr, ui, unit, and unitfolio.

Referenced by setType().

◆ setType

void NumPartEditorW::setType ( NumPartEditorW::type  t,
bool  fnum = false 
)
privateslot

NumPartEditorW::setType Set good behavior by type .

Parameters
t,typeused
fnum,forcethe behavior of numeric type

Definition at line 231 of file numparteditorw.cpp.

References elementcolumn, elementline, elementprefix, folio, hundred, hundredfolio, idfolio, intValidator, locmach, plant, setCurrentIndex(), ten, tenfolio, type_, ui, unit, and unitfolio.

Referenced by NumPartEditorW(), and on_type_cb_activated().

◆ setVisibleItems()

void NumPartEditorW::setVisibleItems ( )
private

Definition at line 80 of file numparteditorw.cpp.

References m_edited_type, QET::Icons::tr, and ui.

Referenced by NumPartEditorW().

◆ toNumContext()

NumerotationContext NumPartEditorW::toNumContext ( )

Member Data Documentation

◆ intValidator

QValidator* NumPartEditorW::intValidator
private

Definition at line 68 of file numparteditorw.h.

Referenced by setType(), and ~NumPartEditorW().

◆ m_edited_type

int NumPartEditorW::m_edited_type = -1
private

Definition at line 69 of file numparteditorw.h.

Referenced by setVisibleItems().

◆ type_

type NumPartEditorW::type_

Definition at line 50 of file numparteditorw.h.

Referenced by isValid(), setType(), and toNumContext().

◆ ui

Ui::NumPartEditorW* NumPartEditorW::ui
private

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