kdf
mntconfig.h
Go to the documentation of this file.00001 /* 00002 * mntconfig.h 00003 * 00004 * Copyright (c) 1999 Michael Kropfberger <michael.kropfberger@gmx.net> 00005 * 00006 * Requires the Qt widget libraries, available at no cost at 00007 * http://www.troll.no/ 00008 * 00009 * This program is free software; you can redistribute it and/or modify 00010 * it under the terms of the GNU General Public License as published by 00011 * the Free Software Foundation; either version 2 of the License, or 00012 * (at your option) any later version. 00013 * 00014 * This program is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 * GNU General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU General Public License 00020 * along with this program; if not, write to the Free Software 00021 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00022 */ 00023 00024 #ifndef __MNTCONFIG_H__ 00025 #define __MNTCONFIG_H__ 00026 00027 #include <kcmodule.h> 00028 #include <kconfig.h> 00029 #include <kiconloader.h> 00030 00031 #include "disks.h" 00032 #include "disklist.h" 00033 #include <QtGui/QCloseEvent> 00034 #include <QtCore/QVector> 00035 00036 class QGroupBox; 00037 class QPushButton; 00038 class KLineEdit; 00039 class KIconButton; 00040 00041 class CListView; 00042 class Q3ListViewItem; 00043 00044 /**************************************************************/ 00045 00046 class MntConfigWidget : public QWidget 00047 { 00048 Q_OBJECT 00049 00050 public: 00051 enum ColType 00052 { 00053 ICONCOL=0, 00054 DEVCOL=1, 00055 MNTPNTCOL=2, 00056 MNTCMDCOL=3, 00057 UMNTCMDCOL=4 00058 }; 00059 00060 public: 00061 explicit MntConfigWidget( QWidget *parent=0, bool init=false ); 00062 ~MntConfigWidget(); 00063 00064 public slots: 00065 void loadSettings( void ); 00066 void applySettings( void ); 00067 00068 protected slots: 00069 void slotChanged(); 00070 00071 private slots: 00072 void readDFDone( void ); 00073 void clicked( Q3ListViewItem *item ); 00074 void selectMntFile( void ); 00075 void selectUmntFile( void ); 00076 void iconChangedButton( const QString & ); 00077 void iconChanged( const QString & ); 00078 void mntCmdChanged( const QString & ); 00079 void umntCmdChanged( const QString & ); 00080 00081 protected: 00082 void closeEvent( QCloseEvent * ); 00083 00084 private: 00085 CListView *mList; 00086 QGroupBox *mGroupBox; 00087 KLineEdit *mIconLineEdit; 00088 KLineEdit *mMountLineEdit; 00089 KLineEdit *mUmountLineEdit; 00090 QPushButton *mMountButton; 00091 QPushButton *mUmountButton; 00092 KIconButton *mIconButton; 00093 DiskList mDiskList; 00094 bool mInitializing; 00095 QVector<Q3ListViewItem*> mDiskLookup; 00096 00097 signals: 00098 void configChanged(); 00099 }; 00100 00101 #endif
KDE 4.2 API Reference