author | llornkcor <llornkcor> | 2002-03-11 13:35:07 (UTC) |
---|---|---|
committer | llornkcor <llornkcor> | 2002-03-11 13:35:07 (UTC) |
commit | d9406acf405148290c11a49fc09f5ed6b1258843 (patch) (unidiff) | |
tree | fe3ca4c79917a1ff052ad63e65434b9b372c5d0b | |
parent | aeb745907f05b7d0729d273f72b5641e890a4c27 (diff) | |
download | opie-d9406acf405148290c11a49fc09f5ed6b1258843.zip opie-d9406acf405148290c11a49fc09f5ed6b1258843.tar.gz opie-d9406acf405148290c11a49fc09f5ed6b1258843.tar.bz2 |
adde patch for Pru'homme
-rw-r--r-- | noncore/apps/tableviewer/main.cpp | 6 | ||||
-rw-r--r-- | noncore/apps/tableviewer/tableviewer.cpp | 26 | ||||
-rw-r--r-- | noncore/apps/tableviewer/tableviewer.h | 3 |
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 | |||
@@ -25,7 +25,7 @@ int main( int argc, char ** argv ) | |||
25 | QPEApplication a( argc, argv ); | 25 | QPEApplication a( argc, argv ); |
26 | 26 | ||
27 | TableViewerWindow * mw = new TableViewerWindow; | 27 | TableViewerWindow mw; |
28 | mw->setCaption( TableViewerWindow::tr("Table Viewer") ); | 28 | mw.setCaption( TableViewerWindow::tr("Table Viewer") ); |
29 | a.showMainWidget(mw); | 29 | a.showMainWidget(&mw); |
30 | 30 | ||
31 | return a.exec(); | 31 | return a.exec(); |
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 | |||
@@ -35,4 +35,5 @@ | |||
35 | /* QTE includes */ | 35 | /* QTE includes */ |
36 | #include <qpe/qpemenubar.h> | 36 | #include <qpe/qpemenubar.h> |
37 | #include <qpe/qpetoolbar.h> | ||
37 | #include <qpopupmenu.h> | 38 | #include <qpopupmenu.h> |
38 | #include <qapplication.h> | 39 | #include <qapplication.h> |
@@ -235,4 +236,9 @@ void TableViewerWindow::newDocument() | |||
235 | } | 236 | } |
236 | 237 | ||
238 | void TableViewerWindow::setDocument(const QString &f) | ||
239 | { | ||
240 | openDocument(DocLnk(f, TRUE)); | ||
241 | } | ||
242 | |||
237 | void TableViewerWindow::openDocument(const DocLnk &f) | 243 | void TableViewerWindow::openDocument(const DocLnk &f) |
238 | { | 244 | { |
@@ -290,4 +296,24 @@ void TableViewerWindow::openDocument(const DocLnk &f) | |||
290 | 296 | ||
291 | /*! | 297 | /*! |
298 | Moves to the first item of the current table | ||
299 | */ | ||
300 | void TableViewerWindow::firstItem() | ||
301 | { | ||
302 | listView->first(); | ||
303 | ts.current_elem = listView->getCurrentData(); | ||
304 | browseView->rebuildData(); | ||
305 | } | ||
306 | |||
307 | /*! | ||
308 | Moves to the lat item of the current table | ||
309 | */ | ||
310 | void TableViewerWindow::lastItem() | ||
311 | { | ||
312 | listView->last(); | ||
313 | ts.current_elem = listView->getCurrentData(); | ||
314 | browseView->rebuildData(); | ||
315 | } | ||
316 | |||
317 | /*! | ||
292 | Moves to the next item of the current table | 318 | Moves to the next item of the current table |
293 | */ | 319 | */ |
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 | |||
@@ -50,6 +50,9 @@ public slots: | |||
50 | void newDocument(); | 50 | void newDocument(); |
51 | void saveDocument(); | 51 | void saveDocument(); |
52 | void setDocument(const QString &); | ||
52 | void openDocument(const DocLnk &); | 53 | void openDocument(const DocLnk &); |
53 | 54 | ||
55 | void firstItem(); | ||
56 | void lastItem(); | ||
54 | void nextItem(); | 57 | void nextItem(); |
55 | void previousItem(); | 58 | void previousItem(); |