summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/oglobalsettings.h
Side-by-side diff
Diffstat (limited to 'libopie2/opiecore/oglobalsettings.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/oglobalsettings.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/libopie2/opiecore/oglobalsettings.h b/libopie2/opiecore/oglobalsettings.h
index e3ac148..8eea709 100644
--- a/libopie2/opiecore/oglobalsettings.h
+++ b/libopie2/opiecore/oglobalsettings.h
@@ -1,99 +1,105 @@
/*
                This file is part of the Opie Project
              Copyright (C) 2003 Michael Lauer <mickey@tm.informatik.uni-frankfurt.de>
Inspired by KDE OGlobalSettings
Copyright (C) 2000 David Faure <faure@kde.org>
=.
.=l.
           .>+-=
 _;:,     .>    :=|. This program is free software; you can
.> <`_,   >  .   <= redistribute it and/or modify it under
:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
.="- .-=="i,     .._ License as published by the Free Software
 - .   .-<_>     .<> Foundation; either version 2 of the License,
     ._= =}       : or (at your option) any later version.
    .%`+i>       _;_.
    .i_,=:_.      -<s. This program is distributed in the hope that
     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
    : ..    .:,     . . . without even the implied warranty of
    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
..}^=.=       =       ; Library General Public License for more
++=   -.     .`     .: details.
 :     =  ...= . :.=-
 -.   .:....=;==+<; You should have received a copy of the GNU
  -_. . .   )=.  = 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 OGLOBALSETTINGS_H
#define OGLOBALSETTINGS_H
#include <qstring.h>
#include <qcolor.h>
#include <qfont.h>
+/**
+ * \todo make real const values
+ */
#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
+namespace Opie {
+namespace Core {
+
/**
* 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
* of pixels in either X or Y direction no drag operation may
* be started. This prevents spurious drags when the user intended
* to click on something but moved the mouse a bit while doing so.
*
* For this to work you must save the position of the mouse (oldPos)
* in the @ref QWidget::mousePressEvent().
* When the position of the mouse (newPos)
* in a @ref QWidget::mouseMoveEvent() exceeds this threshold
* you may start a drag
* which should originate from oldPos.
*
* Example code:
* <pre>
* void OColorCells::mousePressEvent( QMouseEvent *e )
* {
* mOldPos = e->pos();
* }
*
* void OColorCells::mouseMoveEvent( QMouseEvent *e )
* {
* if( !(e->state() && LeftButton)) return;
*
* int delay = OGlobalSettings::dndEventDelay();
* QPoint newPos = e->pos();
* if(newPos.x() > mOldPos.x()+delay || newPos.x() < mOldPos.x()-delay ||
* newPos.y() > mOldPos.y()+delay || newPos.y() < mOldPos.y()-delay)
* {
* // Drag color object
* int cell = posToCell(mOldPos); // Find color at mOldPos
* if ((cell != -1) && colors[cell].isValid())
* {
* OColorDrag *d = OColorDrag::makeDrag( colors[cell], this);
* d->dragCopy();
* }
* }
* }
* </pre>
@@ -323,51 +329,57 @@ class OGlobalSettings
* if the user wants OPIE to run on all of them or just on the primary
*/
static bool isMultiHead();
private:
/**
* reads in all paths from kdeglobals
*/
static void initStatic();
/**
* initialise kde2Blue
*/
static void initColors();
/**
* drop cached values for fonts (called by OApplication)
*/
static void rereadFontSettings();
/**
* drop cached values for paths (called by OApplication)
*/
static void rereadPathSettings();
/**
* drop cached values for mouse settings (called by OApplication)
*/
static void rereadMouseSettings();
static QString* s_desktopPath;
static QString* s_autostartPath;
static QString* s_trashPath;
static QString* s_documentPath;
static QFont *_generalFont;
static QFont *_fixedFont;
static QFont *_toolBarFont;
static QFont *_menuFont;
static QFont *_windowTitleFont;
static QFont *_taskbarFont;
static QColor * kde2Gray;
static QColor * kde2Blue;
static QColor * kde2AlternateColor;
static OMouseSettings *s_mouseSettings;
static QColor * OpieGray;
static QColor * OpieBlue;
static QColor * OpieAlternate;
static QColor * OpieHighlight;
friend class OApplication;
+private:
+ class Private;
+ Private *d;
};
+}
+}
+
#endif