summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/opie-bartender/bartender.cpp34
1 files changed, 18 insertions, 16 deletions
diff --git a/noncore/apps/opie-bartender/bartender.cpp b/noncore/apps/opie-bartender/bartender.cpp
index bee164c..57b28d4 100644
--- a/noncore/apps/opie-bartender/bartender.cpp
+++ b/noncore/apps/opie-bartender/bartender.cpp
@@ -21,4 +21,4 @@
#include <opie2/odebug.h>
+#include <opie2/oresource.h>
#include <qpe/qpeapplication.h>
-#include <qpe/resource.h>
using namespace Opie::Core;
@@ -51,5 +51,3 @@ Bartender::Bartender( QWidget* parent, const char* name, WFlags fl )
setName( "Bartender" );
- QGridLayout *layout = new QGridLayout( this );
- layout->setSpacing( 2);
- layout->setMargin( 2);
+
connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
@@ -58,9 +56,8 @@ Bartender::Bartender( QWidget* parent, const char* name, WFlags fl )
- setToolBarsMovable( FALSE );
-
- ToolBar1 = new QToolBar( this, "ToolBar1" );
- ToolBar1->setFixedHeight(22);
- layout->addMultiCellWidget( ToolBar1, 0, 0, 0, 4 );
+ setToolBarsMovable( false );
+ QToolBar *dock = new QToolBar( this );
+ dock->setHorizontalStretchable( true );
- QMenuBar *menuBar = new QMenuBar( ToolBar1 );
+ QMenuBar *menuBar = new QMenuBar( dock );
+ menuBar->setMargin( 0 );
QPopupMenu *fileMenu;
@@ -82,4 +79,6 @@ Bartender::Bartender( QWidget* parent, const char* name, WFlags fl )
+ ToolBar1 = new QToolBar( this );
- QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), "New", 0, this, 0 );
+ QAction *a = new QAction( tr( "New" ), Opie::Core::OResource::loadPixmap( "new", Opie::Core::OResource::SmallIcon ),
+ "New", 0, this, 0 );
connect( a, SIGNAL( activated() ), this, SLOT( fileNew() ) );
@@ -87,3 +86,4 @@ Bartender::Bartender( QWidget* parent, const char* name, WFlags fl )
- a = new QAction( tr( "Open" ), Resource::loadPixmap( "bartender/bartender_sm" ), "open", 0, this, 0 );
+ a = new QAction( tr( "Open" ), Opie::Core::OResource::loadPixmap( "bartender/bartender_sm", Opie::Core::OResource::SmallIcon ),
+ "open", 0, this, 0 );
connect( a, SIGNAL( activated() ), this, SLOT( openCurrentDrink() ) );
@@ -91,3 +91,4 @@ Bartender::Bartender( QWidget* parent, const char* name, WFlags fl )
- a = new QAction( tr( "Find" ), Resource::loadPixmap( "find" ), "Find", 0, this, 0 );
+ a = new QAction( tr( "Find" ), Opie::Core::OResource::loadPixmap( "find", Opie::Core::OResource::SmallIcon ),
+ "Find", 0, this, 0 );
connect( a, SIGNAL( activated() ), this, SLOT( askSearch() ) );
@@ -95,3 +96,4 @@ Bartender::Bartender( QWidget* parent, const char* name, WFlags fl )
- a = new QAction( tr( "Edit" ), Resource::loadPixmap( "edit" ),"Edit", 0, this, 0 );
+ a = new QAction( tr( "Edit" ), Opie::Core::OResource::loadPixmap( "edit", Opie::Core::OResource::SmallIcon ),
+ "Edit", 0, this, 0 );
connect( a, SIGNAL( activated() ), this, SLOT( doEdit() ) );
@@ -105,3 +107,2 @@ Bartender::Bartender( QWidget* parent, const char* name, WFlags fl )
DrinkView->addColumn( tr( "Name of Drink" ) );
-// DrinkView->setRootIsDecorated( TRUE );
DrinkView->header()->hide();
@@ -114,3 +115,2 @@ Bartender::Bartender( QWidget* parent, const char* name, WFlags fl )
- layout->addMultiCellWidget( DrinkView, 1, 2, 0, 4 );
if(QDir("db").exists())
@@ -123,2 +123,4 @@ Bartender::Bartender( QWidget* parent, const char* name, WFlags fl )
DrinkView->setFocus();
+
+ setCentralWidget( DrinkView );
}