summaryrefslogtreecommitdiff
Side-by-side diff
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.pngbin1262 -> 0 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.pngbin1262 -> 0 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--inputmethods/handwriting/qimpenchar.cpp2
-rw-r--r--library/alarmserver.h3
-rw-r--r--library/applnk.h3
-rw-r--r--library/backend/categories.cpp146
-rw-r--r--library/backend/categories.h12
-rw-r--r--library/backend/contact.cpp107
-rw-r--r--library/backend/contact.h7
-rw-r--r--library/backend/event.h5
-rw-r--r--library/backend/recordfields.h46
-rw-r--r--library/backend/task.h4
-rw-r--r--library/backend/vobject.cpp9
-rw-r--r--library/backend/vobject_p.h3
-rw-r--r--library/categoryedit_p.cpp6
-rw-r--r--library/categoryselect.cpp185
-rw-r--r--library/categoryselect.h26
-rw-r--r--library/config.cpp13
-rw-r--r--library/custom-linux-sharp-g++.h147
-rw-r--r--library/datebookmonth.h1
-rw-r--r--library/fileselector.h32
-rw-r--r--library/finddialog.cpp4
-rw-r--r--library/finddialog.h11
-rw-r--r--library/mimetype.cpp19
-rw-r--r--library/mimetype.h5
-rw-r--r--library/network.cpp19
-rw-r--r--library/power.cpp2
-rw-r--r--library/qcopmessage_qws.h99
-rw-r--r--library/qpedecoration_qws.cpp9
-rw-r--r--noncore/games/go/gowidget.cpp15
-rw-r--r--noncore/games/minesweep/minefield.h30
-rw-r--r--noncore/games/minesweep/minesweep.cpp35
-rw-r--r--noncore/games/snake/interface.h2
-rw-r--r--noncore/games/snake/obstacle.cpp35
-rw-r--r--noncore/games/snake/obstacle.h4
-rw-r--r--noncore/games/solitaire/canvascard.cpp71
-rw-r--r--noncore/games/solitaire/canvasshapes.cpp52
-rw-r--r--noncore/games/solitaire/freecellcardgame.cpp11
-rw-r--r--noncore/games/solitaire/patiencecardgame.cpp49
-rw-r--r--noncore/games/solitaire/patiencecardgame.h7
-rw-r--r--noncore/games/wordgame/wordgame.cpp71
-rw-r--r--noncore/games/wordgame/wordgame.h6
-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.pngbin436 -> 0 bytes
-rw-r--r--pics/cards/cross.pngbin480 -> 0 bytes
-rw-r--r--pics/inline/today.pngbin486 -> 0 bytes
-rw-r--r--pics/slideshow.pngbin207 -> 0 bytes
70 files changed, 724 insertions, 1685 deletions
diff --git a/configs/linux-arm-g++-sharedx11 b/configs/linux-arm-g++-sharedx11
deleted file mode 100644
index b810b05..0000000
--- a/configs/linux-arm-g++-sharedx11
+++ b/dev/null
@@ -1,97 +0,0 @@
-# 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
deleted file mode 100644
index 1cd7a46..0000000
--- a/configs/linux-generic-g++-sharedx11
+++ b/dev/null
@@ -1,94 +0,0 @@
-# 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
deleted file mode 100644
index 23058ed..0000000
--- a/core/pim/datebook/layoutmanager.cpp
+++ b/dev/null
@@ -1,177 +0,0 @@
-/**********************************************************************
-** 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
deleted file mode 100644
index 128f927..0000000
--- a/core/pim/datebook/layoutmanager.h
+++ b/dev/null
@@ -1,78 +0,0 @@
-/**********************************************************************
-** 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
deleted file mode 100644
index 465182b..0000000
--- a/docs/inputmethodinterface.doc
+++ b/dev/null
@@ -1,49 +0,0 @@
-/*! \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
deleted file mode 100644
index f63d0bc..0000000
--- a/examples/application/Example.png
+++ b/dev/null
Binary files differ
diff --git a/examples/application/README b/examples/application/README
deleted file mode 100644
index 63986f4..0000000
--- a/examples/application/README
+++ b/dev/null
@@ -1,2 +0,0 @@
-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
deleted file mode 100644
index e79c6f6..0000000
--- a/examples/application/example.control
+++ b/dev/null
@@ -1,11 +0,0 @@
-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
deleted file mode 100644
index 1e0bbe9..0000000
--- a/examples/application/example.cpp
+++ b/dev/null
@@ -1,28 +0,0 @@
-#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
deleted file mode 100644
index f1e6f06..0000000
--- a/examples/application/example.desktop
+++ b/dev/null
@@ -1,6 +0,0 @@
-[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
deleted file mode 100644
index 24c58c0..0000000
--- a/examples/application/example.h
+++ b/dev/null
@@ -1,17 +0,0 @@
-#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
deleted file mode 100644
index 9163573..0000000
--- a/examples/application/example.html
+++ b/dev/null
@@ -1,15 +0,0 @@
-<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
deleted file mode 100644
index 2d89311..0000000
--- a/examples/application/example.pro
+++ b/dev/null
@@ -1,10 +0,0 @@
-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
deleted file mode 100644
index b47d20c..0000000
--- a/examples/application/examplebase.ui
+++ b/dev/null
@@ -1,55 +0,0 @@
-<!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
deleted file mode 100644
index ad97378..0000000
--- a/examples/application/index.html
+++ b/dev/null
@@ -1,23 +0,0 @@
-<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
deleted file mode 100644
index b705c44..0000000
--- a/examples/application/main.cpp
+++ b/dev/null
@@ -1,12 +0,0 @@
-#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
deleted file mode 100644
index 24b44d1..0000000
--- a/examples/qpepim-addressbook/abexample.desktop
+++ b/dev/null
@@ -1,6 +0,0 @@
-[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
deleted file mode 100644
index f63d0bc..0000000
--- a/examples/qpepim-addressbook/abexample.png
+++ b/dev/null
Binary files differ
diff --git a/examples/qpepim-addressbook/addressbookdumper.cpp b/examples/qpepim-addressbook/addressbookdumper.cpp
deleted file mode 100644
index c47e05c..0000000
--- a/examples/qpepim-addressbook/addressbookdumper.cpp
+++ b/dev/null
@@ -1,65 +0,0 @@
-/**********************************************************************
-** 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
deleted file mode 100644
index cc83d32..0000000
--- a/examples/qpepim-addressbook/addressbookdumper.h
+++ b/dev/null
@@ -1,39 +0,0 @@
-/**********************************************************************
-** 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
deleted file mode 100644
index 590fffe..0000000
--- a/examples/qpepim-addressbook/main.cpp
+++ b/dev/null
@@ -1,47 +0,0 @@
-/**********************************************************************
-** 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
deleted file mode 100644
index 5a31c97..0000000
--- a/examples/qpepim-addressbook/qpepim-abexample.control
+++ b/dev/null
@@ -1,9 +0,0 @@
-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
deleted file mode 100644
index 7e918e0..0000000
--- a/examples/qpepim-addressbook/qpepim-addressbook.pro
+++ b/dev/null
@@ -1,8 +0,0 @@
-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/inputmethods/handwriting/qimpenchar.cpp b/inputmethods/handwriting/qimpenchar.cpp
index 9c38ec9..152bfec 100644
--- a/inputmethods/handwriting/qimpenchar.cpp
+++ b/inputmethods/handwriting/qimpenchar.cpp
@@ -431,3 +431,3 @@ QIMPenCharMatchList QIMPenCharSet::match( QIMPenChar *ch )
if (tmplChar->penStrokes().count() != ch->penStrokes().count())
- err = QIMPEN_MATCH_THRESHOLD;
+ err = QMIN(err*3, QIMPEN_MATCH_THRESHOLD);
QIMPenCharMatchList::Iterator it;
diff --git a/library/alarmserver.h b/library/alarmserver.h
index 665c3ae..f12a63d 100644
--- a/library/alarmserver.h
+++ b/library/alarmserver.h
@@ -30,2 +30,5 @@ public:
static void deleteAlarm (QDateTime when, const QCString& channel, const QCString& msg, int data=0);
+
+private:
+ friend int initApplication(int, char **);
static void initialize();
diff --git a/library/applnk.h b/library/applnk.h
index c6f92a3..18e20b6 100644
--- a/library/applnk.h
+++ b/library/applnk.h
@@ -60,2 +60,4 @@ public:
+ bool linkFileKnown() const { return !mLinkFile.isNull(); }
+
void execute() const;
@@ -98,2 +100,3 @@ protected:
bool ensureLinkExists() const;
+ void storeLink() const;
};
diff --git a/library/backend/categories.cpp b/library/backend/categories.cpp
index 91331db..6e011c4 100644
--- a/library/backend/categories.cpp
+++ b/library/backend/categories.cpp
@@ -173,32 +173,2 @@ QStringList CategoryGroup::labels(const QArray<int> &catids ) const
-QArray<int> CategoryGroup::ids( const QStringList &cats ) const
-{
- QArray<int> results;
-
- for ( QStringList::ConstIterator catIt = cats.begin();
- catIt != cats.end(); ++catIt ) {
- if ( *catIt == QObject::tr("All") || *catIt == QObject::tr("Unfiled") )
- continue;
- int value = id( *catIt );
- if ( value != 0 ) {
- int tmp = results.size();
- results.resize( tmp + 1 );
- results[ tmp ] = value;
- }
- }
-
- return results;
-}
-
-QArray<int> CategoryGroup::ids() const
-{
- QArray<int> results( mIdLabelMap.count() );
- int i = 0;
- for ( QMap<int, QString>::ConstIterator it = mIdLabelMap.begin();
- it != mIdLabelMap.end(); ++it )
- results[i++] = it.key();
-
- return results;
-}
-
/***********************************************************
@@ -345,2 +315,10 @@ QStringList Categories::labels( const QString &app,
QStringList cats;
+
+ if ( appIt != mAppCats.end() )
+ cats += (*appIt).labels();
+ else qDebug("Categories::labels didn't find app %s", app.latin1() );
+ if ( includeGlobal )
+ cats += mGlobalCats.labels();
+
+ cats.sort();
switch ( extra ) {
@@ -358,10 +336,3 @@ QStringList Categories::labels( const QString &app,
}
- if ( appIt != mAppCats.end() )
- cats += (*appIt).labels();
- else qDebug("Categories::labels didn't find app %s", app.latin1() );
- if ( includeGlobal )
- cats += mGlobalCats.labels();
- // I don't think a sorted list is useful, the user might find prefer
- // it in the original order.
-// cats.sort();
+
return cats;
@@ -380,10 +351,2 @@ QString Categories::label( const QString &app, int id ) const
-QStringList Categories::labels( const QString & app,
- const QArray<int> &catids ) const
-{
- QStringList strs = mGlobalCats.labels( catids );
- strs += mAppCats[app].labels( catids );
- return strs;
-}
-
/** Returns a single string associated with the cat ids for display in
@@ -419,29 +382,17 @@ QString Categories::displaySingle( const QString &app,
-QArray<int> Categories::ids( const QString &app ) const
-{
- QArray<int> allIds = mGlobalCats.ids();
- QArray<int> appIds = mAppCats[app].ids();
-
- // we should make the guarentee that the ids are in the
- // same order as the labels, (i.e. app cats then global)
- // otherwise there is no point in having these two separate functions.
- uint appSize = appIds.size();
- appIds.resize( appSize + allIds.size() );
- for ( uint i = appSize; i < appIds.size(); ++i )
- appIds[int(i)] = allIds[int(i - appSize)];
-
- return appIds;
-}
-
-QArray<int> Categories::ids( const QString &app, const QStringList &cats ) const
+QArray<int> Categories::ids( const QString &app, const QStringList &labels) const
{
- QArray<int> allIds = mGlobalCats.ids( cats );
- QArray<int> appIds = mAppCats[app].ids( cats );
-
- uint appSize = appIds.size();
- appIds.resize( appSize + allIds.size() );
- for ( uint i = appSize; i < appIds.size(); ++i )
- appIds[int(i)] = allIds[int(i - appSize)];
-
- return appIds;
+ QArray<int> results;
+ QStringList::ConstIterator it;
+ int i;
+
+ for ( i=0, it=labels.begin(); it!=labels.end(); i++, ++it ) {
+ int value = id( app, *it );
+ if ( value != 0 ) {
+ int tmp = results.size();
+ results.resize( tmp + 1 );
+ results[ tmp ] = value;
+ }
+ }
+ return results;
}
@@ -541,6 +492,11 @@ bool Categories::exists( const QString &appname,
+
bool Categories::save( const QString &fname ) const
{
- QFile file( fname );
- if ( !file.open( IO_WriteOnly ) ) {
+ QString strNewFile = fname + ".new";
+ QFile f( strNewFile );
+ QString out;
+ int total_written;
+
+ if ( !f.open( IO_WriteOnly|IO_Raw ) ) {
qWarning("Unable to write to %s", fname.latin1());
@@ -549,11 +505,11 @@ bool Categories::save( const QString &fname ) const
- QTextStream ts( &file );
- ts << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
- ts << "<!DOCTYPE CategoryList>" << endl;
+ out = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
+ out += "<!DOCTYPE CategoryList>\n";
+
+ out += "<Categories>\n";
- ts << "<Categories>" << endl;
for ( QMap<int, QString>::ConstIterator git = mGlobalCats.idMap().begin();
git != mGlobalCats.idMap().end(); ++git )
- ts << "<Category id=\"" << git.key() << "\""
- << " name=\"" << escapeString(*git) << "\" />" << endl;
+ out += "<Category id=\"" + QString::number(git.key()) + "\"" +
+ " name=\"" + escapeString(*git) + "\" />\n";
@@ -565,9 +521,24 @@ bool Categories::save( const QString &fname ) const
appcatit != appcats.end(); ++appcatit )
- ts << "<Category id=\"" << appcatit.key() << "\""
- << " app=\"" << escapeString(app) << "\""
- << " name=\"" << escapeString(*appcatit) << "\" />" << endl;
+ out += "<Category id=\"" + QString::number(appcatit.key()) + "\"" +
+ " app=\"" + escapeString(app) + "\"" +
+ " name=\"" + escapeString(*appcatit) + "\" />\n";
+ }
+ out += "</Categories>\n";
+
+ QCString cstr = out.utf8();
+ total_written = f.writeBlock( cstr.data(), cstr.length() );
+ if ( total_written != int(cstr.length()) ) {
+ f.close();
+ QFile::remove( strNewFile );
+ return FALSE;
+ }
+ f.close();
+
+ if ( ::rename( strNewFile.latin1(), fname.latin1() ) < 0 ) {
+ qWarning( "problem renaming file %s to %s",
+ strNewFile.latin1(), fname.latin1());
+ // remove the tmp file...
+ QFile::remove( strNewFile );
}
- ts << "</Categories>" << endl;
- file.close();
return TRUE;
@@ -580,2 +551,7 @@ bool Categories::load( const QString &fname )
qWarning("Unable to open %s", fname.latin1());
+
+ addGlobalCategory(tr("Business"));
+ addGlobalCategory(tr("Personal"));
+ save(fname);
+
return FALSE;
diff --git a/library/backend/categories.h b/library/backend/categories.h
index 82d765b..ba65ee3 100644
--- a/library/backend/categories.h
+++ b/library/backend/categories.h
@@ -73,4 +73,3 @@ public:
QStringList labels() const;
- QArray<int> ids( const QStringList &cats ) const;
- QArray<int> ids() const;
+
QStringList labels( const QArray<int> &catids ) const;
@@ -132,5 +131,4 @@ public:
- QArray<int> ids( const QString &app ) const;
- QArray<int> ids( const QString &app,
- const QStringList &cats ) const;
+ QArray<int> ids( const QString &app, const QStringList &labels) const;
+
/** Returns the id associated with the app */
@@ -155,6 +153,2 @@ public:
- /** Returns the labels of the categories associated with the uids */
- QStringList labels( const QString & app,
- const QArray<int> &catids ) const;
-
enum DisplaySingle { ShowMulti, ShowAll, ShowFirst };
diff --git a/library/backend/contact.cpp b/library/backend/contact.cpp
index a5f10ab..b10b19a 100644
--- a/library/backend/contact.cpp
+++ b/library/backend/contact.cpp
@@ -20,5 +20,7 @@
+#define QTOPIA_INTERNAL_CONTACT_MRE
+
#include "contact.h"
-#include "vobject_p.h"
-#include "qfiledirect_p.h"
+#include "vobject_p.h"
+#include "qfiledirect_p.h"
@@ -388,2 +390,9 @@ QStringList Contact::fields()
+ list.append( "JobTitle" );
+ list.append( "Department" );
+ list.append( "Company" );
+ list.append( "BusinessPhone" );
+ list.append( "BusinessFax" );
+ list.append( "BusinessMobile" );
+
list.append( "DefaultEmail" );
@@ -391,7 +400,2 @@ QStringList Contact::fields()
- list.append( "HomeStreet" );
- list.append( "HomeCity" );
- list.append( "HomeState" );
- list.append( "HomeZip" );
- list.append( "HomeCountry" );
list.append( "HomePhone" );
@@ -399,5 +403,3 @@ QStringList Contact::fields()
list.append( "HomeMobile" );
- list.append( "HomeWebPage" );
- list.append( "Company" );
list.append( "BusinessStreet" );
@@ -407,10 +409,6 @@ QStringList Contact::fields()
list.append( "BusinessCountry" );
+ list.append( "BusinessPager" );
list.append( "BusinessWebPage" );
- list.append( "JobTitle" );
- list.append( "Department" );
+
list.append( "Office" );
- list.append( "BusinessPhone" );
- list.append( "BusinessFax" );
- list.append( "BusinessMobile" );
- list.append( "BusinessPager" );
list.append( "Profession" );
@@ -419,2 +417,9 @@ QStringList Contact::fields()
+ list.append( "HomeStreet" );
+ list.append( "HomeCity" );
+ list.append( "HomeState" );
+ list.append( "HomeZip" );
+ list.append( "HomeCountry" );
+ list.append( "HomeWebPage" );
+
list.append( "Spouse" );
@@ -424,5 +429,6 @@ QStringList Contact::fields()
list.append( "Nickname" );
-
list.append( "Children" );
+
list.append( "Notes" );
+ list.append( "Groups" );
@@ -442,2 +448,9 @@ QStringList Contact::trfields()
+ list.append( QObject::tr( "Job Title" ) );
+ list.append( QObject::tr( "Department" ) );
+ list.append( QObject::tr( "Company" ) );
+ list.append( QObject::tr( "Business Phone" ) );
+ list.append( QObject::tr( "Business Fax" ) );
+ list.append( QObject::tr( "Business Mobile" ) );
+
list.append( QObject::tr( "Default Email" ) );
@@ -445,7 +458,2 @@ QStringList Contact::trfields()
- list.append( QObject::tr( "Home Street" ) );
- list.append( QObject::tr( "Home City" ) );
- list.append( QObject::tr( "Home State" ) );
- list.append( QObject::tr( "Home Zip" ) );
- list.append( QObject::tr( "Home Country" ) );
list.append( QObject::tr( "Home Phone" ) );
@@ -453,5 +461,3 @@ QStringList Contact::trfields()
list.append( QObject::tr( "Home Mobile" ) );
- list.append( QObject::tr( "Home Web Page" ) );
- list.append( QObject::tr( "Company" ) );
list.append( QObject::tr( "Business Street" ) );
@@ -461,10 +467,6 @@ QStringList Contact::trfields()
list.append( QObject::tr( "Business Country" ) );
+ list.append( QObject::tr( "Business Pager" ) );
list.append( QObject::tr( "Business WebPage" ) );
- list.append( QObject::tr( "Job Title" ) );
- list.append( QObject::tr( "Department" ) );
+
list.append( QObject::tr( "Office" ) );
- list.append( QObject::tr( "Business Phone" ) );
- list.append( QObject::tr( "Business Fax" ) );
- list.append( QObject::tr( "Business Mobile" ) );
- list.append( QObject::tr( "Business Pager" ) );
list.append( QObject::tr( "Profession" ) );
@@ -473,2 +475,9 @@ QStringList Contact::trfields()
+ list.append( QObject::tr( "Home Street" ) );
+ list.append( QObject::tr( "Home City" ) );
+ list.append( QObject::tr( "Home State" ) );
+ list.append( QObject::tr( "Home Zip" ) );
+ list.append( QObject::tr( "Home Country" ) );
+ list.append( QObject::tr( "Home Web Page" ) );
+
list.append( QObject::tr( "Spouse" ) );
@@ -478,5 +487,6 @@ QStringList Contact::trfields()
list.append( QObject::tr( "Nickname" ) );
-
list.append( QObject::tr( "Children" ) );
+
list.append( QObject::tr( "Notes" ) );
+ list.append( QObject::tr( "Groups" ) );
@@ -631,3 +641,3 @@ static Contact parseVObject( VObject *obj )
VObject *o = nextVObject( &nit );
- QCString name = vObjectName( o );
+ QCString name = vObjectTypeInfo( o );
QString value = vObjectStringZValue( o );
@@ -704,3 +714,3 @@ static Contact parseVObject( VObject *obj )
VObject *o = nextVObject( &nit );
- QCString name = vObjectName( o );
+ QCString name = vObjectTypeInfo( o );
if ( name == VCHomeProp )
@@ -751,3 +761,3 @@ static Contact parseVObject( VObject *obj )
VObject *o = nextVObject( &nit );
- QCString name = vObjectName( o );
+ QCString name = vObjectTypeInfo( o );
if ( name != VCInternetProp && name != VCHomeProp &&
@@ -774,3 +784,3 @@ static Contact parseVObject( VObject *obj )
VObject *o = nextVObject( &nit );
- QCString name = vObjectName( o );
+ QCString name = vObjectTypeInfo( o );
if ( name == VCHomeProp )
@@ -844,8 +854,8 @@ static Contact parseVObject( VObject *obj )
void Contact::writeVCard( const QString &filename, const QValueList<Contact> &contacts)
-{
- QFileDirect f( filename.utf8().data() );
- if ( !f.open( IO_WriteOnly ) ) {
- qWarning("Unable to open vcard write");
- return;
- }
+{
+ QFileDirect f( filename.utf8().data() );
+ if ( !f.open( IO_WriteOnly ) ) {
+ qWarning("Unable to open vcard write");
+ return;
+ }
@@ -861,8 +871,8 @@ void Contact::writeVCard( const QString &filename, const QValueList<Contact> &co
void Contact::writeVCard( const QString &filename, const Contact &contact)
-{
- QFileDirect f( filename.utf8().data() );
- if ( !f.open( IO_WriteOnly ) ) {
- qWarning("Unable to open vcard write");
- return;
- }
+{
+ QFileDirect f( filename.utf8().data() );
+ if ( !f.open( IO_WriteOnly ) ) {
+ qWarning("Unable to open vcard write");
+ return;
+ }
@@ -896,2 +906,7 @@ QValueList<Contact> Contact::readVCard( const QString &filename )
+bool Contact::match( const QString &regexp ) const
+{
+ return match(QRegExp(regexp));
+}
+
bool Contact::match( const QRegExp &r ) const
diff --git a/library/backend/contact.h b/library/backend/contact.h
index 6abdab6..a74cbbe 100644
--- a/library/backend/contact.h
+++ b/library/backend/contact.h
@@ -103,3 +103,8 @@ public:
- bool match( const QRegExp &r ) const;
+ bool match( const QString &regexp ) const;
+
+// DON'T ATTEMPT TO USE THIS
+#ifdef QTOPIA_INTERNAL_CONTACT_MRE
+ bool match( const QRegExp &regexp ) const;
+#endif
diff --git a/library/backend/event.h b/library/backend/event.h
index 0ebe9ea..277aadd 100644
--- a/library/backend/event.h
+++ b/library/backend/event.h
@@ -142,3 +142,8 @@ private:
QString note;
+ // ADDITION
+ int mRid; // Recode ID
+ int mRinfo; // Recode Info
+ //
EventPrivate *d;
+
};
diff --git a/library/backend/recordfields.h b/library/backend/recordfields.h
index 3cddde2..4196c8b 100644
--- a/library/backend/recordfields.h
+++ b/library/backend/recordfields.h
@@ -33,3 +33,5 @@ namespace Qtopia
AddressCategory = CATEGORY_ID,
-
+
+ // NOTE: Order of fields dependency in backend/contact.cpp
+
Title,
@@ -41,2 +43,9 @@ namespace Qtopia
+ JobTitle,
+ Department,
+ Company,
+ BusinessPhone,
+ BusinessFax,
+ BusinessMobile,
+
// email
@@ -45,8 +54,2 @@ namespace Qtopia
- // home
- HomeStreet,
- HomeCity,
- HomeState,
- HomeZip,
- HomeCountry,
HomePhone,
@@ -54,6 +57,4 @@ namespace Qtopia
HomeMobile,
- HomeWebPage,
// business
- Company,
BusinessStreet,
@@ -63,10 +64,6 @@ namespace Qtopia
BusinessCountry,
+ BusinessPager,
BusinessWebPage,
- JobTitle,
- Department,
+
Office,
- BusinessPhone,
- BusinessFax,
- BusinessMobile,
- BusinessPager,
Profession,
@@ -75,2 +72,10 @@ namespace Qtopia
+ // home
+ HomeStreet,
+ HomeCity,
+ HomeState,
+ HomeZip,
+ HomeCountry,
+ HomeWebPage,
+
//personal
@@ -86,2 +91,5 @@ namespace Qtopia
Groups
+
+ ,rid,
+ rinfo
};
@@ -97,3 +105,6 @@ namespace Qtopia
Priority,
- Date
+ Date,
+
+ TaskRid,
+ TaskRinfo
};
@@ -130,2 +141,5 @@ namespace Qtopia
RepeatPatternEndDate,
+
+ DateBookRid,
+ DateBookRinfo
};
diff --git a/library/backend/task.h b/library/backend/task.h
index ffe26b0..6f383b8 100644
--- a/library/backend/task.h
+++ b/library/backend/task.h
@@ -74,2 +74,6 @@ private:
TaskPrivate *d;
+ // ADDITION
+ int recordId;
+ int recordInfo;
+ //
};
diff --git a/library/backend/vobject.cpp b/library/backend/vobject.cpp
index af112a7..9c2ba3b 100644
--- a/library/backend/vobject.cpp
+++ b/library/backend/vobject.cpp
@@ -1209,2 +1209,11 @@ DLLEXPORT(void) writeVObjectsToFile(char *fname, VObject *list)
+DLLEXPORT(const char *) vObjectTypeInfo(VObject *o)
+{
+ const char *type = vObjectName( o );
+ if ( strcmp( type, "TYPE" ) == 0 )
+ type = vObjectStringZValue( o );
+ return type;
+}
+
+
// end of source file vobject.c
diff --git a/library/backend/vobject_p.h b/library/backend/vobject_p.h
index b6a2c0a..a0d921e 100644
--- a/library/backend/vobject_p.h
+++ b/library/backend/vobject_p.h
@@ -398,2 +398,5 @@ extern VObject* Parse_MIME_FromFile(FILE *file);
+extern DLLEXPORT(const char *) vObjectTypeInfo(VObject *o);
+
+
#endif /* __VOBJECT_H__ */
diff --git a/library/categoryedit_p.cpp b/library/categoryedit_p.cpp
index 06e5fec..07e707e 100644
--- a/library/categoryedit_p.cpp
+++ b/library/categoryedit_p.cpp
@@ -77,5 +77,7 @@ void CategoryEdit::setCategories( const QArray<int> &recCats,
d->mVisible = visibleName;
- QArray<int> cats = d->mCategories.ids( d->mStrApp );
- lvView->clear();
+
QStringList appCats = d->mCategories.labels( d->mStrApp );
+ QArray<int> cats = d->mCategories.ids(d->mStrApp, appCats);
+ lvView->clear();
+
QStringList::ConstIterator it;
diff --git a/library/categoryselect.cpp b/library/categoryselect.cpp
index dc5d1fa..21b3f91 100644
--- a/library/categoryselect.cpp
+++ b/library/categoryselect.cpp
@@ -21,6 +21,8 @@
#include <qpe/categories.h>
+#include <qpe/palmtoprecord.h>
-#include <qdialog.h>
+#include <qmessagebox.h>
#include <qlayout.h>
#include <qtoolbutton.h>
+#include <qfile.h>
@@ -29,2 +31,10 @@
+#include <stdlib.h>
+
+static QString categoryEdittingFileName()
+{
+ QString str = getenv("HOME");
+ str +="/.cateditting";
+ return str;
+}
@@ -59,3 +69,3 @@ public:
-CategoryCombo::CategoryCombo( QWidget *parent, const char *name )
+CategoryCombo::CategoryCombo( QWidget *parent, const char *name , int width)
: QComboBox( parent, name )
@@ -63,2 +73,4 @@ CategoryCombo::CategoryCombo( QWidget *parent, const char *name )
d = new CategoryComboPrivate(this);
+ if (width)
+ setFixedWidth(width);
}
@@ -80,2 +92,5 @@ void CategoryCombo::initCombo( const QArray<int> &recCats,
+ QObject::disconnect( this, SIGNAL(activated(int)),
+ this, SLOT(slotValueChanged(int)) );
+
QObject::connect( this, SIGNAL(activated(int)),
@@ -84,3 +99,4 @@ void CategoryCombo::initCombo( const QArray<int> &recCats,
slApp = d->mCat.labels( d->mStrAppName, TRUE, Categories::UnfiledLabel );
- d->mAppCats = d->mCat.ids( d->mStrAppName );
+
+ d->mAppCats = d->mCat.ids( d->mStrAppName, slApp);
@@ -96,5 +112,3 @@ void CategoryCombo::initCombo( const QArray<int> &recCats,
it = slApp.begin();
- insertItem( *it );
- ++it;
- for ( j = 0; it != slApp.end(); ++it, j++ ) {
+ for ( j = 0; j< (int)(slApp.count()-1); ++it, j++ ) {
// grr... we have to go through and compare...
@@ -113,2 +127,3 @@ void CategoryCombo::initCombo( const QArray<int> &recCats,
}
+ insertItem( *it );
} else
@@ -119,3 +134,95 @@ void CategoryCombo::initCombo( const QArray<int> &recCats,
if ( d->mAppCats[i] == recCats[0] ) {
- setCurrentItem( i + 1 );
+ setCurrentItem( i );
+ break;
+ }
+ }
+ } else
+ {
+ setCurrentItem( slApp.count()-1 ); // unfiled
+ }
+}
+
+// this is a new function by SHARP instead of initCombo()
+QArray<int> CategoryCombo::initComboWithRefind( const QArray<int> &recCats,
+ const QString &appName)
+{
+ QString visibleName = appName;
+ d->mStrAppName = appName;
+ d->mStrVisibleName = visibleName;
+ clear();
+ QStringList slApp;
+ QArray<int> results;
+
+ QObject::disconnect( this, SIGNAL(activated(int)),
+ this, SLOT(slotValueChanged(int)) );
+
+ QObject::connect( this, SIGNAL(activated(int)),
+ this, SLOT(slotValueChanged(int)) );
+ bool loadOk = d->mCat.load( categoryFileName() );
+ slApp = d->mCat.labels( d->mStrAppName, TRUE, Categories::UnfiledLabel );
+
+ d->mAppCats = d->mCat.ids( d->mStrAppName, slApp);
+
+ // addition part
+ // make new recCats
+ if (loadOk){
+ int i,j;
+ int value;
+ int rCount = recCats.count();
+ int mCount = d->mAppCats.count();
+
+ for (i=0; i<rCount; i++){
+ value = 0;
+ for (j=0; j<mCount; j++){
+ if (recCats[i] == d->mAppCats[j]){
+ value = recCats[i];
+ break;
+ }
+ }
+ if (value != 0){
+ int tmp = results.size();
+ results.resize( tmp + 1 );
+ results[ tmp ] = value;
+ }
+ }
+ }
+ else{
+ results = recCats;
+ }
+ // addition end
+
+ int i,
+ j,
+ saveMe,
+ recCount;
+ QStringList::Iterator it;
+ // now add in all the items...
+ recCount = results.count();
+ saveMe = -1;
+ if ( recCount > 1 && loadOk ) {
+ it = slApp.begin();
+ for ( j = 0; j< (int)(slApp.count()-1); ++it, j++ ) {
+
+ // grr... we have to go through and compare...
+ if ( j < int(d->mAppCats.size()) ) {
+ for ( i = 0; i < recCount; i++ ) {
+ if ( results[i] == d->mAppCats[j] ) {
+ (*it).append( tr(" (Multi.)") );
+ if ( saveMe < 0 )
+ saveMe = j;
+ // no need to continue through the list.
+ break;
+ }
+ }
+ }
+ insertItem( *it );
+ }
+ insertItem( *it );
+ } else
+ insertStringList( slApp );
+
+ if ( recCount > 0 && loadOk ) {
+ for ( i = 0; i < int(d->mAppCats.size()); i++ ) {
+ if ( d->mAppCats[i] == results[0] ) {
+ setCurrentItem( i );
break;
@@ -124,7 +231,13 @@ void CategoryCombo::initCombo( const QArray<int> &recCats,
} else
- setCurrentItem( 0 ); // unfiled
+ {
+ setCurrentItem( slApp.count()-1 ); // unfiled
+ }
+/*
QObject::connect( this, SIGNAL(activated(int)),
this, SLOT(slotValueChanged(int)) );
+*/
+ return results;
}
+
CategoryCombo::~CategoryCombo()
@@ -138,4 +251,4 @@ int CategoryCombo::currentCategory() const
returnMe = currentItem();
- // unfiled is now 0...
- if ( returnMe == 0 )
+
+ if ( returnMe == (int)d->mAppCats.count() )
returnMe = -1;
@@ -144,3 +257,3 @@ int CategoryCombo::currentCategory() const
else
- returnMe = d->mAppCats[returnMe - 1];
+ returnMe = d->mAppCats[returnMe];
return returnMe;
@@ -175,3 +288,3 @@ void CategoryCombo::slotValueChanged( int )
-CategorySelect::CategorySelect( QWidget *parent, const char *name )
+CategorySelect::CategorySelect( QWidget *parent, const char *name,int width)
: QHBox( parent, name ),
@@ -182,3 +295,3 @@ CategorySelect::CategorySelect( QWidget *parent, const char *name )
d = new CategorySelectPrivate();
- init();
+ init(width);
}
@@ -187,3 +300,3 @@ CategorySelect::CategorySelect( const QArray<int> &vl,
const QString &appName, QWidget *parent,
- const char *name )
+ const char *name ,int width)
: QHBox( parent, name )
@@ -191,3 +304,5 @@ CategorySelect::CategorySelect( const QArray<int> &vl,
d = new CategorySelectPrivate( vl );
- init();
+
+ init(width);
+
setCategories( vl, appName, appName );
@@ -198,3 +313,3 @@ CategorySelect::CategorySelect( const QArray<int> &vl,
const QString &visibleName,
- QWidget *parent, const char *name )
+ QWidget *parent, const char *name , int width)
: QHBox( parent, name )
@@ -202,3 +317,3 @@ CategorySelect::CategorySelect( const QArray<int> &vl,
d = new CategorySelectPrivate( vl );
- init();
+ init(width);
setCategories( vl, appName, visibleName );
@@ -213,2 +328,13 @@ void CategorySelect::slotDialog()
{
+ if (QFile::exists( categoryEdittingFileName() )){
+ QMessageBox::warning(this,tr("Error"),
+ tr("Sorry, another application is\nediting categories.") );
+ return;
+ }
+
+ QFile f( categoryEdittingFileName() );
+ if ( !f.open( IO_WriteOnly) ){
+ return;
+ }
+
QDialog editDlg( this, 0, TRUE );
@@ -228,2 +354,5 @@ void CategorySelect::slotDialog()
}
+
+ f.close();
+ QFile::remove( categoryEdittingFileName() );
}
@@ -249,9 +378,9 @@ void CategorySelect::slotNewCat( int newUid )
-void CategorySelect::setCategories( const QArray<int> &rec,
+QString CategorySelect::setCategories( const QArray<int> &rec,
const QString &appName )
{
- setCategories( rec, appName, appName );
+ return setCategories( rec, appName, appName );
}
-void CategorySelect::setCategories( const QArray<int> &rec,
+QString CategorySelect::setCategories( const QArray<int> &rec,
const QString &appName,
@@ -259,11 +388,12 @@ void CategorySelect::setCategories( const QArray<int> &rec,
{
- d->mRec = rec;
d->mVisibleName = visibleName;
mStrAppName = appName;
- cmbCat->initCombo( rec, appName );
+ d->mRec = cmbCat->initComboWithRefind( rec, appName );
+ return Qtopia::Record::idsToString(d->mRec);
}
-void CategorySelect::init()
+void CategorySelect::init(int width)
{
- cmbCat = new CategoryCombo( this );
+ cmbCat = new CategoryCombo( this, 0, width);
+
QObject::connect( cmbCat, SIGNAL(sigCatChanged(int)),
@@ -315 +445,8 @@ void CategorySelect::setAllCategories( bool add )
}
+
+// 01.12.21 added
+void CategorySelect::setFixedWidth(int width)
+{
+ width -= cmdCat->width();
+ cmbCat->setFixedWidth(width);
+}
diff --git a/library/categoryselect.h b/library/categoryselect.h
index 5c6b565..7a8e491 100644
--- a/library/categoryselect.h
+++ b/library/categoryselect.h
@@ -38,3 +38,4 @@ class CategoryCombo : public QComboBox
public:
- CategoryCombo( QWidget *parent, const char* name = 0 );
+ CategoryCombo( QWidget *parent, const char* name = 0, int width=0);
+
~CategoryCombo();
@@ -48,2 +49,4 @@ public:
+ QArray<int> initComboWithRefind( const QArray<int> &recCats, const QString &appName );
+
signals:
@@ -67,9 +70,12 @@ public:
// we need two constructors, the first gets around designer limitations
- CategorySelect( QWidget *parent = 0, const char *name = 0 );
+
+ CategorySelect( QWidget *parent = 0, const char *name = 0, int width = 0 );
CategorySelect( const QArray<int> &vlCats, const QString &appName,
- QWidget *parent = 0, const char *name = 0 );
+ QWidget *parent = 0, const char *name = 0,
+ int width = 0);
CategorySelect( const QArray<int> &vlCats, const QString &appName,
const QString &visibleName, QWidget *parent = 0,
- const char *name = 0 );
+ const char *name = 0 , int width = 0);
+
~CategorySelect();
@@ -82,7 +88,6 @@ public:
// however this call is depreciated...
- void setCategories( const QArray<int> &vlCats, const QString &appName );
- // use this one instead (for translating )
- void setCategories( const QArray<int> &vlCats, const QString &appName,
- const QString &visibleName );
+ QString setCategories( const QArray<int> &vlCats, const QString &appName );
+ QString setCategories( const QArray<int> &vlCats, const QString &appName,
+ const QString &visibleName );
// these were added for find dialog.
@@ -91,2 +96,3 @@ public:
+ void setFixedWidth(int width);
signals:
@@ -96,2 +102,4 @@ private slots:
void slotDialog();
+
+public slots:
void slotNewCat( int id );
@@ -99,3 +107,3 @@ private slots:
private:
- void init();
+ void init(int width=0);
QString mStrAppName;
diff --git a/library/config.cpp b/library/config.cpp
index 9634571..e07eecb 100644
--- a/library/config.cpp
+++ b/library/config.cpp
@@ -35,3 +35,5 @@
+#define QTOPIA_INTERNAL_LANGLIST
#include "config.h"
+#include "global.h"
@@ -97,10 +99,5 @@ Config::Config( const QString &name, Domain domain )
read();
-
- lang = getenv("LANG");
- int i = lang.find(".");
- if ( i > 0 )
- lang = lang.left( i );
- i = lang.find( "_" );
- if ( i > 0 )
- glang = lang.left(i);
+ QStringList l = Global::languageList();
+ lang = l[0];
+ glang = l[1];
}
diff --git a/library/custom-linux-sharp-g++.h b/library/custom-linux-sharp-g++.h
deleted file mode 100644
index f65d474..0000000
--- a/library/custom-linux-sharp-g++.h
+++ b/dev/null
@@ -1,147 +0,0 @@
-/**********************************************************************
-** 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/datebookmonth.h b/library/datebookmonth.h
index 6cd1ac5..a7647ae 100644
--- a/library/datebookmonth.h
+++ b/library/datebookmonth.h
@@ -70,2 +70,3 @@ private:
DateBookMonthHeaderPrivate *d;
+ int focus;
};
diff --git a/library/fileselector.h b/library/fileselector.h
index ef8efea..8cfdf13 100644
--- a/library/fileselector.h
+++ b/library/fileselector.h
@@ -24,4 +24,4 @@
#include <qvbox.h>
-#include <qlistview.h>
#include <qtoolbutton.h>
+#include <qlistview.h>
@@ -32,2 +32,3 @@ class QPopupMenu;
class QPushButton;
+class FileSelectorView;
@@ -45,30 +46,2 @@ private:
-class CategoryMenu;
-class FileSelectorViewPrivate;
-class FileSelectorView : public QListView
-{
- Q_OBJECT
-
-public:
- FileSelectorView( const QString &mimefilter, QWidget *parent, const char *name );
- ~FileSelectorView();
- void reread();
- int fileCount() { return count; }
-
- void setCategoryFilter(CategoryMenu *);
-protected:
- void keyPressEvent( QKeyEvent *e );
-
-protected slots:
- void cardMessage( const QCString &, const QByteArray &);
-
- void categoryChanged();
-
-private:
- QString filter;
- FileManager *fileManager;
- int count;
- FileSelectorViewPrivate *d;
-};
-
class FileSelectorPrivate;
@@ -83,3 +56,2 @@ public:
void setCloseVisible( bool b );
- void setCategoriesVisible( bool b );
void reread();
diff --git a/library/finddialog.cpp b/library/finddialog.cpp
index 7a9367b..904e952 100644
--- a/library/finddialog.cpp
+++ b/library/finddialog.cpp
@@ -20,2 +20,6 @@
+// WARNING: Do *NOT* define this yourself. The SL5xxx from SHARP does NOT
+// have this class.
+#define QTOPIA_INTERNAL_FD
+
#include "finddialog.h"
diff --git a/library/finddialog.h b/library/finddialog.h
index 265b5ae..00c7b45 100644
--- a/library/finddialog.h
+++ b/library/finddialog.h
@@ -20,2 +20,7 @@
+
+//
+// DO NOT ATTEMPT TO USE THIS CLASS
+//
+
#ifndef __FINDDIALOG_H__
@@ -33,2 +38,7 @@ class FindDialog : public QDialog
public:
+
+// WARNING: Do *NOT* define this yourself. The SL5xxx from SHARP does NOT
+// have this class.
+#ifdef QTOPIA_INTERNAL_FD
+
FindDialog( const QString &appName,
@@ -36,2 +46,3 @@ public:
~FindDialog();
+#endif
diff --git a/library/mimetype.cpp b/library/mimetype.cpp
index c6a4453..9fab160 100644
--- a/library/mimetype.cpp
+++ b/library/mimetype.cpp
@@ -20,2 +20,3 @@
+#define QTOPIA_INTERNAL_MIMEEXT
#include "mimetype.h"
@@ -48,2 +49,3 @@ public:
QString id;
+ QString extension;
QString desc;
@@ -61,2 +63,3 @@ MimeType::Dict* MimeType::d=0;
static QMap<QString,QString> *typeFor = 0;
+static QMap<QString,QString> *extFor = 0;
@@ -98,2 +101,8 @@ QPixmap MimeType::pixmap() const
+QString MimeType::extension() const
+{
+ loadExtensions();
+ return *(*extFor).find(i);
+}
+
QPixmap MimeType::bigPixmap() const
@@ -130,2 +139,3 @@ void MimeType::loadExtensions()
if ( !typeFor ) {
+ extFor = new QMap<QString,QString>;
typeFor = new QMap<QString,QString>;
@@ -147,5 +157,8 @@ void MimeType::loadExtensions(const QString& filename)
QString id = *it; ++it;
- while (it != tokens.end()) {
- (*typeFor)[*it] = id;
- ++it;
+ if ( it != tokens.end() ) {
+ (*extFor)[id] = *it;
+ while (it != tokens.end()) {
+ (*typeFor)[*it] = id;
+ ++it;
+ }
}
diff --git a/library/mimetype.h b/library/mimetype.h
index 58725d7..b6cca95 100644
--- a/library/mimetype.h
+++ b/library/mimetype.h
@@ -42,2 +42,7 @@ public:
+// DON'T define this yourself!
+#ifdef QTOPIA_INTERNAL_MIMEEXT
+ QString extension() const;
+#endif
+
const AppLnk* application() const;
diff --git a/library/network.cpp b/library/network.cpp
index 7d51016..e6d2781 100644
--- a/library/network.cpp
+++ b/library/network.cpp
@@ -20,2 +20,3 @@
+#define QTOPIA_INTERNAL_LANGLIST
#include "qpe/network.h"
@@ -420,10 +421,12 @@ NetworkInterface* Network::loadPlugin(const QString& type)
ifaces->insert(type,iface);
- QString lang = getenv( "LANG" );
- QTranslator * trans = new QTranslator(qApp);
- QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/lib"+type+".qm";
- if ( trans->load( tfn ))
- qApp->installTranslator( trans );
- else
- delete trans;
-
+ QStringList langs = Global::languageList();
+ for (QStringList::ConstIterator it = langs.begin(); it!=langs.end(); ++it) {
+ QString lang = *it;
+ QTranslator * trans = new QTranslator(qApp);
+ QString tfn = QPEApplication::qpeDir()+"/i18n/"+lang+"/lib"+type+".qm";
+ if ( trans->load( tfn ))
+ qApp->installTranslator( trans );
+ else
+ delete trans;
+ }
}
diff --git a/library/power.cpp b/library/power.cpp
index 990ff62..12b52ed 100644
--- a/library/power.cpp
+++ b/library/power.cpp
@@ -104,2 +104,4 @@ bool PowerStatusManager::getProcApmStatus( int &ac, int &bs, int &bf, int &pc, i
case 0x04:
+ case 0xff: // 0xff is Unknown but we map to NotPresent
+ default:
ps->bs = PowerStatus::NotPresent;
diff --git a/library/qcopmessage_qws.h b/library/qcopmessage_qws.h
deleted file mode 100644
index c19f57d..0000000
--- a/library/qcopmessage_qws.h
+++ b/dev/null
@@ -1,99 +0,0 @@
-/**********************************************************************
-** 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/library/qpedecoration_qws.cpp b/library/qpedecoration_qws.cpp
index b6085ef..e041945 100644
--- a/library/qpedecoration_qws.cpp
+++ b/library/qpedecoration_qws.cpp
@@ -19,2 +19,3 @@
**********************************************************************/
+#define QTOPIA_INTERNAL_LANGLIST
#include <qapplication.h>
@@ -246,6 +247,6 @@ QPEDecoration::QPEDecoration()
helpFile = QString(qApp->argv()[0]) + ".html";
- QString lang = getenv( "LANG" );
- helpExists = QFile::exists( QPEApplication::qpeDir() + "/help/" + lang + "/html/" + helpFile );
- if ( !helpExists )
- helpExists = QFile::exists( QPEApplication::qpeDir() + "/help/en/html/" + helpFile );
+ QStringList path = Global::helpPath();
+ helpExists = FALSE;
+ for (QStringList::ConstIterator it=path.begin(); it!=path.end() && !helpExists; ++it)
+ helpExists = QFile::exists( *it + "/" + helpFile );
#ifndef MINIMIZE_HELP_HACK
diff --git a/noncore/games/go/gowidget.cpp b/noncore/games/go/gowidget.cpp
index fca9797..8567b30 100644
--- a/noncore/games/go/gowidget.cpp
+++ b/noncore/games/go/gowidget.cpp
@@ -51,2 +51,4 @@ static QPixmap *whiteStone;
+static bool smallStones = FALSE;
+
GoMainWidget::GoMainWidget( QWidget *parent, const char* name) :
@@ -199,2 +201,15 @@ void GoWidget::resizeEvent( QResizeEvent * )
by = (height() - 18*d)/2 ;
+
+ if ( d < 10 && !smallStones ) {
+ blackStone->convertFromImage( blackStone->convertToImage().smoothScale(8,8) );
+ whiteStone->convertFromImage( whiteStone->convertToImage().smoothScale(8,8) );
+ newBlackStone->convertFromImage( newBlackStone->convertToImage().smoothScale(8,8) );
+
+ smallStones = TRUE;
+ } else if ( d >= 10 && smallStones ) {
+ blackStone = new QPixmap(Resource::loadPixmap( "Go-black" ));
+ whiteStone = new QPixmap(Resource::loadPixmap( "Go-white" ));
+ newBlackStone = new QPixmap(Resource::loadPixmap( "Go-black-highlight" ));
+ smallStones = FALSE;
+ }
}
diff --git a/noncore/games/minesweep/minefield.h b/noncore/games/minesweep/minefield.h
index 4ede435..1349c35 100644
--- a/noncore/games/minesweep/minefield.h
+++ b/noncore/games/minesweep/minefield.h
@@ -22,3 +22,3 @@
-#include <qtable.h>
+#include <qscrollview.h>
@@ -27,3 +27,3 @@ class Config;
-class MineField : public QTable
+class MineField : public QScrollView
{
@@ -43,2 +43,3 @@ public:
+ void setAvailableRect( const QRect & );
public slots:
@@ -54,13 +55,18 @@ signals:
protected:
- void paintFocus( QPainter*, const QRect& );
- void viewportMousePressEvent( QMouseEvent* );
- void viewportMouseReleaseEvent( QMouseEvent* );
+
+ void contentsMousePressEvent( QMouseEvent* );
+ void contentsMouseReleaseEvent( QMouseEvent* );
void keyPressEvent( QKeyEvent* );
void keyReleaseEvent( QKeyEvent* );
-
+ void drawContents( QPainter * p, int clipx, int clipy, int clipw, int cliph );
+
int getHint( int row, int col );
- void setHint( Mine* );
+ void setHint( int r, int c );
void updateMine( int row, int col );
void paletteChange( const QPalette & );
-
+ void updateCell( int r, int c );
+ bool onBoard( int r, int c ) const { return r >= 0 && r < numRows && c >= 0 && c < numCols; }
+ Mine *mine( int row, int col ) { return onBoard(row, col ) ? mines[row+numCols*col] : 0; }
+ const Mine *mine( int row, int col ) const { return onBoard(row, col ) ? mines[row+numCols*col] : 0; }
+
protected slots:
@@ -71,2 +77,5 @@ protected slots:
private:
+ int findCellSize();
+ void setCellSize( int );
+
State stat;
@@ -79,2 +88,4 @@ private:
int currCol;
+ int numRows, numCols;
+
int minecount;
@@ -83,3 +94,6 @@ private:
int lev;
+ QRect availableRect;
+ int cellSize;
QTimer *holdTimer;
+ Mine **mines;
};
diff --git a/noncore/games/minesweep/minesweep.cpp b/noncore/games/minesweep/minesweep.cpp
index 6492462..c84fe53 100644
--- a/noncore/games/minesweep/minesweep.cpp
+++ b/noncore/games/minesweep/minesweep.cpp
@@ -221,2 +221,19 @@ void ResultIndicator::timerEvent( QTimerEvent *te )
+class MineFrame : public QFrame
+{
+public:
+ MineFrame( QWidget *parent, const char *name = 0 )
+ :QFrame( parent, name ) {}
+ void setField( MineField *f ) { field = f; }
+protected:
+ void resizeEvent( QResizeEvent *e ) {
+ field->setAvailableRect( contentsRect());
+ QFrame::resizeEvent(e);
+ }
+private:
+ MineField *field;
+};
+
+
+
MineSweep::MineSweep( QWidget* parent, const char* name, WFlags f )
@@ -228,4 +245,6 @@ MineSweep::MineSweep( QWidget* parent, const char* name, WFlags f )
- QPEToolBar *menuToolBar = new QPEToolBar( this );
- QPEMenuBar *menuBar = new QPEMenuBar( menuToolBar );
+ QPEToolBar *toolBar = new QPEToolBar( this );
+ toolBar->setHorizontalStretchable( TRUE );
+
+ QPEMenuBar *menuBar = new QPEMenuBar( toolBar );
@@ -237,5 +256,2 @@ MineSweep::MineSweep( QWidget* parent, const char* name, WFlags f )
menuBar->insertItem( tr("Game"), gameMenu );
-
- QPEToolBar *toolBar = new QPEToolBar( this );
- toolBar->setHorizontalStretchable( TRUE );
@@ -267,13 +283,12 @@ MineSweep::MineSweep( QWidget* parent, const char* name, WFlags f )
- addToolBar( menuToolBar );
addToolBar( toolBar );
- QFrame *mainframe = new QFrame( this );
+ MineFrame *mainframe = new MineFrame( this );
mainframe->setFrameShape( QFrame::Box );
mainframe->setFrameShadow( QFrame::Raised );
- mainframe->setMargin(5);
+
mainframe->setLineWidth(2);
- QBoxLayout *box = new QVBoxLayout( mainframe );
+
field = new MineField( mainframe );
- box->addWidget( field, 0, AlignCenter );
+ mainframe->setField( field );
QFont fnt = field->font();
diff --git a/noncore/games/snake/interface.h b/noncore/games/snake/interface.h
index 30c7f84..454d4ee 100644
--- a/noncore/games/snake/interface.h
+++ b/noncore/games/snake/interface.h
@@ -38,3 +38,2 @@ public:
void createTargets();
- void welcomescreen();
@@ -53,2 +52,3 @@ private slots:
void scoreInc();
+ void welcomescreen();
diff --git a/noncore/games/snake/obstacle.cpp b/noncore/games/snake/obstacle.cpp
index 2d07fe7..4bdefa5 100644
--- a/noncore/games/snake/obstacle.cpp
+++ b/noncore/games/snake/obstacle.cpp
@@ -25,16 +25,35 @@
-Obstacle::Obstacle(QCanvas* canvas, int x, int y)
- : QCanvasSprite(0, canvas)
+
+
+Obstacle::Obstacle(QCanvas* canvas, int y)
+ : QCanvasSprite(0,canvas)
{
- newObstacle(x, y);
+ newObstacle(y);
}
-void Obstacle::newObstacle(int x, int y)
+void Obstacle::newObstacle(int y)
{
- QCanvasPixmapArray* obstaclearray = new QCanvasPixmapArray(Resource::findPixmap("snake/wall.png"));
-
+ QPixmap obstaclePix( Resource::findPixmap("snake/wall.png") );
+
+ if ( obstaclePix.width() > canvas()->width()*3/5 ) {
+ int w = canvas()->width()*3/5;
+ w = w - w % 16;
+ obstaclePix.resize( w, obstaclePix.height() );
+ }
+
+ QList<QPixmap> pixl;
+ pixl.append( &obstaclePix );
+
+ QPoint nullp;
+ QList<QPoint> pl;
+ pl.append( &nullp );
+
+ QCanvasPixmapArray* obstaclearray = new QCanvasPixmapArray(pixl, pl);
setSequence(obstaclearray);
-
+
+ int x = ( canvas()->width() - obstaclePix.width() )/2;
+ x = x - x % 16;
+ y = y - y % 16;
move(x, y);
-
+ setZ( -100 );
show();
diff --git a/noncore/games/snake/obstacle.h b/noncore/games/snake/obstacle.h
index 838917f..b3c7846 100644
--- a/noncore/games/snake/obstacle.h
+++ b/noncore/games/snake/obstacle.h
@@ -25,5 +25,5 @@ class Obstacle : public QCanvasSprite
public:
- Obstacle(QCanvas*, int x, int y);
+ Obstacle(QCanvas*, int y);
~Obstacle();
- void newObstacle(int x, int y);
+ void newObstacle(int y);
int rtti() const;
diff --git a/noncore/games/solitaire/canvascard.cpp b/noncore/games/solitaire/canvascard.cpp
index ae3c859..7c4a5ba 100644
--- a/noncore/games/solitaire/canvascard.cpp
+++ b/noncore/games/solitaire/canvascard.cpp
@@ -29,2 +29,3 @@
#include <qbitmap.h>
+#include <qgfx_qws.h> // Needed to get the device's width
@@ -104,6 +105,13 @@ CanvasCard::CanvasCard( eValue v, eSuit s, bool f, QCanvas *canvas ) :
if ( !cardsFaces ) {
- cardsFaces = new QPixmap( Resource::loadPixmap( "cards/card_face" ) );
- cardsBacks = new QPixmap( Resource::loadPixmap( "cards/card_back0001" ) );
- cardsChars = new QBitmap( Resource::loadBitmap( "cards/card_chars" ) );
- cardsSuits = new QBitmap( Resource::loadBitmap( "cards/card_suits" ) );
+ if ( qt_screen->deviceWidth() < 200 ) {
+ cardsFaces = new QPixmap( Resource::loadPixmap( "cards/card_face_small" ) );
+ cardsBacks = new QPixmap( Resource::loadPixmap( "cards/card_back0001_small" ) );
+ cardsChars = new QBitmap( Resource::loadBitmap( "cards/card_chars_small" ) );
+ cardsSuits = new QBitmap( Resource::loadBitmap( "cards/card_suits_small" ) );
+ } else {
+ cardsFaces = new QPixmap( Resource::loadPixmap( "cards/card_face" ) );
+ cardsBacks = new QPixmap( Resource::loadPixmap( "cards/card_back0001" ) );
+ cardsChars = new QBitmap( Resource::loadBitmap( "cards/card_chars" ) );
+ cardsSuits = new QBitmap( Resource::loadBitmap( "cards/card_suits" ) );
+ }
cardsCharsUpsideDown = Create180RotatedBitmap( cardsChars );
@@ -128,13 +136,28 @@ void CanvasCard::setCardBack(int b)
- switch (cardBack) {
- case 0:
- cardsBacks = new QPixmap( Resource::loadPixmap( "cards/card_back0001" ) ); break;
- case 1:
- cardsBacks = new QPixmap( Resource::loadPixmap( "cards/card_back0002" ) ); break;
- case 2:
- cardsBacks = new QPixmap( Resource::loadPixmap( "cards/card_back0003" ) ); break;
- case 3:
- cardsBacks = new QPixmap( Resource::loadPixmap( "cards/card_back0004" ) ); break;
- case 4:
- cardsBacks = new QPixmap( Resource::loadPixmap( "cards/card_back0005" ) ); break;
+ if ( qt_screen->deviceWidth() < 200 ) {
+ switch (cardBack) {
+ case 0:
+ cardsBacks = new QPixmap( Resource::loadPixmap( "cards/card_back0001_small" ) ); break;
+ case 1:
+ cardsBacks = new QPixmap( Resource::loadPixmap( "cards/card_back0002_small" ) ); break;
+ case 2:
+ cardsBacks = new QPixmap( Resource::loadPixmap( "cards/card_back0003_small" ) ); break;
+ case 3:
+ cardsBacks = new QPixmap( Resource::loadPixmap( "cards/card_back0004_small" ) ); break;
+ case 4:
+ cardsBacks = new QPixmap( Resource::loadPixmap( "cards/card_back0005_small" ) ); break;
+ }
+ } else {
+ switch (cardBack) {
+ case 0:
+ cardsBacks = new QPixmap( Resource::loadPixmap( "cards/card_back0001" ) ); break;
+ case 1:
+ cardsBacks = new QPixmap( Resource::loadPixmap( "cards/card_back0002" ) ); break;
+ case 2:
+ cardsBacks = new QPixmap( Resource::loadPixmap( "cards/card_back0003" ) ); break;
+ case 3:
+ cardsBacks = new QPixmap( Resource::loadPixmap( "cards/card_back0004" ) ); break;
+ case 4:
+ cardsBacks = new QPixmap( Resource::loadPixmap( "cards/card_back0005" ) ); break;
+ }
}
@@ -183,7 +206,15 @@ void CanvasCard::draw(QPainter &painter)
- p->drawPixmap( ix + 0, iy + 0, *cardsFaces );
- p->drawPixmap( ix + 4, iy + 4, *cardsChars, 7*(getValue()-1), 0, 7, 7 );
- p->drawPixmap( ix + 12, iy + 4, *cardsSuits, 7*(getSuit()-1), 0, 7, 8 );
- p->drawPixmap( ix + w-4-7, iy + h-4-7, *cardsCharsUpsideDown, 7*(12-getValue()+1), 0, 7, 7 );
- p->drawPixmap( ix + w-12-7, iy + h-5-7, *cardsSuitsUpsideDown, 7*(3-getSuit()+1), 0, 7, 8 );
+ if ( qt_screen->deviceWidth() < 200 ) {
+ p->drawPixmap( ix + 0, iy + 0, *cardsFaces );
+ p->drawPixmap( ix + 3, iy + 3, *cardsChars, 5*(getValue()-1), 0, 5, 6 );
+ p->drawPixmap( ix + 11, iy + 3, *cardsSuits, 5*(getSuit()-1), 0, 5, 6 );
+ p->drawPixmap( ix + w-3-5, iy + h-3-6, *cardsCharsUpsideDown, 5*(12-getValue()+1), 0, 5, 6 );
+ p->drawPixmap( ix + w-11-5, iy + h-3-6, *cardsSuitsUpsideDown, 5*(3-getSuit()+1), 0, 5, 6 );
+ } else {
+ p->drawPixmap( ix + 0, iy + 0, *cardsFaces );
+ p->drawPixmap( ix + 4, iy + 4, *cardsChars, 7*(getValue()-1), 0, 7, 7 );
+ p->drawPixmap( ix + 12, iy + 4, *cardsSuits, 7*(getSuit()-1), 0, 7, 8 );
+ p->drawPixmap( ix + w-4-7, iy + h-4-7, *cardsCharsUpsideDown, 7*(12-getValue()+1), 0, 7, 7 );
+ p->drawPixmap( ix + w-12-7, iy + h-5-7, *cardsSuitsUpsideDown, 7*(3-getSuit()+1), 0, 7, 8 );
+ }
diff --git a/noncore/games/solitaire/canvasshapes.cpp b/noncore/games/solitaire/canvasshapes.cpp
index 28d0b4e..6ccd4a4 100644
--- a/noncore/games/solitaire/canvasshapes.cpp
+++ b/noncore/games/solitaire/canvasshapes.cpp
@@ -21,2 +21,3 @@
#include <qcanvas.h>
+#include <qgfx_qws.h>
#include "canvasshapes.h"
@@ -25,3 +26,3 @@
CanvasRoundRect::CanvasRoundRect(int x, int y, QCanvas *canvas) :
- QCanvasRectangle( x, y, 23, 36, canvas)
+ QCanvasRectangle( x, y, ( qt_screen->deviceWidth() < 200 ) ? 20 : 23, ( qt_screen->deviceWidth() < 200 ) ? 27 : 36, canvas)
{
@@ -41,3 +42,6 @@ void CanvasRoundRect::drawShape(QPainter &p)
{
- p.drawRoundRect( (int)x(), (int)y(), 23, 36);
+ if ( qt_screen->deviceWidth() < 200 )
+ p.drawRoundRect( (int)x() + 1, (int)y() + 1, 18, 25);
+ else
+ p.drawRoundRect( (int)x(), (int)y(), 23, 36);
}
@@ -75,16 +79,34 @@ void CanvasCircleOrCross::drawShape(QPainter &p)
{
- int x1 = (int)x(), y1 = (int)y();
- // Green circle
- if (circleShape == TRUE) {
- p.setPen( QPen( QColor(0x10, 0xE0, 0x10), 1 ) );
- p.drawEllipse( x1 - 1, y1 - 1, 21, 21);
- p.drawEllipse( x1 - 1, y1 - 0, 21, 19);
- p.drawEllipse( x1 + 0, y1 + 0, 19, 19);
- p.drawEllipse( x1 + 1, y1 + 0, 17, 19);
- p.drawEllipse( x1 + 1, y1 + 1, 17, 17);
- // Red cross
+ if ( qt_screen->deviceWidth() < 200 ) {
+ int x1 = (int)x(), y1 = (int)y();
+ // Green circle
+ if (circleShape == TRUE) {
+ p.setPen( QPen( QColor(0x10, 0xE0, 0x10), 1 ) );
+ p.drawEllipse( x1 - 1, y1 - 1, 17, 17);
+ p.drawEllipse( x1 - 1, y1 - 0, 17, 15);
+ p.drawEllipse( x1 + 0, y1 + 0, 15, 15);
+ p.drawEllipse( x1 + 1, y1 + 0, 13, 15);
+ p.drawEllipse( x1 + 1, y1 + 1, 13, 13);
+ // Red cross
+ } else {
+ p.setPen( QPen( QColor(0xE0, 0x10, 0x10), 4 ) );
+ p.drawLine( x1, y1, x1 + 14, y1 + 14);
+ p.drawLine( x1 + 14, y1, x1, y1 + 14);
+ }
} else {
- p.setPen( QPen( QColor(0xE0, 0x10, 0x10), 5 ) );
- p.drawLine( x1, y1, x1 + 20, y1 + 20);
- p.drawLine( x1 + 20, y1, x1, y1 + 20);
+ int x1 = (int)x(), y1 = (int)y();
+ // Green circle
+ if (circleShape == TRUE) {
+ p.setPen( QPen( QColor(0x10, 0xE0, 0x10), 1 ) );
+ p.drawEllipse( x1 - 1, y1 - 1, 21, 21);
+ p.drawEllipse( x1 - 1, y1 - 0, 21, 19);
+ p.drawEllipse( x1 + 0, y1 + 0, 19, 19);
+ p.drawEllipse( x1 + 1, y1 + 0, 17, 19);
+ p.drawEllipse( x1 + 1, y1 + 1, 17, 17);
+ // Red cross
+ } else {
+ p.setPen( QPen( QColor(0xE0, 0x10, 0x10), 5 ) );
+ p.drawLine( x1, y1, x1 + 20, y1 + 20);
+ p.drawLine( x1 + 20, y1, x1, y1 + 20);
+ }
}
diff --git a/noncore/games/solitaire/freecellcardgame.cpp b/noncore/games/solitaire/freecellcardgame.cpp
index e82afd4..98415aa 100644
--- a/noncore/games/solitaire/freecellcardgame.cpp
+++ b/noncore/games/solitaire/freecellcardgame.cpp
@@ -19,2 +19,3 @@
**********************************************************************/
+#include <qgfx_qws.h>
#include "freecellcardgame.h"
@@ -31,4 +32,8 @@ FreecellCardGame::FreecellCardGame(QCanvas *c, bool snap, QWidget *parent) : Can
+ int spaceBetweenPiles = ( qt_screen->deviceWidth() < 200 ) ? 21 : 28;
+ int xOrigin = ( qt_screen->deviceWidth() < 200 ) ? 0 : 5;
+ int spacing = ( qt_screen->deviceWidth() < 200 ) ? 0 : 0;
+
for (int i = 0; i < 4; i++) {
- freecellPiles[i] = new FreecellFreecellPile( 5 + i * 28, 10, canvas() );
+ freecellPiles[i] = new FreecellFreecellPile( xOrigin + i * spaceBetweenPiles, 10, canvas() );
addCardPile(freecellPiles[i]);
@@ -36,3 +41,3 @@ FreecellCardGame::FreecellCardGame(QCanvas *c, bool snap, QWidget *parent) : Can
for (int i = 0; i < 4; i++) {
- discardPiles[i] = new FreecellDiscardPile( 125 + i * 28, 10, canvas() );
+ discardPiles[i] = new FreecellDiscardPile( xOrigin + spacing + 6 + (i + 4) * spaceBetweenPiles, 10, canvas() );
addCardPile(discardPiles[i]);
@@ -40,3 +45,3 @@ FreecellCardGame::FreecellCardGame(QCanvas *c, bool snap, QWidget *parent) : Can
for (int i = 0; i < 8; i++) {
- workingPiles[i] = new FreecellWorkingPile( 10 + i * 28, 50, canvas() );
+ workingPiles[i] = new FreecellWorkingPile( xOrigin + spacing + 2 + i * spaceBetweenPiles, 50, canvas() );
addCardPile(workingPiles[i]);
diff --git a/noncore/games/solitaire/patiencecardgame.cpp b/noncore/games/solitaire/patiencecardgame.cpp
index 5a9326a..1501d2f 100644
--- a/noncore/games/solitaire/patiencecardgame.cpp
+++ b/noncore/games/solitaire/patiencecardgame.cpp
@@ -19,2 +19,3 @@
**********************************************************************/
+#include <qgfx_qws.h>
#include "patiencecardgame.h"
@@ -30,15 +31,31 @@ PatienceCardGame::PatienceCardGame(QCanvas *c, bool snap, QWidget *parent) : Can
- circleCross = new CanvasCircleOrCross( 7, 18, canvas() );
- rectangle = new CanvasRoundRect( 35, 10, canvas() );
+ if ( qt_screen->deviceWidth() < 200 ) {
+ circleCross = new CanvasCircleOrCross( 7, 16, canvas() );
+ rectangle = new CanvasRoundRect( 30, 10, canvas() );
- for (int i = 0; i < 4; i++) {
- discardPiles[i] = new PatienceDiscardPile( 110 + i * 30, 10, canvas() );
- addCardPile(discardPiles[i]);
- }
- for (int i = 0; i < 7; i++) {
- workingPiles[i] = new PatienceWorkingPile( 10 + i * 30, 50, canvas() );
- addCardPile(workingPiles[i]);
+ for (int i = 0; i < 4; i++) {
+ discardPiles[i] = new PatienceDiscardPile( 78 + i * 23, 10, canvas() );
+ addCardPile(discardPiles[i]);
+ }
+ for (int i = 0; i < 7; i++) {
+ workingPiles[i] = new PatienceWorkingPile( 5 + i * 23, 50, canvas() );
+ addCardPile(workingPiles[i]);
+ }
+ faceDownDealingPile = new PatienceFaceDownDeck( 5, 10, canvas() );
+ faceUpDealingPile = new PatienceFaceUpDeck( 30, 10, canvas() );
+ } else {
+ circleCross = new CanvasCircleOrCross( 7, 18, canvas() );
+ rectangle = new CanvasRoundRect( 35, 10, canvas() );
+
+ for (int i = 0; i < 4; i++) {
+ discardPiles[i] = new PatienceDiscardPile( 110 + i * 30, 10, canvas() );
+ addCardPile(discardPiles[i]);
+ }
+ for (int i = 0; i < 7; i++) {
+ workingPiles[i] = new PatienceWorkingPile( 10 + i * 30, 50, canvas() );
+ addCardPile(workingPiles[i]);
+ }
+ faceDownDealingPile = new PatienceFaceDownDeck( 5, 10, canvas() );
+ faceUpDealingPile = new PatienceFaceUpDeck( 35, 10, canvas() );
}
- faceDownDealingPile = new PatienceFaceDownDeck( 5, 10, canvas() );
- faceUpDealingPile = new PatienceFaceUpDeck( 35, 10, canvas() );
}
@@ -175,3 +192,6 @@ bool PatienceCardGame::mousePressCard( Card *card, QPoint p )
- item->flipTo( 35, (int)item->y() );
+ if ( qt_screen->deviceWidth() < 200 )
+ item->flipTo( 30, (int)item->y() );
+ else
+ item->flipTo( 35, (int)item->y() );
}
@@ -197,3 +217,6 @@ bool PatienceCardGame::mousePressCard( Card *card, QPoint p )
- item->flipTo( 35, (int)item->y(), 8 * flipped );
+ if ( qt_screen->deviceWidth() < 200 )
+ item->flipTo( 30, (int)item->y(), 8 * flipped );
+ else
+ item->flipTo( 35, (int)item->y(), 8 * flipped );
}
diff --git a/noncore/games/solitaire/patiencecardgame.h b/noncore/games/solitaire/patiencecardgame.h
index c4f6c48..0d0e3d5 100644
--- a/noncore/games/solitaire/patiencecardgame.h
+++ b/noncore/games/solitaire/patiencecardgame.h
@@ -27,2 +27,3 @@
#include <qcanvas.h>
+#include <qgfx_qws.h>
// #include "canvascardshapes.h"
@@ -132,2 +133,3 @@ public:
if ( newTopCard->isFacing() == FALSE ) {
+ int offsetDown = ( qt_screen->deviceWidth() < 200 ) ? 9 : 13;
// correct the position taking in to account the card is not
@@ -136,3 +138,3 @@ public:
newTopCard->flipTo( top.x(), top.y() );
- top = QPoint( top.x(), top.y() + 13 );
+ top = QPoint( top.x(), top.y() + offsetDown );
}
@@ -147,3 +149,4 @@ public:
if (card->isFacing()) {
- y += 13;
+ int offsetDown = ( qt_screen->deviceWidth() < 200 ) ? 9 : 13;
+ y += offsetDown;
} else {
diff --git a/noncore/games/wordgame/wordgame.cpp b/noncore/games/wordgame/wordgame.cpp
index ca4352d..16d37b3 100644
--- a/noncore/games/wordgame/wordgame.cpp
+++ b/noncore/games/wordgame/wordgame.cpp
@@ -61,2 +61,9 @@ enum RuleEffects {
+static int tile_smallw = 16;
+static int tile_smallh = 16;
+static int tile_bigw = 22;
+static int tile_bigh = 22;
+static int tile_stweak = -2;
+static int tile_btweak = -1;
+
static const int rack_tiles=7;
@@ -113,2 +120,11 @@ WordGame::WordGame( QWidget* parent, const char* name, WFlags fl ) :
{
+ if ( qApp->desktop()->width() < 240 ) {
+ tile_smallw = 10;
+ tile_smallh = 10;
+ tile_bigw = 16;
+ tile_bigh = 16;
+ tile_stweak = 0;
+ tile_btweak = 0;
+ }
+
setIcon( Resource::loadPixmap( "wordgame" ) );
@@ -249,2 +265,3 @@ void WordGame::startGame(const QStringList& playerlist)
racks = new QWidgetStack(vbox);
+ racks->setFixedHeight(TileItem::bigHeight()+2);
namelist.clear();
@@ -285,3 +302,2 @@ bool WordGame::loadRules(const QString &name)
- QPixmap bgshapes = Resource::loadPixmap(shapepixmap);
QString rule_shapes;
@@ -299,2 +315,8 @@ bool WordGame::loadRules(const QString &name)
}
+
+ QImage shim = Resource::loadImage(shapepixmap);
+ shim = shim.smoothScale((re-1)*TileItem::smallWidth(),TileItem::smallHeight());
+ QPixmap bgshapes;
+ bgshapes.convertFromImage(shim);
+
rule_effects[re++] = 100; // default bonus
@@ -683,3 +705,3 @@ int TileItem::smallWidth()
{
- return 16;
+ return tile_smallw;
}
@@ -688,3 +710,3 @@ int TileItem::smallHeight()
{
- return 16;
+ return tile_smallh;
}
@@ -693,3 +715,3 @@ int TileItem::bigWidth()
{
- return 22;
+ return tile_bigw;
}
@@ -698,3 +720,3 @@ int TileItem::bigHeight()
{
- return 22;
+ return tile_bigh;
}
@@ -722,5 +744,15 @@ void TileItem::drawShape(QPainter& p)
{
- static QFont value_font("heletica",8);
- static QFont big_font("smoothtimes",17);
- static QFont small_font("smoothtimes",10);
+ static QFont *value_font=0;
+ static QFont *big_font=0;
+ static QFont *small_font=0;
+ if ( !value_font ) {
+ value_font = new QFont("helvetica",8);
+ if ( TileItem::bigWidth() < 20 ) {
+ big_font = new QFont("helvetica",12);
+ small_font = new QFont("helvetica",8);
+ } else {
+ big_font = new QFont("smoothtimes",17);
+ small_font = new QFont("smoothtimes",10);
+ }
+ }
@@ -730,3 +762,3 @@ void TileItem::drawShape(QPainter& p)
if ( big ) {
- p.setFont(value_font);
+ p.setFont(*value_font);
QString n = QString::number(t.value());
@@ -735,9 +767,9 @@ void TileItem::drawShape(QPainter& p)
w *= n.length();
- QRect valuearea(x()+width()-w-2,y()+height()-h+1,w,h);
+ QRect valuearea(x()+width()-w-1,y()+height()-h,w,h);
p.drawText(valuearea,AlignCenter,n);
- p.setFont(big_font);
- area = QRect(x(),y(),width()-2,height()-1);
+ p.setFont(*big_font);
+ area = QRect(x(),y()+tile_btweak,width()-4,height()-1);
} else {
- p.setFont(small_font);
- area = QRect(x(),y()+2,width(),height()-2);
+ p.setFont(*small_font);
+ area = QRect(x()+1+tile_stweak,y()+1,width(),height()-3);
}
@@ -752,2 +784,3 @@ Board::Board(QPixmap bgshapes, int w, int h, QWidget* parent) :
{
+ setFixedSize(w*TileItem::smallWidth(),h*TileItem::smallHeight());
grid = new TileItem*[w*h];
@@ -766,2 +799,7 @@ Board::~Board()
+QSize Board::sizeHint() const
+{
+ return QSize(canvas()->width(),canvas()->height());
+}
+
void Board::writeConfig(Config& cfg)
@@ -1183,2 +1221,7 @@ Rack::~Rack()
+QSize Rack::sizeHint() const
+{
+ return QSize(-1,TileItem::bigHeight()+2);
+}
+
void Rack::clear()
diff --git a/noncore/games/wordgame/wordgame.h b/noncore/games/wordgame/wordgame.h
index 0ffa56a..f73c85a 100644
--- a/noncore/games/wordgame/wordgame.h
+++ b/noncore/games/wordgame/wordgame.h
@@ -150,2 +150,4 @@ public:
+ QSize sizeHint() const;
+
protected:
@@ -213,2 +215,4 @@ public:
+ QSize sizeHint() const;
+
signals:
@@ -333,3 +337,3 @@ private:
QToolBar* toolbar;
- QVBox *vbox;
+ QWidget *vbox;
Board *board;
diff --git a/noncore/multimedia/showimg/settingsdialog.cpp b/noncore/multimedia/showimg/settingsdialog.cpp
deleted file mode 100644
index d21f4cb..0000000
--- a/noncore/multimedia/showimg/settingsdialog.cpp
+++ b/dev/null
@@ -1,57 +0,0 @@
-/**********************************************************************
-** 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
deleted file mode 100644
index 6dfd2c4..0000000
--- a/noncore/multimedia/showimg/settingsdialog.h
+++ b/dev/null
@@ -1,42 +0,0 @@
-/**********************************************************************
-** 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
deleted file mode 100644
index ed404d8..0000000
--- a/noncore/multimedia/showimg/settingsdialogbase.ui
+++ b/dev/null
@@ -1,149 +0,0 @@
-<!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
deleted file mode 100644
index 3b006de..0000000
--- a/pics/cards/circle.png
+++ b/dev/null
Binary files differ
diff --git a/pics/cards/cross.png b/pics/cards/cross.png
deleted file mode 100644
index cac7576..0000000
--- a/pics/cards/cross.png
+++ b/dev/null
Binary files differ
diff --git a/pics/inline/today.png b/pics/inline/today.png
deleted file mode 100644
index ac244c6..0000000
--- a/pics/inline/today.png
+++ b/dev/null
Binary files differ
diff --git a/pics/slideshow.png b/pics/slideshow.png
deleted file mode 100644
index 9a7f8d5..0000000
--- a/pics/slideshow.png
+++ b/dev/null
Binary files differ