summaryrefslogtreecommitdiff
authorzecke <zecke>2004-11-14 21:58:26 (UTC)
committer zecke <zecke>2004-11-14 21:58:26 (UTC)
commit3e23af22643ac0ff3740f37803a94f81d6b15fe1 (patch) (unidiff)
tree1f08bde3533ac0ea7fc6f5bc470bc910fe6cc172
parent7a8f86ed0f1d160e9c2a4794e297ba49fd9ac712 (diff)
downloadopie-3e23af22643ac0ff3740f37803a94f81d6b15fe1.zip
opie-3e23af22643ac0ff3740f37803a94f81d6b15fe1.tar.gz
opie-3e23af22643ac0ff3740f37803a94f81d6b15fe1.tar.bz2
Make Bartender Quick Launchable
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-bartender/bartender.h2
-rw-r--r--noncore/apps/opie-bartender/bartender.pro4
-rw-r--r--noncore/apps/opie-bartender/main.cpp12
-rw-r--r--noncore/apps/opie-bartender/opie-bartender.control2
4 files changed, 6 insertions, 14 deletions
diff --git a/noncore/apps/opie-bartender/bartender.h b/noncore/apps/opie-bartender/bartender.h
index df1af76..27362df 100644
--- a/noncore/apps/opie-bartender/bartender.h
+++ b/noncore/apps/opie-bartender/bartender.h
@@ -2,62 +2,64 @@
2** Created: Sat Jul 20 08:10:31 2002 2** Created: Sat Jul 20 08:10:31 2002
3** by: L.J. Potter <ljp@llornkcor.com> 3** by: L.J. Potter <ljp@llornkcor.com>
4** copyright : (C) 2002 by ljp 4** copyright : (C) 2002 by ljp
5 email : ljp@llornkcor.com 5 email : ljp@llornkcor.com
6 * This program is free software; you can redistribute it and/or modify * 6 * This program is free software; you can redistribute it and/or modify *
7 * it under the terms of the GNU General Public License as published by * 7 * it under the terms of the GNU General Public License as published by *
8 * the Free Software Foundation; either version 2 of the License, or * 8 * the Free Software Foundation; either version 2 of the License, or *
9 * (at your option) any later version. * 9 * (at your option) any later version. *
10 ***************************************************************************/ 10 ***************************************************************************/
11#ifndef BARTENDER_H 11#ifndef BARTENDER_H
12#define BARTENDER_H 12#define BARTENDER_H
13#include "newdrinks.h" 13#include "newdrinks.h"
14 14
15#include <qvariant.h> 15#include <qvariant.h>
16#include <qwidget.h> 16#include <qwidget.h>
17#include <qmainwindow.h> 17#include <qmainwindow.h>
18#include <qfile.h> 18#include <qfile.h>
19 19
20class QVBoxLayout; 20class QVBoxLayout;
21class QHBoxLayout; 21class QHBoxLayout;
22class QGridLayout; 22class QGridLayout;
23class QListView; 23class QListView;
24class QListViewItem; 24class QListViewItem;
25class QToolBar; 25class QToolBar;
26 26
27class Bartender : public QMainWindow 27class Bartender : public QMainWindow
28{ 28{
29 Q_OBJECT 29 Q_OBJECT
30 30
31public: 31public:
32 Bartender( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 32 Bartender( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
33 ~Bartender(); 33 ~Bartender();
34
35 static QString appName() { return QString::fromLatin1("bartender"); }
34 36
35 QToolBar* ToolBar1; 37 QToolBar* ToolBar1;
36 QListView* DrinkView; 38 QListView* DrinkView;
37 QFile dbFile; 39 QFile dbFile;
38public slots: 40public slots:
39 void doEdit(); 41 void doEdit();
40 42
41protected: 43protected:
42 44
43protected slots: 45protected slots:
44 void fileMenuActivated(int); 46 void fileMenuActivated(int);
45 void editMenuActivated(int); 47 void editMenuActivated(int);
46 void cleanUp(); 48 void cleanUp();
47 void fileNew(); 49 void fileNew();
48 void showDrink( QListViewItem *); 50 void showDrink( QListViewItem *);
49 void showDrink(int, QListViewItem *, const QPoint&, int); 51 void showDrink(int, QListViewItem *, const QPoint&, int);
50 void initDrinkDb(); 52 void initDrinkDb();
51 void doSearchByName(); 53 void doSearchByName();
52 void doSearchByDrink(); 54 void doSearchByDrink();
53 void showSearchResult(QStringList &); 55 void showSearchResult(QStringList &);
54 void doBac(); 56 void doBac();
55 void openCurrentDrink(); 57 void openCurrentDrink();
56 void askSearch(); 58 void askSearch();
57private: 59private:
58 void clearList(); 60 void clearList();
59 void fillList(); 61 void fillList();
60 62
61}; 63};
62 64
63#endif // BARTENDER_H 65#endif // BARTENDER_H
diff --git a/noncore/apps/opie-bartender/bartender.pro b/noncore/apps/opie-bartender/bartender.pro
index 41fc0e5..79a39aa 100644
--- a/noncore/apps/opie-bartender/bartender.pro
+++ b/noncore/apps/opie-bartender/bartender.pro
@@ -1,11 +1,9 @@
1TEMPLATE = app 1CONFIG = qt quick-app
2CONFIG = qt warn_on
3HEADERS = bartender.h newdrinks.h showdrinks.h inputDialog.h searchresults.h bac.h 2HEADERS = bartender.h newdrinks.h showdrinks.h inputDialog.h searchresults.h bac.h
4SOURCES = main.cpp bartender.cpp newdrinks.cpp showdrinks.cpp inputDialog.cpp searchresults.cpp bac.cpp 3SOURCES = main.cpp bartender.cpp newdrinks.cpp showdrinks.cpp inputDialog.cpp searchresults.cpp bac.cpp
5INCLUDEPATH += $(OPIEDIR)/include 4INCLUDEPATH += $(OPIEDIR)/include
6DEPENDPATH += $(OPIEDIR)/include 5DEPENDPATH += $(OPIEDIR)/include
7LIBS += -lqpe -lopiecore2 6LIBS += -lqpe -lopiecore2
8DESTDIR = $(OPIEDIR)/bin
9TARGET = bartender 7TARGET = bartender
10 8
11include ( $(OPIEDIR)/include.pro ) 9include ( $(OPIEDIR)/include.pro )
diff --git a/noncore/apps/opie-bartender/main.cpp b/noncore/apps/opie-bartender/main.cpp
index eefda7f..593f693 100644
--- a/noncore/apps/opie-bartender/main.cpp
+++ b/noncore/apps/opie-bartender/main.cpp
@@ -1,23 +1,15 @@
1/** by: L.J. Potter <ljp@llornkcor.com> 1/** by: L.J. Potter <ljp@llornkcor.com>
2** copyright : (C) 2002 by ljp 2** copyright : (C) 2002 by ljp
3 email : ljp@llornkcor.com 3 email : ljp@llornkcor.com
4 * This program is free software; you can redistribute it and/or modify * 4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by * 5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or * 6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. * 7 * (at your option) any later version. *
8 ***************************************************************************/ 8 ***************************************************************************/
9 9
10#include "bartender.h" 10#include "bartender.h"
11#include <qpe/qpeapplication.h> 11#include <qpe/qpeapplication.h>
12#include <opie2/oapplicationfactory.h>
12 13
13//Bartender *bart;
14 14
15int main( int argc, char ** argv ) 15OPIE_EXPORT_APP( Opie::Core::OApplicationFactory<Bartender> )
16{
17 QPEApplication a( argc, argv );
18
19 Bartender bart;
20 a.showMainWidget( &bart );
21
22 return a.exec();
23}
diff --git a/noncore/apps/opie-bartender/opie-bartender.control b/noncore/apps/opie-bartender/opie-bartender.control
index db30b9c..045c68e 100644
--- a/noncore/apps/opie-bartender/opie-bartender.control
+++ b/noncore/apps/opie-bartender/opie-bartender.control
@@ -1,10 +1,10 @@
1Files: bin/bartender apps/Applications/bartender.desktop etc/bartender/drinkdb.txt 1Files: plugins/applications/libbartender.so* bin/bartender apps/Applications/bartender.desktop etc/bartender/drinkdb.txt
2Priority: optional 2Priority: optional
3Package: opie-bartender 3Package: opie-bartender
4Section: opie/applications 4Section: opie/applications
5Maintainer: L.J. Potter <lpotter@trolltech.com> 5Maintainer: L.J. Potter <lpotter@trolltech.com>
6Architecture: arm 6Architecture: arm
7Version: $QPE_VERSION-$SUB_VERSION 7Version: $QPE_VERSION-$SUB_VERSION
8Depends: task-opie-minimal 8Depends: task-opie-minimal
9Description: Bartender drink receipe database lookup, and 9Description: Bartender drink receipe database lookup, and
10 blood alcohol estimator. 10 blood alcohol estimator.