QElectroTech
0.70
sources
ui
elementinfopartwidget.h
Go to the documentation of this file.
1
/*
2
Copyright 2006-2019 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 ELEMENTINFOPARTWIDGET_H
19
#define ELEMENTINFOPARTWIDGET_H
20
21
#include <QWidget>
22
23
namespace
Ui
{
24
class
ElementInfoPartWidget
;
25
}
26
27
class
ElementInfoPartWidget
:
public
QWidget
28
{
29
Q_OBJECT
30
31
//METHODS
32
public
:
33
explicit
ElementInfoPartWidget
(QString
key
,
const
QString& translated_key, QWidget *parent =
nullptr
);
34
~ElementInfoPartWidget
()
override
;
35
36
QString
key
()
const
{
return
key_
;}
37
void
setText
(
const
QString &);
38
QString
text
()
const
;
39
void
setPlaceHolderText
(
const
QString &
text
);
40
void
setFocusTolineEdit
();
41
void
setEnabled
(
bool
e);
42
void
setDisabled
(
bool
d);
43
void
setEraseTextVisible
(
bool
visible);
44
void
setEraseTextChecked
(
bool
check);
45
Qt::CheckState
EraseTextCheckState
()
const
;
46
47
signals:
48
void
textEdited
(
const
QString &
text
);
49
void
textChanged
(
const
QString &
text
);
50
51
//ATTRIBUTES
52
private
slots:
53
void
on_m_erase_text_clicked
();
54
55
private
:
56
Ui::ElementInfoPartWidget *
ui
;
57
QString
key_
;
58
bool
m_show_erase
=
false
;
59
};
60
61
#endif // ELEMENTINFOPARTWIDGET_H
ElementInfoPartWidget::ElementInfoPartWidget
ElementInfoPartWidget(QString key, const QString &translated_key, QWidget *parent=nullptr)
ElementInfoPartWidget::ElementInfoPartWidget Constructor.
Definition:
elementinfopartwidget.cpp:33
ElementInfoPartWidget::setFocusTolineEdit
void setFocusTolineEdit()
ElementInfoPartWidget::setFocusTolineEdit Set the focus to the line edit.
Definition:
elementinfopartwidget.cpp:89
Ui
Definition:
autonumberingdockwidget.h:25
ElementInfoPartWidget::textEdited
void textEdited(const QString &text)
ElementInfoPartWidget::setEraseTextChecked
void setEraseTextChecked(bool check)
ElementInfoPartWidget::setEraseTextChecked.
Definition:
elementinfopartwidget.cpp:124
ElementInfoPartWidget::setEnabled
void setEnabled(bool e)
ElementInfoPartWidget::setEnabled enable the line edit.
Definition:
elementinfopartwidget.cpp:98
ElementInfoPartWidget
Definition:
elementinfopartwidget.h:27
ElementInfoPartWidget::m_show_erase
bool m_show_erase
Definition:
elementinfopartwidget.h:58
ElementInfoPartWidget::on_m_erase_text_clicked
void on_m_erase_text_clicked()
Definition:
elementinfopartwidget.cpp:136
ElementInfoPartWidget::setEraseTextVisible
void setEraseTextVisible(bool visible)
ElementInfoPartWidget::setEraseTextVisible.
Definition:
elementinfopartwidget.cpp:115
ElementInfoPartWidget::ui
Ui::ElementInfoPartWidget * ui
Definition:
elementinfopartwidget.h:56
ElementInfoPartWidget::textChanged
void textChanged(const QString &text)
ElementInfoPartWidget::key_
QString key_
Definition:
elementinfopartwidget.h:57
ElementInfoPartWidget::setDisabled
void setDisabled(bool d)
ElementInfoPartWidget::setDisabled disable the line edit.
Definition:
elementinfopartwidget.cpp:107
ElementInfoPartWidget::~ElementInfoPartWidget
~ElementInfoPartWidget() override
ElementInfoPartWidget::~ElementInfoPartWidget destructor.
Definition:
elementinfopartwidget.cpp:50
ElementInfoPartWidget::setText
void setText(const QString &)
ElementInfoPartWidget::setText Set text to line edit.
Definition:
elementinfopartwidget.cpp:60
ElementInfoPartWidget::text
QString text() const
ElementInfoPartWidget::text.
Definition:
elementinfopartwidget.cpp:73
ElementInfoPartWidget::setPlaceHolderText
void setPlaceHolderText(const QString &text)
ElementInfoPartWidget::setPlaceHolderText.
Definition:
elementinfopartwidget.cpp:81
ElementInfoPartWidget::key
QString key() const
Definition:
elementinfopartwidget.h:36
ElementInfoPartWidget::EraseTextCheckState
Qt::CheckState EraseTextCheckState() const
ElementInfoPartWidget::EraseTextCheckState.
Definition:
elementinfopartwidget.cpp:132
Generated by
1.8.15