2014-04-11 09:51:21 +00:00
|
|
|
/*
|
2025-01-04 13:37:40 +01:00
|
|
|
Copyright 2006-2025 The QElectroTech Team
|
2014-04-11 09:51:21 +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 XREFPROPERTIESWIDGET_H
|
|
|
|
#define XREFPROPERTIESWIDGET_H
|
|
|
|
|
2020-12-08 19:57:35 +01:00
|
|
|
#include "../properties/xrefproperties.h"
|
2020-09-21 21:19:50 +02:00
|
|
|
|
2020-12-08 19:57:35 +01:00
|
|
|
#include <QHash>
|
|
|
|
#include <QWidget>
|
2014-04-11 09:51:21 +00:00
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class XRefPropertiesWidget;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
2020-08-16 11:19:36 +02:00
|
|
|
@brief The XRefPropertiesWidget class
|
|
|
|
This class provide a widget to edit the XRefProperties
|
|
|
|
*/
|
2014-04-11 09:51:21 +00:00
|
|
|
class XRefPropertiesWidget : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2017-08-05 02:06:59 +00:00
|
|
|
XRefPropertiesWidget(QHash <QString, XRefProperties> properties = QHash <QString, XRefProperties>(), QWidget *parent = nullptr);
|
2017-08-05 02:10:01 +00:00
|
|
|
~XRefPropertiesWidget() override;
|
2014-04-11 09:51:21 +00:00
|
|
|
|
2014-07-03 08:52:14 +00:00
|
|
|
void setProperties (const QHash <QString, XRefProperties> &properties);
|
|
|
|
QHash <QString, XRefProperties> properties();
|
2014-04-11 09:51:21 +00:00
|
|
|
|
|
|
|
void setReadOnly (bool = true);
|
|
|
|
|
|
|
|
private:
|
2014-07-03 08:52:14 +00:00
|
|
|
void buildUi();
|
|
|
|
void saveProperties(int index);
|
|
|
|
|
|
|
|
private slots:
|
2014-04-11 09:51:21 +00:00
|
|
|
void updateDisplay();
|
2014-07-03 08:52:14 +00:00
|
|
|
void typeChanged();
|
2016-06-10 16:46:15 +00:00
|
|
|
void enableOffsetSB(int i);
|
2014-07-03 08:52:14 +00:00
|
|
|
|
2014-04-11 09:51:21 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
Ui::XRefPropertiesWidget *ui;
|
2014-07-03 08:52:14 +00:00
|
|
|
QHash <QString, XRefProperties> m_properties;
|
|
|
|
int m_previous_type_index;
|
2014-04-11 09:51:21 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // XREFPROPERTIESWIDGET_H
|