~ben-kietzman/ubuntu/quantal/mountmanager/fix-for-598070

« back to all changes in this revision

Viewing changes to sources/gui/volumewidget.h

  • Committer: Bazaar Package Importer
  • Author(s): Fabrice Coutadeur
  • Date: 2008-08-20 10:22:14 UTC
  • Revision ID: james.westby@ubuntu.com-20080820102214-fv93myu0ncb1503r
Tags: upstream-0.2.4
ImportĀ upstreamĀ versionĀ 0.2.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//MountManager - the program for easy mounting of storage devices in Linux
 
2
//Copyright (C) 2007-2008 Tikhonov Sergey
 
3
//
 
4
//This file is part of MountManager Gui
 
5
//
 
6
//This program is free software; you can redistribute it and/or
 
7
//modify it under the terms of the GNU General Public License
 
8
//as published by the Free Software Foundation; either version 2
 
9
//of the License, or (at your option) any later version.
 
10
//
 
11
//This program is distributed in the hope that it will be useful,
 
12
//but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
//GNU General Public License for more details.
 
15
//
 
16
//You should have received a copy of the GNU General Public License
 
17
//along with this program; if not, write to the Free Software
 
18
//Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
19
#ifndef VOLUMEWIDGET_H
 
20
#define VOLUMEWIDGET_H
 
21
 
 
22
#include <QtGui/QWidget>
 
23
 
 
24
class QPushButton;
 
25
class QLabel;
 
26
class QCheckBox;
 
27
class QLineEdit;
 
28
class QComboBox;
 
29
class OptionsTable;
 
30
class DiskDevice;
 
31
class DiskCore;
 
32
class PopupWindow;
 
33
class InfoButton;
 
34
class ChooseMountPointWidget;
 
35
class QAction;
 
36
class QSpinBox;
 
37
class QGroupBox;
 
38
 
 
39
class VolumeWidget : public QWidget
 
40
{
 
41
        Q_OBJECT
 
42
        signals:
 
43
                void showWarning(const QString& warningText,QList<QAction *> actions);
 
44
                void optionsChanged();
 
45
        private slots:
 
46
                void setFilter(const QString& filterText);
 
47
                void setTypeFilter(int index);
 
48
                void updateOptionLine();
 
49
                void udfOrIsoChangedSlot(int index);
 
50
                void useNtfs3g(bool use);
 
51
                void setMountPoint(const QString&);
 
52
        private:
 
53
                DiskDevice *device;
 
54
 
 
55
                ChooseMountPointWidget *mountPointLine;
 
56
                QCheckBox *dump;
 
57
                QSpinBox *fsck;
 
58
 
 
59
                QGroupBox *optionsGroupBox;
 
60
 
 
61
                QAction *changeMountPointAction;
 
62
                
 
63
                // Cd's can have file system udf or iso9660, but in
 
64
                // /etc/fstab user can write as file system "udf,iso9660" or "udf" or "iso9660" if user have DVD-Rom
 
65
                QComboBox *udfOrIsoComboBox;
 
66
                QLabel *udfOrIsoLabel;
 
67
                
 
68
                QCheckBox *showDefaultOptions;
 
69
                QCheckBox *useNtfs3gOptions;
 
70
                
 
71
                QLineEdit *optionsLine;
 
72
                InfoButton *optionsLineInfoButton;
 
73
 
 
74
                QLineEdit *filterLine;
 
75
                QPushButton *clearFilterLineButton;
 
76
 
 
77
                QComboBox *optionTypes;
 
78
                OptionsTable *optionsTable;
 
79
                // rw,suid,dev,exec,auto,nouser,async == defaults
 
80
                void replaceDefaultOptionsOnOneWord(QString&);
 
81
                QString fileSystem();
 
82
        public:
 
83
                VolumeWidget(DiskCore *core,DiskDevice *device,PopupWindow *popupWindow);
 
84
                ~VolumeWidget();
 
85
 
 
86
                const QString& mountPoint() const;
 
87
                QString options();
 
88
                QString fstabLine(bool warn = false,const QString& format = "name");
 
89
};
 
90
 
 
91
#endif