2010-01-15 18:08:01 +00:00
|
|
|
/***************************************************************************
|
2010-01-16 20:21:42 +00:00
|
|
|
* Copyright (C) 2009,2010 by Volker Lanz <vl@fidra.de> *
|
2010-01-15 18:08:01 +00:00
|
|
|
* *
|
|
|
|
* 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. *
|
|
|
|
***************************************************************************/
|
|
|
|
|
2010-01-16 20:21:42 +00:00
|
|
|
#if !defined(EDITMOUNTPOINTDIALOGWIDGET__H)
|
2010-01-15 18:08:01 +00:00
|
|
|
|
2010-01-16 20:21:42 +00:00
|
|
|
#define EDITMOUNTPOINTDIALOGWIDGET__H
|
2010-01-15 18:08:01 +00:00
|
|
|
|
|
|
|
#include "ui_editmountpointdialogwidgetbase.h"
|
|
|
|
|
|
|
|
#include <QMap>
|
|
|
|
#include <QString>
|
|
|
|
|
|
|
|
class Partition;
|
|
|
|
|
|
|
|
class QWidget;
|
|
|
|
class QSpinBox;
|
|
|
|
class QCheckBox;
|
2014-05-14 01:01:34 +01:00
|
|
|
class QLineEdit;
|
|
|
|
class QPushButton;
|
2010-01-15 18:08:01 +00:00
|
|
|
class QStringList;
|
2010-01-16 22:16:04 +00:00
|
|
|
class QFile;
|
2010-01-15 18:08:01 +00:00
|
|
|
|
2010-06-01 23:07:13 +01:00
|
|
|
class MountEntry;
|
2010-01-16 20:21:42 +00:00
|
|
|
|
2010-01-15 18:08:01 +00:00
|
|
|
class EditMountPointDialogWidget : public QWidget, public Ui::EditMountPointDialogWidgetBase
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
EditMountPointDialogWidget(QWidget* parent, const Partition& p);
|
2010-01-16 20:21:42 +00:00
|
|
|
~EditMountPointDialogWidget();
|
2010-01-15 18:08:01 +00:00
|
|
|
|
|
|
|
public:
|
2014-05-14 01:01:34 +01:00
|
|
|
QPushButton& buttonMore() { return *m_ButtonMore; }
|
2010-01-16 20:21:42 +00:00
|
|
|
QLabel& labelName() { return *m_LabelNameValue; }
|
2014-05-14 01:01:34 +01:00
|
|
|
QLineEdit& editPath() { return *m_EditPath; }
|
2010-01-15 18:08:01 +00:00
|
|
|
QSpinBox& spinDumpFreq() { return *m_SpinDumpFreq; }
|
|
|
|
QSpinBox& spinPassNumber() { return *m_SpinPassNumber; }
|
2010-01-16 20:21:42 +00:00
|
|
|
QLabel& labelType() { return *m_LabelTypeValue; }
|
2010-01-15 18:08:01 +00:00
|
|
|
QStringList options();
|
2010-01-16 22:16:04 +00:00
|
|
|
QRadioButton& radioUUID() { return *m_RadioUUID; }
|
|
|
|
QRadioButton& radioLabel() { return *m_RadioLabel; }
|
|
|
|
QRadioButton& radioDeviceNode() { return *m_RadioDeviceNode; }
|
2010-01-16 20:21:42 +00:00
|
|
|
|
|
|
|
bool acceptChanges();
|
|
|
|
bool writeMountpoints(const QString& filename);
|
2010-01-15 18:08:01 +00:00
|
|
|
|
|
|
|
protected slots:
|
|
|
|
void on_m_ButtonSelect_clicked(bool);
|
|
|
|
void on_m_ButtonMore_clicked(bool);
|
|
|
|
|
|
|
|
private:
|
|
|
|
void setupOptions(const QStringList& options);
|
|
|
|
QMap<QString, QCheckBox*>& boxOptions() { return m_BoxOptions; }
|
|
|
|
const QMap<QString, QCheckBox*>& boxOptions() const { return m_BoxOptions; }
|
2010-01-16 20:21:42 +00:00
|
|
|
bool readMountpoints(const QString& filename);
|
|
|
|
QMap<QString, MountEntry*>& mountPoints() { return m_MountPoints; }
|
2010-01-16 22:16:04 +00:00
|
|
|
const Partition& partition() const { return m_Partition; }
|
2010-01-15 18:08:01 +00:00
|
|
|
|
|
|
|
private:
|
2010-01-16 22:16:04 +00:00
|
|
|
const Partition& m_Partition;
|
2010-01-16 20:21:42 +00:00
|
|
|
QMap<QString, MountEntry*> m_MountPoints;
|
2010-01-15 18:08:01 +00:00
|
|
|
QString m_Options;
|
|
|
|
QMap<QString, QCheckBox*> m_BoxOptions;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|