QElectroTech  0.8-dev
elementinfopartwidget.h
Go to the documentation of this file.
1 /*
2  Copyright 2006-2020 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 
32 class ElementInfoPartWidget : public QWidget
33 {
34  Q_OBJECT
35 
36  //METHODS
37  public:
38  explicit ElementInfoPartWidget(QString key,
39  const QString& translated_key,
40  QWidget *parent = nullptr);
41  ~ElementInfoPartWidget() override;
42 
43  QString key () const {return key_;}
44  QString text () const;
45  void setText (const QString &);
46  void setPlaceHolderText (const QString &text);
47  void setFocusTolineEdit();
48  void setEnabled(bool e);
49  void setDisabled(bool d);
50  void setEraseTextVisible (bool visible);
51  void setEraseTextChecked (bool check);
52  Qt::CheckState EraseTextCheckState ()const;
53 
54  signals:
55  void textEdited (const QString & text);
56  void textChanged (const QString & text);
57 
58  //ATTRIBUTES
59  private slots:
61 
62  private:
63  Ui::ElementInfoPartWidget *ui;
64  QString key_;
65  bool m_show_erase = false;
66 };
67 
68 #endif // ELEMENTINFOPARTWIDGET_H
ElementInfoPartWidget::m_show_erase
bool m_show_erase
Definition: elementinfopartwidget.h:65
ElementInfoPartWidget::setEraseTextVisible
void setEraseTextVisible(bool visible)
ElementInfoPartWidget::setEraseTextVisible.
Definition: elementinfopartwidget.cpp:124
ElementInfoPartWidget::text
QString text() const
ElementInfoPartWidget::text.
Definition: elementinfopartwidget.cpp:63
ElementInfoPartWidget::setEnabled
void setEnabled(bool e)
ElementInfoPartWidget::setEnabled enable the line edit.
Definition: elementinfopartwidget.cpp:105
ElementInfoPartWidget::~ElementInfoPartWidget
~ElementInfoPartWidget() override
ElementInfoPartWidget::~ElementInfoPartWidget destructor.
Definition: elementinfopartwidget.cpp:54
elementinfopartwidget.h
ElementInfoPartWidget::setFocusTolineEdit
void setFocusTolineEdit()
ElementInfoPartWidget::setFocusTolineEdit Set the focus to the line edit.
Definition: elementinfopartwidget.cpp:95
ElementInfoPartWidget
The ElementInfoPartWidget class gebruikt bij schema editor als men edit dit Element aanklikt.
Definition: elementinfopartwidget.h:33
SearchAndReplaceWorker::eraseText
static QString eraseText()
Definition: searchandreplaceworker.h:72
ElementInfoPartWidget::textEdited
void textEdited(const QString &text)
ElementInfoPartWidget::setDisabled
void setDisabled(bool d)
ElementInfoPartWidget::setDisabled disable the line edit.
Definition: elementinfopartwidget.cpp:115
ElementInfoPartWidget::key_
QString key_
Definition: elementinfopartwidget.h:64
ElementInfoPartWidget::setEraseTextChecked
void setEraseTextChecked(bool check)
ElementInfoPartWidget::setEraseTextChecked.
Definition: elementinfopartwidget.cpp:134
sarw
SearchAndReplaceWorker sarw
Definition: elementinfopartwidget.cpp:24
ElementInfoPartWidget::key
QString key() const
Definition: elementinfopartwidget.h:43
ElementInfoPartWidget::ui
Ui::ElementInfoPartWidget * ui
Definition: elementinfopartwidget.h:63
ElementInfoPartWidget::EraseTextCheckState
Qt::CheckState EraseTextCheckState() const
ElementInfoPartWidget::EraseTextCheckState.
Definition: elementinfopartwidget.cpp:143
SearchAndReplaceWorker
The SearchAndReplaceWorker class This class is the worker use to change properties when use the searc...
Definition: searchandreplaceworker.h:52
ElementInfoPartWidget::textChanged
void textChanged(const QString &text)
Ui
Definition: autonumberingdockwidget.h:25
ElementInfoPartWidget::ElementInfoPartWidget
ElementInfoPartWidget(QString key, const QString &translated_key, QWidget *parent=nullptr)
ElementInfoPartWidget::ElementInfoPartWidget Constructor.
Definition: elementinfopartwidget.cpp:33
searchandreplaceworker.h
ElementInfoPartWidget::on_m_erase_text_clicked
void on_m_erase_text_clicked()
Definition: elementinfopartwidget.cpp:148
ElementInfoPartWidget::setPlaceHolderText
void setPlaceHolderText(const QString &text)
ElementInfoPartWidget::setPlaceHolderText.
Definition: elementinfopartwidget.cpp:86
ElementInfoPartWidget::setText
void setText(const QString &)
ElementInfoPartWidget::setText Set text to line edit.
Definition: elementinfopartwidget.cpp:73
SearchAndReplaceWorker::setupLineEdit
static void setupLineEdit(QLineEdit *l, QCheckBox *cb, QString str)
SearchAndReplaceWorker::setupLineEdit With search and replace, when the variable to edit is a text,...
Definition: searchandreplaceworker.cpp:371