QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
numparteditorw.h
Go to the documentation of this file.
1/*
2 Copyright 2006-2024 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 "../numerotationcontext.h"
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
52 };
54 bool isValid ();
56
57 private:
58 void setVisibleItems();
59 void disableItem(int index);
61
62 private slots:
63 void on_type_cb_activated(int);
66 void setType (NumPartEditorW::type t, bool=false);
67
68 signals:
69 void changed ();
70
71 private:
72 Ui::NumPartEditorW *ui;
73 QValidator *intValidator;
74 int m_edited_type = -1;
75
76
77
78};
79
80#endif // NUMPARTEDITORW_H
The NumPartEditorW class This class represent a single part num widget. By this widget,...
Definition numparteditorw.h:37
void disableItem(int index)
void on_increase_spinBox_valueChanged(int)
NumPartEditorW::on_increase_spinBox_valueChanged emit changed when increase_spinBox value changed.
Definition numparteditorw.cpp:279
bool isValid()
NumPartEditorW::isValid.
Definition numparteditorw.cpp:217
type type_
Definition numparteditorw.h:55
void setVisibleItems()
Definition numparteditorw.cpp:104
Ui::NumPartEditorW * ui
Definition numparteditorw.h:72
int m_edited_type
0 == element : 1 == conductor : 2 == folio
Definition numparteditorw.h:74
~NumPartEditorW() override
Definition numparteditorw.cpp:98
void setCurrentIndex(NumPartEditorW::type)
NumPartEditorW::setCurrentIndex Set Current Index of type_cb.
Definition numparteditorw.cpp:373
void setType(NumPartEditorW::type t, bool=false)
NumPartEditorW::setType Set good behavior by type t.
Definition numparteditorw.cpp:289
NumerotationContext toNumContext()
NumPartEditorW::toNumContext.
Definition numparteditorw.cpp:151
void on_value_field_textEdited()
NumPartEditorW::on_value_field_textChanged emit changed when value_field text changed.
Definition numparteditorw.cpp:270
type
Definition numparteditorw.h:49
@ hundred
Definition numparteditorw.h:49
@ unitfolio
Definition numparteditorw.h:49
@ idfolio
Definition numparteditorw.h:50
@ tenfolio
Definition numparteditorw.h:49
@ elementline
Definition numparteditorw.h:51
@ hundredfolio
Definition numparteditorw.h:49
@ ten
Definition numparteditorw.h:49
@ elementcolumn
Definition numparteditorw.h:51
@ unit
Definition numparteditorw.h:49
@ plant
Definition numparteditorw.h:50
@ elementprefix
Definition numparteditorw.h:51
@ folio
Definition numparteditorw.h:50
@ string
Definition numparteditorw.h:50
@ locmach
Definition numparteditorw.h:50
void on_type_cb_activated(int)
NumPartEditorW::on_type_cb_activated Action when user change the type comboBox.
Definition numparteditorw.cpp:234
QValidator * intValidator
Definition numparteditorw.h:73
Definition numerotationcontext.h:31
Definition autonumberingdockwidget.h:26