QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
elementinfopartwidget.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 ELEMENTINFOPARTWIDGET_H
19#define ELEMENTINFOPARTWIDGET_H
20
21#include <QWidget>
22
23namespace Ui {
25}
26
32class ElementInfoPartWidget : public QWidget
33{
34 Q_OBJECT
35
36 //METHODS
37 public:
38 explicit ElementInfoPartWidget(
39 QString key,
40 const QString& translated_key,
41 QWidget *parent = nullptr);
42 ~ElementInfoPartWidget() override;
43
44 QString key () const
45{return key_;}
46 QString text () const;
47 void setText (const QString &);
48 void setPlaceHolderText (const QString &text);
49 void setFocusTolineEdit();
50 void setEnabled(bool e);
51 void setDisabled(bool d);
52 void setEraseTextVisible (bool visible);
53 void setEraseTextChecked (bool check);
54 Qt::CheckState EraseTextCheckState ()const;
55
56 signals:
57 void textEdited (const QString & text);
58 void textChanged (const QString & text);
59
60 //ATTRIBUTES
61 private slots:
63
64 private:
65 Ui::ElementInfoPartWidget *ui;
66 QString key_;
67 bool m_show_erase = false;
68};
69
70#endif // ELEMENTINFOPARTWIDGET_H
The ElementInfoPartWidget class gebruikt bij schema editor als men edit dit Element aanklikt.
Definition elementinfopartwidget.h:33
~ElementInfoPartWidget() override
ElementInfoPartWidget::~ElementInfoPartWidget destructor.
Definition elementinfopartwidget.cpp:56
Ui::ElementInfoPartWidget * ui
Definition elementinfopartwidget.h:65
void setEraseTextVisible(bool visible)
ElementInfoPartWidget::setEraseTextVisible.
Definition elementinfopartwidget.cpp:126
void setPlaceHolderText(const QString &text)
ElementInfoPartWidget::setPlaceHolderText.
Definition elementinfopartwidget.cpp:88
bool m_show_erase
Definition elementinfopartwidget.h:67
QString text() const
ElementInfoPartWidget::text.
Definition elementinfopartwidget.cpp:65
void textChanged(const QString &text)
QString key() const
Definition elementinfopartwidget.h:44
Qt::CheckState EraseTextCheckState() const
ElementInfoPartWidget::EraseTextCheckState.
Definition elementinfopartwidget.cpp:145
void on_m_erase_text_clicked()
Definition elementinfopartwidget.cpp:150
void setEnabled(bool e)
ElementInfoPartWidget::setEnabled enable the line edit.
Definition elementinfopartwidget.cpp:107
void textEdited(const QString &text)
void setText(const QString &)
ElementInfoPartWidget::setText Set text to line edit.
Definition elementinfopartwidget.cpp:75
void setEraseTextChecked(bool check)
ElementInfoPartWidget::setEraseTextChecked.
Definition elementinfopartwidget.cpp:136
QString key_
Definition elementinfopartwidget.h:66
void setDisabled(bool d)
ElementInfoPartWidget::setDisabled disable the line edit.
Definition elementinfopartwidget.cpp:117
void setFocusTolineEdit()
ElementInfoPartWidget::setFocusTolineEdit Set the focus to the line edit.
Definition elementinfopartwidget.cpp:97
Definition autonumberingdockwidget.h:26