author | harlekin <harlekin> | 2003-04-22 17:39:18 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2003-04-22 17:39:18 (UTC) |
commit | b22d89883cd92bd9d858caf5ca90b6eef80598d4 (patch) (side-by-side diff) | |
tree | 695ff1e42ca09098d8b0cba0b95f0f2f736e0fd2 | |
parent | ab9387322c5802f75bc9b37b3bb334bd98dd5dd1 (diff) | |
download | opie-b22d89883cd92bd9d858caf5ca90b6eef80598d4.zip opie-b22d89883cd92bd9d858caf5ca90b6eef80598d4.tar.gz opie-b22d89883cd92bd9d858caf5ca90b6eef80598d4.tar.bz2 |
- a lot of includes and gui cleanups
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.cpp | 39 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfm.h | 5 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfmData.cpp | 82 | ||||
-rw-r--r-- | noncore/apps/advancedfm/advancedfmMenu.cpp | 4 |
4 files changed, 47 insertions, 83 deletions
diff --git a/noncore/apps/advancedfm/advancedfm.cpp b/noncore/apps/advancedfm/advancedfm.cpp index 41e83c7..66353bb 100644 --- a/noncore/apps/advancedfm/advancedfm.cpp +++ b/noncore/apps/advancedfm/advancedfm.cpp @@ -14,3 +14,3 @@ -#include <opie/otabwidget.h> + // #include <opie/ofileselector.h> @@ -18,9 +18,7 @@ -#include <qpe/config.h> +#include <opie/otabwidget.h> + #include <qpe/filemanager.h> #include <qpe/qcopenvelope_qws.h> -#include <qpe/qpemenubar.h> -#include <qpe/qpetoolbar.h> #include <qpe/qpeapplication.h> -#include <qpe/qcopenvelope_qws.h> #include <qpe/config.h> @@ -32,12 +30,4 @@ - -#include <qwmatrix.h> -#include <qregexp.h> -#include <qtabwidget.h> -#include <qtextstream.h> -#include <qpushbutton.h> #include <qdatetime.h> -#include <qdir.h> #include <qfile.h> -#include <qstring.h> #include <qcombobox.h> @@ -45,6 +35,3 @@ #include <qlistview.h> -#include <qmainwindow.h> #include <qlabel.h> -#include <qprogressbar.h> -#include <qspinbox.h> #include <qwidget.h> @@ -52,20 +39,11 @@ #include <qimage.h> -#include <qpixmap.h> #include <qmessagebox.h> #include <qlineedit.h> -#include <qregexp.h> -#include <unistd.h> -#include <stdlib.h> #include <sys/stat.h> -#include <dirent.h> -#include <stdio.h> #include <time.h> +#include <dirent.h> #include <fcntl.h> -#include <mntent.h> -#include <string.h> -#include <errno.h> #include <sys/vfs.h> #include <mntent.h> -#include <sys/utsname.h> @@ -76,7 +54,4 @@ AdvancedFm::AdvancedFm( ) - QWMatrix matrix; - QPixmap pix(Resource::loadPixmap( "UnknownDocument" )); - matrix.scale( .4, .4); - unknownXpm = pix.xForm(matrix); - + unknownXpm = Resource::loadImage( "UnknownDocument" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ); + initConnections(); @@ -212,3 +187,3 @@ void AdvancedFm::populateView() item->setPixmap( 0,pm); - + } diff --git a/noncore/apps/advancedfm/advancedfm.h b/noncore/apps/advancedfm/advancedfm.h index c30d8e0..4480051 100644 --- a/noncore/apps/advancedfm/advancedfm.h +++ b/noncore/apps/advancedfm/advancedfm.h @@ -42,4 +42,2 @@ class QTabWidget; class QWidget; -class QPEToolBar; -class QPEMenuBar; class QPopupMenu; @@ -50,3 +48,2 @@ class MenuButton; -//class QPushButton; class QToolButton; @@ -56,3 +53,3 @@ class AdvancedFm : public QMainWindow { - Q_OBJECT + Q_OBJECT public: diff --git a/noncore/apps/advancedfm/advancedfmData.cpp b/noncore/apps/advancedfm/advancedfmData.cpp index 1a7a6d7..eb2bcd8 100644 --- a/noncore/apps/advancedfm/advancedfmData.cpp +++ b/noncore/apps/advancedfm/advancedfmData.cpp @@ -15,13 +15,9 @@ #include <qpe/qpeapplication.h> -#include <qpe/qpemenubar.h> -#include <qpe/qpetoolbar.h> #include <qpe/resource.h> #include <qpe/menubutton.h> -#include <qpe/config.h> #include <qlayout.h> -#include <qpixmap.h> +#include <qhbox.h> +#include <qmenubar.h> #include <qcombobox.h> -#include <qpopupmenu.h> -#include <qtabwidget.h> #include <qtoolbutton.h> @@ -39,8 +35,8 @@ void AdvancedFm::init() { - QGridLayout *layout = new QGridLayout( this ); - layout->setSpacing( 2); - layout->setMargin( 2); + QVBoxLayout *layout = new QVBoxLayout( this ); + layout->setSpacing( 2); + layout->setMargin( 2); - QPEMenuBar *menuBar = new QPEMenuBar(this); + QMenuBar *menuBar = new QMenuBar(this); fileMenu = new QPopupMenu( this ); @@ -49,3 +45,3 @@ void AdvancedFm::init() { - layout->addMultiCellWidget( menuBar, 0, 0, 0, 1 ); + layout->addWidget( menuBar ); @@ -53,38 +49,35 @@ void AdvancedFm::init() { menuBar->insertItem( tr( "View" ), viewMenu); -// menuBar->insertItem( tr( "^" ), customDirMenu); - cdUpButton = new QToolButton( this,"cdUpButton"); + cdUpButton = new QToolButton( 0,"cdUpButton"); cdUpButton->setPixmap(Resource::loadPixmap("up")); - cdUpButton->setFixedSize( QSize( 20, 20 ) ); - layout->addMultiCellWidget( cdUpButton , 0, 0, 2, 2); + cdUpButton->setAutoRaise( true ); + menuBar->insertItem( cdUpButton ); - menuButton = new MenuButton(this); - menuButton->setFixedSize( QSize( 20, 20 ) ); - layout->addMultiCellWidget( menuButton , 0, 0, 3, 3); - qpeDirButton= new QToolButton(this,"QPEButton"); + QHBox *lineBox = new QHBox( this ); + + qpeDirButton= new QToolButton( 0,"QPEButton"); qpeDirButton->setPixmap( Resource::loadPixmap("launcher/opielogo16x16"));//,"",this,"QPEButton"); - qpeDirButton ->setFixedSize( QSize( 20, 20 ) ); - layout->addMultiCellWidget( qpeDirButton , 0, 0, 4, 4); + qpeDirButton->setAutoRaise( true ); + menuBar->insertItem( qpeDirButton ); - cfButton = new QToolButton( this,"CFButton"); + cfButton = new QToolButton( 0, "CFButton"); cfButton->setPixmap(Resource::loadPixmap("cardmon/pcmcia")); - cfButton ->setFixedSize( QSize( 20, 20 ) ); - layout->addMultiCellWidget( cfButton , 0, 0, 5, 5); + cfButton->setAutoRaise( true ); + menuBar->insertItem( cfButton ); - sdButton = new QToolButton( this,"SDButton"); + sdButton = new QToolButton( 0, "SDButton"); sdButton->setPixmap(Resource::loadPixmap("advancedfm/sdcard")); - sdButton->setFixedSize( QSize( 20, 20 ) ); - layout->addMultiCellWidget( sdButton , 0, 0, 6, 6); - + sdButton->setAutoRaise( true ); + menuBar->insertItem( sdButton ); - docButton = new QToolButton( this,"docsButton"); + docButton = new QToolButton( 0,"docsButton"); docButton->setPixmap(Resource::loadPixmap("DocsIcon")); - docButton->setFixedSize( QSize( 20, 20 ) ); - layout->addMultiCellWidget( docButton, 0, 0, 7, 7); + docButton->setAutoRaise( true ); + menuBar->insertItem( docButton ); - homeButton = new QToolButton( this,"homeButton"); + homeButton = new QToolButton( 0, "homeButton"); homeButton->setPixmap(Resource::loadPixmap("home")); - homeButton->setFixedSize( QSize( 20, 20 ) ); - layout->addMultiCellWidget( homeButton, 0, 0, 8, 8); + homeButton->setAutoRaise( true ); + menuBar->insertItem( homeButton ); @@ -113,6 +106,2 @@ void AdvancedFm::init() { - menuButton->setUseLabel(false); - menuButton->insertItem( s_addBookmark); - menuButton->insertItem( s_removeBookmark); - menuButton->insertSeparator(); // menuButton->insertItem(""); @@ -125,10 +114,15 @@ void AdvancedFm::init() { - currentPathCombo = new QComboBox( FALSE, this, "currentPathCombo" ); - currentPathCombo->setEditable(TRUE); - layout->addMultiCellWidget( currentPathCombo, 1, 1, 0, 8); - currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); + menuButton = new MenuButton( lineBox ); + menuButton->setUseLabel(false); + menuButton->setMaximumWidth( 20 ); + menuButton->insertItem( s_addBookmark); + menuButton->insertItem( s_removeBookmark); + menuButton->insertSeparator(); + + currentPathCombo = new QComboBox( FALSE, lineBox, "currentPathCombo" ); + currentPathCombo->setEditable(TRUE); currentPathCombo->lineEdit()->setText( currentDir.canonicalPath()); - layout->addMultiCellWidget( currentPathCombo, 1, 1, 0, 8); + layout->addWidget( lineBox ); @@ -137,3 +131,3 @@ void AdvancedFm::init() { // TabWidget = new QTabWidget( this, "TabWidget" ); - layout->addMultiCellWidget( TabWidget, 2, 2, 0, 8); + layout->addWidget( TabWidget, 4 ); diff --git a/noncore/apps/advancedfm/advancedfmMenu.cpp b/noncore/apps/advancedfm/advancedfmMenu.cpp index eae86a4..575833a 100644 --- a/noncore/apps/advancedfm/advancedfmMenu.cpp +++ b/noncore/apps/advancedfm/advancedfmMenu.cpp @@ -20,4 +20,2 @@ #include <qpe/qpeapplication.h> -#include <qpe/qpemenubar.h> -#include <qpe/qpetoolbar.h> #include <qpe/resource.h> @@ -776,3 +774,3 @@ void AdvancedFm::oprocessStderr(OProcess*, char *buffer, int buflen) { QMessageBox::warning( this, tr("Error"), lineStr ,tr("Ok") ); - + // OutputEdit->append(lineStr); |