2020-09-16 00:35:12 +01:00
|
|
|
/*
|
|
|
|
SPDX-FileCopyrightText: 2010 Volker Lanz <vl@fidra.de>
|
|
|
|
SPDX-FileCopyrightText: 2014-2017 Andrius Štikonas <andrius@stikonas.eu>
|
|
|
|
|
|
|
|
SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
*/
|
2010-02-17 13:18:25 +00:00
|
|
|
|
2017-09-11 16:27:51 +01:00
|
|
|
#if !defined(DEVICEPROPSDIALOG_H)
|
2010-02-17 13:18:25 +00:00
|
|
|
|
2017-09-11 16:27:51 +01:00
|
|
|
#define DEVICEPROPSDIALOG_H
|
2010-02-17 13:18:25 +00:00
|
|
|
|
2014-05-17 03:06:58 +01:00
|
|
|
#include <QDialog>
|
2010-02-17 13:18:25 +00:00
|
|
|
|
|
|
|
class Device;
|
|
|
|
class DevicePropsWidget;
|
|
|
|
|
2014-05-17 03:06:58 +01:00
|
|
|
class QDialogButtonBox;
|
|
|
|
class QPushButton;
|
|
|
|
class QVBoxLayout;
|
2010-02-17 13:18:25 +00:00
|
|
|
class QWidget;
|
|
|
|
class QString;
|
|
|
|
|
2010-05-18 23:27:30 +01:00
|
|
|
/** Show Device properties.
|
2010-02-17 13:18:25 +00:00
|
|
|
|
2015-07-13 15:17:41 +01:00
|
|
|
Dialog that shows a Device's properties.
|
2010-02-17 13:18:25 +00:00
|
|
|
|
2015-07-13 15:17:41 +01:00
|
|
|
@author Volker Lanz <vl@fidra.de>
|
2010-02-17 13:18:25 +00:00
|
|
|
*/
|
2014-05-17 03:06:58 +01:00
|
|
|
class DevicePropsDialog : public QDialog
|
2010-02-17 13:18:25 +00:00
|
|
|
{
|
2015-07-13 15:17:41 +01:00
|
|
|
Q_DISABLE_COPY(DevicePropsDialog)
|
|
|
|
|
|
|
|
public:
|
|
|
|
DevicePropsDialog(QWidget* parent, Device& d);
|
|
|
|
~DevicePropsDialog();
|
|
|
|
|
|
|
|
public:
|
|
|
|
bool cylinderBasedAlignment() const;
|
|
|
|
bool sectorBasedAlignment() const;
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void setupDialog();
|
|
|
|
void setupConnections();
|
|
|
|
|
|
|
|
Device& device() {
|
|
|
|
return m_Device;
|
|
|
|
}
|
|
|
|
const Device& device() const {
|
|
|
|
return m_Device;
|
|
|
|
}
|
|
|
|
|
|
|
|
DevicePropsWidget& dialogWidget() {
|
|
|
|
Q_ASSERT(m_DialogWidget);
|
|
|
|
return *m_DialogWidget;
|
|
|
|
}
|
|
|
|
const DevicePropsWidget& dialogWidget() const {
|
|
|
|
Q_ASSERT(m_DialogWidget);
|
|
|
|
return *m_DialogWidget;
|
|
|
|
}
|
|
|
|
|
|
|
|
void setDirty(bool);
|
|
|
|
void onButtonSmartMore(bool);
|
|
|
|
|
|
|
|
private:
|
|
|
|
Device& m_Device;
|
|
|
|
DevicePropsWidget* m_DialogWidget;
|
|
|
|
|
|
|
|
QDialogButtonBox* dialogButtonBox;
|
|
|
|
QPushButton* okButton;
|
|
|
|
QPushButton* cancelButton;
|
|
|
|
QVBoxLayout *mainLayout;
|
2010-02-17 13:18:25 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|