-rw-r--r-- | noncore/apps/tableviewer/tableviewer.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/noncore/apps/tableviewer/tableviewer.cpp b/noncore/apps/tableviewer/tableviewer.cpp index 207172d..f35dfcd 100644 --- a/noncore/apps/tableviewer/tableviewer.cpp +++ b/noncore/apps/tableviewer/tableviewer.cpp | |||
@@ -1,85 +1,84 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | 2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Qtopia Environment. | 4 | ** This file is part of Qtopia Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | /* local includes */ | 21 | /* local includes */ |
22 | #include "tableviewer.h" | 22 | #include "tableviewer.h" |
23 | #include "ui/tvbrowseview.h" | 23 | #include "ui/tvbrowseview.h" |
24 | #include "ui/tvfilterview.h" | 24 | #include "ui/tvfilterview.h" |
25 | #include "ui/tvlistview.h" | 25 | #include "ui/tvlistview.h" |
26 | #include "ui/tveditview.h" | 26 | #include "ui/tveditview.h" |
27 | #include "ui/tvkeyedit.h" | 27 | #include "ui/tvkeyedit.h" |
28 | #include "db/datacache.h" | 28 | #include "db/datacache.h" |
29 | 29 | ||
30 | /* QPE includes */ | 30 | /* QPE includes */ |
31 | #include <qpe/fileselector.h> | 31 | #include <qpe/fileselector.h> |
32 | #include <qpe/resource.h> | 32 | #include <qpe/resource.h> |
33 | #include <qpe/qpetoolbar.h> | 33 | #include <qpe/qpetoolbar.h> |
34 | 34 | ||
35 | /* QTE includes */ | 35 | /* QTE includes */ |
36 | #include <qmenubar.h> | 36 | #include <qmenubar.h> |
37 | #include <qpe/qpetoolbar.h> | ||
38 | #include <qpopupmenu.h> | 37 | #include <qpopupmenu.h> |
39 | #include <qapplication.h> | 38 | #include <qapplication.h> |
40 | #include <qwidgetstack.h> | 39 | #include <qwidgetstack.h> |
41 | #include <qlayout.h> | 40 | #include <qlayout.h> |
42 | #include <qbuffer.h> | 41 | #include <qbuffer.h> |
43 | /*! | 42 | /*! |
44 | \class TableViewerWindow | 43 | \class TableViewerWindow |
45 | \brief The main window widget of the application | 44 | \brief The main window widget of the application |
46 | 45 | ||
47 | This is the main widget of the table viewer application. | 46 | This is the main widget of the table viewer application. |
48 | It is the co-ordination point. | 47 | It is the co-ordination point. |
49 | */ | 48 | */ |
50 | 49 | ||
51 | /*! | 50 | /*! |
52 | Constructs a new TableViewerWindow | 51 | Constructs a new TableViewerWindow |
53 | */ | 52 | */ |
54 | TableViewerWindow::TableViewerWindow(QWidget *parent, const char *name, WFlags f) | 53 | TableViewerWindow::TableViewerWindow(QWidget *parent, const char *name, WFlags f) |
55 | : QMainWindow(parent, name, f) | 54 | : QMainWindow(parent, name, f) |
56 | { | 55 | { |
57 | setCaption(tr("Table Viewer")); | 56 | setCaption(tr("Table Viewer")); |
58 | 57 | ||
59 | /* Build data */ | 58 | /* Build data */ |
60 | ds = new DBStore(); | 59 | ds = new DBStore(); |
61 | doc.setType("text/x-xml-tableviewer"); | 60 | doc.setType("text/x-xml-tableviewer"); |
62 | doc.setName("table"); | 61 | doc.setName("table"); |
63 | 62 | ||
64 | dirty = FALSE; | 63 | dirty = FALSE; |
65 | ts.current_column = 0; | 64 | ts.current_column = 0; |
66 | ts.kRep = ds->getKeys(); | 65 | ts.kRep = ds->getKeys(); |
67 | 66 | ||
68 | /* build menus */ | 67 | /* build menus */ |
69 | menu = new QMenuBar(this, 0); | 68 | menu = new QMenuBar(this, 0); |
70 | 69 | ||
71 | QPopupMenu *file_menu = new QPopupMenu; | 70 | QPopupMenu *file_menu = new QPopupMenu; |
72 | file_menu->insertItem("New", this, SLOT(newDocument())); | 71 | file_menu->insertItem("New", this, SLOT(newDocument())); |
73 | 72 | ||
74 | file_menu->insertItem("Open", this, SLOT(selectDocument())); | 73 | file_menu->insertItem("Open", this, SLOT(selectDocument())); |
75 | file_menu->insertSeparator(); | 74 | file_menu->insertSeparator(); |
76 | file_menu->insertItem("Properties"); | 75 | file_menu->insertItem("Properties"); |
77 | 76 | ||
78 | /* later will want to set this up to clean up first via this, SLOT(quit) */ | 77 | /* later will want to set this up to clean up first via this, SLOT(quit) */ |
79 | menu->insertItem("Document", file_menu); | 78 | menu->insertItem("Document", file_menu); |
80 | 79 | ||
81 | QPopupMenu *edit_menu = new QPopupMenu; | 80 | QPopupMenu *edit_menu = new QPopupMenu; |
82 | edit_menu->insertItem("Edit Item", this, SLOT(editItemSlot())); | 81 | edit_menu->insertItem("Edit Item", this, SLOT(editItemSlot())); |
83 | edit_menu->insertItem("Edit Keys", this, SLOT(editKeysSlot())); | 82 | edit_menu->insertItem("Edit Keys", this, SLOT(editKeysSlot())); |
84 | edit_menu->insertItem("Edit filters", this, SLOT(filterViewSlot())); | 83 | edit_menu->insertItem("Edit filters", this, SLOT(filterViewSlot())); |
85 | menu->insertItem("Edit", edit_menu); | 84 | menu->insertItem("Edit", edit_menu); |