summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/oglobalsettings.h
Side-by-side diff
Diffstat (limited to 'libopie2/opiecore/oglobalsettings.h') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiecore/oglobalsettings.h5
1 files changed, 5 insertions, 0 deletions
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
@@ -26,48 +26,49 @@
    --        :-=` 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>
#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
* 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:
@@ -78,63 +79,65 @@ class OGlobalSettings
* }
*
* 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>
*
*/
+ // 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();
static unsigned int visualActivateSpeed();
/**
* Returns the OPIE setting for the auto-select option
*
* @return the auto-select delay or -1 if auto-select is disabled.
*/
static int autoSelectDelay();
/**
* Returns the OPIE setting for the shortcut key to open
* context menus.
@@ -230,58 +233,60 @@ class OGlobalSettings
/**
* Returns additional information for debug output (dependent on the debug mode).
*
* @return Additional debug output information.
*/
static QString debugOutput();
/**
* This is a structure containing the possible mouse settings.
*/
struct OMouseSettings
{
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.
*/
+ // 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();
static QColor inactiveTitleColor();
static QColor inactiveTextColor();
static QColor activeTitleColor();
static QColor activeTextColor();
static int contrast();
/**
* The default colors to use for text and links.
*/
static QColor baseColor(); // Similair to QColorGroup::base()
static QColor textColor(); // Similair to QColorGroup::text()
static QColor linkColor();