QElectroTech 0.100.0-dev
Loading...
Searching...
No Matches
xrefpropertieswidget.h
Go to the documentation of this file.
1/*
2 Copyright 2006-2024 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 "../properties/xrefproperties.h"
22
23#include <QHash>
24#include <QWidget>
25
26namespace Ui {
28}
29
34class XRefPropertiesWidget : public QWidget
35{
36 Q_OBJECT
37
38 public:
39 XRefPropertiesWidget(QHash <QString, XRefProperties> properties = QHash <QString, XRefProperties>(), QWidget *parent = nullptr);
40 ~XRefPropertiesWidget() override;
41
42 void setProperties (const QHash <QString, XRefProperties> &properties);
43 QHash <QString, XRefProperties> properties();
44
45 void setReadOnly (bool = true);
46
47 private:
48 void buildUi();
49 void saveProperties(int index);
50
51 private slots:
52 void updateDisplay();
53 void typeChanged();
54 void enableOffsetSB(int i);
55
56
57 private:
58 Ui::XRefPropertiesWidget *ui;
59 QHash <QString, XRefProperties> m_properties;
61};
62
63#endif // XREFPROPERTIESWIDGET_H
The XRefPropertiesWidget class This class provide a widget to edit the XRefProperties.
Definition xrefpropertieswidget.h:35
QHash< QString, XRefProperties > m_properties
Definition xrefpropertieswidget.h:59
void buildUi()
XRefPropertiesWidget::buildUi Build some widget of this ui.
Definition xrefpropertieswidget.cpp:99
~XRefPropertiesWidget() override
XRefPropertiesWidget::~XRefPropertiesWidget Default destructor.
Definition xrefpropertieswidget.cpp:50
Ui::XRefPropertiesWidget * ui
Definition xrefpropertieswidget.h:58
QHash< QString, XRefProperties > properties()
XRefPropertiesWidget::properties.
Definition xrefpropertieswidget.cpp:74
void enableOffsetSB(int i)
XRefPropertiesWidget::enableOffsetSB Enable Offset SB only if Snap to Footer is selected.
Definition xrefpropertieswidget.cpp:219
void typeChanged()
XRefPropertiesWidget::typeChanged manage the save of the current properties, when the combo box of ty...
Definition xrefpropertieswidget.cpp:204
void setProperties(const QHash< QString, XRefProperties > &properties)
XRefPropertiesWidget::setProperties set new properties for this widget.
Definition xrefpropertieswidget.cpp:63
void saveProperties(int index)
XRefPropertiesWidget::saveProperties Save the properties of the type define at index of the combo box...
Definition xrefpropertieswidget.cpp:121
void updateDisplay()
XRefPropertiesWidget::updateDisplay Update display with the current displayed type.
Definition xrefpropertieswidget.cpp:156
void setReadOnly(bool=true)
XRefPropertiesWidget::setReadOnly Set all of this widget disable if true.
Definition xrefpropertieswidget.cpp:85
int m_previous_type_index
Definition xrefpropertieswidget.h:60
Definition autonumberingdockwidget.h:26