summaryrefslogtreecommitdiff
authorkergoth <kergoth>2002-06-06 23:31:00 (UTC)
committer kergoth <kergoth>2002-06-06 23:31:00 (UTC)
commitdfb9c76738bb68e235114c5ad43dbd26a59b98ab (patch) (unidiff)
tree25ab1468116e8a092dc402f8aa96a9c6976ebdce
parent9d6af1137a96d63f71f8e4797fe3bf377d92a15a (diff)
downloadopie-dfb9c76738bb68e235114c5ad43dbd26a59b98ab.zip
opie-dfb9c76738bb68e235114c5ad43dbd26a59b98ab.tar.gz
opie-dfb9c76738bb68e235114c5ad43dbd26a59b98ab.tar.bz2
Initial revision
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--configs/linux-arm-g++-sharedx1197
-rw-r--r--configs/linux-generic-g++-sharedx1194
-rw-r--r--core/pim/datebook/layoutmanager.cpp177
-rw-r--r--core/pim/datebook/layoutmanager.h78
-rw-r--r--docs/inputmethodinterface.doc49
-rw-r--r--examples/application/Example.pngbin0 -> 1262 bytes
-rw-r--r--examples/application/README2
-rw-r--r--examples/application/example.control11
-rw-r--r--examples/application/example.cpp28
-rw-r--r--examples/application/example.desktop6
-rw-r--r--examples/application/example.h17
-rw-r--r--examples/application/example.html15
-rw-r--r--examples/application/example.pro10
-rw-r--r--examples/application/examplebase.ui55
-rw-r--r--examples/application/index.html23
-rw-r--r--examples/application/main.cpp12
-rw-r--r--examples/qpepim-addressbook/abexample.desktop6
-rw-r--r--examples/qpepim-addressbook/abexample.pngbin0 -> 1262 bytes
-rw-r--r--examples/qpepim-addressbook/addressbookdumper.cpp65
-rw-r--r--examples/qpepim-addressbook/addressbookdumper.h39
-rw-r--r--examples/qpepim-addressbook/main.cpp47
-rw-r--r--examples/qpepim-addressbook/qpepim-abexample.control9
-rw-r--r--examples/qpepim-addressbook/qpepim-addressbook.pro8
-rw-r--r--library/custom-linux-sharp-g++.h147
-rw-r--r--library/qcopmessage_qws.h99
-rw-r--r--noncore/multimedia/showimg/settingsdialog.cpp57
-rw-r--r--noncore/multimedia/showimg/settingsdialog.h42
-rw-r--r--noncore/multimedia/showimg/settingsdialogbase.ui149
-rw-r--r--pics/cards/circle.pngbin0 -> 436 bytes
-rw-r--r--pics/cards/cross.pngbin0 -> 480 bytes
-rw-r--r--pics/cards/large/back01.pngbin0 -> 8421 bytes
-rw-r--r--pics/cards/large/back02.pngbin0 -> 595 bytes
-rw-r--r--pics/cards/large/back03.pngbin0 -> 18721 bytes
-rw-r--r--pics/cards/large/back04.pngbin0 -> 10774 bytes
-rw-r--r--pics/cards/large/back05.pngbin0 -> 10706 bytes
-rw-r--r--pics/cards/large/face.pngbin0 -> 797 bytes
-rw-r--r--pics/cards/large/pictures.pngbin0 -> 93276 bytes
-rw-r--r--pics/cards/large/ranks.pngbin0 -> 560 bytes
-rw-r--r--pics/cards/large/spade.pngbin0 -> 407 bytes
-rw-r--r--pics/cards/large/suits01.pngbin0 -> 279 bytes
-rw-r--r--pics/cards/large/suits02.pngbin0 -> 324 bytes
-rw-r--r--pics/cards/micro/back01.pngbin0 -> 736 bytes
-rw-r--r--pics/cards/micro/back02.pngbin0 -> 1317 bytes
-rw-r--r--pics/cards/micro/back03.pngbin0 -> 1128 bytes
-rw-r--r--pics/cards/micro/back04.pngbin0 -> 1375 bytes
-rw-r--r--pics/cards/micro/back05.pngbin0 -> 1050 bytes
-rw-r--r--pics/cards/micro/face.pngbin0 -> 262 bytes
-rw-r--r--pics/cards/micro/ranks.pngbin0 -> 225 bytes
-rw-r--r--pics/cards/micro/suits01.pngbin0 -> 172 bytes
-rw-r--r--pics/cards/normal/back01.pngbin0 -> 4799 bytes
-rw-r--r--pics/cards/normal/back02.pngbin0 -> 600 bytes
-rw-r--r--pics/cards/normal/back03.pngbin0 -> 11993 bytes
-rw-r--r--pics/cards/normal/back04.pngbin0 -> 5950 bytes
-rw-r--r--pics/cards/normal/back05.pngbin0 -> 5965 bytes
-rw-r--r--pics/cards/normal/face.pngbin0 -> 601 bytes
-rw-r--r--pics/cards/normal/joker.pngbin0 -> 1662 bytes
-rw-r--r--pics/cards/normal/pictures.pngbin0 -> 6092 bytes
-rw-r--r--pics/cards/normal/ranks.pngbin0 -> 361 bytes
-rw-r--r--pics/cards/normal/spade.pngbin0 -> 314 bytes
-rw-r--r--pics/cards/normal/suits.pngbin0 -> 828 bytes
-rw-r--r--pics/cards/normal/suits01.pngbin0 -> 243 bytes
-rw-r--r--pics/cards/normal/suits02.pngbin0 -> 268 bytes
-rw-r--r--pics/cards/normal/suits2.pngbin0 -> 1277 bytes
-rw-r--r--pics/cards/small/back01.pngbin0 -> 761 bytes
-rw-r--r--pics/cards/small/back02.pngbin0 -> 2014 bytes
-rw-r--r--pics/cards/small/back03.pngbin0 -> 1740 bytes
-rw-r--r--pics/cards/small/back04.pngbin0 -> 2139 bytes
-rw-r--r--pics/cards/small/back05.pngbin0 -> 1182 bytes
-rw-r--r--pics/cards/small/face.pngbin0 -> 221 bytes
-rw-r--r--pics/cards/small/ranks.pngbin0 -> 297 bytes
-rw-r--r--pics/cards/small/suits01.pngbin0 -> 191 bytes
-rw-r--r--pics/inline/today.pngbin0 -> 486 bytes
-rw-r--r--pics/slideshow.pngbin0 -> 207 bytes
73 files changed, 1342 insertions, 0 deletions
diff --git a/configs/linux-arm-g++-sharedx11 b/configs/linux-arm-g++-sharedx11
new file mode 100644
index 0000000..b810b05
--- a/dev/null
+++ b/configs/linux-arm-g++-sharedx11
@@ -0,0 +1,97 @@
1# Compiling
2 INTERFACE_DECL_PATH = .
3 SYSCONF_CXX = arm-linux-g++
4 SYSCONF_CC = arm-linux-gcc
5 DASHCROSS = -arm
6
7# Set XROOT to the root directory of the arm X11 files for cross compiling
8XROOT=/scratch/src/xfree86.41/xbinaries
9# Compiling with support libraries
10 SYSCONF_CXXFLAGS_X11=
11 SYSCONF_CXXFLAGS_QT= -I$(QTDIR)/include
12 SYSCONF_CXXFLAGS_OPENGL= -I$(XROOT)/usr/X11R6/include
13
14# Compiling YACC output
15SYSCONF_CXXFLAGS_YACC = -Wno-unused -Wno-parentheses
16
17# Linking with support libraries
18 SYSCONF_RPATH_X11=
19 SYSCONF_RPATH_QT= -Wl,-rpath,$(QTDIR)/lib,-rpath,$(XROOT)/usr/X11R6/lib
20 SYSCONF_RPATH_OPENGL= -Wl,-rpath,$(XROOT)/usr/X11R6/lib
21
22# Linking with support libraries
23# X11
24 SYSCONF_LFLAGS_X11=
25 SYSCONF_LIBS_X11=
26# Qt, Qt+OpenGL
27 SYSCONF_LFLAGS_QT= -L$(QTDIR)/lib
28 SYSCONF_LIBS_QT = -lqt$(QT_THREAD_SUFFIX)
29 SYSCONF_LIBS_QT_OPENGL=
30# OpenGL
31 SYSCONF_LFLAGS_OPENGL= -L$(XROOT)/usr/X11R6/lib
32 SYSCONF_LIBS_OPENGL=
33# Yacc
34 SYSCONF_LIBS_YACC=
35
36# Linking applications
37 SYSCONF_LINK = arm-linux-gcc
38 SYSCONF_LFLAGS =
39 SYSCONF_LIBS =
40
41# Link flags for shared objects
42 SYSCONF_LFLAGS_SHOBJ= -shared
43
44# Flags for threading
45 SYSCONF_CFLAGS_THREAD= -D_REENTRANT
46 SYSCONF_CXXFLAGS_THREAD= -D_REENTRANT
47 SYSCONF_LFLAGS_THREAD=
48 SYSCONF_LIBS_THREAD= -lpthread
49
50# Point to /usr/bin for moc and uic since we are cross compiling here
51# Meta-object compiler
52 SYSCONF_MOC = /usr/bin/moc
53
54# UI compiler
55 SYSCONF_UIC = /usr/bin/uic
56
57# Linking shared libraries
58# - Build the $(TARGET) library, eg. lib$(TARGET).so.2.2.2
59# - Place target in $(DESTDIR) - which has a trailing /
60# - Usually needs to incorporate $(VER_MAJ), $(VER_MIN) and $(VER_PATCH)
61#
62 SYSCONF_LINK_SHLIB= arm-linux-gcc
63 SYSCONF_LINK_TARGET_SHARED= lib$(TARGET).so.$(VER_MAJ).$(VER_MIN).$(VER_PATCH)
64 SYSCONF_LINK_LIB_SHARED= $(SYSCONF_LINK_SHLIB) -shared -Wl,-soname,lib$(TARGET).so.$(VER_MAJ) \
65 $(LFLAGS) -o $(SYSCONF_LINK_TARGET_SHARED) \
66 $(OBJECTS) $(OBJMOC) $(LIBS) && \
67 mv $(SYSCONF_LINK_TARGET_SHARED) $(DESTDIR); \
68 cd $(DESTDIR) && \
69 rm -f lib$(TARGET).so lib$(TARGET).so.$(VER_MAJ) lib$(TARGET).so.$(VER_MAJ).$(VER_MIN); \
70 ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so; \
71 ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so.$(VER_MAJ); \
72 ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so.$(VER_MAJ).$(VER_MIN)
73
74# Linking static libraries
75# - Build the $(TARGET) library, eg. lib$(TARGET).a
76# - Place target in $(DESTDIR) - which has a trailing /
77#
78 SYSCONF_AR = arm-linux-ar cqs
79SYSCONF_LINK_TARGET_STATIC = lib$(TARGET).a
80 SYSCONF_LINK_LIB_STATIC= rm -f $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) ; \
81 $(SYSCONF_AR) $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) $(OBJECTS) $(OBJMOC)
82# Compiling application source
83 SYSCONF_CXXFLAGS= -pipe -DQT_NO_COP -fno-exceptions -fno-rtti -O2 -Wall -W
84 SYSCONF_CFLAGS = -pipe -O2 -Wall -W
85# Default link type (static linking is still be used where required)
86 SYSCONF_LINK_LIB= $(SYSCONF_LINK_LIB_SHARED)
87 SYSCONF_LINK_TARGET= $(SYSCONF_LINK_TARGET_SHARED)
88# Compiling library source
89 SYSCONF_CXXFLAGS_LIB= -fPIC
90 SYSCONF_CFLAGS_LIB= -fPIC
91# Compiling shared-object source
92 SYSCONF_CXXFLAGS_SHOBJ= -fPIC
93 SYSCONF_CFLAGS_SHOBJ= -fPIC
94# Linking Qt
95 SYSCONF_LIBS_QTLIB= $(SYSCONF_LFLAGS_X11) $(QT_LIBS_MT) $(QT_LIBS_OPT)
96# Linking Qt applications
97 SYSCONF_LIBS_QTAPP=
diff --git a/configs/linux-generic-g++-sharedx11 b/configs/linux-generic-g++-sharedx11
new file mode 100644
index 0000000..1cd7a46
--- a/dev/null
+++ b/configs/linux-generic-g++-sharedx11
@@ -0,0 +1,94 @@
1# Compiling
2 INTERFACE_DECL_PATH = .
3 SYSCONF_CXX = g++
4 SYSCONF_CC = gcc
5 DASHCROSS =
6
7# Compiling with support libraries
8 SYSCONF_CXXFLAGS_X11=
9 SYSCONF_CXXFLAGS_QT= -I$(QTDIR)/include
10 SYSCONF_CXXFLAGS_OPENGL= -I/usr/X11R6/include
11
12# Compiling YACC output
13SYSCONF_CXXFLAGS_YACC = -Wno-unused -Wno-parentheses
14
15# Linking with support libraries
16 SYSCONF_RPATH_X11=
17 SYSCONF_RPATH_QT= -Wl,-rpath,$(QTDIR)/lib
18 SYSCONF_RPATH_OPENGL= -Wl,-rpath,/usr/X11R6/lib
19
20# Linking with support libraries
21# X11
22 SYSCONF_LFLAGS_X11=
23 SYSCONF_LIBS_X11=
24# Qt, Qt+OpenGL
25 SYSCONF_LFLAGS_QT= -L$(QTDIR)/lib
26 SYSCONF_LIBS_QT = -lqt$(QT_THREAD_SUFFIX)
27 SYSCONF_LIBS_QT_OPENGL=
28# OpenGL
29 SYSCONF_LFLAGS_OPENGL= -L/usr/X11R6/lib
30 SYSCONF_LIBS_OPENGL=
31# Yacc
32 SYSCONF_LIBS_YACC=
33
34# Linking applications
35 SYSCONF_LINK = gcc
36 SYSCONF_LFLAGS =
37 SYSCONF_LIBS =
38
39# Link flags for shared objects
40 SYSCONF_LFLAGS_SHOBJ= -shared
41
42# Flags for threading
43 SYSCONF_CFLAGS_THREAD= -D_REENTRANT
44 SYSCONF_CXXFLAGS_THREAD= -D_REENTRANT
45 SYSCONF_LFLAGS_THREAD=
46 SYSCONF_LIBS_THREAD= -lpthread
47
48# Meta-object compiler
49 SYSCONF_MOC = $(QTDIR)/bin/moc
50
51# UI compiler
52 SYSCONF_UIC = $(QTDIR)/bin/uic
53
54# Linking shared libraries
55# - Build the $(TARGET) library, eg. lib$(TARGET).so.2.2.2
56# - Place target in $(DESTDIR) - which has a trailing /
57# - Usually needs to incorporate $(VER_MAJ), $(VER_MIN) and $(VER_PATCH)
58#
59 SYSCONF_LINK_SHLIB= gcc
60 SYSCONF_LINK_TARGET_SHARED= lib$(TARGET).so.$(VER_MAJ).$(VER_MIN).$(VER_PATCH)
61 SYSCONF_LINK_LIB_SHARED= $(SYSCONF_LINK_SHLIB) -shared -Wl,-soname,lib$(TARGET).so.$(VER_MAJ) \
62 $(LFLAGS) -o $(SYSCONF_LINK_TARGET_SHARED) \
63 $(OBJECTS) $(OBJMOC) $(LIBS) && \
64 mv $(SYSCONF_LINK_TARGET_SHARED) $(DESTDIR); \
65 cd $(DESTDIR) && \
66 rm -f lib$(TARGET).so lib$(TARGET).so.$(VER_MAJ) lib$(TARGET).so.$(VER_MAJ).$(VER_MIN); \
67 ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so; \
68 ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so.$(VER_MAJ); \
69 ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so.$(VER_MAJ).$(VER_MIN)
70
71# Linking static libraries
72# - Build the $(TARGET) library, eg. lib$(TARGET).a
73# - Place target in $(DESTDIR) - which has a trailing /
74#
75 SYSCONF_AR = ar cqs
76SYSCONF_LINK_TARGET_STATIC = lib$(TARGET).a
77 SYSCONF_LINK_LIB_STATIC= rm -f $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) ; \
78 $(SYSCONF_AR) $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) $(OBJECTS) $(OBJMOC)
79# Compiling application source
80 SYSCONF_CXXFLAGS= -pipe -DQT_NO_COP -fno-exceptions -fno-rtti -O2 -Wall -W
81 SYSCONF_CFLAGS = -pipe -O2 -Wall -W
82# Default link type (static linking is still be used where required)
83 SYSCONF_LINK_LIB= $(SYSCONF_LINK_LIB_SHARED)
84 SYSCONF_LINK_TARGET= $(SYSCONF_LINK_TARGET_SHARED)
85# Compiling library source
86 SYSCONF_CXXFLAGS_LIB= -fPIC
87 SYSCONF_CFLAGS_LIB= -fPIC
88# Compiling shared-object source
89 SYSCONF_CXXFLAGS_SHOBJ= -fPIC
90 SYSCONF_CFLAGS_SHOBJ= -fPIC
91# Linking Qt
92 SYSCONF_LIBS_QTLIB= $(SYSCONF_LFLAGS_X11) $(QT_LIBS_MT) $(QT_LIBS_OPT)
93# Linking Qt applications
94 SYSCONF_LIBS_QTAPP=
diff --git a/core/pim/datebook/layoutmanager.cpp b/core/pim/datebook/layoutmanager.cpp
new file mode 100644
index 0000000..23058ed
--- a/dev/null
+++ b/core/pim/datebook/layoutmanager.cpp
@@ -0,0 +1,177 @@
1/**********************************************************************
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3**
4** This file is part of the Qtopia Environment.
5**
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
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
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.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20
21#include "layoutmanager.h"
22
23static const int min_height = 15;
24
25LayoutItem::LayoutItem( const EffectiveEvent e ) : eevent(e) { }
26
27LayoutManager::LayoutManager(int w, int h) : width(w), height(h), maxWidth(w) { }
28
29LayoutManager::~LayoutManager() { }
30
31void LayoutManager::setSize(int w, int h)
32{
33 height = h;
34 maxWidth = width = w;
35 // with changed, re-init, re-layout items.
36 for (uint i = 0; i < mItems.count(); i++)
37 initializeGeometry(mItems.at(i));
38}
39
40void LayoutManager::setOccurances(QValueList<EffectiveEvent> &events)
41{
42 mItems.clear();
43
44 QValueListIterator<EffectiveEvent> it;
45 for ( it = events.begin(); it != events.end(); ++it ) {
46 addOccurance(*it);
47 }
48 layoutItems(TRUE);
49}
50
51void LayoutManager::addOccurance(EffectiveEvent &event)
52{
53 LayoutItem *i = new LayoutItem(event);
54 initializeGeometry(i);
55 addItem(i);
56}
57
58void LayoutManager::addItem(LayoutItem *i)
59{
60 mItems.resize(mItems.size() + 1);
61 mItems.insert(mItems.size() - 1, i);
62}
63
64void LayoutManager::layoutItems(bool resetMaxWidth)
65{
66 if (resetMaxWidth)
67 maxWidth = width;
68
69 int iCount = mItems.count();
70 int itemWidth = QMIN(width, maxWidth);
71 int n = 1;
72
73 if (width < 1)
74 return;
75 if (iCount < (width/4)) {
76 int i = 0;
77 while (i < iCount) {
78 LayoutItem *item = mItems.at(i);
79 int x = 0;
80 int xp = 0;
81 QRect geom = item->geometry();
82 geom.setX( x );
83 geom.setWidth(itemWidth);
84 while ( xp < n && intersects(item, geom)) {
85 x += itemWidth;
86 xp++;
87 geom.moveBy(itemWidth, 0);
88 }
89 if (xp >= n) {
90 n++;
91 itemWidth = QMIN(width / n, maxWidth);
92 i = 0; // Start again.
93 } else {
94 item->setGeometry( geom );
95 i++;
96 }
97 }
98 } else {
99 // alturnate algorithm. // same as above, but just overlap
100 // if fail.
101 itemWidth = 4;
102 n = width / itemWidth;
103 int i = 0;
104 int rovingXp = 0;
105 while (i < iCount) {
106 LayoutItem *item = mItems.at(i);
107 int x = 0;
108 int xp = 0;
109 QRect geom = item->geometry();
110 geom.setX( x );
111 geom.setWidth(itemWidth);
112 while ( xp < n && intersects(item, geom)) {
113 x += itemWidth;
114 xp++;
115 geom.moveBy(itemWidth, 0);
116 }
117 if (xp >= n) {
118 geom.setX(rovingXp * itemWidth);
119 geom.setWidth(itemWidth);
120 rovingXp++;
121 item->setGeometry( geom );
122 } else {
123 item->setGeometry( geom );
124 }
125 i++;
126 }
127 }
128 if (itemWidth < maxWidth)
129 maxWidth = itemWidth;
130}
131
132int LayoutManager::timeToHeight( const QTime &time ) const
133{
134 int y = time.hour() * 60 + time.minute();
135 if (y)
136 y = (y * (height / 24)) / 60;
137 return y;
138}
139
140QTime LayoutManager::heightToTime( int h ) const
141{
142 // broken
143 return QTime(0,0,0);
144}
145
146LayoutItem *LayoutManager::intersects(LayoutItem *item, QRect geom) const
147{
148 int i = 0;
149 // allow overlapping
150 geom.moveBy(1,1);
151 geom.setSize( geom.size() - QSize(2,2) );
152
153 LayoutItem *it = mItems.at(i);
154 int count = mItems.count();
155 while (i < count && it != item) {
156 if (it->geometry().intersects( geom ) )
157 return it;
158 it = mItems.at(++i);
159 }
160 return 0;
161}
162
163void LayoutManager::initializeGeometry(LayoutItem *item)
164{
165 int y = timeToHeight(item->occurance().start());
166 int yend = timeToHeight(item->occurance().end());
167
168 int h = yend - y;
169 if (h < min_height)
170 h = min_height;
171 if (y + min_height > height) {
172 y = height - min_height;
173 h = min_height;
174 }
175
176 item->setGeometry(QRect(0, y, width, h));
177}
diff --git a/core/pim/datebook/layoutmanager.h b/core/pim/datebook/layoutmanager.h
new file mode 100644
index 0000000..128f927
--- a/dev/null
+++ b/core/pim/datebook/layoutmanager.h
@@ -0,0 +1,78 @@
1/**********************************************************************
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3**
4** This file is part of the Qtopia Environment.
5**
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
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
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.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20
21#include <qvector.h>
22#include <qvaluelist.h>
23#include <qrect.h>
24#include <qdatetime.h>
25#include <qpe/event.h>
26
27class LayoutItem
28{
29public:
30 LayoutItem( const EffectiveEvent e );
31
32 void setGeometry(const QRect &rect) { r = rect; }
33 void setGeometry(int x, int y, int w, int h)
34 { setGeometry(QRect(x,y,w,h)); }
35 QRect geometry() const { return r; }
36
37 EffectiveEvent occurance() const { return eevent; }
38 Event event() const { return eevent.event(); }
39
40private:
41 EffectiveEvent eevent;
42 QRect r;
43};
44
45class LayoutManager
46{
47public:
48 LayoutManager(int w, int h);
49 virtual ~LayoutManager();
50
51 void setSize(int w, int h);
52 void setMaximumColumnWidth(int x) { maxWidth = x; };
53 int maximumColumnWidth() const { return maxWidth; };
54 void setOccurances(QValueList<EffectiveEvent> &events);
55 virtual void addOccurance(EffectiveEvent &event);
56
57 void clear() { mItems.clear(); }
58
59 QVector<LayoutItem> items() const { return mItems; }
60 QSize size() const { return QSize(width, height); }
61 int count() const { return mItems.count(); }
62
63 virtual void layoutItems(bool resetMaxWidth = FALSE);
64
65 virtual int timeToHeight(const QTime &) const;
66 virtual QTime heightToTime(int) const;
67
68protected:
69 void initializeGeometry(LayoutItem *);
70 LayoutItem *intersects(LayoutItem *, QRect) const;
71 void addItem(LayoutItem *);
72
73private:
74 QVector<LayoutItem> mItems;
75 int width;
76 int height;
77 int maxWidth;
78};
diff --git a/docs/inputmethodinterface.doc b/docs/inputmethodinterface.doc
new file mode 100644
index 0000000..465182b
--- a/dev/null
+++ b/docs/inputmethodinterface.doc
@@ -0,0 +1,49 @@
1/*! \class InputMethodInterface inputmethodinterface.h
2 \brief The InputMethodInterface class provides an interface for Qtopia
3 input methods.
4
5 Input methods must supply a QWidget that will be shown above the task bar
6 and emit a signal when a key is pressed:
7
8 Input methods may be added to Qtopia via plugins. In order to write an
9 input method plugin you must create an interface to your input method by
10 deriving from the InputMethodInterface class and implementing the pure
11 virtual functions.
12
13 See also: <a href=inputmethods.html>Input Method Tutorial</a>
14*/
15
16
17/*! \fn QWidget *InputMethodInterface::inputMethod( QWidget *parent, Qt::WFlags f )
18
19 The inputMethod() function returns the input method widget. This
20 widget will be display just above the task bar when the user needs to input
21 text. You should always return the same widget if this function is called
22 multiple times.
23*/
24
25/*! \fn void InputMethodInterface::resetState()
26
27 The resetState() function should return the input method to its default
28 state.
29*/
30
31/*! \fn QString InputMethodInterface::name()
32
33 The name() function returns the name of the input method. This will
34 be displayed in the popup list of available input methods.
35*/
36
37/*! \fn QPixmap *InputMethodInterface::icon()
38
39 The icon() function returns the icon for the input method. This will
40 be displayed in the taskbar when the input method is selected.
41*/
42
43
44/*! \fn void InputMethodInterface::onKeyPress( QObject *receiver, const char *slot )
45
46 The onKeyPress() function must connect the supplied slot to the signal
47 that is emitted when a key press is generated.
48*/
49
diff --git a/examples/application/Example.png b/examples/application/Example.png
new file mode 100644
index 0000000..f63d0bc
--- a/dev/null
+++ b/examples/application/Example.png
Binary files differ
diff --git a/examples/application/README b/examples/application/README
new file mode 100644
index 0000000..63986f4
--- a/dev/null
+++ b/examples/application/README
@@ -0,0 +1,2 @@
1See /opt/Qtopia/doc/index.html for help.
2See doc.trolltech.com for more recent documentation updates.
diff --git a/examples/application/example.control b/examples/application/example.control
new file mode 100644
index 0000000..e79c6f6
--- a/dev/null
+++ b/examples/application/example.control
@@ -0,0 +1,11 @@
1Files: bin/example apps/Applications/example.desktop pics/Example.png help/html/example.html
2Priority: optional
3Section: qpe/applications
4Maintainer: Your Name <you@your.domain.com>
5Architecture: arm
6Version: 1.0.0
7Depends: qpe-base ($QPE_VERSION)
8License: Public Domain
9Description: Example program
10 An example program for the Qtopia environment.
11 Does nothing interesting.
diff --git a/examples/application/example.cpp b/examples/application/example.cpp
new file mode 100644
index 0000000..1e0bbe9
--- a/dev/null
+++ b/examples/application/example.cpp
@@ -0,0 +1,28 @@
1#include "example.h"
2#include <qpushbutton.h>
3
4/*
5 * Constructs a Example which is a child of 'parent', with the
6 * name 'name' and widget flags set to 'f'
7 */
8Example::Example( QWidget* parent, const char* name, WFlags fl )
9 : ExampleBase( parent, name, fl )
10{
11 connect(quit, SIGNAL(clicked()), this, SLOT(goodBye()));
12}
13
14/*
15 * Destroys the object and frees any allocated resources
16 */
17Example::~Example()
18{
19 // no need to delete child widgets, Qt does it all for us
20}
21
22/*
23 * A simple slot... not very interesting.
24 */
25void Example::goodBye()
26{
27 close();
28}
diff --git a/examples/application/example.desktop b/examples/application/example.desktop
new file mode 100644
index 0000000..f1e6f06
--- a/dev/null
+++ b/examples/application/example.desktop
@@ -0,0 +1,6 @@
1[Desktop Entry]
2Comment=An Example Program
3Exec=example
4Icon=Example
5Type=Application
6Name=Example
diff --git a/examples/application/example.h b/examples/application/example.h
new file mode 100644
index 0000000..24c58c0
--- a/dev/null
+++ b/examples/application/example.h
@@ -0,0 +1,17 @@
1#ifndef EXAMPLE_H
2#define EXAMPLE_H
3#include "examplebase.h"
4
5class Example : public ExampleBase
6{
7 Q_OBJECT
8
9public:
10 Example( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
11 ~Example();
12
13private slots:
14 void goodBye();
15};
16
17#endif // EXAMPLE_H
diff --git a/examples/application/example.html b/examples/application/example.html
new file mode 100644
index 0000000..9163573
--- a/dev/null
+++ b/examples/application/example.html
@@ -0,0 +1,15 @@
1<html>
2<h1>Example</h1>
3
4<p>This is the help for the Example program.
5
6<p>To user this application:
7
8<ol>
9 <li>Press the <img width=12 height=12 src=Example.png> icon in the Qtopia launcher.
10 <li>Read the label.
11 <li>Press the button.
12 <li>Read the source code provided.
13</ol>
14
15Now you know how to make a Qtopia application!
diff --git a/examples/application/example.pro b/examples/application/example.pro
new file mode 100644
index 0000000..2d89311
--- a/dev/null
+++ b/examples/application/example.pro
@@ -0,0 +1,10 @@
1 TEMPLATE= app
2 #CONFIG = qt warn_on debug
3 CONFIG = qt warn_on release
4 HEADERS = example.h
5 SOURCES = main.cpp example.cpp
6 INCLUDEPATH+= $(QPEDIR)/include
7 DEPENDPATH+= $(QPEDIR)/include
8LIBS += -lqpe
9 INTERFACES= examplebase.ui
10 TARGET = example
diff --git a/examples/application/examplebase.ui b/examples/application/examplebase.ui
new file mode 100644
index 0000000..b47d20c
--- a/dev/null
+++ b/examples/application/examplebase.ui
@@ -0,0 +1,55 @@
1<!DOCTYPE UI><UI>
2<class>ExampleBase</class>
3<widget>
4 <class>QWidget</class>
5 <property stdset="1">
6 <name>name</name>
7 <cstring>ExampleBase</cstring>
8 </property>
9 <property stdset="1">
10 <name>geometry</name>
11 <rect>
12 <x>0</x>
13 <y>0</y>
14 <width>196</width>
15 <height>245</height>
16 </rect>
17 </property>
18 <property stdset="1">
19 <name>caption</name>
20 <string>Example</string>
21 </property>
22 <vbox>
23 <property stdset="1">
24 <name>margin</name>
25 <number>11</number>
26 </property>
27 <property stdset="1">
28 <name>spacing</name>
29 <number>6</number>
30 </property>
31 <widget>
32 <class>QLabel</class>
33 <property stdset="1">
34 <name>name</name>
35 <cstring>TextLabel1</cstring>
36 </property>
37 <property stdset="1">
38 <name>text</name>
39 <string>&lt;p&gt;This is just an &lt;i&gt;example&lt;/i&gt;. It doesn't do anything interesting at all.</string>
40 </property>
41 </widget>
42 <widget>
43 <class>QPushButton</class>
44 <property stdset="1">
45 <name>name</name>
46 <cstring>quit</cstring>
47 </property>
48 <property stdset="1">
49 <name>text</name>
50 <string>Quit</string>
51 </property>
52 </widget>
53 </vbox>
54</widget>
55</UI>
diff --git a/examples/application/index.html b/examples/application/index.html
new file mode 100644
index 0000000..ad97378
--- a/dev/null
+++ b/examples/application/index.html
@@ -0,0 +1,23 @@
1<h1 align=center><small>Welcome to the</small><br>Qtopia SDK</h1>
2
3<h3>API Documentation</h3>
4<p>
5For API documentation, point a web browser at
6/opt/Qtopia/doc/html/qtopia/index.html
7
8<h3>Application Documentation</h3>
9Put English documentation for applications in:
10
11<p>
12&nbsp;&nbsp;&nbsp;$QPEDIR/help/html/<i>appname</i>.html
13
14<p>
15Put non-English documentation for applications in:
16
17<p>
18&nbsp;&nbsp;&nbsp;$QPEDIR/help/<i>lang</i>/html/<i>appname</i>.html
19
20<p>
21Where <i>lang</i> is the language specifier (eg. "de" for German),
22and <i>appname</i> is the program name of your application.
23
diff --git a/examples/application/main.cpp b/examples/application/main.cpp
new file mode 100644
index 0000000..b705c44
--- a/dev/null
+++ b/examples/application/main.cpp
@@ -0,0 +1,12 @@
1#include "example.h"
2#include <qpe/qpeapplication.h>
3
4int main( int argc, char ** argv )
5{
6 QPEApplication a( argc, argv );
7
8 Example mw;
9 a.showMainWidget( &mw );
10
11 return a.exec();
12}
diff --git a/examples/qpepim-addressbook/abexample.desktop b/examples/qpepim-addressbook/abexample.desktop
new file mode 100644
index 0000000..24b44d1
--- a/dev/null
+++ b/examples/qpepim-addressbook/abexample.desktop
@@ -0,0 +1,6 @@
1[Desktop Entry]
2Comment=Simple QPEPIM Example
3Exec=abexample
4Icon=abexample
5Type=Application
6Name=AB QPEPIM
diff --git a/examples/qpepim-addressbook/abexample.png b/examples/qpepim-addressbook/abexample.png
new file mode 100644
index 0000000..f63d0bc
--- a/dev/null
+++ b/examples/qpepim-addressbook/abexample.png
Binary files differ
diff --git a/examples/qpepim-addressbook/addressbookdumper.cpp b/examples/qpepim-addressbook/addressbookdumper.cpp
new file mode 100644
index 0000000..c47e05c
--- a/dev/null
+++ b/examples/qpepim-addressbook/addressbookdumper.cpp
@@ -0,0 +1,65 @@
1/**********************************************************************
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3**
4** This file is part of the Qtopia Environment.
5**
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
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
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.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20
21#include <qpe/contact.h>
22#include <qvaluelist.h>
23#include "addressbookdumper.h"
24
25AddressBookDumper::AddressBookDumper(QWidget* parent) : QMultiLineEdit(parent) {
26 // connect(&m_ABAccess, SIGNAL(addressbookUpdated()), this, SLOT(abChanged()));
27}
28
29AddressBookDumper::~AddressBookDumper() {
30}
31
32void AddressBookDumper::abChanged() {
33 QString newText;
34 QValueList<Contact> contacts = m_ABAccess.contacts();
35 QValueListConstIterator<Contact> it;
36 for (it = contacts.begin() ; it != contacts.end(); it++) {
37 newText.append((*it).firstName() + " " + (*it).lastName() + "\n");
38 }
39 setText(newText);
40}
41
42void AddressBookDumper::startBigEdit() {
43 if (m_ABAccess.startBlockEdit())
44 qDebug("*** Block edit successfully started.");
45 else
46 qDebug("*** Block edit start failed.");
47}
48
49void AddressBookDumper::endBigEdit() {
50 if (m_ABAccess.endBlockEdit())
51 qDebug("*** Block edit successfully ended.");
52 else
53 qDebug("*** Block edit end failed.");
54}
55
56void AddressBookDumper::addContact() {
57 Contact foo;
58 foo.setFirstName("Foo");
59 foo.setLastName("Bar");
60 foo.setFileAs();
61 if (m_ABAccess.addContact(foo))
62 qDebug("*** Add succeeded..");
63 else
64 qDebug("*** Add failed..");
65}
diff --git a/examples/qpepim-addressbook/addressbookdumper.h b/examples/qpepim-addressbook/addressbookdumper.h
new file mode 100644
index 0000000..cc83d32
--- a/dev/null
+++ b/examples/qpepim-addressbook/addressbookdumper.h
@@ -0,0 +1,39 @@
1/**********************************************************************
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3**
4** This file is part of the Qtopia Environment.
5**
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
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
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.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20
21#include <qmultilineedit.h>
22#include <qpe/pim/addressbookaccess.h>
23
24class AddressBookDumper : public QMultiLineEdit {
25 Q_OBJECT
26
27 public:
28 AddressBookDumper(QWidget* parent);
29 ~AddressBookDumper();
30
31 public slots:
32 void abChanged();
33 void startBigEdit();
34 void endBigEdit();
35 void addContact();
36
37 private:
38 AddressBookAccess m_ABAccess;
39};
diff --git a/examples/qpepim-addressbook/main.cpp b/examples/qpepim-addressbook/main.cpp
new file mode 100644
index 0000000..590fffe
--- a/dev/null
+++ b/examples/qpepim-addressbook/main.cpp
@@ -0,0 +1,47 @@
1/**********************************************************************
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3**
4** This file is part of the Qtopia Environment.
5**
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
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
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.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20
21#include <qpe/qpeapplication.h>
22#ifdef QWS
23#include <qpe/qcopenvelope_qws.h>
24#endif
25#include <qapplication.h>
26#include <qpe/pim/addressbookaccess.h>
27#include "addressbookdumper.h"
28#include <qvbox.h>
29#include <qpushbutton.h>
30
31int main( int argc, char ** argv )
32{
33 QPEApplication a( argc, argv );
34 QVBox* vbox = new QVBox(0L);
35 QPushButton* clicker = new QPushButton("Refresh", vbox);
36 QPushButton* startBigEditButton = new QPushButton("Start Big Edit", vbox);
37 QPushButton* endBigEditButton = new QPushButton("End Big Edit", vbox);
38 QPushButton* addContactButton = new QPushButton("Add Contact", vbox);
39 AddressBookDumper* abDumper = new AddressBookDumper(vbox);
40 QObject::connect(clicker, SIGNAL(clicked()), abDumper, SLOT(abChanged()));
41 QObject::connect(startBigEditButton, SIGNAL(clicked()), abDumper, SLOT(startBigEdit()));
42 QObject::connect(endBigEditButton, SIGNAL(clicked()), abDumper, SLOT(endBigEdit()));
43 QObject::connect(addContactButton, SIGNAL(clicked()), abDumper, SLOT(addContact()));
44 a.setMainWidget(vbox);
45 vbox->show();
46 return a.exec();
47}
diff --git a/examples/qpepim-addressbook/qpepim-abexample.control b/examples/qpepim-addressbook/qpepim-abexample.control
new file mode 100644
index 0000000..5a31c97
--- a/dev/null
+++ b/examples/qpepim-addressbook/qpepim-abexample.control
@@ -0,0 +1,9 @@
1Files: bin/abexample apps/Applications/abexample.desktop
2Priority: optional
3Section: qpe/applications
4Maintainer: Warwick Allison <warwick@trolltech.com>
5Architecture: arm
6Version: $QPE_VERSION-1
7Depends: qpe-pim, qpe-base ($QPE_VERSION)
8Description: Example Addressbook reader
9 Simple example for using the QPEPIM access library.
diff --git a/examples/qpepim-addressbook/qpepim-addressbook.pro b/examples/qpepim-addressbook/qpepim-addressbook.pro
new file mode 100644
index 0000000..7e918e0
--- a/dev/null
+++ b/examples/qpepim-addressbook/qpepim-addressbook.pro
@@ -0,0 +1,8 @@
1TEMPLATE = app
2CONFIG = qt warn_on debug
3
4HEADERS = addressbookdumper.h
5SOURCES = main.cpp addressbookdumper.cpp
6TARGET = abexample
7INCLUDEPATH = $(QPEDIR)/include
8LIBS += -lqpepim -lqpe -lqte
diff --git a/library/custom-linux-sharp-g++.h b/library/custom-linux-sharp-g++.h
new file mode 100644
index 0000000..f65d474
--- a/dev/null
+++ b/library/custom-linux-sharp-g++.h
@@ -0,0 +1,147 @@
1/**********************************************************************
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3**
4** This file is part of the Qtopia Environment.
5**
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
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
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.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20
21#define QPE_OWNAPM
22#define QPE_HAVE_TOGGLELIGHT
23#define QPE_NOCIBAUD
24#define QPE_STARTMENU
25#include <asm/sharp_apm.h>
26#ifndef APM_IOC_BATTERY_BACK_CHK
27#define APM_IOC_BATTERY_BACK_CHK _IO(APM_IOC_MAGIC, 32)
28#endif
29#ifndef APM_IOC_BATTERY_MAIN_CHK
30#define APM_IOC_BATTERY_MAIN_CHK _IO(APM_IOC_MAGIC, 33)
31#endif
32
33#include <unistd.h>
34#include <stdio.h>
35#include <signal.h>
36#include <fcntl.h>
37#include <sys/ioctl.h>
38
39#define SHARP_DEV_IOCTL_COMMAND_START 0x5680
40
41/* --- for SHARP_BUZZER device --- */
42 #defineSHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START)
43#define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START)
44#define SHARP_BUZZER_SETVOLUME (SHARP_BUZZER_IOCTL_START+1)
45#define SHARP_BUZZER_GETVOLUME (SHARP_BUZZER_IOCTL_START+2)
46#define SHARP_BUZZER_ISSUPPORTED (SHARP_BUZZER_IOCTL_START+3)
47#define SHARP_BUZZER_SETMUTE (SHARP_BUZZER_IOCTL_START+4)
48#define SHARP_BUZZER_STOPSOUND (SHARP_BUZZER_IOCTL_START+5)
49
50#define SHARP_BUZ_TOUCHSOUND 1 /* touch panel sound */
51#define SHARP_BUZ_KEYSOUND 2 /* key sound */
52#define SHARP_PDA_ILLCLICKSOUND 3 /* illegal click */
53#define SHARP_PDA_WARNSOUND 4 /* warning occurred */
54#define SHARP_PDA_ERRORSOUND 5 /* error occurred */
55#define SHARP_PDA_CRITICALSOUND 6 /* critical error occurred */
56#define SHARP_PDA_SYSSTARTSOUND 7 /* system start */
57#define SHARP_PDA_SYSTEMENDSOUND 8 /* system shutdown */
58#define SHARP_PDA_APPSTART 9 /* application start */
59#define SHARP_PDA_APPQUIT 10 /* application ends */
60#define SHARP_BUZ_SCHEDULE_ALARM 11 /* schedule alarm */
61#define SHARP_BUZ_DAILY_ALARM 12 /* daily alarm */
62#define SHARP_BUZ_GOT_PHONE_CALL 13 /* phone call sound */
63#define SHARP_BUZ_GOT_MAIL 14 /* mail sound */
64
65
66#define CUSTOM_BUZZER( sound ) \
67{ \
68 static int fd = open( "/dev/sharp_buz", O_RDWR|O_NONBLOCK ); \
69 ioctl( fd, SHARP_BUZZER_MAKESOUND, sound ); \
70}
71
72#define CUSTOM_SOUND_ALARM CUSTOM_BUZZER( SHARP_BUZ_SCHEDULE_ALARM )
73
74#include <sys/ioctl.h>
75#include <asm/sharp_char.h>
76
77// a bit awkward, as this value is defined in emailclient.cpp aswell...
78#define LED_MAIL 0
79#define SHARP_LED_MAIL 9
80
81#define CUSTOM_LEDS( led, status ) \
82{ \
83 if ( led == LED_MAIL ) \
84 led = SHARP_LED_MAIL; \
85 static int fd = open( "/dev/sharp_led", O_RDWR|O_NONBLOCK ); \
86 sharp_led_status leds; \
87 memset(&leds, 0, sizeof(leds)); \
88 leds.which = led; \
89 leds.status = status; \
90 ioctl( fd, SHARP_LED_SETSTATUS, (char*)&leds ); \
91}
92
93#define QPE_HAVE_MEMALERTER
94
95#define QPE_MEMALERTER_IMPL \
96static void sig_handler(int sig) \
97{ \
98 switch (sig) { \
99 case SIGHUP: \
100 memstate = VeryLow; \
101 break; \
102 case SIGUSR1: \
103 memstate = Normal; \
104 break; \
105 case SIGUSR2: \
106 memstate = Low; \
107 break; \
108 } \
109} \
110static void initMemalerter() \
111{ \
112 struct sigaction sa; \
113 memset(&sa, '\0', sizeof sa); \
114 sa.sa_handler = sig_handler; \
115 sa.sa_flags = SA_RESTART; \
116 if (sigaction(SIGHUP, &sa, NULL) < 0) { \
117 return; \
118 } \
119 if (sigaction(SIGUSR1, &sa, NULL) < 0) { \
120 return; \
121 } \
122 if (sigaction(SIGUSR2, &sa, NULL) < 0) { \
123 return; \
124 } \
125 FILE *fo = fopen("/proc/sys/vm/freepg_signal_proc", "w"); \
126 \
127 if (!fo) \
128 return; \
129 fprintf(fo, "qpe\n"); \
130 fclose(fo); \
131}
132
133#define QPE_INITIAL_NUMLOCK_STATE \
134{ \
135 bool numLock = FALSE; \
136 sharp_kbdctl_modifstat st; \
137 int dev = ::open("/dev/sharp_kbdctl", O_RDWR); \
138 if( dev >= 0 ) { \
139 memset(&st, 0, sizeof(st)); \
140 st.which = 3; \
141 int ret = ioctl(dev, SHARP_KBDCTL_GETMODIFSTAT, (char*)&st); \
142 if( !ret ) \
143 numLock = (bool)st.stat; \
144 ::close(dev); \
145 } \
146 return numLock; \
147}
diff --git a/library/qcopmessage_qws.h b/library/qcopmessage_qws.h
new file mode 100644
index 0000000..c19f57d
--- a/dev/null
+++ b/library/qcopmessage_qws.h
@@ -0,0 +1,99 @@
1/**********************************************************************
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3**
4** This file is part of the Qtopia Environment.
5**
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
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
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.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20
21#ifndef QCOP_MESSAGE_H
22#define QCOP_MESSAGE_H
23
24#include <qdatastream.h>
25#include <qbuffer.h>
26
27class QCopMessage : public QDataStream {
28 public:
29 QCopMessage();
30 QCopMessage(const QCString& channel, const QCString& message);
31 QCopMessage(const QCopMessage& orig);
32 ~QCopMessage();
33
34 void setChannel(QCString& channel) { m_Channel = channel; }
35 QCString channel() const { return m_Channel; }
36 void setMessage(QCString& message) { m_Message = message; }
37 QCString message() const { return m_Message; }
38 const QByteArray data() const;
39
40 QCopMessage& operator=(const QCopMessage& orig);
41
42 private:
43 QCString m_Channel;
44 QCString m_Message;
45};
46
47// ### No need to inline, just maintaining binary compatability
48inline QCopMessage::QCopMessage() : QDataStream(new QBuffer()) {
49 device()->open(IO_WriteOnly);
50}
51
52inline QCopMessage::QCopMessage(const QCString& channel, const QCString& message)
53 : QDataStream(new QBuffer()), m_Channel(channel), m_Message(message) {
54 device()->open(IO_WriteOnly);
55}
56
57inline QCopMessage::QCopMessage(const QCopMessage& orig) : QDataStream() {
58 // The QBuffer is going to share the byte array, so it will keep the
59 // data pointer even when this one goes out of scope.
60 QByteArray array(((QBuffer*)orig.device())->buffer());
61 array.detach();
62 setDevice(new QBuffer(array));
63 device()->open(IO_Append);
64
65 m_Channel = orig.channel();
66 m_Message = orig.message();
67}
68
69inline QCopMessage& QCopMessage::operator=(const QCopMessage& orig) {
70 if (device()) {
71 delete device();
72 unsetDevice();
73 }
74
75 // The QBuffer is going to share the byte array, so it will keep the
76 // data pointer even when this one goes out of scope.
77 QByteArray array(((QBuffer*)orig.device())->buffer());
78 array.detach();
79 setDevice(new QBuffer(array));
80 device()->open(IO_Append);
81
82 m_Channel = orig.channel();
83 m_Message = orig.message();
84
85 return *this;
86}
87
88inline const QByteArray QCopMessage::data() const {
89 return ((QBuffer*)device())->buffer();
90}
91
92inline QCopMessage::~QCopMessage() {
93 // If we still have our QBuffer, clean it up...
94 if (device())
95 delete device();
96 unsetDevice();
97}
98
99#endif
diff --git a/noncore/multimedia/showimg/settingsdialog.cpp b/noncore/multimedia/showimg/settingsdialog.cpp
new file mode 100644
index 0000000..d21f4cb
--- a/dev/null
+++ b/noncore/multimedia/showimg/settingsdialog.cpp
@@ -0,0 +1,57 @@
1/**********************************************************************
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3**
4** This file is part of the Qtopia Environment.
5**
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
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
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.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20
21#include "settingsdialog.h"
22#include <qslider.h>
23#include <qlabel.h>
24#include <qcheckbox.h>
25
26SettingsDialog::SettingsDialog( QWidget *parent, const char *name, bool modal, WFlags f )
27 : SettingsDialogBase( parent, name, modal, f )
28{
29 connect( delaySlider, SIGNAL(valueChanged(int)), this, SLOT(delayChanged(int)) );
30}
31
32void SettingsDialog::setDelay( int d )
33{
34 delaySlider->setValue( d );
35 delayChanged( d );
36}
37
38int SettingsDialog::delay() const
39{
40 return delaySlider->value();
41}
42
43void SettingsDialog::setRepeat( bool r )
44{
45 repeatCheck->setChecked( r );
46}
47
48bool SettingsDialog::repeat() const
49{
50 return repeatCheck->isChecked();
51}
52
53void SettingsDialog::delayChanged( int d )
54{
55 delayText->setText( QString::number( d ) + " s" );
56}
57
diff --git a/noncore/multimedia/showimg/settingsdialog.h b/noncore/multimedia/showimg/settingsdialog.h
new file mode 100644
index 0000000..6dfd2c4
--- a/dev/null
+++ b/noncore/multimedia/showimg/settingsdialog.h
@@ -0,0 +1,42 @@
1/**********************************************************************
2** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
3**
4** This file is part of the Qtopia Environment.
5**
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
8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file.
10**
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.
13**
14** See http://www.trolltech.com/gpl/ for GPL licensing information.
15**
16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you.
18**
19**********************************************************************/
20
21#ifndef SETTINGSDIALOG_H
22#define SETTINGSDIALOG_H
23
24#include "settingsdialogbase.h"
25
26class SettingsDialog : public SettingsDialogBase
27{
28 Q_OBJECT
29public:
30 SettingsDialog( QWidget * parent=0, const char * name=0, bool modal=FALSE, WFlags f=0 );
31
32 void setDelay( int d );
33 int delay() const;
34 void setRepeat( bool r );
35 bool repeat() const;
36
37private slots:
38 void delayChanged( int );
39};
40
41
42#endif
diff --git a/noncore/multimedia/showimg/settingsdialogbase.ui b/noncore/multimedia/showimg/settingsdialogbase.ui
new file mode 100644
index 0000000..ed404d8
--- a/dev/null
+++ b/noncore/multimedia/showimg/settingsdialogbase.ui
@@ -0,0 +1,149 @@
1<!DOCTYPE UI><UI>
2<class>SettingsDialogBase</class>
3<widget>
4 <class>QDialog</class>
5 <property stdset="1">
6 <name>name</name>
7 <cstring>SettingsDialogBase</cstring>
8 </property>
9 <property stdset="1">
10 <name>geometry</name>
11 <rect>
12 <x>0</x>
13 <y>0</y>
14 <width>227</width>
15 <height>258</height>
16 </rect>
17 </property>
18 <property stdset="1">
19 <name>caption</name>
20 <string>Preferences</string>
21 </property>
22 <vbox>
23 <property stdset="1">
24 <name>margin</name>
25 <number>11</number>
26 </property>
27 <property stdset="1">
28 <name>spacing</name>
29 <number>6</number>
30 </property>
31 <widget>
32 <class>QGroupBox</class>
33 <property stdset="1">
34 <name>name</name>
35 <cstring>GroupBox1</cstring>
36 </property>
37 <property stdset="1">
38 <name>title</name>
39 <string>Slide Show</string>
40 </property>
41 <vbox>
42 <property stdset="1">
43 <name>margin</name>
44 <number>11</number>
45 </property>
46 <property stdset="1">
47 <name>spacing</name>
48 <number>6</number>
49 </property>
50 <widget>
51 <class>QCheckBox</class>
52 <property stdset="1">
53 <name>name</name>
54 <cstring>repeatCheck</cstring>
55 </property>
56 <property stdset="1">
57 <name>text</name>
58 <string>Repeat</string>
59 </property>
60 </widget>
61 <widget>
62 <class>QLayoutWidget</class>
63 <property stdset="1">
64 <name>name</name>
65 <cstring>Layout1</cstring>
66 </property>
67 <hbox>
68 <property stdset="1">
69 <name>margin</name>
70 <number>0</number>
71 </property>
72 <property stdset="1">
73 <name>spacing</name>
74 <number>6</number>
75 </property>
76 <widget>
77 <class>QLabel</class>
78 <property stdset="1">
79 <name>name</name>
80 <cstring>TextLabel1</cstring>
81 </property>
82 <property stdset="1">
83 <name>text</name>
84 <string>Delay</string>
85 </property>
86 </widget>
87 <widget>
88 <class>QSlider</class>
89 <property stdset="1">
90 <name>name</name>
91 <cstring>delaySlider</cstring>
92 </property>
93 <property stdset="1">
94 <name>minValue</name>
95 <number>5</number>
96 </property>
97 <property stdset="1">
98 <name>maxValue</name>
99 <number>60</number>
100 </property>
101 <property stdset="1">
102 <name>lineStep</name>
103 <number>5</number>
104 </property>
105 <property stdset="1">
106 <name>orientation</name>
107 <enum>Horizontal</enum>
108 </property>
109 <property stdset="1">
110 <name>tickmarks</name>
111 <enum>Right</enum>
112 </property>
113 <property stdset="1">
114 <name>tickInterval</name>
115 <number>10</number>
116 </property>
117 </widget>
118 <widget>
119 <class>QLabel</class>
120 <property stdset="1">
121 <name>name</name>
122 <cstring>delayText</cstring>
123 </property>
124 <property stdset="1">
125 <name>minimumSize</name>
126 <size>
127 <width>25</width>
128 <height>0</height>
129 </size>
130 </property>
131 <property stdset="1">
132 <name>text</name>
133 <string>s</string>
134 </property>
135 <property stdset="1">
136 <name>alignment</name>
137 <set>AlignVCenter|AlignRight</set>
138 </property>
139 <property>
140 <name>hAlign</name>
141 </property>
142 </widget>
143 </hbox>
144 </widget>
145 </vbox>
146 </widget>
147 </vbox>
148</widget>
149</UI>
diff --git a/pics/cards/circle.png b/pics/cards/circle.png
new file mode 100644
index 0000000..3b006de
--- a/dev/null
+++ b/pics/cards/circle.png
Binary files differ
diff --git a/pics/cards/cross.png b/pics/cards/cross.png
new file mode 100644
index 0000000..cac7576
--- a/dev/null
+++ b/pics/cards/cross.png
Binary files differ
diff --git a/pics/cards/large/back01.png b/pics/cards/large/back01.png
new file mode 100644
index 0000000..ec82690
--- a/dev/null
+++ b/pics/cards/large/back01.png
Binary files differ
diff --git a/pics/cards/large/back02.png b/pics/cards/large/back02.png
new file mode 100644
index 0000000..d070d7f
--- a/dev/null
+++ b/pics/cards/large/back02.png
Binary files differ
diff --git a/pics/cards/large/back03.png b/pics/cards/large/back03.png
new file mode 100644
index 0000000..eaf81ef
--- a/dev/null
+++ b/pics/cards/large/back03.png
Binary files differ
diff --git a/pics/cards/large/back04.png b/pics/cards/large/back04.png
new file mode 100644
index 0000000..e633e90
--- a/dev/null
+++ b/pics/cards/large/back04.png
Binary files differ
diff --git a/pics/cards/large/back05.png b/pics/cards/large/back05.png
new file mode 100644
index 0000000..a3fe30a
--- a/dev/null
+++ b/pics/cards/large/back05.png
Binary files differ
diff --git a/pics/cards/large/face.png b/pics/cards/large/face.png
new file mode 100644
index 0000000..eb65737
--- a/dev/null
+++ b/pics/cards/large/face.png
Binary files differ
diff --git a/pics/cards/large/pictures.png b/pics/cards/large/pictures.png
new file mode 100644
index 0000000..33346d6
--- a/dev/null
+++ b/pics/cards/large/pictures.png
Binary files differ
diff --git a/pics/cards/large/ranks.png b/pics/cards/large/ranks.png
new file mode 100644
index 0000000..3d7f0fa
--- a/dev/null
+++ b/pics/cards/large/ranks.png
Binary files differ
diff --git a/pics/cards/large/spade.png b/pics/cards/large/spade.png
new file mode 100644
index 0000000..38193a8
--- a/dev/null
+++ b/pics/cards/large/spade.png
Binary files differ
diff --git a/pics/cards/large/suits01.png b/pics/cards/large/suits01.png
new file mode 100644
index 0000000..302c512
--- a/dev/null
+++ b/pics/cards/large/suits01.png
Binary files differ
diff --git a/pics/cards/large/suits02.png b/pics/cards/large/suits02.png
new file mode 100644
index 0000000..b66780c
--- a/dev/null
+++ b/pics/cards/large/suits02.png
Binary files differ
diff --git a/pics/cards/micro/back01.png b/pics/cards/micro/back01.png
new file mode 100644
index 0000000..11d085c
--- a/dev/null
+++ b/pics/cards/micro/back01.png
Binary files differ
diff --git a/pics/cards/micro/back02.png b/pics/cards/micro/back02.png
new file mode 100644
index 0000000..d7d4279
--- a/dev/null
+++ b/pics/cards/micro/back02.png
Binary files differ
diff --git a/pics/cards/micro/back03.png b/pics/cards/micro/back03.png
new file mode 100644
index 0000000..690d103
--- a/dev/null
+++ b/pics/cards/micro/back03.png
Binary files differ
diff --git a/pics/cards/micro/back04.png b/pics/cards/micro/back04.png
new file mode 100644
index 0000000..6a7c23f
--- a/dev/null
+++ b/pics/cards/micro/back04.png
Binary files differ
diff --git a/pics/cards/micro/back05.png b/pics/cards/micro/back05.png
new file mode 100644
index 0000000..752c987
--- a/dev/null
+++ b/pics/cards/micro/back05.png
Binary files differ
diff --git a/pics/cards/micro/face.png b/pics/cards/micro/face.png
new file mode 100644
index 0000000..4a7f853
--- a/dev/null
+++ b/pics/cards/micro/face.png
Binary files differ
diff --git a/pics/cards/micro/ranks.png b/pics/cards/micro/ranks.png
new file mode 100644
index 0000000..2637870
--- a/dev/null
+++ b/pics/cards/micro/ranks.png
Binary files differ
diff --git a/pics/cards/micro/suits01.png b/pics/cards/micro/suits01.png
new file mode 100644
index 0000000..0f9e01a
--- a/dev/null
+++ b/pics/cards/micro/suits01.png
Binary files differ
diff --git a/pics/cards/normal/back01.png b/pics/cards/normal/back01.png
new file mode 100644
index 0000000..46c8025
--- a/dev/null
+++ b/pics/cards/normal/back01.png
Binary files differ
diff --git a/pics/cards/normal/back02.png b/pics/cards/normal/back02.png
new file mode 100644
index 0000000..c053465
--- a/dev/null
+++ b/pics/cards/normal/back02.png
Binary files differ
diff --git a/pics/cards/normal/back03.png b/pics/cards/normal/back03.png
new file mode 100644
index 0000000..f32a6aa
--- a/dev/null
+++ b/pics/cards/normal/back03.png
Binary files differ
diff --git a/pics/cards/normal/back04.png b/pics/cards/normal/back04.png
new file mode 100644
index 0000000..ca8bbbe
--- a/dev/null
+++ b/pics/cards/normal/back04.png
Binary files differ
diff --git a/pics/cards/normal/back05.png b/pics/cards/normal/back05.png
new file mode 100644
index 0000000..556c55c
--- a/dev/null
+++ b/pics/cards/normal/back05.png
Binary files differ
diff --git a/pics/cards/normal/face.png b/pics/cards/normal/face.png
new file mode 100644
index 0000000..f8940d1
--- a/dev/null
+++ b/pics/cards/normal/face.png
Binary files differ
diff --git a/pics/cards/normal/joker.png b/pics/cards/normal/joker.png
new file mode 100644
index 0000000..cca545b
--- a/dev/null
+++ b/pics/cards/normal/joker.png
Binary files differ
diff --git a/pics/cards/normal/pictures.png b/pics/cards/normal/pictures.png
new file mode 100644
index 0000000..845e51c
--- a/dev/null
+++ b/pics/cards/normal/pictures.png
Binary files differ
diff --git a/pics/cards/normal/ranks.png b/pics/cards/normal/ranks.png
new file mode 100644
index 0000000..f102ad5
--- a/dev/null
+++ b/pics/cards/normal/ranks.png
Binary files differ
diff --git a/pics/cards/normal/spade.png b/pics/cards/normal/spade.png
new file mode 100644
index 0000000..cd62f95
--- a/dev/null
+++ b/pics/cards/normal/spade.png
Binary files differ
diff --git a/pics/cards/normal/suits.png b/pics/cards/normal/suits.png
new file mode 100644
index 0000000..8aba204
--- a/dev/null
+++ b/pics/cards/normal/suits.png
Binary files differ
diff --git a/pics/cards/normal/suits01.png b/pics/cards/normal/suits01.png
new file mode 100644
index 0000000..c7a0db4
--- a/dev/null
+++ b/pics/cards/normal/suits01.png
Binary files differ
diff --git a/pics/cards/normal/suits02.png b/pics/cards/normal/suits02.png
new file mode 100644
index 0000000..53b526f
--- a/dev/null
+++ b/pics/cards/normal/suits02.png
Binary files differ
diff --git a/pics/cards/normal/suits2.png b/pics/cards/normal/suits2.png
new file mode 100644
index 0000000..5799eb4
--- a/dev/null
+++ b/pics/cards/normal/suits2.png
Binary files differ
diff --git a/pics/cards/small/back01.png b/pics/cards/small/back01.png
new file mode 100644
index 0000000..d0eeeb5
--- a/dev/null
+++ b/pics/cards/small/back01.png
Binary files differ
diff --git a/pics/cards/small/back02.png b/pics/cards/small/back02.png
new file mode 100644
index 0000000..c66f557
--- a/dev/null
+++ b/pics/cards/small/back02.png
Binary files differ
diff --git a/pics/cards/small/back03.png b/pics/cards/small/back03.png
new file mode 100644
index 0000000..983c73e
--- a/dev/null
+++ b/pics/cards/small/back03.png
Binary files differ
diff --git a/pics/cards/small/back04.png b/pics/cards/small/back04.png
new file mode 100644
index 0000000..3953dd6
--- a/dev/null
+++ b/pics/cards/small/back04.png
Binary files differ
diff --git a/pics/cards/small/back05.png b/pics/cards/small/back05.png
new file mode 100644
index 0000000..6140352
--- a/dev/null
+++ b/pics/cards/small/back05.png
Binary files differ
diff --git a/pics/cards/small/face.png b/pics/cards/small/face.png
new file mode 100644
index 0000000..7acc092
--- a/dev/null
+++ b/pics/cards/small/face.png
Binary files differ
diff --git a/pics/cards/small/ranks.png b/pics/cards/small/ranks.png
new file mode 100644
index 0000000..6e50618
--- a/dev/null
+++ b/pics/cards/small/ranks.png
Binary files differ
diff --git a/pics/cards/small/suits01.png b/pics/cards/small/suits01.png
new file mode 100644
index 0000000..ac4c4e7
--- a/dev/null
+++ b/pics/cards/small/suits01.png
Binary files differ
diff --git a/pics/inline/today.png b/pics/inline/today.png
new file mode 100644
index 0000000..ac244c6
--- a/dev/null
+++ b/pics/inline/today.png
Binary files differ
diff --git a/pics/slideshow.png b/pics/slideshow.png
new file mode 100644
index 0000000..9a7f8d5
--- a/dev/null
+++ b/pics/slideshow.png
Binary files differ