summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-bartender
authordrw <drw>2005-05-17 23:02:25 (UTC)
committer drw <drw>2005-05-17 23:02:25 (UTC)
commitf37c642f417a58ee489ab5a8bab56e5efb59bada (patch) (unidiff)
treea3cf08e41dc605906ec08ce5e47d29776d461410 /noncore/apps/opie-bartender
parent0892a9d473bfeacc921d586266e6889153654737 (diff)
downloadopie-f37c642f417a58ee489ab5a8bab56e5efb59bada.zip
opie-f37c642f417a58ee489ab5a8bab56e5efb59bada.tar.gz
opie-f37c642f417a58ee489ab5a8bab56e5efb59bada.tar.bz2
Resource -> OResource
Diffstat (limited to 'noncore/apps/opie-bartender') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-bartender/bartender.cpp36
1 files changed, 19 insertions, 17 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 @@
21#include <opie2/odebug.h> 21#include <opie2/odebug.h>
22#include <opie2/oresource.h>
22#include <qpe/qpeapplication.h> 23#include <qpe/qpeapplication.h>
23#include <qpe/resource.h>
24using namespace Opie::Core; 24using namespace Opie::Core;
@@ -50,6 +50,4 @@ Bartender::Bartender( QWidget* parent, const char* name, WFlags fl )
50 if ( !name ) 50 if ( !name )
51 setName( "Bartender" ); 51 setName( "Bartender" );
52 QGridLayout *layout = new QGridLayout( this ); 52
53 layout->setSpacing( 2);
54 layout->setMargin( 2);
55 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); 53 connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
@@ -58,9 +56,8 @@ Bartender::Bartender( QWidget* parent, const char* name, WFlags fl )
58 56
59 setToolBarsMovable( FALSE ); 57 setToolBarsMovable( false );
60 58 QToolBar *dock = new QToolBar( this );
61 ToolBar1 = new QToolBar( this, "ToolBar1" ); 59 dock->setHorizontalStretchable( true );
62 ToolBar1->setFixedHeight(22);
63 layout->addMultiCellWidget( ToolBar1, 0, 0, 0, 4 );
64 60
65 QMenuBar *menuBar = new QMenuBar( ToolBar1 ); 61 QMenuBar *menuBar = new QMenuBar( dock );
62 menuBar->setMargin( 0 );
66 QPopupMenu *fileMenu; 63 QPopupMenu *fileMenu;
@@ -82,4 +79,6 @@ Bartender::Bartender( QWidget* parent, const char* name, WFlags fl )
82 79
80 ToolBar1 = new QToolBar( this );
83 81
84 QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), "New", 0, this, 0 ); 82 QAction *a = new QAction( tr( "New" ), Opie::Core::OResource::loadPixmap( "new", Opie::Core::OResource::SmallIcon ),
83 "New", 0, this, 0 );
85 connect( a, SIGNAL( activated() ), this, SLOT( fileNew() ) ); 84 connect( a, SIGNAL( activated() ), this, SLOT( fileNew() ) );
@@ -87,3 +86,4 @@ Bartender::Bartender( QWidget* parent, const char* name, WFlags fl )
87 86
88 a = new QAction( tr( "Open" ), Resource::loadPixmap( "bartender/bartender_sm" ), "open", 0, this, 0 ); 87 a = new QAction( tr( "Open" ), Opie::Core::OResource::loadPixmap( "bartender/bartender_sm", Opie::Core::OResource::SmallIcon ),
88 "open", 0, this, 0 );
89 connect( a, SIGNAL( activated() ), this, SLOT( openCurrentDrink() ) ); 89 connect( a, SIGNAL( activated() ), this, SLOT( openCurrentDrink() ) );
@@ -91,3 +91,4 @@ Bartender::Bartender( QWidget* parent, const char* name, WFlags fl )
91 91
92 a = new QAction( tr( "Find" ), Resource::loadPixmap( "find" ), "Find", 0, this, 0 ); 92 a = new QAction( tr( "Find" ), Opie::Core::OResource::loadPixmap( "find", Opie::Core::OResource::SmallIcon ),
93 "Find", 0, this, 0 );
93 connect( a, SIGNAL( activated() ), this, SLOT( askSearch() ) ); 94 connect( a, SIGNAL( activated() ), this, SLOT( askSearch() ) );
@@ -95,3 +96,4 @@ Bartender::Bartender( QWidget* parent, const char* name, WFlags fl )
95 96
96 a = new QAction( tr( "Edit" ), Resource::loadPixmap( "edit" ),"Edit", 0, this, 0 ); 97 a = new QAction( tr( "Edit" ), Opie::Core::OResource::loadPixmap( "edit", Opie::Core::OResource::SmallIcon ),
98 "Edit", 0, this, 0 );
97 connect( a, SIGNAL( activated() ), this, SLOT( doEdit() ) ); 99 connect( a, SIGNAL( activated() ), this, SLOT( doEdit() ) );
@@ -105,3 +107,2 @@ Bartender::Bartender( QWidget* parent, const char* name, WFlags fl )
105 DrinkView->addColumn( tr( "Name of Drink" ) ); 107 DrinkView->addColumn( tr( "Name of Drink" ) );
106// DrinkView->setRootIsDecorated( TRUE );
107 DrinkView->header()->hide(); 108 DrinkView->header()->hide();
@@ -114,3 +115,2 @@ Bartender::Bartender( QWidget* parent, const char* name, WFlags fl )
114 115
115 layout->addMultiCellWidget( DrinkView, 1, 2, 0, 4 );
116 if(QDir("db").exists()) 116 if(QDir("db").exists())
@@ -123,2 +123,4 @@ Bartender::Bartender( QWidget* parent, const char* name, WFlags fl )
123 DrinkView->setFocus(); 123 DrinkView->setFocus();
124
125 setCentralWidget( DrinkView );
124} 126}