QElectroTech  0.70
conductorpropertieswidget.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 CONDUCTORPROPERTIESWIDGET_H
19 #define CONDUCTORPROPERTIESWIDGET_H
20 
21 #include <QWidget>
22 #include "conductorproperties.h"
24 class QComboBox;
25 class QPushButton;
26 
27 namespace Ui {
29 }
30 
31 class ConductorPropertiesWidget : public QWidget
32 {
33  Q_OBJECT
34 
35  public:
36  explicit ConductorPropertiesWidget(QWidget *parent = nullptr);
37  explicit ConductorPropertiesWidget(const ConductorProperties &properties, QWidget *parent = nullptr);
38  ~ConductorPropertiesWidget() override;
39 
40  //METHODS
43  void setReadOnly(const bool &ro);
44 
45  void addAutonumWidget (QWidget *widget);
46  void setHiddenOneTextPerFolio (const bool &hide);
47  void setDisabledShowText (const bool &disable = true);
48  void setHiddenAvailableAutonum (const bool &hide);
49  QComboBox *autonumComboBox() const;
50  QPushButton *editAutonumPushButton() const;
51 
52  private:
53  void initWidget();
55 
56  protected:
57  bool event(QEvent *event) override;
58 
59  //SLOTS
60  public slots:
61  void updatePreview(bool b = true);
62 
63  private slots:
64  void on_m_earth_cb_toggled(bool checked);
65  void on_m_neutral_cb_toggled(bool checked);
67 
68  private:
69  Ui::ConductorPropertiesWidget *ui;
72 };
73 
74 #endif // CONDUCTORPROPERTIESWIDGET_H
ConductorProperties properties() const
ConductorPropertiesWidget::properties.
Ui::ConductorPropertiesWidget * ui
~ConductorPropertiesWidget() override
ConductorPropertiesWidget::~ConductorPropertiesWidget destructor.
void on_m_earth_cb_toggled(bool checked)
ConductorPropertiesWidget::on_m_earth_cb_toggled Update the widget when toggled.
void initWidget()
ConductorPropertiesWidget::initWidget.
ConductorPropertiesWidget(QWidget *parent=nullptr)
ConductorPropertiesWidget::ConductorPropertiesWidget Constructor.
void setConductorType(ConductorProperties::ConductorType type)
ConductorPropertiesWidget::setConductorType Update this widget to the new conductor type...
QTextOrientationSpinBoxWidget * m_horiz_select
void on_m_update_preview_pb_clicked()
ConductorPropertiesWidget::on_m_update_preview_pb_clicked Update the preview of single line...
void setDisabledShowText(const bool &disable=true)
ConductorPropertiesWidget::setDisabledShowText.
QTextOrientationSpinBoxWidget * m_verti_select
bool event(QEvent *event) override
ConductorPropertiesWidget::event.
void setProperties(const ConductorProperties &properties)
ConductorPropertiesWidget::setProperties Set the properties.
ConductorType
The ConductorType enum Represents the kind of a particular conductor: Single: singleline symbols...
QPushButton * editAutonumPushButton() const
QIcon ro
Definition: qeticons.cpp:199
void setHiddenAvailableAutonum(const bool &hide)
ConductorPropertiesWidget::setHiddenAvailableAutonum Hide the label, combo box and push button of ava...
void on_m_neutral_cb_toggled(bool checked)
ConductorPropertiesWidget::on_m_neutral_cb_toggled Update the widget when toggled.
void addAutonumWidget(QWidget *widget)
ConductorPropertiesWidget::addAutonumWidget.
void setHiddenOneTextPerFolio(const bool &hide)
ConductorPropertiesWidget::setHiddenOneTextPerFolio.
void updatePreview(bool b=true)
ConductorPropertiesWidget::updatePreview Update the preview for single lien.
void setReadOnly(const bool &ro)
ConductorPropertiesWidget::setReadOnly.