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

« back to all changes in this revision

Viewing changes to plugins/ImagesMounting/imagesmounting.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 Plugin "Images mounting"
 
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 IMAGESMOUNTING_H
 
20
#define IMAGESMOUNTING_H
 
21
 
 
22
#include <QObject>
 
23
#include <QProcess>
 
24
#include "plugininterface.h"
 
25
 
 
26
class QWidget;
 
27
class QDialog;
 
28
class QDockWidget;
 
29
class QTextBrowser;
 
30
class QAction;
 
31
class QPushButton;
 
32
class QCheckBox;
 
33
class QLineEdit;
 
34
 
 
35
class ImagesMounting : public QObject, public MountManagerPlugin
 
36
{
 
37
        Q_OBJECT
 
38
        Q_INTERFACES(MountManagerPlugin)
 
39
        private slots:
 
40
                void chooseImage();
 
41
                void processFinished(int exitCode,QProcess::ExitStatus exitStatus);
 
42
                void chooseMountPoint();
 
43
                void mount();
 
44
                void unmount();
 
45
        signals:
 
46
                void showError(const QString &);
 
47
        private:
 
48
                QDialog *mainWidget;
 
49
                Actions actions;
 
50
                QPushButton *mountButton;
 
51
                QPushButton *unmountButton;
 
52
                QPushButton *closeButton;
 
53
                QLineEdit *imagePath;
 
54
                QLineEdit *mountPointPath;
 
55
                QPushButton *chooseImagePath;
 
56
                QPushButton *chooseMountPointPath;
 
57
                QCheckBox *openDirAfterMounting;
 
58
 
 
59
                QString homePath;
 
60
                QString imageType;
 
61
                QString tempIsoImagePath;
 
62
                QProcess *process;
 
63
                bool wasMounting;
 
64
 
 
65
                bool convert();
 
66
        public:
 
67
                ImagesMounting(QWidget *parent = 0);
 
68
                ~ImagesMounting();
 
69
 
 
70
                void setParent(QObject *parent);
 
71
 
 
72
                const QString pluginName() const;
 
73
                const QString pluginDescription() const;
 
74
                
 
75
                QDialog* dialog() const;
 
76
                QDockWidget* dockWidget() const;
 
77
                QMenu* menu() const;
 
78
                QToolBar* toolBar() const;
 
79
                
 
80
                Actions menuActions() const;
 
81
};
 
82
 
 
83
#endif