author | mickeyl <mickeyl> | 2004-11-04 10:33:04 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-11-04 10:33:04 (UTC) |
commit | 7855b19ce0241a7b7b4fc72e3a8ddd9bf73b0a77 (patch) (side-by-side diff) | |
tree | e76604c6af3da9c19b69dcdcf8105d58bac63f71 /noncore/apps/qashmoney/memory.cpp | |
parent | cd2d50799e087fad5b56df9d7fe9aa572a313e64 (diff) | |
download | opie-7855b19ce0241a7b7b4fc72e3a8ddd9bf73b0a77.zip opie-7855b19ce0241a7b7b4fc72e3a8ddd9bf73b0a77.tar.gz opie-7855b19ce0241a7b7b4fc72e3a8ddd9bf73b0a77.tar.bz2 |
opie-qashmoney is now unsupported
Diffstat (limited to 'noncore/apps/qashmoney/memory.cpp') (more/less context) (ignore whitespace changes)
-rwxr-xr-x | noncore/apps/qashmoney/memory.cpp | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/noncore/apps/qashmoney/memory.cpp b/noncore/apps/qashmoney/memory.cpp deleted file mode 100755 index b5155b3..0000000 --- a/noncore/apps/qashmoney/memory.cpp +++ b/dev/null @@ -1,62 +0,0 @@ -#include "memory.h" - -#include <stdlib.h> - -Memory::Memory () - { - db = sqlite_open ( "qmmemory.db", 0, NULL ); - } - -Memory::~Memory () - { - sqlite_close ( db ); - } - -void Memory::addMemoryItem ( QString item ) - { - sqlite_exec_printf ( db, "insert into memory values ( '%q', 0, 0 );", 0, 0, 0, ( const char * ) item ); - } - -void Memory::deleteMemoryItem ( QString item ) - { - sqlite_exec_printf ( db, "delete from memory where item = '%q';", 0, 0, 0, ( const char * ) item ); - } - -int Memory::getNumberOfMemoryItems () - { - char **results; - sqlite_get_table ( db, "select count() from memory;", &results, NULL, NULL, NULL ); - return atoi ( results [ 1 ] ); - } - -void Memory::changeMemoryName ( QString item ) - { - sqlite_exec_printf ( db, "update memory set item = '%q' where item = '%q';", 0, 0, 0, ( const char * ) item ); - } - -void Memory::displayMemoryItems ( QListBox *listbox ) - { - char **results; - int rows; - sqlite_get_table ( db, "select item from memory order by item asc;", &results, &rows, NULL, NULL ); - int counter = 1; - while ( counter < ( rows + 1 ) ) - { - listbox->insertItem ( results [ counter ] ); - counter ++; - } - } - -void Memory::displayMemoryItems ( QComboBox *box ) - { - char **results; - int rows; - sqlite_get_table ( db, "select item from memory order by item asc;", &results, &rows, NULL, NULL ); - int counter = 1; - while ( counter < ( rows + 1 ) ) - { - box->insertItem ( results [ counter ] ); - counter ++; - } - } - |