2010-02-17 13:18:25 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* Copyright (C) 2010 by Volker Lanz <vl@fidra.de> *
|
|
|
|
* *
|
|
|
|
* This program 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. *
|
|
|
|
* *
|
|
|
|
* This program 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 this program; if not, write to the *
|
|
|
|
* Free Software Foundation, Inc., *
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
|
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
#if !defined(DEVICEPROPSDIALOG__H)
|
|
|
|
|
|
|
|
#define DEVICEPROPSDIALOG__H
|
|
|
|
|
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
|
|
|
|
|
|
|
Dialog that shows a Device's properties.
|
|
|
|
|
2010-05-18 23:27:30 +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
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
Q_DISABLE_COPY(DevicePropsDialog)
|
|
|
|
|
|
|
|
public:
|
|
|
|
DevicePropsDialog(QWidget* parent, Device& d);
|
|
|
|
~DevicePropsDialog();
|
|
|
|
|
2010-02-24 10:47:22 +00:00
|
|
|
public:
|
2010-03-01 12:00:07 +00:00
|
|
|
bool cylinderBasedAlignment() const;
|
|
|
|
bool sectorBasedAlignment() const;
|
2010-02-24 10:47:22 +00:00
|
|
|
|
2010-02-17 13:18:25 +00:00
|
|
|
protected:
|
|
|
|
void setupDialog();
|
2010-02-24 10:47:22 +00:00
|
|
|
void setupConnections();
|
2010-02-17 13:18:25 +00:00
|
|
|
|
|
|
|
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; }
|
|
|
|
|
2010-03-27 13:47:32 +00:00
|
|
|
void onButtonSmartMore();
|
|
|
|
|
2014-05-20 22:33:02 +01:00
|
|
|
protected Q_SLOTS:
|
2010-02-24 10:47:22 +00:00
|
|
|
void setDirty(bool);
|
2010-03-27 13:47:32 +00:00
|
|
|
void onButtonSmartMore(bool);
|
2010-02-24 10:47:22 +00:00
|
|
|
|
2010-02-17 13:18:25 +00:00
|
|
|
private:
|
|
|
|
Device& m_Device;
|
|
|
|
DevicePropsWidget* m_DialogWidget;
|
2014-05-17 03:06:58 +01:00
|
|
|
|
|
|
|
QDialogButtonBox* dialogButtonBox;
|
|
|
|
QPushButton* okButton;
|
|
|
|
QPushButton* cancelButton;
|
|
|
|
QVBoxLayout *mainLayout;
|
2010-02-17 13:18:25 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|