2014-02-12 17:36:35 +00:00
|
|
|
/*
|
2018-11-09 18:50:37 +00:00
|
|
|
Copyright 2006-2018 The QElectroTech Team
|
2014-02-12 17:36:35 +00:00
|
|
|
This file is part of QElectroTech.
|
|
|
|
|
|
|
|
QElectroTech is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
QElectroTech is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with QElectroTech. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
#ifndef ELEMENTINFOPARTWIDGET_H
|
|
|
|
#define ELEMENTINFOPARTWIDGET_H
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class ElementInfoPartWidget;
|
|
|
|
}
|
|
|
|
|
2015-05-31 15:02:41 +00:00
|
|
|
class ElementInfoPartWidget : public QWidget
|
|
|
|
{
|
2014-02-12 17:36:35 +00:00
|
|
|
Q_OBJECT
|
|
|
|
|
2014-10-28 15:45:28 +00:00
|
|
|
//METHODS
|
|
|
|
public:
|
2018-07-19 14:14:31 +00:00
|
|
|
explicit ElementInfoPartWidget(QString key, const QString& translated_key, QWidget *parent = nullptr);
|
2017-08-05 02:10:01 +00:00
|
|
|
~ElementInfoPartWidget() override;
|
2014-10-28 15:45:28 +00:00
|
|
|
|
|
|
|
QString key () const {return key_;}
|
|
|
|
void setText (const QString &);
|
|
|
|
QString text () const;
|
2018-11-10 12:29:41 +00:00
|
|
|
void setPlaceHolderText (const QString &text);
|
2015-03-05 10:26:09 +00:00
|
|
|
void setFocusTolineEdit();
|
2016-11-24 16:45:55 +00:00
|
|
|
void setEnabled(bool e);
|
|
|
|
void setDisabled(bool d);
|
2018-11-09 18:50:37 +00:00
|
|
|
void setEraseTextVisible (bool visible);
|
|
|
|
void setEraseTextChecked (bool check);
|
|
|
|
Qt::CheckState EraseTextCheckState ()const;
|
2014-10-28 15:45:28 +00:00
|
|
|
|
2015-05-31 15:02:41 +00:00
|
|
|
signals:
|
2015-06-05 08:54:14 +00:00
|
|
|
void textEdited (const QString & text);
|
|
|
|
void textChanged (const QString & text);
|
2015-05-31 15:02:41 +00:00
|
|
|
|
2014-10-28 15:45:28 +00:00
|
|
|
//ATTRIBUTES
|
2018-11-09 18:50:37 +00:00
|
|
|
private slots:
|
|
|
|
void on_m_erase_text_clicked();
|
|
|
|
|
|
|
|
private:
|
2014-10-28 15:45:28 +00:00
|
|
|
Ui::ElementInfoPartWidget *ui;
|
|
|
|
QString key_;
|
2014-02-12 17:36:35 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // ELEMENTINFOPARTWIDGET_H
|