QElectroTech 0.200.1-dev
Loading...
Searching...
No Matches
numparteditorw.h
Go to the documentation of this file.
1/*
2 Copyright 2006-2026 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
22
23#include <QValidator>
24#include <QWidget>
25
26namespace Ui {
27 class NumPartEditorW;
28}
29
36class NumPartEditorW : public QWidget
37{
38 Q_OBJECT
39
40 //METHODS
41 public:
42 explicit NumPartEditorW(int type, QWidget *parent = nullptr);
44 int,
45 int type,
46 QWidget *parent=nullptr);
47 ~NumPartEditorW() override;
48
54 };
56 bool isValid ();
58
59 private:
60 void setVisibleItems();
61 void disableItem(int index);
63
64 private slots:
65 void on_type_cb_activated(int);
69 void on_format_le_textEdited(const QString &);
70 void setType (NumPartEditorW::type t, bool=false);
71
72 signals:
73 void changed ();
74
75 private:
76 Ui::NumPartEditorW *ui;
77 QValidator *intValidator;
78 QValidator *alphaValidator;
79 int m_edited_type = -1;
80
81
82
83};
84
85#endif // NUMPARTEDITORW_H
void disableItem(int index)
NumPartEditorW(int type, QWidget *parent=nullptr)
NumPartEditorW::NumPartEditorW Constructor.
Definition numparteditorw.cpp:31
void on_increase_spinBox_valueChanged(int)
NumPartEditorW::on_increase_spinBox_valueChanged emit changed when increase_spinBox value changed.
Definition numparteditorw.cpp:325
bool isValid()
NumPartEditorW::isValid.
Definition numparteditorw.cpp:259
type type_
Definition numparteditorw.h:57
void setVisibleItems()
Definition numparteditorw.cpp:121
Ui::NumPartEditorW * ui
Definition numparteditorw.h:76
int m_edited_type
0 == element : 1 == conductor : 2 == folio
Definition numparteditorw.h:79
~NumPartEditorW() override
Definition numparteditorw.cpp:114
void setCurrentIndex(NumPartEditorW::type)
NumPartEditorW::setCurrentIndex Set Current Index of type_cb.
Definition numparteditorw.cpp:462
void setType(NumPartEditorW::type t, bool=false)
NumPartEditorW::setType Set good behavior by type t.
Definition numparteditorw.cpp:351
NumerotationContext toNumContext()
NumPartEditorW::toNumContext.
Definition numparteditorw.cpp:174
void on_value_field_textEdited()
NumPartEditorW::on_value_field_textChanged emit changed when value_field text changed.
Definition numparteditorw.cpp:316
type
Definition numparteditorw.h:49
@ hundred
Definition numparteditorw.h:49
@ unitfolio
Definition numparteditorw.h:49
@ idfolio
Definition numparteditorw.h:51
@ wrap
Definition numparteditorw.h:53
@ tenfolio
Definition numparteditorw.h:49
@ elementline
Definition numparteditorw.h:52
@ hundredfolio
Definition numparteditorw.h:49
@ alpha
Definition numparteditorw.h:50
@ ten
Definition numparteditorw.h:49
@ elementcolumn
Definition numparteditorw.h:52
@ unit
Definition numparteditorw.h:49
@ plant
Definition numparteditorw.h:51
@ elementprefix
Definition numparteditorw.h:52
@ folio
Definition numparteditorw.h:51
@ string
Definition numparteditorw.h:51
@ locmach
Definition numparteditorw.h:51
void on_format_le_textEdited(const QString &)
NumPartEditorW::on_modulus_spinBox_valueChanged emit changed when modulus_spinBox value changed.
Definition numparteditorw.cpp:337
void on_type_cb_activated(int)
NumPartEditorW::on_type_cb_activated Action when user change the type comboBox.
Definition numparteditorw.cpp:276
QValidator * intValidator
Definition numparteditorw.h:77
QValidator * alphaValidator
Definition numparteditorw.h:78
void on_modulus_spinBox_valueChanged(int)
Definition numparteditorw.cpp:341
Definition numerotationcontext.h:31
Definition autonumberingdockwidget.h:30