summaryrefslogtreecommitdiff
authorkergoth <kergoth>2002-06-06 23:31:00 (UTC)
committer kergoth <kergoth>2002-06-06 23:31:00 (UTC)
commitdfb9c76738bb68e235114c5ad43dbd26a59b98ab (patch) (side-by-side diff)
tree25ab1468116e8a092dc402f8aa96a9c6976ebdce
parent9d6af1137a96d63f71f8e4797fe3bf377d92a15a (diff)
downloadopie-dfb9c76738bb68e235114c5ad43dbd26a59b98ab.zip
opie-dfb9c76738bb68e235114c5ad43dbd26a59b98ab.tar.gz
opie-dfb9c76738bb68e235114c5ad43dbd26a59b98ab.tar.bz2
Initial revision
Diffstat (more/less context) (show 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 @@
+# Compiling
+INTERFACE_DECL_PATH = .
+SYSCONF_CXX = arm-linux-g++
+SYSCONF_CC = arm-linux-gcc
+DASHCROSS = -arm
+
+# Set XROOT to the root directory of the arm X11 files for cross compiling
+XROOT=/scratch/src/xfree86.41/xbinaries
+# Compiling with support libraries
+SYSCONF_CXXFLAGS_X11 =
+SYSCONF_CXXFLAGS_QT = -I$(QTDIR)/include
+SYSCONF_CXXFLAGS_OPENGL = -I$(XROOT)/usr/X11R6/include
+
+# Compiling YACC output
+SYSCONF_CXXFLAGS_YACC = -Wno-unused -Wno-parentheses
+
+# Linking with support libraries
+SYSCONF_RPATH_X11 =
+SYSCONF_RPATH_QT = -Wl,-rpath,$(QTDIR)/lib,-rpath,$(XROOT)/usr/X11R6/lib
+SYSCONF_RPATH_OPENGL = -Wl,-rpath,$(XROOT)/usr/X11R6/lib
+
+# Linking with support libraries
+# X11
+SYSCONF_LFLAGS_X11 =
+SYSCONF_LIBS_X11 =
+# Qt, Qt+OpenGL
+SYSCONF_LFLAGS_QT = -L$(QTDIR)/lib
+SYSCONF_LIBS_QT = -lqt$(QT_THREAD_SUFFIX)
+SYSCONF_LIBS_QT_OPENGL =
+# OpenGL
+SYSCONF_LFLAGS_OPENGL = -L$(XROOT)/usr/X11R6/lib
+SYSCONF_LIBS_OPENGL =
+# Yacc
+SYSCONF_LIBS_YACC =
+
+# Linking applications
+SYSCONF_LINK = arm-linux-gcc
+SYSCONF_LFLAGS =
+SYSCONF_LIBS =
+
+# Link flags for shared objects
+SYSCONF_LFLAGS_SHOBJ = -shared
+
+# Flags for threading
+SYSCONF_CFLAGS_THREAD = -D_REENTRANT
+SYSCONF_CXXFLAGS_THREAD = -D_REENTRANT
+SYSCONF_LFLAGS_THREAD =
+SYSCONF_LIBS_THREAD = -lpthread
+
+# Point to /usr/bin for moc and uic since we are cross compiling here
+# Meta-object compiler
+SYSCONF_MOC = /usr/bin/moc
+
+# UI compiler
+SYSCONF_UIC = /usr/bin/uic
+
+# Linking shared libraries
+# - Build the $(TARGET) library, eg. lib$(TARGET).so.2.2.2
+# - Place target in $(DESTDIR) - which has a trailing /
+# - Usually needs to incorporate $(VER_MAJ), $(VER_MIN) and $(VER_PATCH)
+#
+SYSCONF_LINK_SHLIB = arm-linux-gcc
+SYSCONF_LINK_TARGET_SHARED = lib$(TARGET).so.$(VER_MAJ).$(VER_MIN).$(VER_PATCH)
+SYSCONF_LINK_LIB_SHARED = $(SYSCONF_LINK_SHLIB) -shared -Wl,-soname,lib$(TARGET).so.$(VER_MAJ) \
+ $(LFLAGS) -o $(SYSCONF_LINK_TARGET_SHARED) \
+ $(OBJECTS) $(OBJMOC) $(LIBS) && \
+ mv $(SYSCONF_LINK_TARGET_SHARED) $(DESTDIR); \
+ cd $(DESTDIR) && \
+ rm -f lib$(TARGET).so lib$(TARGET).so.$(VER_MAJ) lib$(TARGET).so.$(VER_MAJ).$(VER_MIN); \
+ ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so; \
+ ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so.$(VER_MAJ); \
+ ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so.$(VER_MAJ).$(VER_MIN)
+
+# Linking static libraries
+# - Build the $(TARGET) library, eg. lib$(TARGET).a
+# - Place target in $(DESTDIR) - which has a trailing /
+#
+SYSCONF_AR = arm-linux-ar cqs
+SYSCONF_LINK_TARGET_STATIC = lib$(TARGET).a
+SYSCONF_LINK_LIB_STATIC = rm -f $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) ; \
+ $(SYSCONF_AR) $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) $(OBJECTS) $(OBJMOC)
+# Compiling application source
+SYSCONF_CXXFLAGS = -pipe -DQT_NO_COP -fno-exceptions -fno-rtti -O2 -Wall -W
+SYSCONF_CFLAGS = -pipe -O2 -Wall -W
+# Default link type (static linking is still be used where required)
+SYSCONF_LINK_LIB = $(SYSCONF_LINK_LIB_SHARED)
+SYSCONF_LINK_TARGET = $(SYSCONF_LINK_TARGET_SHARED)
+# Compiling library source
+SYSCONF_CXXFLAGS_LIB = -fPIC
+SYSCONF_CFLAGS_LIB = -fPIC
+# Compiling shared-object source
+SYSCONF_CXXFLAGS_SHOBJ = -fPIC
+SYSCONF_CFLAGS_SHOBJ = -fPIC
+# Linking Qt
+SYSCONF_LIBS_QTLIB = $(SYSCONF_LFLAGS_X11) $(QT_LIBS_MT) $(QT_LIBS_OPT)
+# Linking Qt applications
+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 @@
+# Compiling
+INTERFACE_DECL_PATH = .
+SYSCONF_CXX = g++
+SYSCONF_CC = gcc
+DASHCROSS =
+
+# Compiling with support libraries
+SYSCONF_CXXFLAGS_X11 =
+SYSCONF_CXXFLAGS_QT = -I$(QTDIR)/include
+SYSCONF_CXXFLAGS_OPENGL = -I/usr/X11R6/include
+
+# Compiling YACC output
+SYSCONF_CXXFLAGS_YACC = -Wno-unused -Wno-parentheses
+
+# Linking with support libraries
+SYSCONF_RPATH_X11 =
+SYSCONF_RPATH_QT = -Wl,-rpath,$(QTDIR)/lib
+SYSCONF_RPATH_OPENGL = -Wl,-rpath,/usr/X11R6/lib
+
+# Linking with support libraries
+# X11
+SYSCONF_LFLAGS_X11 =
+SYSCONF_LIBS_X11 =
+# Qt, Qt+OpenGL
+SYSCONF_LFLAGS_QT = -L$(QTDIR)/lib
+SYSCONF_LIBS_QT = -lqt$(QT_THREAD_SUFFIX)
+SYSCONF_LIBS_QT_OPENGL =
+# OpenGL
+SYSCONF_LFLAGS_OPENGL = -L/usr/X11R6/lib
+SYSCONF_LIBS_OPENGL =
+# Yacc
+SYSCONF_LIBS_YACC =
+
+# Linking applications
+SYSCONF_LINK = gcc
+SYSCONF_LFLAGS =
+SYSCONF_LIBS =
+
+# Link flags for shared objects
+SYSCONF_LFLAGS_SHOBJ = -shared
+
+# Flags for threading
+SYSCONF_CFLAGS_THREAD = -D_REENTRANT
+SYSCONF_CXXFLAGS_THREAD = -D_REENTRANT
+SYSCONF_LFLAGS_THREAD =
+SYSCONF_LIBS_THREAD = -lpthread
+
+# Meta-object compiler
+SYSCONF_MOC = $(QTDIR)/bin/moc
+
+# UI compiler
+SYSCONF_UIC = $(QTDIR)/bin/uic
+
+# Linking shared libraries
+# - Build the $(TARGET) library, eg. lib$(TARGET).so.2.2.2
+# - Place target in $(DESTDIR) - which has a trailing /
+# - Usually needs to incorporate $(VER_MAJ), $(VER_MIN) and $(VER_PATCH)
+#
+SYSCONF_LINK_SHLIB = gcc
+SYSCONF_LINK_TARGET_SHARED = lib$(TARGET).so.$(VER_MAJ).$(VER_MIN).$(VER_PATCH)
+SYSCONF_LINK_LIB_SHARED = $(SYSCONF_LINK_SHLIB) -shared -Wl,-soname,lib$(TARGET).so.$(VER_MAJ) \
+ $(LFLAGS) -o $(SYSCONF_LINK_TARGET_SHARED) \
+ $(OBJECTS) $(OBJMOC) $(LIBS) && \
+ mv $(SYSCONF_LINK_TARGET_SHARED) $(DESTDIR); \
+ cd $(DESTDIR) && \
+ rm -f lib$(TARGET).so lib$(TARGET).so.$(VER_MAJ) lib$(TARGET).so.$(VER_MAJ).$(VER_MIN); \
+ ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so; \
+ ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so.$(VER_MAJ); \
+ ln -s $(SYSCONF_LINK_TARGET_SHARED) lib$(TARGET).so.$(VER_MAJ).$(VER_MIN)
+
+# Linking static libraries
+# - Build the $(TARGET) library, eg. lib$(TARGET).a
+# - Place target in $(DESTDIR) - which has a trailing /
+#
+SYSCONF_AR = ar cqs
+SYSCONF_LINK_TARGET_STATIC = lib$(TARGET).a
+SYSCONF_LINK_LIB_STATIC = rm -f $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) ; \
+ $(SYSCONF_AR) $(DESTDIR)$(SYSCONF_LINK_TARGET_STATIC) $(OBJECTS) $(OBJMOC)
+# Compiling application source
+SYSCONF_CXXFLAGS = -pipe -DQT_NO_COP -fno-exceptions -fno-rtti -O2 -Wall -W
+SYSCONF_CFLAGS = -pipe -O2 -Wall -W
+# Default link type (static linking is still be used where required)
+SYSCONF_LINK_LIB = $(SYSCONF_LINK_LIB_SHARED)
+SYSCONF_LINK_TARGET = $(SYSCONF_LINK_TARGET_SHARED)
+# Compiling library source
+SYSCONF_CXXFLAGS_LIB = -fPIC
+SYSCONF_CFLAGS_LIB = -fPIC
+# Compiling shared-object source
+SYSCONF_CXXFLAGS_SHOBJ = -fPIC
+SYSCONF_CFLAGS_SHOBJ = -fPIC
+# Linking Qt
+SYSCONF_LIBS_QTLIB = $(SYSCONF_LFLAGS_X11) $(QT_LIBS_MT) $(QT_LIBS_OPT)
+# Linking Qt applications
+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 @@
+/**********************************************************************
+** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "layoutmanager.h"
+
+static const int min_height = 15;
+
+LayoutItem::LayoutItem( const EffectiveEvent e ) : eevent(e) { }
+
+LayoutManager::LayoutManager(int w, int h) : width(w), height(h), maxWidth(w) { }
+
+LayoutManager::~LayoutManager() { }
+
+void LayoutManager::setSize(int w, int h)
+{
+ height = h;
+ maxWidth = width = w;
+ // with changed, re-init, re-layout items.
+ for (uint i = 0; i < mItems.count(); i++)
+ initializeGeometry(mItems.at(i));
+}
+
+void LayoutManager::setOccurances(QValueList<EffectiveEvent> &events)
+{
+ mItems.clear();
+
+ QValueListIterator<EffectiveEvent> it;
+ for ( it = events.begin(); it != events.end(); ++it ) {
+ addOccurance(*it);
+ }
+ layoutItems(TRUE);
+}
+
+void LayoutManager::addOccurance(EffectiveEvent &event)
+{
+ LayoutItem *i = new LayoutItem(event);
+ initializeGeometry(i);
+ addItem(i);
+}
+
+void LayoutManager::addItem(LayoutItem *i)
+{
+ mItems.resize(mItems.size() + 1);
+ mItems.insert(mItems.size() - 1, i);
+}
+
+void LayoutManager::layoutItems(bool resetMaxWidth)
+{
+ if (resetMaxWidth)
+ maxWidth = width;
+
+ int iCount = mItems.count();
+ int itemWidth = QMIN(width, maxWidth);
+ int n = 1;
+
+ if (width < 1)
+ return;
+ if (iCount < (width/4)) {
+ int i = 0;
+ while (i < iCount) {
+ LayoutItem *item = mItems.at(i);
+ int x = 0;
+ int xp = 0;
+ QRect geom = item->geometry();
+ geom.setX( x );
+ geom.setWidth(itemWidth);
+ while ( xp < n && intersects(item, geom)) {
+ x += itemWidth;
+ xp++;
+ geom.moveBy(itemWidth, 0);
+ }
+ if (xp >= n) {
+ n++;
+ itemWidth = QMIN(width / n, maxWidth);
+ i = 0; // Start again.
+ } else {
+ item->setGeometry( geom );
+ i++;
+ }
+ }
+ } else {
+ // alturnate algorithm. // same as above, but just overlap
+ // if fail.
+ itemWidth = 4;
+ n = width / itemWidth;
+ int i = 0;
+ int rovingXp = 0;
+ while (i < iCount) {
+ LayoutItem *item = mItems.at(i);
+ int x = 0;
+ int xp = 0;
+ QRect geom = item->geometry();
+ geom.setX( x );
+ geom.setWidth(itemWidth);
+ while ( xp < n && intersects(item, geom)) {
+ x += itemWidth;
+ xp++;
+ geom.moveBy(itemWidth, 0);
+ }
+ if (xp >= n) {
+ geom.setX(rovingXp * itemWidth);
+ geom.setWidth(itemWidth);
+ rovingXp++;
+ item->setGeometry( geom );
+ } else {
+ item->setGeometry( geom );
+ }
+ i++;
+ }
+ }
+ if (itemWidth < maxWidth)
+ maxWidth = itemWidth;
+}
+
+int LayoutManager::timeToHeight( const QTime &time ) const
+{
+ int y = time.hour() * 60 + time.minute();
+ if (y)
+ y = (y * (height / 24)) / 60;
+ return y;
+}
+
+QTime LayoutManager::heightToTime( int h ) const
+{
+ // broken
+ return QTime(0,0,0);
+}
+
+LayoutItem *LayoutManager::intersects(LayoutItem *item, QRect geom) const
+{
+ int i = 0;
+ // allow overlapping
+ geom.moveBy(1,1);
+ geom.setSize( geom.size() - QSize(2,2) );
+
+ LayoutItem *it = mItems.at(i);
+ int count = mItems.count();
+ while (i < count && it != item) {
+ if (it->geometry().intersects( geom ) )
+ return it;
+ it = mItems.at(++i);
+ }
+ return 0;
+}
+
+void LayoutManager::initializeGeometry(LayoutItem *item)
+{
+ int y = timeToHeight(item->occurance().start());
+ int yend = timeToHeight(item->occurance().end());
+
+ int h = yend - y;
+ if (h < min_height)
+ h = min_height;
+ if (y + min_height > height) {
+ y = height - min_height;
+ h = min_height;
+ }
+
+ item->setGeometry(QRect(0, y, width, h));
+}
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 @@
+/**********************************************************************
+** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include <qvector.h>
+#include <qvaluelist.h>
+#include <qrect.h>
+#include <qdatetime.h>
+#include <qpe/event.h>
+
+class LayoutItem
+{
+public:
+ LayoutItem( const EffectiveEvent e );
+
+ void setGeometry(const QRect &rect) { r = rect; }
+ void setGeometry(int x, int y, int w, int h)
+ { setGeometry(QRect(x,y,w,h)); }
+ QRect geometry() const { return r; }
+
+ EffectiveEvent occurance() const { return eevent; }
+ Event event() const { return eevent.event(); }
+
+private:
+ EffectiveEvent eevent;
+ QRect r;
+};
+
+class LayoutManager
+{
+public:
+ LayoutManager(int w, int h);
+ virtual ~LayoutManager();
+
+ void setSize(int w, int h);
+ void setMaximumColumnWidth(int x) { maxWidth = x; };
+ int maximumColumnWidth() const { return maxWidth; };
+ void setOccurances(QValueList<EffectiveEvent> &events);
+ virtual void addOccurance(EffectiveEvent &event);
+
+ void clear() { mItems.clear(); }
+
+ QVector<LayoutItem> items() const { return mItems; }
+ QSize size() const { return QSize(width, height); }
+ int count() const { return mItems.count(); }
+
+ virtual void layoutItems(bool resetMaxWidth = FALSE);
+
+ virtual int timeToHeight(const QTime &) const;
+ virtual QTime heightToTime(int) const;
+
+protected:
+ void initializeGeometry(LayoutItem *);
+ LayoutItem *intersects(LayoutItem *, QRect) const;
+ void addItem(LayoutItem *);
+
+private:
+ QVector<LayoutItem> mItems;
+ int width;
+ int height;
+ int maxWidth;
+};
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 @@
+/*! \class InputMethodInterface inputmethodinterface.h
+ \brief The InputMethodInterface class provides an interface for Qtopia
+ input methods.
+
+ Input methods must supply a QWidget that will be shown above the task bar
+ and emit a signal when a key is pressed:
+
+ Input methods may be added to Qtopia via plugins. In order to write an
+ input method plugin you must create an interface to your input method by
+ deriving from the InputMethodInterface class and implementing the pure
+ virtual functions.
+
+ See also: <a href=inputmethods.html>Input Method Tutorial</a>
+*/
+
+
+/*! \fn QWidget *InputMethodInterface::inputMethod( QWidget *parent, Qt::WFlags f )
+
+ The inputMethod() function returns the input method widget. This
+ widget will be display just above the task bar when the user needs to input
+ text. You should always return the same widget if this function is called
+ multiple times.
+*/
+
+/*! \fn void InputMethodInterface::resetState()
+
+ The resetState() function should return the input method to its default
+ state.
+*/
+
+/*! \fn QString InputMethodInterface::name()
+
+ The name() function returns the name of the input method. This will
+ be displayed in the popup list of available input methods.
+*/
+
+/*! \fn QPixmap *InputMethodInterface::icon()
+
+ The icon() function returns the icon for the input method. This will
+ be displayed in the taskbar when the input method is selected.
+*/
+
+
+/*! \fn void InputMethodInterface::onKeyPress( QObject *receiver, const char *slot )
+
+ The onKeyPress() function must connect the supplied slot to the signal
+ that is emitted when a key press is generated.
+*/
+
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 @@
+See /opt/Qtopia/doc/index.html for help.
+See 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 @@
+Files: bin/example apps/Applications/example.desktop pics/Example.png help/html/example.html
+Priority: optional
+Section: qpe/applications
+Maintainer: Your Name <you@your.domain.com>
+Architecture: arm
+Version: 1.0.0
+Depends: qpe-base ($QPE_VERSION)
+License: Public Domain
+Description: Example program
+ An example program for the Qtopia environment.
+ 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 @@
+#include "example.h"
+#include <qpushbutton.h>
+
+/*
+ * Constructs a Example which is a child of 'parent', with the
+ * name 'name' and widget flags set to 'f'
+ */
+Example::Example( QWidget* parent, const char* name, WFlags fl )
+ : ExampleBase( parent, name, fl )
+{
+ connect(quit, SIGNAL(clicked()), this, SLOT(goodBye()));
+}
+
+/*
+ * Destroys the object and frees any allocated resources
+ */
+Example::~Example()
+{
+ // no need to delete child widgets, Qt does it all for us
+}
+
+/*
+ * A simple slot... not very interesting.
+ */
+void Example::goodBye()
+{
+ close();
+}
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 @@
+[Desktop Entry]
+Comment=An Example Program
+Exec=example
+Icon=Example
+Type=Application
+Name=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 @@
+#ifndef EXAMPLE_H
+#define EXAMPLE_H
+#include "examplebase.h"
+
+class Example : public ExampleBase
+{
+ Q_OBJECT
+
+public:
+ Example( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ ~Example();
+
+private slots:
+ void goodBye();
+};
+
+#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 @@
+<html>
+<h1>Example</h1>
+
+<p>This is the help for the Example program.
+
+<p>To user this application:
+
+<ol>
+ <li>Press the <img width=12 height=12 src=Example.png> icon in the Qtopia launcher.
+ <li>Read the label.
+ <li>Press the button.
+ <li>Read the source code provided.
+</ol>
+
+Now 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 @@
+TEMPLATE = app
+#CONFIG = qt warn_on debug
+CONFIG = qt warn_on release
+HEADERS = example.h
+SOURCES = main.cpp example.cpp
+INCLUDEPATH += $(QPEDIR)/include
+DEPENDPATH += $(QPEDIR)/include
+LIBS += -lqpe
+INTERFACES = examplebase.ui
+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 @@
+<!DOCTYPE UI><UI>
+<class>ExampleBase</class>
+<widget>
+ <class>QWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>ExampleBase</cstring>
+ </property>
+ <property stdset="1">
+ <name>geometry</name>
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>196</width>
+ <height>245</height>
+ </rect>
+ </property>
+ <property stdset="1">
+ <name>caption</name>
+ <string>Example</string>
+ </property>
+ <vbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>11</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>&lt;p&gt;This is just an &lt;i&gt;example&lt;/i&gt;. It doesn't do anything interesting at all.</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>quit</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Quit</string>
+ </property>
+ </widget>
+ </vbox>
+</widget>
+</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 @@
+<h1 align=center><small>Welcome to the</small><br>Qtopia SDK</h1>
+
+<h3>API Documentation</h3>
+<p>
+For API documentation, point a web browser at
+/opt/Qtopia/doc/html/qtopia/index.html
+
+<h3>Application Documentation</h3>
+Put English documentation for applications in:
+
+<p>
+&nbsp;&nbsp;&nbsp;$QPEDIR/help/html/<i>appname</i>.html
+
+<p>
+Put non-English documentation for applications in:
+
+<p>
+&nbsp;&nbsp;&nbsp;$QPEDIR/help/<i>lang</i>/html/<i>appname</i>.html
+
+<p>
+Where <i>lang</i> is the language specifier (eg. "de" for German),
+and <i>appname</i> is the program name of your application.
+
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 @@
+#include "example.h"
+#include <qpe/qpeapplication.h>
+
+int main( int argc, char ** argv )
+{
+ QPEApplication a( argc, argv );
+
+ Example mw;
+ a.showMainWidget( &mw );
+
+ return a.exec();
+}
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 @@
+[Desktop Entry]
+Comment=Simple QPEPIM Example
+Exec=abexample
+Icon=abexample
+Type=Application
+Name=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 @@
+/**********************************************************************
+** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include <qpe/contact.h>
+#include <qvaluelist.h>
+#include "addressbookdumper.h"
+
+AddressBookDumper::AddressBookDumper(QWidget* parent) : QMultiLineEdit(parent) {
+ // connect(&m_ABAccess, SIGNAL(addressbookUpdated()), this, SLOT(abChanged()));
+}
+
+AddressBookDumper::~AddressBookDumper() {
+}
+
+void AddressBookDumper::abChanged() {
+ QString newText;
+ QValueList<Contact> contacts = m_ABAccess.contacts();
+ QValueListConstIterator<Contact> it;
+ for (it = contacts.begin() ; it != contacts.end(); it++) {
+ newText.append((*it).firstName() + " " + (*it).lastName() + "\n");
+ }
+ setText(newText);
+}
+
+void AddressBookDumper::startBigEdit() {
+ if (m_ABAccess.startBlockEdit())
+ qDebug("*** Block edit successfully started.");
+ else
+ qDebug("*** Block edit start failed.");
+}
+
+void AddressBookDumper::endBigEdit() {
+ if (m_ABAccess.endBlockEdit())
+ qDebug("*** Block edit successfully ended.");
+ else
+ qDebug("*** Block edit end failed.");
+}
+
+void AddressBookDumper::addContact() {
+ Contact foo;
+ foo.setFirstName("Foo");
+ foo.setLastName("Bar");
+ foo.setFileAs();
+ if (m_ABAccess.addContact(foo))
+ qDebug("*** Add succeeded..");
+ else
+ qDebug("*** Add failed..");
+}
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 @@
+/**********************************************************************
+** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include <qmultilineedit.h>
+#include <qpe/pim/addressbookaccess.h>
+
+class AddressBookDumper : public QMultiLineEdit {
+ Q_OBJECT
+
+ public:
+ AddressBookDumper(QWidget* parent);
+ ~AddressBookDumper();
+
+ public slots:
+ void abChanged();
+ void startBigEdit();
+ void endBigEdit();
+ void addContact();
+
+ private:
+ AddressBookAccess m_ABAccess;
+};
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 @@
+/**********************************************************************
+** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include <qpe/qpeapplication.h>
+#ifdef QWS
+#include <qpe/qcopenvelope_qws.h>
+#endif
+#include <qapplication.h>
+#include <qpe/pim/addressbookaccess.h>
+#include "addressbookdumper.h"
+#include <qvbox.h>
+#include <qpushbutton.h>
+
+int main( int argc, char ** argv )
+{
+ QPEApplication a( argc, argv );
+ QVBox* vbox = new QVBox(0L);
+ QPushButton* clicker = new QPushButton("Refresh", vbox);
+ QPushButton* startBigEditButton = new QPushButton("Start Big Edit", vbox);
+ QPushButton* endBigEditButton = new QPushButton("End Big Edit", vbox);
+ QPushButton* addContactButton = new QPushButton("Add Contact", vbox);
+ AddressBookDumper* abDumper = new AddressBookDumper(vbox);
+ QObject::connect(clicker, SIGNAL(clicked()), abDumper, SLOT(abChanged()));
+ QObject::connect(startBigEditButton, SIGNAL(clicked()), abDumper, SLOT(startBigEdit()));
+ QObject::connect(endBigEditButton, SIGNAL(clicked()), abDumper, SLOT(endBigEdit()));
+ QObject::connect(addContactButton, SIGNAL(clicked()), abDumper, SLOT(addContact()));
+ a.setMainWidget(vbox);
+ vbox->show();
+ return a.exec();
+}
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 @@
+Files: bin/abexample apps/Applications/abexample.desktop
+Priority: optional
+Section: qpe/applications
+Maintainer: Warwick Allison <warwick@trolltech.com>
+Architecture: arm
+Version: $QPE_VERSION-1
+Depends: qpe-pim, qpe-base ($QPE_VERSION)
+Description: Example Addressbook reader
+ 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 @@
+TEMPLATE = app
+CONFIG = qt warn_on debug
+
+HEADERS = addressbookdumper.h
+SOURCES = main.cpp addressbookdumper.cpp
+TARGET = abexample
+INCLUDEPATH = $(QPEDIR)/include
+LIBS += -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 @@
+/**********************************************************************
+** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#define QPE_OWNAPM
+#define QPE_HAVE_TOGGLELIGHT
+#define QPE_NOCIBAUD
+#define QPE_STARTMENU
+#include <asm/sharp_apm.h>
+#ifndef APM_IOC_BATTERY_BACK_CHK
+#define APM_IOC_BATTERY_BACK_CHK _IO(APM_IOC_MAGIC, 32)
+#endif
+#ifndef APM_IOC_BATTERY_MAIN_CHK
+#define APM_IOC_BATTERY_MAIN_CHK _IO(APM_IOC_MAGIC, 33)
+#endif
+
+#include <unistd.h>
+#include <stdio.h>
+#include <signal.h>
+#include <fcntl.h>
+#include <sys/ioctl.h>
+
+#define SHARP_DEV_IOCTL_COMMAND_START 0x5680
+
+/* --- for SHARP_BUZZER device --- */
+#define SHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START)
+#define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START)
+#define SHARP_BUZZER_SETVOLUME (SHARP_BUZZER_IOCTL_START+1)
+#define SHARP_BUZZER_GETVOLUME (SHARP_BUZZER_IOCTL_START+2)
+#define SHARP_BUZZER_ISSUPPORTED (SHARP_BUZZER_IOCTL_START+3)
+#define SHARP_BUZZER_SETMUTE (SHARP_BUZZER_IOCTL_START+4)
+#define SHARP_BUZZER_STOPSOUND (SHARP_BUZZER_IOCTL_START+5)
+
+#define SHARP_BUZ_TOUCHSOUND 1 /* touch panel sound */
+#define SHARP_BUZ_KEYSOUND 2 /* key sound */
+#define SHARP_PDA_ILLCLICKSOUND 3 /* illegal click */
+#define SHARP_PDA_WARNSOUND 4 /* warning occurred */
+#define SHARP_PDA_ERRORSOUND 5 /* error occurred */
+#define SHARP_PDA_CRITICALSOUND 6 /* critical error occurred */
+#define SHARP_PDA_SYSSTARTSOUND 7 /* system start */
+#define SHARP_PDA_SYSTEMENDSOUND 8 /* system shutdown */
+#define SHARP_PDA_APPSTART 9 /* application start */
+#define SHARP_PDA_APPQUIT 10 /* application ends */
+#define SHARP_BUZ_SCHEDULE_ALARM 11 /* schedule alarm */
+#define SHARP_BUZ_DAILY_ALARM 12 /* daily alarm */
+#define SHARP_BUZ_GOT_PHONE_CALL 13 /* phone call sound */
+#define SHARP_BUZ_GOT_MAIL 14 /* mail sound */
+
+
+#define CUSTOM_BUZZER( sound ) \
+{ \
+ static int fd = open( "/dev/sharp_buz", O_RDWR|O_NONBLOCK ); \
+ ioctl( fd, SHARP_BUZZER_MAKESOUND, sound ); \
+}
+
+#define CUSTOM_SOUND_ALARM CUSTOM_BUZZER( SHARP_BUZ_SCHEDULE_ALARM )
+
+#include <sys/ioctl.h>
+#include <asm/sharp_char.h>
+
+// a bit awkward, as this value is defined in emailclient.cpp aswell...
+#define LED_MAIL 0
+#define SHARP_LED_MAIL 9
+
+#define CUSTOM_LEDS( led, status ) \
+{ \
+ if ( led == LED_MAIL ) \
+ led = SHARP_LED_MAIL; \
+ static int fd = open( "/dev/sharp_led", O_RDWR|O_NONBLOCK ); \
+ sharp_led_status leds; \
+ memset(&leds, 0, sizeof(leds)); \
+ leds.which = led; \
+ leds.status = status; \
+ ioctl( fd, SHARP_LED_SETSTATUS, (char*)&leds ); \
+}
+
+#define QPE_HAVE_MEMALERTER
+
+#define QPE_MEMALERTER_IMPL \
+static void sig_handler(int sig) \
+{ \
+ switch (sig) { \
+ case SIGHUP: \
+ memstate = VeryLow; \
+ break; \
+ case SIGUSR1: \
+ memstate = Normal; \
+ break; \
+ case SIGUSR2: \
+ memstate = Low; \
+ break; \
+ } \
+} \
+static void initMemalerter() \
+{ \
+ struct sigaction sa; \
+ memset(&sa, '\0', sizeof sa); \
+ sa.sa_handler = sig_handler; \
+ sa.sa_flags = SA_RESTART; \
+ if (sigaction(SIGHUP, &sa, NULL) < 0) { \
+ return; \
+ } \
+ if (sigaction(SIGUSR1, &sa, NULL) < 0) { \
+ return; \
+ } \
+ if (sigaction(SIGUSR2, &sa, NULL) < 0) { \
+ return; \
+ } \
+ FILE *fo = fopen("/proc/sys/vm/freepg_signal_proc", "w"); \
+ \
+ if (!fo) \
+ return; \
+ fprintf(fo, "qpe\n"); \
+ fclose(fo); \
+}
+
+#define QPE_INITIAL_NUMLOCK_STATE \
+{ \
+ bool numLock = FALSE; \
+ sharp_kbdctl_modifstat st; \
+ int dev = ::open("/dev/sharp_kbdctl", O_RDWR); \
+ if( dev >= 0 ) { \
+ memset(&st, 0, sizeof(st)); \
+ st.which = 3; \
+ int ret = ioctl(dev, SHARP_KBDCTL_GETMODIFSTAT, (char*)&st); \
+ if( !ret ) \
+ numLock = (bool)st.stat; \
+ ::close(dev); \
+ } \
+ return numLock; \
+}
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 @@
+/**********************************************************************
+** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef QCOP_MESSAGE_H
+#define QCOP_MESSAGE_H
+
+#include <qdatastream.h>
+#include <qbuffer.h>
+
+class QCopMessage : public QDataStream {
+ public:
+ QCopMessage();
+ QCopMessage(const QCString& channel, const QCString& message);
+ QCopMessage(const QCopMessage& orig);
+ ~QCopMessage();
+
+ void setChannel(QCString& channel) { m_Channel = channel; }
+ QCString channel() const { return m_Channel; }
+ void setMessage(QCString& message) { m_Message = message; }
+ QCString message() const { return m_Message; }
+ const QByteArray data() const;
+
+ QCopMessage& operator=(const QCopMessage& orig);
+
+ private:
+ QCString m_Channel;
+ QCString m_Message;
+};
+
+// ### No need to inline, just maintaining binary compatability
+inline QCopMessage::QCopMessage() : QDataStream(new QBuffer()) {
+ device()->open(IO_WriteOnly);
+}
+
+inline QCopMessage::QCopMessage(const QCString& channel, const QCString& message)
+ : QDataStream(new QBuffer()), m_Channel(channel), m_Message(message) {
+ device()->open(IO_WriteOnly);
+}
+
+inline QCopMessage::QCopMessage(const QCopMessage& orig) : QDataStream() {
+ // The QBuffer is going to share the byte array, so it will keep the
+ // data pointer even when this one goes out of scope.
+ QByteArray array(((QBuffer*)orig.device())->buffer());
+ array.detach();
+ setDevice(new QBuffer(array));
+ device()->open(IO_Append);
+
+ m_Channel = orig.channel();
+ m_Message = orig.message();
+}
+
+inline QCopMessage& QCopMessage::operator=(const QCopMessage& orig) {
+ if (device()) {
+ delete device();
+ unsetDevice();
+ }
+
+ // The QBuffer is going to share the byte array, so it will keep the
+ // data pointer even when this one goes out of scope.
+ QByteArray array(((QBuffer*)orig.device())->buffer());
+ array.detach();
+ setDevice(new QBuffer(array));
+ device()->open(IO_Append);
+
+ m_Channel = orig.channel();
+ m_Message = orig.message();
+
+ return *this;
+}
+
+inline const QByteArray QCopMessage::data() const {
+ return ((QBuffer*)device())->buffer();
+}
+
+inline QCopMessage::~QCopMessage() {
+ // If we still have our QBuffer, clean it up...
+ if (device())
+ delete device();
+ unsetDevice();
+}
+
+#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 @@
+/**********************************************************************
+** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#include "settingsdialog.h"
+#include <qslider.h>
+#include <qlabel.h>
+#include <qcheckbox.h>
+
+SettingsDialog::SettingsDialog( QWidget *parent, const char *name, bool modal, WFlags f )
+ : SettingsDialogBase( parent, name, modal, f )
+{
+ connect( delaySlider, SIGNAL(valueChanged(int)), this, SLOT(delayChanged(int)) );
+}
+
+void SettingsDialog::setDelay( int d )
+{
+ delaySlider->setValue( d );
+ delayChanged( d );
+}
+
+int SettingsDialog::delay() const
+{
+ return delaySlider->value();
+}
+
+void SettingsDialog::setRepeat( bool r )
+{
+ repeatCheck->setChecked( r );
+}
+
+bool SettingsDialog::repeat() const
+{
+ return repeatCheck->isChecked();
+}
+
+void SettingsDialog::delayChanged( int d )
+{
+ delayText->setText( QString::number( d ) + " s" );
+}
+
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 @@
+/**********************************************************************
+** Copyright (C) 2000-2002 Trolltech AS. All rights reserved.
+**
+** This file is part of the Qtopia Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+** See http://www.trolltech.com/gpl/ for GPL licensing information.
+**
+** Contact info@trolltech.com if any conditions of this licensing are
+** not clear to you.
+**
+**********************************************************************/
+
+#ifndef SETTINGSDIALOG_H
+#define SETTINGSDIALOG_H
+
+#include "settingsdialogbase.h"
+
+class SettingsDialog : public SettingsDialogBase
+{
+ Q_OBJECT
+public:
+ SettingsDialog( QWidget * parent=0, const char * name=0, bool modal=FALSE, WFlags f=0 );
+
+ void setDelay( int d );
+ int delay() const;
+ void setRepeat( bool r );
+ bool repeat() const;
+
+private slots:
+ void delayChanged( int );
+};
+
+
+#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 @@
+<!DOCTYPE UI><UI>
+<class>SettingsDialogBase</class>
+<widget>
+ <class>QDialog</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>SettingsDialogBase</cstring>
+ </property>
+ <property stdset="1">
+ <name>geometry</name>
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>227</width>
+ <height>258</height>
+ </rect>
+ </property>
+ <property stdset="1">
+ <name>caption</name>
+ <string>Preferences</string>
+ </property>
+ <vbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>11</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QGroupBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>GroupBox1</cstring>
+ </property>
+ <property stdset="1">
+ <name>title</name>
+ <string>Slide Show</string>
+ </property>
+ <vbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>11</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QCheckBox</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>repeatCheck</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Repeat</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QLayoutWidget</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>Layout1</cstring>
+ </property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>TextLabel1</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Delay</string>
+ </property>
+ </widget>
+ <widget>
+ <class>QSlider</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>delaySlider</cstring>
+ </property>
+ <property stdset="1">
+ <name>minValue</name>
+ <number>5</number>
+ </property>
+ <property stdset="1">
+ <name>maxValue</name>
+ <number>60</number>
+ </property>
+ <property stdset="1">
+ <name>lineStep</name>
+ <number>5</number>
+ </property>
+ <property stdset="1">
+ <name>orientation</name>
+ <enum>Horizontal</enum>
+ </property>
+ <property stdset="1">
+ <name>tickmarks</name>
+ <enum>Right</enum>
+ </property>
+ <property stdset="1">
+ <name>tickInterval</name>
+ <number>10</number>
+ </property>
+ </widget>
+ <widget>
+ <class>QLabel</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>delayText</cstring>
+ </property>
+ <property stdset="1">
+ <name>minimumSize</name>
+ <size>
+ <width>25</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>s</string>
+ </property>
+ <property stdset="1">
+ <name>alignment</name>
+ <set>AlignVCenter|AlignRight</set>
+ </property>
+ <property>
+ <name>hAlign</name>
+ </property>
+ </widget>
+ </hbox>
+ </widget>
+ </vbox>
+ </widget>
+ </vbox>
+</widget>
+</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