summaryrefslogtreecommitdiff
path: root/noncore
authorllornkcor <llornkcor>2002-03-09 20:00:31 (UTC)
committer llornkcor <llornkcor>2002-03-09 20:00:31 (UTC)
commit767f33638631d29bca260aab66c1224ab2108af7 (patch) (side-by-side diff)
treee8c66841e18a4f106e0650e1e29d21e706bcef14 /noncore
parent3095bf47c523afcf5441057db23050767f69ebf9 (diff)
downloadopie-767f33638631d29bca260aab66c1224ab2108af7.zip
opie-767f33638631d29bca260aab66c1224ab2108af7.tar.gz
opie-767f33638631d29bca260aab66c1224ab2108af7.tar.bz2
got tableviewer compiling to find out what the heck it is- and I still can't tell
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/tableviewer/db/common.cpp40
-rw-r--r--noncore/apps/tableviewer/main.cpp2
-rw-r--r--noncore/apps/tableviewer/tableviewer.cpp116
-rw-r--r--noncore/apps/tableviewer/tableviewer.h4
-rw-r--r--noncore/apps/tableviewer/ui/commonwidgets.cpp3
-rw-r--r--noncore/apps/tableviewer/ui/tvbrowseview.cpp12
6 files changed, 89 insertions, 88 deletions
diff --git a/noncore/apps/tableviewer/db/common.cpp b/noncore/apps/tableviewer/db/common.cpp
index 4c70e54..71844a5 100644
--- a/noncore/apps/tableviewer/db/common.cpp
+++ b/noncore/apps/tableviewer/db/common.cpp
@@ -24,3 +24,3 @@
#include <qdatetime.h>
-#include <timestring.h>
+#include <qpe/timestring.h>
#include "common.h"
@@ -312,5 +312,5 @@ void TVVariant::load(QDataStream &s )
}
- break;
+ break;
default:
- qFatal("Unrecognized data type");
+ qFatal("Unrecognized data type");
}
@@ -392,3 +392,3 @@ int TVVariant::toInt() const
if(d->typ == String) {
- QString tmpq(*(QString *)d->value.ptr);
+ QString tmpq(*(QString *)d->value.ptr);
return parseNextNumber(&tmpq);
@@ -686,5 +686,5 @@ Key::Key(const Key &other)
{
- kname = other.kname;
- kexample = other.kexample;
- kflags = other.kflags;
+ kname = other.kname;
+ kexample = other.kexample;
+ kflags = other.kflags;
}
@@ -780,6 +780,6 @@ KeyList::KeyList(const KeyList &k) : QIntDict<Key>(k)
KeyListIterator it(k);
- while(it.current()) {
- replace(it.currentKey(), new Key(*it.current()));
- ++it;
- }
+ while(it.current()) {
+ replace(it.currentKey(), new Key(*it.current()));
+ ++it;
+ }
@@ -800,11 +800,11 @@ bool KeyList::operator!=(const KeyList &other)
if (other.getNumFields() != getNumFields())
- return TRUE;
+ return TRUE;
while(it.current()) {
- //it.currentKey(), it.current();
- if (other.getKeyName(it.currentKey()) != getKeyName(it.currentKey()))
- return TRUE;
- if (other.getKeyType(it.currentKey()) != getKeyType(it.currentKey()))
- return TRUE;
- ++it;
+ //it.currentKey(), it.current();
+ if (other.getKeyName(it.currentKey()) != getKeyName(it.currentKey()))
+ return TRUE;
+ if (other.getKeyType(it.currentKey()) != getKeyType(it.currentKey()))
+ return TRUE;
+ ++it;
}
@@ -1184,3 +1184,3 @@ void DataElem::setField(int i, QString q)
setField(i, t);
- return;
+ return;
}
@@ -1272,3 +1272,3 @@ QString DataElem::toQString() const
while (it.current()) {
- i = it.currentKey();
+ i = it.currentKey();
if(hasValidValue(i)) {
diff --git a/noncore/apps/tableviewer/main.cpp b/noncore/apps/tableviewer/main.cpp
index 736e1cf..56c567f 100644
--- a/noncore/apps/tableviewer/main.cpp
+++ b/noncore/apps/tableviewer/main.cpp
@@ -20,3 +20,3 @@
#include "tableviewer.h"
-#include <qpeapplication.h>
+#include <qpe/qpeapplication.h>
diff --git a/noncore/apps/tableviewer/tableviewer.cpp b/noncore/apps/tableviewer/tableviewer.cpp
index 0d4a412..0456b41 100644
--- a/noncore/apps/tableviewer/tableviewer.cpp
+++ b/noncore/apps/tableviewer/tableviewer.cpp
@@ -30,4 +30,5 @@
/* QPE includes */
-#include "fileselector.h"
-#include "resource.h"
+#include <qpe/fileselector.h>
+#include <qpe/resource.h>
+#include <qpe/qpetoolbar.h>
@@ -40,3 +41,2 @@
#include <qbuffer.h>
-
/*!
@@ -95,11 +95,11 @@ TableViewerWindow::TableViewerWindow(QWidget *parent, const char *name, WFlags f
QToolButton *newItemButton = new QToolButton(
- QIconSet(Resource::loadImage("new")), "New Item", QString::null,
- this, SLOT(newItemSlot()), navigation, "New Item");
+ QIconSet(Resource::loadPixmap("new")), "New Item", QString::null,
+ this, SLOT(newItemSlot()), navigation, "New Item");
QToolButton *editItemButton = new QToolButton(
- QIconSet(Resource::loadImage("edit")), "Edit Item", QString::null,
- this, SLOT(editItemSlot()), navigation, "Edit Item");
+ QIconSet(Resource::loadPixmap("edit")), "Edit Item", QString::null,
+ this, SLOT(editItemSlot()), navigation, "Edit Item");
QToolButton *deleteItemButton = new QToolButton(
- QIconSet(Resource::loadImage("trash")), "Delete Item",
- QString::null, this,
- SLOT(deleteItemSlot()), navigation, "Delete Item");
+ QIconSet(Resource::loadPixmap("trash")), "Delete Item",
+ QString::null, this,
+ SLOT(deleteItemSlot()), navigation, "Delete Item");
@@ -108,17 +108,17 @@ TableViewerWindow::TableViewerWindow(QWidget *parent, const char *name, WFlags f
QToolButton *firstItemButton = new QToolButton(
- QIconSet(Resource::loadImage("fastback")), "First Item",
- QString::null, this,
- SLOT(firstItem()), navigation, "First Item");
+ QIconSet(Resource::loadPixmap("fastback")), "First Item",
+ QString::null, this,
+ SLOT(firstItem()), navigation, "First Item");
QToolButton *previousItemButton = new QToolButton(
- QIconSet(Resource::loadImage("back")), "Previous Item",
- QString::null, this,
- SLOT(previousItem()), navigation, "Previous Item");
+ QIconSet(Resource::loadPixmap("back")), "Previous Item",
+ QString::null, this,
+ SLOT(previousItem()), navigation, "Previous Item");
QToolButton *nextItemButton = new QToolButton(
- QIconSet(Resource::loadImage("forward")), "Next Item",
- QString::null, this,
- SLOT(nextItem()), navigation, "Next Item");
+ QIconSet(Resource::loadPixmap("forward")), "Next Item",
+ QString::null, this,
+ SLOT(nextItem()), navigation, "Next Item");
QToolButton *lastItemButton = new QToolButton(
- QIconSet(Resource::loadImage("fastforward")), "Last Item",
- QString::null, this,
- SLOT(lastItem()), navigation, "Last Item");
+ QIconSet(Resource::loadPixmap("fastforward")), "Last Item",
+ QString::null, this,
+ SLOT(lastItem()), navigation, "Last Item");
@@ -126,9 +126,9 @@ TableViewerWindow::TableViewerWindow(QWidget *parent, const char *name, WFlags f
QToolButton *browseButton = new QToolButton(
- QIconSet(Resource::loadImage("day")), "View Single Item",
- QString::null, this,
- SLOT(browseViewSlot()), navigation, "View Single Item");
+ QIconSet(Resource::loadPixmap("day")), "View Single Item",
+ QString::null, this,
+ SLOT(browseViewSlot()), navigation, "View Single Item");
QToolButton *listButton = new QToolButton(
- QIconSet(Resource::loadImage("month")), "View Multiple Items",
- QString::null, this,
- SLOT(listViewSlot()), navigation, "View Multiple Items");
+ QIconSet(Resource::loadPixmap("month")), "View Multiple Items",
+ QString::null, this,
+ SLOT(listViewSlot()), navigation, "View Multiple Items");
@@ -143,3 +143,3 @@ TableViewerWindow::TableViewerWindow(QWidget *parent, const char *name, WFlags f
fileSelector = new FileSelector("text/csv;text/x-xml-tableviewer",
- this, "fileselector");
+ this, "fileselector");
fileSelector->setNewVisible(FALSE);
@@ -164,3 +164,3 @@ TableViewerWindow::TableViewerWindow(QWidget *parent, const char *name, WFlags f
connect(fileSelector, SIGNAL(fileSelected(const DocLnk &)),
- this, SLOT(openDocument(const DocLnk &)));
+ this, SLOT(openDocument(const DocLnk &)));
@@ -179,3 +179,3 @@ TableViewerWindow::~TableViewerWindow()
if(dirty)
- saveDocument();
+ saveDocument();
}
@@ -188,3 +188,3 @@ void TableViewerWindow::selectDocument()
if(dirty)
- saveDocument();
+ saveDocument();
current_view = FileState;
@@ -197,3 +197,3 @@ void TableViewerWindow::saveDocument()
if(!dirty)
- return;
+ return;
@@ -203,4 +203,4 @@ void TableViewerWindow::saveDocument()
if(!ds->saveSource(dev, doc.type())){
- qWarning("Save unsuccessful");
- return;
+ qWarning("Save unsuccessful");
+ return;
}
@@ -231,5 +231,5 @@ void TableViewerWindow::newDocument()
- /* now set up for editing the keys */
- ts.kRep->addKey("key", TVVariant::String);
- editKeysSlot();
+ /* now set up for editing the keys */
+ ts.kRep->addKey("key", TVVariant::String);
+ editKeysSlot();
}
@@ -240,3 +240,3 @@ void TableViewerWindow::openDocument(const DocLnk &f)
if (!f.isValid())
- return;
+ return;
@@ -253,4 +253,4 @@ void TableViewerWindow::openDocument(const DocLnk &f)
- current_view = BrowseState;
- cw->raiseWidget(current_view);
+ current_view = BrowseState;
+ cw->raiseWidget(current_view);
@@ -283,3 +283,3 @@ void TableViewerWindow::openDocument(const DocLnk &f)
- dirty = FALSE;
+ dirty = FALSE;
} else {
@@ -331,3 +331,3 @@ void TableViewerWindow::applyFilter()
if(filterView->passesFilter(d))
- listView->addItem(d);
+ listView->addItem(d);
} while(ds->next());
@@ -367,5 +367,5 @@ void TableViewerWindow::editItemSlot()
if(TVEditView::openEditItemDialog(&ts, ts.current_elem, this)) {
- listView->rebuildData();
- browseView->rebuildData();
- dirty = TRUE;
+ listView->rebuildData();
+ browseView->rebuildData();
+ dirty = TRUE;
}
@@ -378,8 +378,8 @@ void TableViewerWindow::newItemSlot()
- ds->addItem(d);
- ts.current_elem = d;
- applyFilter();
- listView->rebuildData();
- browseView->rebuildData();
- dirty = TRUE;
+ ds->addItem(d);
+ ts.current_elem = d;
+ applyFilter();
+ listView->rebuildData();
+ browseView->rebuildData();
+ dirty = TRUE;
}
@@ -389,10 +389,10 @@ void TableViewerWindow::deleteItemSlot()
{
- /* delete the actual item, then do a 'filter' */
- DataElem *to_remove = ts.current_elem;
+ /* delete the actual item, then do a 'filter' */
+ DataElem *to_remove = ts.current_elem;
- if(!to_remove)
- return;
+ if(!to_remove)
+ return;
listView->removeItem();
- ds->removeItem(to_remove);
+ ds->removeItem(to_remove);
@@ -434,3 +434,3 @@ void TableViewerWindow::editKeysSlot()
/* Set up browse view, Will be based of structure of listView */
- dirty = TRUE;
+ dirty = TRUE;
}
diff --git a/noncore/apps/tableviewer/tableviewer.h b/noncore/apps/tableviewer/tableviewer.h
index 2d4686a..0d3c39d 100644
--- a/noncore/apps/tableviewer/tableviewer.h
+++ b/noncore/apps/tableviewer/tableviewer.h
@@ -24,3 +24,3 @@
#include "db/common.h"
-#include "fileselector.h"
+#include <qpe/fileselector.h>
@@ -100,3 +100,3 @@ private:
EditState,
- FileState,
+ FileState,
};
diff --git a/noncore/apps/tableviewer/ui/commonwidgets.cpp b/noncore/apps/tableviewer/ui/commonwidgets.cpp
index 0b4f3c2..bf4c36f 100644
--- a/noncore/apps/tableviewer/ui/commonwidgets.cpp
+++ b/noncore/apps/tableviewer/ui/commonwidgets.cpp
@@ -24,3 +24,4 @@
#include <qcombobox.h>
-#include <datebookmonth.h>
+
+#include <qpe/datebookmonth.h>
#include <qpopupmenu.h>
diff --git a/noncore/apps/tableviewer/ui/tvbrowseview.cpp b/noncore/apps/tableviewer/ui/tvbrowseview.cpp
index f6da7b1..9bfc791 100644
--- a/noncore/apps/tableviewer/ui/tvbrowseview.cpp
+++ b/noncore/apps/tableviewer/ui/tvbrowseview.cpp
@@ -40,8 +40,8 @@
TVBrowseView::TVBrowseView(TableState *t, QWidget* parent = 0, const char *name = 0,
- WFlags fl =0)
+ WFlags fl =0)
{
if (!name)
- setName("BrowseView");
+ setName("BrowseView");
- setSizePolicy(QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding, 0, 0, sizePolicy().hasHeightForWidth() ) );
+// setSizePolicy(QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding, 0, 0, sizePolicy().hasHeightForWidth() ) );
QVBoxLayout *vlayout = new QVBoxLayout(this);
@@ -76,6 +76,6 @@ void TVBrowseView::rebuildData()
if(!ts->current_elem) {
- /* also disable buttons */
- textViewDisplay->setText("");
+ /* also disable buttons */
+ textViewDisplay->setText("");
return;
- }
+ }