QElectroTech  0.8-dev
numparteditorw.h
Go to the documentation of this file.
1 /*
2  Copyright 2006-2020 The QElectroTech Team
3  This file is part of QElectroTech.
4 
5  QElectroTech is free software: you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation, either version 2 of the License, or
8  (at your option) any later version.
9 
10  QElectroTech is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
17 */
18 #ifndef NUMPARTEDITORW_H
19 #define NUMPARTEDITORW_H
20 
21 #include <QWidget>
22 #include <QValidator>
23 #include "numerotationcontext.h"
24 
30 namespace Ui {
31  class NumPartEditorW;
32 }
33 
34 class NumPartEditorW : public QWidget
35 {
36  Q_OBJECT
37 
38  //METHODS
39  public:
40  explicit NumPartEditorW(int type, QWidget *parent = nullptr);
41  NumPartEditorW (NumerotationContext &, int, int type, QWidget *parent=nullptr);
42  ~NumPartEditorW() override;
43 
47  };
49  bool isValid ();
51 
52  private:
53  void setVisibleItems();
54  void disableItem(int index);
56 
57  private slots:
58  void on_type_cb_activated(int);
61  void setType (NumPartEditorW::type t, bool=false);
62 
63  signals:
64  void changed ();
65 
66  private:
67  Ui::NumPartEditorW *ui;
68  QValidator *intValidator;
69  int m_edited_type = -1; //0 == element : 1 == conductor : 2 == folio
70 
71 
72 
73 };
74 
75 #endif // NUMPARTEDITORW_H
NumPartEditorW::hundredfolio
@ hundredfolio
Definition: numparteditorw.h:44
NumPartEditorW::setCurrentIndex
void setCurrentIndex(NumPartEditorW::type)
NumPartEditorW::setCurrentIndex Set Current Index of type_cb.
Definition: numparteditorw.cpp:334
NumPartEditorW::on_increase_spinBox_valueChanged
void on_increase_spinBox_valueChanged(int)
NumPartEditorW::on_increase_spinBox_valueChanged emit changed when increase_spinBox value changed.
Definition: numparteditorw.cpp:263
NumPartEditorW::on_value_field_textEdited
void on_value_field_textEdited()
NumPartEditorW::on_value_field_textChanged emit changed when value_field text changed.
Definition: numparteditorw.cpp:255
NumPartEditorW::idfolio
@ idfolio
Definition: numparteditorw.h:45
NumPartEditorW::tenfolio
@ tenfolio
Definition: numparteditorw.h:44
NumPartEditorW::hundred
@ hundred
Definition: numparteditorw.h:44
NumPartEditorW::isValid
bool isValid()
NumPartEditorW::isValid.
Definition: numparteditorw.cpp:203
NumPartEditorW::NumPartEditorW
NumPartEditorW(int type, QWidget *parent=nullptr)
NumPartEditorW::NumPartEditorW Constructor.
Definition: numparteditorw.cpp:28
NumerotationContext
Definition: numerotationcontext.h:31
NumPartEditorW::unitfolio
@ unitfolio
Definition: numparteditorw.h:44
NumPartEditorW::elementcolumn
@ elementcolumn
Definition: numparteditorw.h:46
NumPartEditorW::setType
void setType(NumPartEditorW::type t, bool=false)
NumPartEditorW::setType Set good behavior by type t.
Definition: numparteditorw.cpp:273
NumPartEditorW::folio
@ folio
Definition: numparteditorw.h:45
NumPartEditorW
Definition: numparteditorw.h:35
NumerotationContext::size
int size() const
NumerotationContext::size.
Definition: numerotationcontext.cpp:93
numparteditorw.h
NumPartEditorW::toNumContext
NumerotationContext toNumContext()
NumPartEditorW::toNumContext.
Definition: numparteditorw.cpp:138
NumPartEditorW::locmach
@ locmach
Definition: numparteditorw.h:45
NumPartEditorW::ten
@ ten
Definition: numparteditorw.h:44
NumPartEditorW::unit
@ unit
Definition: numparteditorw.h:44
numerotationcontext.h
NumPartEditorW::elementprefix
@ elementprefix
Definition: numparteditorw.h:46
NumPartEditorW::string
@ string
Definition: numparteditorw.h:45
NumPartEditorW::changed
void changed()
NumPartEditorW::plant
@ plant
Definition: numparteditorw.h:45
Ui
Definition: autonumberingdockwidget.h:25
NumPartEditorW::type_
type type_
Definition: numparteditorw.h:50
NumerotationContext::addValue
bool addValue(const QString &, const QVariant &=QVariant(1), const int=1, const int=0)
NumerotationContext::addValue add a new value on the contexte.
Definition: numerotationcontext.cpp:52
NumPartEditorW::m_edited_type
int m_edited_type
Definition: numparteditorw.h:69
NumerotationContext::itemAt
QStringList itemAt(const int) const
NumerotationContext::itemAt.
Definition: numerotationcontext.cpp:110
NumPartEditorW::on_type_cb_activated
void on_type_cb_activated(int)
NumPartEditorW::on_type_cb_activated Action when user change the type comboBox.
Definition: numparteditorw.cpp:219
NumPartEditorW::ui
Ui::NumPartEditorW * ui
Definition: numparteditorw.h:67
NumPartEditorW::~NumPartEditorW
~NumPartEditorW() override
Definition: numparteditorw.cpp:85
NumPartEditorW::intValidator
QValidator * intValidator
Definition: numparteditorw.h:68
NumPartEditorW::elementline
@ elementline
Definition: numparteditorw.h:46
NumPartEditorW::disableItem
void disableItem(int index)
QET::Icons::tr
QIcon tr
Definition: qeticons.cpp:206
NumPartEditorW::setVisibleItems
void setVisibleItems()
Definition: numparteditorw.cpp:91
NumPartEditorW::type
type
Definition: numparteditorw.h:44