-rw-r--r-- | noncore/tools/formatter/formatter.cpp | 2 | ||||
-rw-r--r-- | noncore/tools/formatter/formatter.h | 3 | ||||
-rw-r--r-- | noncore/tools/formatter/formatter.pro | 4 | ||||
-rw-r--r-- | noncore/tools/formatter/main.cpp | 10 |
4 files changed, 6 insertions, 13 deletions
diff --git a/noncore/tools/formatter/formatter.cpp b/noncore/tools/formatter/formatter.cpp index 49f6355..a8dd11c 100644 --- a/noncore/tools/formatter/formatter.cpp +++ b/noncore/tools/formatter/formatter.cpp @@ -33,49 +33,49 @@ #include <qmessagebox.h> #include <qregexp.h> #include <qlabel.h> #include <qlineedit.h> #include <qpushbutton.h> #include <qtabwidget.h> #include <qwidget.h> #include <qlayout.h> #include <qvariant.h> #include <unistd.h> #include <stdio.h> #include <stdlib.h> #include <sys/vfs.h> #include <mntent.h> #include <string.h> #include <errno.h> #define BLANK ' ' #define DELIMITER '#' /* Blah blah blah blah */ -FormatterApp::FormatterApp( QWidget* parent, const char* name, bool , WFlags fl ) +FormatterApp::FormatterApp( QWidget* parent, const char* name, WFlags fl, bool modal ) : QMainWindow( parent, name, fl ) // : QDialog( parent, name, modal, fl ) { if ( !name ) setName( "FormatterApp" ); connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); setCaption( tr( "Formatter" ) ); FormatterAppLayout = new QGridLayout( this ); FormatterAppLayout->setSpacing( 2); FormatterAppLayout->setMargin( 2 ); TabWidget = new QTabWidget( this, "TabWidget" ); tab = new QWidget( TabWidget, "tab" ); tabLayout = new QGridLayout( tab ); tabLayout->setSpacing( 3); tabLayout->setMargin( 2); storageComboBox = new QComboBox( FALSE, tab, "storageComboBox" ); storageComboBox->setMaximumWidth(220); tabLayout->addMultiCellWidget( storageComboBox, 0, 0, 0, 1); diff --git a/noncore/tools/formatter/formatter.h b/noncore/tools/formatter/formatter.h index 960a68a..faf0b30 100644 --- a/noncore/tools/formatter/formatter.h +++ b/noncore/tools/formatter/formatter.h @@ -9,49 +9,50 @@ #ifndef FORMATTERAPP_H #define FORMATTERAPP_H #include <qvariant.h> //#include <qdialog.h> #include <qmainwindow.h> class QVBoxLayout; class QHBoxLayout; class QGridLayout; class QComboBox; class QLabel; class QLineEdit; class QPushButton; class QTabWidget; class QWidget; class QStringList; class FormatterApp : public QMainWindow //public QDialog { Q_OBJECT public: - FormatterApp( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); + static QString appName() { return QString::fromLatin1("formatter"); } + FormatterApp( QWidget* parent = 0, const char* name = 0, WFlags fl = 0, bool modal = FALSE ); ~FormatterApp(); QTabWidget *TabWidget; QWidget *tab, *tab_2;; QLabel *TextLabel1, *TextLabel2, *TextLabel3, *TextLabel4, *TextLabel5; QComboBox *storageComboBox, *fileSystemsCombo, *deviceComboBox; QPushButton *formatPushButton, *editPushButton, *fsckButton; QLineEdit* mountPointLineEdit; QStringList fileSystemTypeList, fsList, deviceList; protected: QGridLayout *FormatterAppLayout, *tabLayout, *tabLayout_2; QString getFileSystemType(const QString &); void fillCombos(); void parsetab(const QString &); bool doFdisk(); int formatCheck(const QString &); int runCommand(const QString &); protected slots: void cleanUp(); void doFormat(); void editFstab(); bool doFsck(); diff --git a/noncore/tools/formatter/formatter.pro b/noncore/tools/formatter/formatter.pro index baf6ace..17aab57 100644 --- a/noncore/tools/formatter/formatter.pro +++ b/noncore/tools/formatter/formatter.pro @@ -1,30 +1,28 @@ -TEMPLATE = app -CONFIG += qt warn_on release +CONFIG += qt warn_on release quick-app HEADERS = formatter.h inputDialog.h output.h SOURCES = formatter.cpp inputDialog.cpp output.cpp main.cpp TARGET = formatter -DESTDIR = $(OPIEDIR)/bin INCLUDEPATH += $(OPIEDIR)/include DEPENDPATH += $(OPIEDIR)/include LIBS += -lqpe TRANSLATIONS = ../../../i18n/de/formatter.ts \ ../../../i18n/nl/formatter.ts \ ../../../i18n/da/formatter.ts \ ../../../i18n/xx/formatter.ts \ ../../../i18n/en/formatter.ts \ ../../../i18n/es/formatter.ts \ ../../../i18n/fr/formatter.ts \ ../../../i18n/hu/formatter.ts \ ../../../i18n/ja/formatter.ts \ ../../../i18n/ko/formatter.ts \ ../../../i18n/no/formatter.ts \ ../../../i18n/pl/formatter.ts \ ../../../i18n/pt/formatter.ts \ ../../../i18n/pt_BR/formatter.ts \ ../../../i18n/sl/formatter.ts \ ../../../i18n/zh_CN/formatter.ts \ ../../../i18n/zh_TW/formatter.ts diff --git a/noncore/tools/formatter/main.cpp b/noncore/tools/formatter/main.cpp index f67c9f2..6228e55 100644 --- a/noncore/tools/formatter/main.cpp +++ b/noncore/tools/formatter/main.cpp @@ -1,25 +1,19 @@ /*************************************************************************** main.cpp - description ------------------- begin : March 10, 2002 copyright : (C) 2002 by llornkcor email : ljp@llornkcor.com * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * ***************************************************************************/ #include <qpe/qpeapplication.h> #include "formatter.h" -int main(int argc, char *argv[]) -{ - QPEApplication a(argc, argv); - - FormatterApp formatterApp; - a.showMainWidget( &formatterApp); - return a.exec(); -} +#include <opie/oapplicationfactory.h> +OPIE_EXPORT_APP( OApplicationFactory<FormatterApp> ) |