summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-bartender/bartender.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-bartender/bartender.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-bartender/bartender.cpp35
1 files changed, 19 insertions, 16 deletions
diff --git a/noncore/apps/opie-bartender/bartender.cpp b/noncore/apps/opie-bartender/bartender.cpp
index e6cb515..59fc242 100644
--- a/noncore/apps/opie-bartender/bartender.cpp
+++ b/noncore/apps/opie-bartender/bartender.cpp
@@ -18,8 +18,9 @@
18 18
19#include <qtoolbar.h> 19/* OPIE */
20#include <qmenubar.h> 20#include <opie2/odebug.h>
21//#include <opie2/colorpopupmenu.h>
22#include <qpe/qpeapplication.h> 21#include <qpe/qpeapplication.h>
23#include <qpe/resource.h> 22#include <qpe/resource.h>
23using namespace Opie::Core;
24 24
25/* QT */
25#include <qlineedit.h> 26#include <qlineedit.h>
@@ -35,3 +36,6 @@
35#include <qlayout.h> 36#include <qlayout.h>
37#include <qtoolbar.h>
38#include <qmenubar.h>
36 39
40/* STD */
37#include <fcntl.h> 41#include <fcntl.h>
@@ -42,3 +46,2 @@
42 46
43
44Bartender::Bartender( QWidget* parent, const char* name, WFlags fl ) 47Bartender::Bartender( QWidget* parent, const char* name, WFlags fl )
@@ -146,3 +149,3 @@ void Bartender::fillList() {
146 if(s.find("#",0,TRUE) != -1) { 149 if(s.find("#",0,TRUE) != -1) {
147// qDebug(s.right(s.length()-2)); 150// odebug << s.right(s.length()-2) << oendl;
148 item= new QListViewItem( DrinkView, 0 ); 151 item= new QListViewItem( DrinkView, 0 );
@@ -152,3 +155,3 @@ void Bartender::fillList() {
152 } 155 }
153 qDebug("there are currently %d of drinks", i); 156 odebug << "there are currently " << i << " of drinks" << oendl;
154} 157}
@@ -173,3 +176,3 @@ void Bartender::fileNew() {
173 newDrink.append(newIng+"\n"); 176 newDrink.append(newIng+"\n");
174 qDebug("writing "+newDrink); 177 odebug << "writing "+newDrink << oendl;
175 dbFile.writeBlock( newDrink.latin1(), newDrink.length()); 178 dbFile.writeBlock( newDrink.latin1(), newDrink.length());
@@ -209,3 +212,3 @@ void Bartender::showDrink( QListViewItem *item) {
209 if(s2.find("#",0,TRUE) == -1 || dbFile.atEnd() ) { 212 if(s2.find("#",0,TRUE) == -1 || dbFile.atEnd() ) {
210// qDebug(s2); 213// odebug << s2 << oendl;
211 showDrinks->MultiLineEdit1->append(s2); 214 showDrinks->MultiLineEdit1->append(s2);
@@ -250,3 +253,3 @@ void Bartender::doSearchByName() {
250 if ( it.current()->text(0).find( searchForDrinkName, 0, TRUE) != -1 ) { 253 if ( it.current()->text(0).find( searchForDrinkName, 0, TRUE) != -1 ) {
251// qDebug( it.current()->text(0)); 254// odebug << it.current()->text(0) << oendl;
252 searchList.append(it.current()->text(0)); 255 searchList.append(it.current()->text(0));
@@ -281,6 +284,6 @@ void Bartender::doSearchByDrink() {
281 lastDrinkName=s.right(s.length()-2); 284 lastDrinkName=s.right(s.length()-2);
282// qDebug("last drink name "+lastDrinkName); 285// odebug << "last drink name "+lastDrinkName << oendl;
283 } 286 }
284 else if( s.find( searchForDrinkName ,0, FALSE) != -1 && lastDrinkName != tempName ) { 287 else if( s.find( searchForDrinkName ,0, FALSE) != -1 && lastDrinkName != tempName ) {
285// qDebug("appending "+lastDrinkName); 288// odebug << "appending "+lastDrinkName << oendl;
286 searchList.append( lastDrinkName); 289 searchList.append( lastDrinkName);
@@ -315,3 +318,3 @@ void Bartender::showSearchResult(QStringList &searchList) {
315 if ( it2.current()->text(0)== result ) { 318 if ( it2.current()->text(0)== result ) {
316// qDebug( it2.current()->text(0)); 319// odebug << it2.current()->text(0) << oendl;
317 showDrink(it2.current()); 320 showDrink(it2.current());
@@ -345,3 +348,3 @@ void Bartender::doEdit() {
345 if(s2.find("#",0,TRUE) == -1 || dbFile.atEnd() ) { 348 if(s2.find("#",0,TRUE) == -1 || dbFile.atEnd() ) {
346// qDebug(s2); 349// odebug << s2 << oendl;
347 newDrinks->MultiLineEdit1->append(s2); 350 newDrinks->MultiLineEdit1->append(s2);
@@ -372,3 +375,3 @@ void Bartender::doEdit() {
372 newDrink.append(newIng+"\n"); 375 newDrink.append(newIng+"\n");
373 qDebug("writing "+newDrink); 376 odebug << "writing "+newDrink << oendl;
374 dbFile.writeBlock( newDrink.latin1(), newDrink.length()); 377 dbFile.writeBlock( newDrink.latin1(), newDrink.length());
@@ -399,3 +402,3 @@ void Bartender::openCurrentDrink() {
399void Bartender::fileMenuActivated( int item) { 402void Bartender::fileMenuActivated( int item) {
400 qDebug("Item %d", item); 403 odebug << "Item " << item << "" << oendl;
401 switch(item) { 404 switch(item) {
@@ -420,3 +423,3 @@ void Bartender::fileMenuActivated( int item) {
420void Bartender::editMenuActivated(int item) { 423void Bartender::editMenuActivated(int item) {
421 qDebug("Item %d", item); 424 odebug << "Item " << item << "" << oendl;
422 /* 425 /*