summaryrefslogtreecommitdiff
path: root/noncore/apps/tableviewer/db/datacache.h
Side-by-side diff
Diffstat (limited to 'noncore/apps/tableviewer/db/datacache.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/tableviewer/db/datacache.h24
1 files changed, 15 insertions, 9 deletions
diff --git a/noncore/apps/tableviewer/db/datacache.h b/noncore/apps/tableviewer/db/datacache.h
index c5dc637..e38050c 100644
--- a/noncore/apps/tableviewer/db/datacache.h
+++ b/noncore/apps/tableviewer/db/datacache.h
@@ -24,15 +24,21 @@
* otherwise any other data headings are allowed.
*/
#ifndef __DATACACHE_H__
#define __DATACACHE_H__
+#include "common.h"
+
+/* OPIE */
+#include <opie2/odebug.h>
+using namespace Opie::Core;
+
+/* QT */
#include <qstring.h>
#include <qvector.h>
-#include "common.h"
class DBStore;
/*! Abstract class that defines how database stuff can be accessed */
class DBAccess {
public:
@@ -42,18 +48,18 @@ public:
virtual QString type() {
return QString();
}
virtual bool openSource(QIODevice *) {
- qWarning("DBAccess::openSource not yet implemented");
+ owarn << "DBAccess::openSource not yet implemented" << oendl;
return false;
}
virtual bool saveSource(QIODevice *) {
- qWarning("DBAccess::saveSource(QString) not yet implemented");
+ owarn << "DBAccess::saveSource(QString) not yet implemented" << oendl;
return false;
}
protected:
DBStore *dstore;
QString source_name;
@@ -67,13 +73,13 @@ public:
bool openSource(QIODevice *, const QString &source);
bool saveSource(QIODevice *, const QString &source);
// Add an item
void addItem(DataElem *);
void addItemInternal(DataElem *);
- void removeItem(DataElem *);
+ void removeItem(DataElem *);
// Set the name of the database
void setName(const QString &name);
// Get the name of the database
QString getName();
@@ -103,28 +109,28 @@ public:
// Access functions.. iterator type stuff
void first();
void last();
- bool next();
- bool previous();
+ bool next();
+ bool previous();
- DataElem* getCurrentData();
+ DataElem* getCurrentData();
private:
/* does the work of freeing used memory */
void freeTable();
- QString name;
+ QString name;
QVector<DataElem> master_table;
DBAccess *archive;
KeyList *kRep;
unsigned int number_elems;
unsigned int table_size; /* should always be a power of 2 */
- bool full; /* since because we are using an int for indexing there is
+ bool full; /* since because we are using an int for indexing there is
an upper limit on the number of items we can store. */
unsigned int current_elem;
};
#endif