Diffstat (limited to 'noncore/apps/opie-bartender/bartender.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/apps/opie-bartender/bartender.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/apps/opie-bartender/bartender.cpp b/noncore/apps/opie-bartender/bartender.cpp index 59fc242..b4958b3 100644 --- a/noncore/apps/opie-bartender/bartender.cpp +++ b/noncore/apps/opie-bartender/bartender.cpp | |||
@@ -92,49 +92,49 @@ Bartender::Bartender( QWidget* parent, const char* name, WFlags fl ) | |||
92 | 92 | ||
93 | a = new QAction( tr( "Edit" ), Resource::loadPixmap( "edit" ),"Edit", 0, this, 0 ); | 93 | a = new QAction( tr( "Edit" ), Resource::loadPixmap( "edit" ),"Edit", 0, this, 0 ); |
94 | connect( a, SIGNAL( activated() ), this, SLOT( doEdit() ) ); | 94 | connect( a, SIGNAL( activated() ), this, SLOT( doEdit() ) ); |
95 | a->addTo( ToolBar1 ); | 95 | a->addTo( ToolBar1 ); |
96 | 96 | ||
97 | QPushButton *t; | 97 | QPushButton *t; |
98 | t= new QPushButton( "BAC", ToolBar1, "bacButtin"); | 98 | t= new QPushButton( "BAC", ToolBar1, "bacButtin"); |
99 | connect( t, SIGNAL( clicked() ), this, SLOT( doBac() ) ); | 99 | connect( t, SIGNAL( clicked() ), this, SLOT( doBac() ) ); |
100 | 100 | ||
101 | DrinkView = new QListView( this, "DrinkView" ); | 101 | DrinkView = new QListView( this, "DrinkView" ); |
102 | DrinkView->addColumn( tr( "Name of Drink" ) ); | 102 | DrinkView->addColumn( tr( "Name of Drink" ) ); |
103 | // DrinkView->setRootIsDecorated( TRUE ); | 103 | // DrinkView->setRootIsDecorated( TRUE ); |
104 | DrinkView->header()->hide(); | 104 | DrinkView->header()->hide(); |
105 | 105 | ||
106 | QPEApplication::setStylusOperation( DrinkView->viewport(),QPEApplication::RightOnHold); | 106 | QPEApplication::setStylusOperation( DrinkView->viewport(),QPEApplication::RightOnHold); |
107 | 107 | ||
108 | connect(DrinkView, SIGNAL( doubleClicked(QListViewItem*)),this,SLOT(showDrink(QListViewItem*))); | 108 | connect(DrinkView, SIGNAL( doubleClicked(QListViewItem*)),this,SLOT(showDrink(QListViewItem*))); |
109 | connect(DrinkView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int)), | 109 | connect(DrinkView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int)), |
110 | this,SLOT( showDrink(int,QListViewItem*,const QPoint&,int))); | 110 | this,SLOT( showDrink(int,QListViewItem*,const QPoint&,int))); |
111 | 111 | ||
112 | layout->addMultiCellWidget( DrinkView, 1, 2, 0, 4 ); | 112 | layout->addMultiCellWidget( DrinkView, 1, 2, 0, 4 ); |
113 | if(QDir("db").exists()) { | 113 | if(QDir("db").exists()) { |
114 | dbFile.setName( "db/drinkdb.txt"); | 114 | dbFile.setName( "db/drinkdb.txt"); |
115 | } else | 115 | } else |
116 | dbFile.setName( QPEApplication::qpeDir()+"/etc/bartender/drinkdb.txt"); | 116 | dbFile.setName( QPEApplication::qpeDir()+"etc/bartender/drinkdb.txt"); |
117 | initDrinkDb(); | 117 | initDrinkDb(); |
118 | } | 118 | } |
119 | 119 | ||
120 | Bartender::~Bartender() { | 120 | Bartender::~Bartender() { |
121 | } | 121 | } |
122 | 122 | ||
123 | /* | 123 | /* |
124 | this happens right before exit */ | 124 | this happens right before exit */ |
125 | void Bartender::cleanUp() { | 125 | void Bartender::cleanUp() { |
126 | dbFile.close(); | 126 | dbFile.close(); |
127 | 127 | ||
128 | } | 128 | } |
129 | 129 | ||
130 | void Bartender::initDrinkDb() { | 130 | void Bartender::initDrinkDb() { |
131 | 131 | ||
132 | if(!dbFile.isOpen()) | 132 | if(!dbFile.isOpen()) |
133 | if ( !dbFile.open( IO_ReadOnly)) { | 133 | if ( !dbFile.open( IO_ReadOnly)) { |
134 | QMessageBox::message( (tr("Note")), (tr("Drink database not opened sucessfully.\n")) ); | 134 | QMessageBox::message( (tr("Note")), (tr("Drink database not opened sucessfully.\n")) ); |
135 | return; | 135 | return; |
136 | } | 136 | } |
137 | fillList(); | 137 | fillList(); |
138 | } | 138 | } |
139 | 139 | ||
140 | void Bartender::fillList() { | 140 | void Bartender::fillList() { |