QElectroTech  0.70
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 {
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:
54 
55  private:
56  Ui::ElementInfoPartWidget *ui;
57  QString key_;
58  bool m_show_erase = false;
59 };
60 
61 #endif // ELEMENTINFOPARTWIDGET_H
ElementInfoPartWidget(QString key, const QString &translated_key, QWidget *parent=nullptr)
ElementInfoPartWidget::ElementInfoPartWidget Constructor.
void setFocusTolineEdit()
ElementInfoPartWidget::setFocusTolineEdit Set the focus to the line edit.
void textEdited(const QString &text)
void setEraseTextChecked(bool check)
ElementInfoPartWidget::setEraseTextChecked.
void setEnabled(bool e)
ElementInfoPartWidget::setEnabled enable the line edit.
void setEraseTextVisible(bool visible)
ElementInfoPartWidget::setEraseTextVisible.
Ui::ElementInfoPartWidget * ui
void textChanged(const QString &text)
void setDisabled(bool d)
ElementInfoPartWidget::setDisabled disable the line edit.
~ElementInfoPartWidget() override
ElementInfoPartWidget::~ElementInfoPartWidget destructor.
void setText(const QString &)
ElementInfoPartWidget::setText Set text to line edit.
QString text() const
ElementInfoPartWidget::text.
void setPlaceHolderText(const QString &text)
ElementInfoPartWidget::setPlaceHolderText.
Qt::CheckState EraseTextCheckState() const
ElementInfoPartWidget::EraseTextCheckState.