author | llornkcor <llornkcor> | 2004-12-27 23:41:09 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2004-12-27 23:41:09 (UTC) |
commit | 02395040e422485ceb2fa435a3fb30879d5f3df2 (patch) (unidiff) | |
tree | 0052da61e1a209bddf2da6f130210d569610de9f /noncore/apps/opie-bartender/drinkdata.h | |
parent | b2b6055b9180214150cdbbff72b79b35db379fb2 (diff) | |
download | opie-02395040e422485ceb2fa435a3fb30879d5f3df2.zip opie-02395040e422485ceb2fa435a3fb30879d5f3df2.tar.gz opie-02395040e422485ceb2fa435a3fb30879d5f3df2.tar.bz2 |
new code from Paul Eggleton
Diffstat (limited to 'noncore/apps/opie-bartender/drinkdata.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-bartender/drinkdata.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/noncore/apps/opie-bartender/drinkdata.h b/noncore/apps/opie-bartender/drinkdata.h new file mode 100644 index 0000000..bcc3022 --- a/dev/null +++ b/noncore/apps/opie-bartender/drinkdata.h | |||
@@ -0,0 +1,48 @@ | |||
1 | /**************************************************************************** | ||
2 | ** Created: Sun Dec 26 22:00:00 2004 | ||
3 | ** by: Paul Eggleton <bluelightning@bluelightning.org> | ||
4 | ** copyright : (C) 2004 by Paul Eggleton | ||
5 | email : bluelightning@bluelightning.org | ||
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 * | ||
8 | * the Free Software Foundation; either version 2 of the License, or * | ||
9 | * (at your option) any later version. * | ||
10 | ***************************************************************************/ | ||
11 | |||
12 | #ifndef DRINKDATA_H | ||
13 | #define DRINKDATA_H | ||
14 | |||
15 | class DrinkItem; | ||
16 | |||
17 | typedef QValueList<DrinkItem> DrinkList; | ||
18 | |||
19 | class DrinkData { | ||
20 | private: | ||
21 | DrinkList items; | ||
22 | QString filename; | ||
23 | public: | ||
24 | DrinkData(void); | ||
25 | void setFile(const QString &filename); | ||
26 | bool writeChanges(void); | ||
27 | bool read(void); | ||
28 | void print(void); | ||
29 | void addDrink(const QString &name, const QString &ingredients); | ||
30 | DrinkList::Iterator getBegin(void); | ||
31 | DrinkList::Iterator getEnd(void); | ||
32 | DrinkList::Iterator findDrink(const QString &name); | ||
33 | }; | ||
34 | |||
35 | class DrinkItem { | ||
36 | private: | ||
37 | QString name; | ||
38 | QString ingredients; | ||
39 | public: | ||
40 | DrinkItem(void); | ||
41 | DrinkItem(const QString &name, const QString &ingredients); | ||
42 | const QString &getName(void); | ||
43 | const QString &getIngredients(void); | ||
44 | void setName(const QString &name); | ||
45 | void setIngredients(const QString &ingredients); | ||
46 | }; | ||
47 | |||
48 | #endif // DRINKDATA_H | ||