summaryrefslogtreecommitdiff
path: root/libopie2/opiecore
Side-by-side diff
Diffstat (limited to 'libopie2/opiecore') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/oapplication.cpp2
-rw-r--r--libopie2/opiecore/oapplication.h6
-rw-r--r--libopie2/opiecore/oglobal.h3
-rw-r--r--libopie2/opiecore/oglobalsettings.h7
4 files changed, 14 insertions, 4 deletions
diff --git a/libopie2/opiecore/oapplication.cpp b/libopie2/opiecore/oapplication.cpp
index d3e04ba..ce26420 100644
--- a/libopie2/opiecore/oapplication.cpp
+++ b/libopie2/opiecore/oapplication.cpp
@@ -102,23 +102,23 @@ void OApplication::setMainWidget( QWidget* widget )
void OApplication::showMainWidget( QWidget* widget, bool nomax )
{
#ifdef Q_WS_QWS
QPEApplication::showMainWidget( widget, nomax );
#else
QApplication::setMainWidget( widget );
widget->show();
#endif
widget->setCaption( _appname );
}
-void OApplication::setTitle( QString title ) const
+void OApplication::setTitle( const QString& title ) const
{
if ( mainWidget() )
{
if ( !title.isNull() )
mainWidget()->setCaption( QString(_appname) + QString( " - " ) + title );
else
mainWidget()->setCaption( _appname );
}
}
diff --git a/libopie2/opiecore/oapplication.h b/libopie2/opiecore/oapplication.h
index 4d25202..8326847 100644
--- a/libopie2/opiecore/oapplication.h
+++ b/libopie2/opiecore/oapplication.h
@@ -24,37 +24,41 @@
  -_. . .   )=.  = Library General Public License along with
    --        :-=` this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#ifndef OAPPLICATION_H
#define OAPPLICATION_H
#define oApp OApplication::oApplication()
+// the below stuff will fail with moc because moc does not pre process headers
+// This will make usage of signal and slots hard inside QPEApplication -zecke
+
#ifdef QWS
#include <qpe/qpeapplication.h>
#define OApplicationBaseClass QPEApplication
#else
#include <qapplication.h>
#define OApplicationBaseClass QApplication
#endif
class OApplicationPrivate;
class OConfig;
class OApplication: public OApplicationBaseClass
{
+// Q_OBJECT would fail -zecke
public:
/**
* Constructor. Parses command-line arguments and sets the window caption.
*
* @param rAppName application name. Will be used for finding the
* associated message, icon and configuration files
*
*/
OApplication( int& argc, char** argv, const QCString& rAppName );
/**
* Destructor. Destroys the application object and its children.
@@ -105,25 +109,25 @@ class OApplication: public OApplicationBaseClass
*
* @param mainWidget the widget to become the main widget
* @see QWidget object
*/
virtual void showMainWidget( QWidget* widget, bool nomax = false );
/**
* Set the application title. The application title will be concatenated
* to the application name given in the constructor.
*
* @param title the title. If not given, resets caption to appname
*/
- virtual void setTitle( QString title = QString::null ) const;
+ virtual void setTitle( const QString& title = QString::null ) const;
//virtual void setTitle() const;
protected:
void init();
private:
const QCString _appname;
static OApplication* _instance;
OConfig* _config;
OApplicationPrivate* d;
};
diff --git a/libopie2/opiecore/oglobal.h b/libopie2/opiecore/oglobal.h
index 8345c6a..34f211e 100644
--- a/libopie2/opiecore/oglobal.h
+++ b/libopie2/opiecore/oglobal.h
@@ -28,21 +28,22 @@
Boston, MA 02111-1307, USA.
*/
#ifndef OGLOBAL_H
#define OGLOBAL_H
#include <qpe/global.h>
#include <opie2/oconfig.h>
static OConfig globalconfig = OConfig( "global" );
//FIXME: Is it wise or even necessary to inherit OGlobal from Global?
+// once we totally skip libqpe it should ideally swallow Global -zecke
class OGlobal : public Global
{
public:
-
+ // do we want to put that into OApplication as in KApplication -zecke
static OConfig* config();
};
#endif // OGLOBAL_H
diff --git a/libopie2/opiecore/oglobalsettings.h b/libopie2/opiecore/oglobalsettings.h
index 6481251..d3f357e 100644
--- a/libopie2/opiecore/oglobalsettings.h
+++ b/libopie2/opiecore/oglobalsettings.h
@@ -38,24 +38,25 @@
#define OPIE_DEFAULT_SINGLECLICK true
#define OPIE_DEFAULT_INSERTTEAROFFHANDLES true
#define OPIE_DEFAULT_AUTOSELECTDELAY -1
#define OPIE_DEFAULT_CHANGECURSOR true
#define OPIE_DEFAULT_LARGE_CURSOR false
#define OPIE_DEFAULT_VISUAL_ACTIVATE true
#define OPIE_DEFAULT_VISUAL_ACTIVATE_SPEED 50
//FIXME: There's still a whole lot of stuff in here which has to be revised
//FIXME: before public usage... lack of time to do it at once - so it will
//FIXME: happen step-by-step. ML.
+// we should not habe too much configure options!!!!!! -zecke
/**
* Access the OPIE global configuration settings.
*
*/
class OGlobalSettings
{
public:
/**
* Returns a threshold in pixels for drag & drop operations.
* As long as the mouse movement has not exceeded this number
@@ -90,39 +91,41 @@ class OGlobalSettings
* int cell = posToCell(mOldPos); // Find color at mOldPos
* if ((cell != -1) && colors[cell].isValid())
* {
* OColorDrag *d = OColorDrag::makeDrag( colors[cell], this);
* d->dragCopy();
* }
* }
* }
* </pre>
*
*/
+ // we do not support DND at the momemt -zecke
static int dndEventDelay();
/**
* Returns whether OPIE runs in single (default) or double click
* mode.
*
* @return @p true if single click mode, or @p false if double click mode.
*
* see @ref http://opie.handhelds.org/documentation/standards/opie/style/mouse/index.html
**/
static bool singleClick();
/**
* Returns whether tear-off handles are inserted in OPopupMenus.
**/
+ // would clutter the small screen -zecke
static bool insertTearOffHandle();
/**
* @return the OPIE setting for "change cursor over icon"
*/
static bool changeCursorOverIcon();
/**
* @return whether to show some feedback when an item (specifically an
* icon) is activated.
*/
static bool visualActivate();
@@ -242,34 +245,36 @@ class OGlobalSettings
enum { RightHanded = 0, LeftHanded = 1 };
int handed; // left or right
};
/**
* This returns the current mouse settings.
*/
static OMouseSettings & mouseSettings();
/**
* The path to the desktop directory of the current user.
*/
+ // below handled by Global stuff and QPEApplication
static QString desktopPath() { initStatic(); return *s_desktopPath; }
/**
* The path to the autostart directory of the current user.
*/
static QString autostartPath() { initStatic(); return *s_autostartPath; }
/**
- * The path to the trash directory of the current user.
+ * The path to the trash directory of the current user.
*/
+ // we do not have that concept -zecke
static QString trashPath() { initStatic(); return *s_trashPath; }
/**
* The path where documents are stored of the current user.
*/
static QString documentPath() { initStatic(); return *s_documentPath; }
/**
* The default color to use when highlighting toolbar buttons
*/
static QColor toolBarHighlightColor();