QElectroTech
0.200.1-dev
Loading...
Searching...
No Matches
customelementinfopartwidget.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 CUSTOMELEMENTINFOPARTWIDGET_H
19
#define CUSTOMELEMENTINFOPARTWIDGET_H
20
21
#include <QWidget>
22
23
class
QLineEdit;
24
class
QToolButton;
25
33
class
CustomElementInfoPartWidget
:
public
QWidget
34
{
35
Q_OBJECT
36
37
public
:
38
explicit
CustomElementInfoPartWidget
(
39
const
QString &
key
= QString(),
40
const
QString &
value
= QString(),
41
QWidget *parent =
nullptr
);
42
~CustomElementInfoPartWidget
()
override
;
43
44
QString
key
()
const
;
45
QString
value
()
const
;
46
bool
hasValidKey
()
const
;
47
48
signals:
49
void
changed
();
50
void
removeRequested
(
CustomElementInfoPartWidget
*self);
51
52
private
slots:
53
void
validateKey
();
54
55
private
:
56
QLineEdit *
m_key_edit
;
57
QLineEdit *
m_value_edit
;
58
QToolButton *
m_remove_button
;
59
};
60
61
#endif
// CUSTOMELEMENTINFOPARTWIDGET_H
CustomElementInfoPartWidget::key
QString key() const
Definition
customelementinfopartwidget.cpp:77
CustomElementInfoPartWidget::m_remove_button
QToolButton * m_remove_button
Definition
customelementinfopartwidget.h:58
CustomElementInfoPartWidget::value
QString value() const
Definition
customelementinfopartwidget.cpp:85
CustomElementInfoPartWidget::m_value_edit
QLineEdit * m_value_edit
Definition
customelementinfopartwidget.h:57
CustomElementInfoPartWidget::~CustomElementInfoPartWidget
~CustomElementInfoPartWidget() override
Definition
customelementinfopartwidget.cpp:70
CustomElementInfoPartWidget::CustomElementInfoPartWidget
CustomElementInfoPartWidget(const QString &key=QString(), const QString &value=QString(), QWidget *parent=nullptr)
CustomElementInfoPartWidget::CustomElementInfoPartWidget Constructor.
Definition
customelementinfopartwidget.cpp:34
CustomElementInfoPartWidget::removeRequested
void removeRequested(CustomElementInfoPartWidget *self)
CustomElementInfoPartWidget::changed
void changed()
CustomElementInfoPartWidget::m_key_edit
QLineEdit * m_key_edit
Definition
customelementinfopartwidget.h:56
CustomElementInfoPartWidget::hasValidKey
bool hasValidKey() const
Definition
customelementinfopartwidget.cpp:94
CustomElementInfoPartWidget::validateKey
void validateKey()
CustomElementInfoPartWidget::validateKey Flag the key field when it doesn't match the accepted format...
Definition
customelementinfopartwidget.cpp:105
sources
ui
customelementinfopartwidget.h
Generated by
1.15.0