summaryrefslogtreecommitdiff
path: root/noncore/apps/tableviewer
authorllornkcor <llornkcor>2002-03-11 13:35:07 (UTC)
committer llornkcor <llornkcor>2002-03-11 13:35:07 (UTC)
commitd9406acf405148290c11a49fc09f5ed6b1258843 (patch) (side-by-side diff)
treefe3ca4c79917a1ff052ad63e65434b9b372c5d0b /noncore/apps/tableviewer
parentaeb745907f05b7d0729d273f72b5641e890a4c27 (diff)
downloadopie-d9406acf405148290c11a49fc09f5ed6b1258843.zip
opie-d9406acf405148290c11a49fc09f5ed6b1258843.tar.gz
opie-d9406acf405148290c11a49fc09f5ed6b1258843.tar.bz2
adde patch for Pru'homme
Diffstat (limited to 'noncore/apps/tableviewer') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/tableviewer/main.cpp6
-rw-r--r--noncore/apps/tableviewer/tableviewer.cpp26
-rw-r--r--noncore/apps/tableviewer/tableviewer.h3
3 files changed, 32 insertions, 3 deletions
diff --git a/noncore/apps/tableviewer/main.cpp b/noncore/apps/tableviewer/main.cpp
index 56c567f..d17ee65 100644
--- a/noncore/apps/tableviewer/main.cpp
+++ b/noncore/apps/tableviewer/main.cpp
@@ -26,5 +26,5 @@ int main( int argc, char ** argv )
- TableViewerWindow * mw = new TableViewerWindow;
- mw->setCaption( TableViewerWindow::tr("Table Viewer") );
- a.showMainWidget(mw);
+ TableViewerWindow mw;
+ mw.setCaption( TableViewerWindow::tr("Table Viewer") );
+ a.showMainWidget(&mw);
diff --git a/noncore/apps/tableviewer/tableviewer.cpp b/noncore/apps/tableviewer/tableviewer.cpp
index 0456b41..fbb5c24 100644
--- a/noncore/apps/tableviewer/tableviewer.cpp
+++ b/noncore/apps/tableviewer/tableviewer.cpp
@@ -36,2 +36,3 @@
#include <qpe/qpemenubar.h>
+#include <qpe/qpetoolbar.h>
#include <qpopupmenu.h>
@@ -236,2 +237,7 @@ void TableViewerWindow::newDocument()
+void TableViewerWindow::setDocument(const QString &f)
+{
+ openDocument(DocLnk(f, TRUE));
+}
+
void TableViewerWindow::openDocument(const DocLnk &f)
@@ -291,2 +297,22 @@ void TableViewerWindow::openDocument(const DocLnk &f)
/*!
+ Moves to the first item of the current table
+*/
+void TableViewerWindow::firstItem()
+{
+ listView->first();
+ ts.current_elem = listView->getCurrentData();
+ browseView->rebuildData();
+}
+
+/*!
+ Moves to the lat item of the current table
+*/
+void TableViewerWindow::lastItem()
+{
+ listView->last();
+ ts.current_elem = listView->getCurrentData();
+ browseView->rebuildData();
+}
+
+/*!
Moves to the next item of the current table
diff --git a/noncore/apps/tableviewer/tableviewer.h b/noncore/apps/tableviewer/tableviewer.h
index 0d3c39d..817db21 100644
--- a/noncore/apps/tableviewer/tableviewer.h
+++ b/noncore/apps/tableviewer/tableviewer.h
@@ -51,4 +51,7 @@ public slots:
void saveDocument();
+ void setDocument(const QString &);
void openDocument(const DocLnk &);
+ void firstItem();
+ void lastItem();
void nextItem();