00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef FORMATTERAPP_H
00010 #define FORMATTERAPP_H
00011
00012 #include <qvariant.h>
00013
00014 #include <qmainwindow.h>
00015
00016 class QVBoxLayout;
00017 class QHBoxLayout;
00018 class QGridLayout;
00019 class QComboBox;
00020 class QLabel;
00021 class QLineEdit;
00022 class QPushButton;
00023 class QTabWidget;
00024 class QWidget;
00025 class QStringList;
00026
00027 class FormatterApp : public QMainWindow
00028
00029 {
00030 Q_OBJECT
00031
00032 public:
00033 static QString appName() { return QString::fromLatin1("formatter"); }
00034 FormatterApp( QWidget* parent = 0, const char* name = 0, WFlags fl = 0, bool modal = FALSE );
00035 ~FormatterApp();
00036
00037 QTabWidget *TabWidget;
00038 QWidget *tab, *tab_2;;
00039 QLabel *TextLabel1, *TextLabel2, *TextLabel3, *TextLabel4, *TextLabel5;
00040 QComboBox *storageComboBox, *fileSystemsCombo, *deviceComboBox;
00041 QPushButton *formatPushButton, *editPushButton, *fsckButton;
00042 QLineEdit* mountPointLineEdit;
00043 QStringList fileSystemTypeList, fsList, deviceList;
00044 protected:
00045 QGridLayout *FormatterAppLayout, *tabLayout, *tabLayout_2;
00046 QString getFileSystemType(const QString &);
00047
00048 void fillCombos();
00049 void parsetab(const QString &);
00050 bool doFdisk();
00051 int formatCheck(const QString &);
00052 int runCommand(const QString &);
00053
00054 protected slots:
00055 void cleanUp();
00056 void doFormat();
00057 void editFstab();
00058 bool doFsck();
00059 bool doFsckCheck();
00060
00061 void fsComboSelected(int);
00062 void storageComboSelected(int );
00063 void deviceComboSelected(int );
00064 };
00065
00066 #endif // FORMATTERAPP_H