QElectroTech  0.70
xrefpropertieswidget.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 XREFPROPERTIESWIDGET_H
19 #define XREFPROPERTIESWIDGET_H
20 
21 #include <QWidget>
23 
24 namespace Ui {
26 }
27 
32 class XRefPropertiesWidget : public QWidget
33 {
34  Q_OBJECT
35 
36  public:
37  XRefPropertiesWidget(QHash <QString, XRefProperties> properties = QHash <QString, XRefProperties>(), QWidget *parent = nullptr);
38  ~XRefPropertiesWidget() override;
39 
40  void setProperties (const QHash <QString, XRefProperties> &properties);
41  QHash <QString, XRefProperties> properties();
42 
43  void setReadOnly (bool = true);
44 
45  private:
46  void buildUi();
47  void saveProperties(int index);
48 
49  private slots:
50  void updateDisplay();
51  void typeChanged();
52  void enableOffsetSB(int i);
53 
54 
55  private:
56  Ui::XRefPropertiesWidget *ui;
57  QHash <QString, XRefProperties> m_properties;
59 };
60 
61 #endif // XREFPROPERTIESWIDGET_H
void updateDisplay()
XRefPropertiesWidget::updateDisplay Update display with the curent displayed type.
QHash< QString, XRefProperties > properties()
XRefPropertiesWidget::properties.
void setProperties(const QHash< QString, XRefProperties > &properties)
XRefPropertiesWidget::setProperties set new properties for this widget.
void saveProperties(int index)
XRefPropertiesWidget::saveProperties Save the properties of the type define at of the combo box m_ty...
The XRefPropertiesWidget class This class provide a widget to edit the XRefProperties.
void enableOffsetSB(int i)
XRefPropertiesWidget::enableOffsetSB Enable Offset SB only if Snap to Footer is selected.
void setReadOnly(bool=true)
XRefPropertiesWidget::setReadOnly Set all of this widget disable if true.
XRefPropertiesWidget(QHash< QString, XRefProperties > properties=QHash< QString, XRefProperties >(), QWidget *parent=nullptr)
XRefPropertiesWidget::XRefPropertiesWidget Default constructor.
void typeChanged()
XRefPropertiesWidget::typeChanged manage the save of the current properties, when the combo box of ty...
void buildUi()
XRefPropertiesWidget::buildUi Build some widget of this ui.
~XRefPropertiesWidget() override
XRefPropertiesWidget::~XRefPropertiesWidget Default destructor.
QHash< QString, XRefProperties > m_properties
Ui::XRefPropertiesWidget * ui