summaryrefslogtreecommitdiff
path: root/noncore/apps/tableviewer/tableviewer.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/tableviewer/tableviewer.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/tableviewer/tableviewer.cpp26
1 files changed, 26 insertions, 0 deletions
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
@@ -31,12 +31,13 @@
#include <qpe/fileselector.h>
#include <qpe/resource.h>
#include <qpe/qpetoolbar.h>
/* QTE includes */
#include <qpe/qpemenubar.h>
+#include <qpe/qpetoolbar.h>
#include <qpopupmenu.h>
#include <qapplication.h>
#include <qwidgetstack.h>
#include <qlayout.h>
#include <qbuffer.h>
/*!
@@ -231,12 +232,17 @@ void TableViewerWindow::newDocument()
/* now set up for editing the keys */
ts.kRep->addKey("key", TVVariant::String);
editKeysSlot();
}
+void TableViewerWindow::setDocument(const QString &f)
+{
+ openDocument(DocLnk(f, TRUE));
+}
+
void TableViewerWindow::openDocument(const DocLnk &f)
{
if (!f.isValid())
return;
@@ -286,12 +292,32 @@ void TableViewerWindow::openDocument(const DocLnk &f)
qWarning(tr("could not load Document"));
}
dev->close();
}
/*!
+ 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
*/
void TableViewerWindow::nextItem()
{
listView->next();
ts.current_elem = listView->getCurrentData();