1/*
2* mntconfig.h
3*
4* Copyright (c) 1999 Michael Kropfberger <michael.kropfberger@gmx.net>
5* 2009 Dario Andres Rodriguez <andresbajotierra@gmail.com>
6*
7* This program is free software; you can redistribute it and/or modify
8* it under the terms of the GNU General Public License as published by
9* the Free Software Foundation; either version 2 of the License, or
10* (at your option) any later version.
11*
12* This program is distributed in the hope that it will be useful,
13* but WITHOUT ANY WARRANTY; without even the implied warranty of
14* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15* GNU General Public License for more details.
16*
17* You should have received a copy of the GNU General Public License
18* along with this program; if not, write to the Free Software
19* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20*/
21
22#ifndef MNTCONFIG_H
23#define MNTCONFIG_H
24
25#include <QtGui/QWidget>
26
27#include "ui_mntconfig.h"
28#include "disklist.h"
29
30/**************************************************************/
31
32class MntConfigWidget : public QWidget, private Ui_MntConfigWidget
33{
34 Q_OBJECT
35
36 public:
37 enum ColType
38 {
39 IconCol = 0,
40 DeviceCol = 1,
41 MountPointCol = 2,
42 MountCommandCol = 3,
43 UmountCommandCol = 4
44 };
45
46 explicit MntConfigWidget( QWidget *parent=0, bool init=false );
47 ~MntConfigWidget();
48
49 public Q_SLOTS:
50 void loadSettings( void );
51 void applySettings( void );
52
53 protected Q_SLOTS:
54 void slotChanged();
55
56 private Q_SLOTS:
57 void readDFDone( void );
58 void clicked( QTreeWidgetItem *, int);
59 void selectMntFile( void );
60 void selectUmntFile( void );
61 void iconChangedButton( const QString & );
62 void iconChanged( const QString & );
63 void iconDefault();
64 void mntCmdChanged( const QString & );
65 void umntCmdChanged( const QString & );
66
67 DiskEntry * selectedDisk( QTreeWidgetItem * );
68
69 protected:
70 void closeEvent( QCloseEvent * );
71
72 private:
73 DiskList mDiskList;
74 bool mInitializing;
75
76 Q_SIGNALS:
77 void configChanged();
78};
79
80#endif
81
82