summaryrefslogtreecommitdiff
path: root/noncore/apps
Unidiff
Diffstat (limited to 'noncore/apps') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/tableviewer/db/common.cpp2
-rw-r--r--noncore/apps/tableviewer/main.cpp2
-rw-r--r--noncore/apps/tableviewer/tableviewer.cpp24
-rw-r--r--noncore/apps/tableviewer/tableviewer.h2
-rw-r--r--noncore/apps/tableviewer/ui/commonwidgets.cpp3
-rw-r--r--noncore/apps/tableviewer/ui/tvbrowseview.cpp2
6 files changed, 18 insertions, 17 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
@@ -13,25 +13,25 @@
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#include <stdlib.h> 20#include <stdlib.h>
21#include <qstring.h> 21#include <qstring.h>
22#include <qheader.h> 22#include <qheader.h>
23#include <qvector.h> 23#include <qvector.h>
24#include <qdatetime.h> 24#include <qdatetime.h>
25#include <timestring.h> 25#include <qpe/timestring.h>
26#include "common.h" 26#include "common.h"
27#include "datacache.h" 27#include "datacache.h"
28#include <assert.h> 28#include <assert.h>
29 29
30static const int del_flag = 0x1; 30static const int del_flag = 0x1;
31static const int new_flag = 0x2; 31static const int new_flag = 0x2;
32 32
33/* Helper function */ 33/* Helper function */
34 34
35int parseNextNumber(QString *q) { 35int parseNextNumber(QString *q) {
36 QChar c; 36 QChar c;
37 uint i; 37 uint 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
@@ -9,24 +9,24 @@
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#include "tableviewer.h" 20#include "tableviewer.h"
21#include <qpeapplication.h> 21#include <qpe/qpeapplication.h>
22 22
23int main( int argc, char ** argv ) 23int main( int argc, char ** argv )
24{ 24{
25 QPEApplication a( argc, argv ); 25 QPEApplication a( argc, argv );
26 26
27 TableViewerWindow * mw = new TableViewerWindow; 27 TableViewerWindow * mw = new TableViewerWindow;
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();
32} 32}
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
@@ -19,35 +19,35 @@
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 "fileselector.h" 31#include <qpe/fileselector.h>
32#include "resource.h" 32#include <qpe/resource.h>
33#include <qpe/qpetoolbar.h>
33 34
34/* QTE includes */ 35/* QTE includes */
35#include <qpe/qpemenubar.h> 36#include <qpe/qpemenubar.h>
36#include <qpopupmenu.h> 37#include <qpopupmenu.h>
37#include <qapplication.h> 38#include <qapplication.h>
38#include <qwidgetstack.h> 39#include <qwidgetstack.h>
39#include <qlayout.h> 40#include <qlayout.h>
40#include <qbuffer.h> 41#include <qbuffer.h>
41
42/*! 42/*!
43 \class TableViewerWindow 43 \class TableViewerWindow
44 \brief The main window widget of the application 44 \brief The main window widget of the application
45 45
46 This is the main widget of the table viewer application. 46 This is the main widget of the table viewer application.
47 It is the co-ordination point. 47 It is the co-ordination point.
48*/ 48*/
49 49
50/*! 50/*!
51 Constructs a new TableViewerWindow 51 Constructs a new TableViewerWindow
52*/ 52*/
53TableViewerWindow::TableViewerWindow(QWidget *parent, const char *name, WFlags f) 53TableViewerWindow::TableViewerWindow(QWidget *parent, const char *name, WFlags f)
@@ -84,60 +84,60 @@ TableViewerWindow::TableViewerWindow(QWidget *parent, const char *name, WFlags f
84 menu->insertItem("Edit", edit_menu); 84 menu->insertItem("Edit", edit_menu);
85 85
86 QPopupMenu *view_menu = new QPopupMenu; 86 QPopupMenu *view_menu = new QPopupMenu;
87 view_menu->insertItem("Browse View", this, SLOT(browseViewSlot())); 87 view_menu->insertItem("Browse View", this, SLOT(browseViewSlot()));
88 view_menu->insertItem("List View", this, SLOT(listViewSlot())); 88 view_menu->insertItem("List View", this, SLOT(listViewSlot()));
89 menu->insertItem("View", view_menu); 89 menu->insertItem("View", view_menu);
90 90
91 QVBoxLayout *main_layout = new QVBoxLayout; 91 QVBoxLayout *main_layout = new QVBoxLayout;
92 92
93 /* Build tool bar */ 93 /* Build tool bar */
94 navigation = new QPEToolBar(this, "navigation"); 94 navigation = new QPEToolBar(this, "navigation");
95 QToolButton *newItemButton = new QToolButton( 95 QToolButton *newItemButton = new QToolButton(
96 QIconSet(Resource::loadImage("new")), "New Item", QString::null, 96 QIconSet(Resource::loadPixmap("new")), "New Item", QString::null,
97 this, SLOT(newItemSlot()), navigation, "New Item"); 97 this, SLOT(newItemSlot()), navigation, "New Item");
98 QToolButton *editItemButton = new QToolButton( 98 QToolButton *editItemButton = new QToolButton(
99 QIconSet(Resource::loadImage("edit")), "Edit Item", QString::null, 99 QIconSet(Resource::loadPixmap("edit")), "Edit Item", QString::null,
100 this, SLOT(editItemSlot()), navigation, "Edit Item"); 100 this, SLOT(editItemSlot()), navigation, "Edit Item");
101 QToolButton *deleteItemButton = new QToolButton( 101 QToolButton *deleteItemButton = new QToolButton(
102 QIconSet(Resource::loadImage("trash")), "Delete Item", 102 QIconSet(Resource::loadPixmap("trash")), "Delete Item",
103 QString::null, this, 103 QString::null, this,
104 SLOT(deleteItemSlot()), navigation, "Delete Item"); 104 SLOT(deleteItemSlot()), navigation, "Delete Item");
105 105
106 navigation->addSeparator(); 106 navigation->addSeparator();
107 107
108 QToolButton *firstItemButton = new QToolButton( 108 QToolButton *firstItemButton = new QToolButton(
109 QIconSet(Resource::loadImage("fastback")), "First Item", 109 QIconSet(Resource::loadPixmap("fastback")), "First Item",
110 QString::null, this, 110 QString::null, this,
111 SLOT(firstItem()), navigation, "First Item"); 111 SLOT(firstItem()), navigation, "First Item");
112 QToolButton *previousItemButton = new QToolButton( 112 QToolButton *previousItemButton = new QToolButton(
113 QIconSet(Resource::loadImage("back")), "Previous Item", 113 QIconSet(Resource::loadPixmap("back")), "Previous Item",
114 QString::null, this, 114 QString::null, this,
115 SLOT(previousItem()), navigation, "Previous Item"); 115 SLOT(previousItem()), navigation, "Previous Item");
116 QToolButton *nextItemButton = new QToolButton( 116 QToolButton *nextItemButton = new QToolButton(
117 QIconSet(Resource::loadImage("forward")), "Next Item", 117 QIconSet(Resource::loadPixmap("forward")), "Next Item",
118 QString::null, this, 118 QString::null, this,
119 SLOT(nextItem()), navigation, "Next Item"); 119 SLOT(nextItem()), navigation, "Next Item");
120 QToolButton *lastItemButton = new QToolButton( 120 QToolButton *lastItemButton = new QToolButton(
121 QIconSet(Resource::loadImage("fastforward")), "Last Item", 121 QIconSet(Resource::loadPixmap("fastforward")), "Last Item",
122 QString::null, this, 122 QString::null, this,
123 SLOT(lastItem()), navigation, "Last Item"); 123 SLOT(lastItem()), navigation, "Last Item");
124 124
125 navigation->addSeparator(); 125 navigation->addSeparator();
126 QToolButton *browseButton = new QToolButton( 126 QToolButton *browseButton = new QToolButton(
127 QIconSet(Resource::loadImage("day")), "View Single Item", 127 QIconSet(Resource::loadPixmap("day")), "View Single Item",
128 QString::null, this, 128 QString::null, this,
129 SLOT(browseViewSlot()), navigation, "View Single Item"); 129 SLOT(browseViewSlot()), navigation, "View Single Item");
130 QToolButton *listButton = new QToolButton( 130 QToolButton *listButton = new QToolButton(
131 QIconSet(Resource::loadImage("month")), "View Multiple Items", 131 QIconSet(Resource::loadPixmap("month")), "View Multiple Items",
132 QString::null, this, 132 QString::null, this,
133 SLOT(listViewSlot()), navigation, "View Multiple Items"); 133 SLOT(listViewSlot()), navigation, "View Multiple Items");
134 134
135 setToolBarsMovable(FALSE); 135 setToolBarsMovable(FALSE);
136 setToolBarsMovable(FALSE); 136 setToolBarsMovable(FALSE);
137 setToolBarsMovable(FALSE); 137 setToolBarsMovable(FALSE);
138 138
139/* Build widgets */ 139/* Build widgets */
140 browseView = new TVBrowseView(&ts, this, 0); 140 browseView = new TVBrowseView(&ts, this, 0);
141 listView = new TVListView(&ts, this, 0); 141 listView = new TVListView(&ts, this, 0);
142 filterView = new TVFilterView(&ts, this, 0); 142 filterView = new TVFilterView(&ts, this, 0);
143 fileSelector = new FileSelector("text/csv;text/x-xml-tableviewer", 143 fileSelector = new FileSelector("text/csv;text/x-xml-tableviewer",
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
@@ -13,25 +13,25 @@
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#ifndef Tableviewer_H 20#ifndef Tableviewer_H
21#define Tableviewer_H 21#define Tableviewer_H
22 22
23#include <qmainwindow.h> 23#include <qmainwindow.h>
24#include "db/common.h" 24#include "db/common.h"
25#include "fileselector.h" 25#include <qpe/fileselector.h>
26 26
27/* Forward class declarations */ 27/* Forward class declarations */
28class QWidgetStack; 28class QWidgetStack;
29class QDialog; 29class QDialog;
30class QMenuBar; 30class QMenuBar;
31 31
32class TVListView; 32class TVListView;
33class TVBrowseView; 33class TVBrowseView;
34class TVFilterView; 34class TVFilterView;
35class TVEditView; 35class TVEditView;
36 36
37class DBStore; 37class DBStore;
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
@@ -13,25 +13,26 @@
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#include <qlineedit.h> 21#include <qlineedit.h>
22#include <qlayout.h> 22#include <qlayout.h>
23#include <qlabel.h> 23#include <qlabel.h>
24#include <qcombobox.h> 24#include <qcombobox.h>
25#include <datebookmonth.h> 25
26#include <qpe/datebookmonth.h>
26#include <qpopupmenu.h> 27#include <qpopupmenu.h>
27#include <qspinbox.h> 28#include <qspinbox.h>
28#include "commonwidgets.h" 29#include "commonwidgets.h"
29 30
30DateEdit::DateEdit( QWidget *parent = 0, const char *name = 0, WFlags f = 0 ) 31DateEdit::DateEdit( QWidget *parent = 0, const char *name = 0, WFlags f = 0 )
31 : QToolButton(parent, name) 32 : QToolButton(parent, name)
32{ 33{
33 QPopupMenu *m1 = new QPopupMenu(this); 34 QPopupMenu *m1 = new QPopupMenu(this);
34 dateSelector = new DateBookMonth(m1, 0, TRUE); 35 dateSelector = new DateBookMonth(m1, 0, TRUE);
35 m1->insertItem(dateSelector); 36 m1->insertItem(dateSelector);
36 setPopup(m1); 37 setPopup(m1);
37 setPopupDelay(0); 38 setPopupDelay(0);
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
@@ -34,25 +34,25 @@
34 rapidly find specific elements in the table. 34 rapidly find specific elements in the table.
35*/ 35*/
36 36
37/*! 37/*!
38 Constructs a new TVBrowseView widget 38 Constructs a new TVBrowseView widget
39*/ 39*/
40TVBrowseView::TVBrowseView(TableState *t, QWidget* parent = 0, const char *name = 0, 40TVBrowseView::TVBrowseView(TableState *t, QWidget* parent = 0, const char *name = 0,
41 WFlags fl =0) 41 WFlags fl =0)
42{ 42{
43 if (!name) 43 if (!name)
44 setName("BrowseView"); 44 setName("BrowseView");
45 45
46 setSizePolicy(QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding, 0, 0, sizePolicy().hasHeightForWidth() ) ); 46// setSizePolicy(QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding, 0, 0, sizePolicy().hasHeightForWidth() ) );
47 QVBoxLayout *vlayout = new QVBoxLayout(this); 47 QVBoxLayout *vlayout = new QVBoxLayout(this);
48 textViewDisplay = new QTextBrowser(this, "textViewDisplay"); 48 textViewDisplay = new QTextBrowser(this, "textViewDisplay");
49 vlayout->addWidget( textViewDisplay ); 49 vlayout->addWidget( textViewDisplay );
50 50
51 keyEntry = new TVBrowseKeyEntry(this, "keyEntry"); 51 keyEntry = new TVBrowseKeyEntry(this, "keyEntry");
52 vlayout->addWidget( keyEntry ); 52 vlayout->addWidget( keyEntry );
53 53
54 /* connect the signals down */ 54 /* connect the signals down */
55 55
56 connect(keyEntry, SIGNAL(searchOnKey(int, TVVariant)), 56 connect(keyEntry, SIGNAL(searchOnKey(int, TVVariant)),
57 this, SIGNAL(searchOnKey(int, TVVariant))); 57 this, SIGNAL(searchOnKey(int, TVVariant)));
58 connect(keyEntry, SIGNAL(sortChanged(int)), 58 connect(keyEntry, SIGNAL(sortChanged(int)),