2000-03-24 22:23:02 +00:00
|
|
|
/*****************************************************************
|
|
|
|
kwin - the KDE window manager
|
2000-12-08 00:54:19 +00:00
|
|
|
|
2000-03-24 22:23:02 +00:00
|
|
|
Copyright (C) 1999, 2000 Matthias Ettrich <ettrich@kde.org>
|
|
|
|
******************************************************************/
|
1999-10-09 09:55:16 +00:00
|
|
|
#include "options.h"
|
1999-10-10 03:22:21 +00:00
|
|
|
#include <qpalette.h>
|
1999-11-07 15:48:24 +00:00
|
|
|
#include <qpixmap.h>
|
1999-11-25 12:53:17 +00:00
|
|
|
#include <kapp.h>
|
1999-10-10 03:22:21 +00:00
|
|
|
#include <kconfig.h>
|
|
|
|
#include <kglobal.h>
|
2000-09-23 19:58:45 +00:00
|
|
|
#include <kglobalsettings.h>
|
2001-11-16 23:21:43 +00:00
|
|
|
#include <kkeysequence.h> // for KKeySequence::keyboardHasMetaKey()
|
1999-10-09 09:55:16 +00:00
|
|
|
|
2001-04-20 07:19:03 +00:00
|
|
|
using namespace KWinInternal;
|
|
|
|
|
|
|
|
namespace KWinInternal
|
|
|
|
{
|
|
|
|
class OptionsPrivate
|
|
|
|
{
|
|
|
|
public:
|
2001-05-03 08:06:28 +00:00
|
|
|
OptionsPrivate() : title_buttons_left( "MS" ), title_buttons_right( "HIAX" ),
|
2001-11-03 00:05:33 +00:00
|
|
|
custom_button_positions( false ), electric_borders( 0 ),
|
2001-09-06 19:44:06 +00:00
|
|
|
electric_border_delay(0) {};
|
2001-04-20 07:19:03 +00:00
|
|
|
QColor colors[KWINCOLORS*2];
|
|
|
|
QColorGroup *cg[KWINCOLORS*2];
|
2001-05-03 08:06:28 +00:00
|
|
|
QString title_buttons_left;
|
|
|
|
QString title_buttons_right;
|
|
|
|
bool custom_button_positions;
|
2001-07-01 10:10:17 +00:00
|
|
|
bool show_tooltips;
|
2001-07-02 12:40:14 +00:00
|
|
|
bool fade_tooltips;
|
|
|
|
bool animate_tooltips;
|
2001-11-03 00:05:33 +00:00
|
|
|
int electric_borders;
|
2001-09-06 19:44:06 +00:00
|
|
|
int electric_border_delay;
|
2001-04-20 07:19:03 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
#define colors (d->colors)
|
|
|
|
#define cg (d->cg)
|
|
|
|
|
1999-10-11 02:00:06 +00:00
|
|
|
Options::Options()
|
1999-11-25 12:53:17 +00:00
|
|
|
: QObject( 0, 0)
|
1999-10-11 02:00:06 +00:00
|
|
|
{
|
2001-04-20 07:19:03 +00:00
|
|
|
d = new OptionsPrivate;
|
1999-10-11 02:00:06 +00:00
|
|
|
int i;
|
|
|
|
for(i=0; i < KWINCOLORS*2; ++i)
|
|
|
|
cg[i] = NULL;
|
1999-10-10 03:22:21 +00:00
|
|
|
reload();
|
1999-11-16 08:53:02 +00:00
|
|
|
|
1999-11-25 12:53:17 +00:00
|
|
|
connect( kapp, SIGNAL( appearanceChanged() ), this, SLOT(reload() ) );
|
1999-10-10 03:22:21 +00:00
|
|
|
}
|
|
|
|
|
1999-10-11 02:00:06 +00:00
|
|
|
Options::~Options(){
|
|
|
|
int i;
|
|
|
|
for(i=0; i < KWINCOLORS*2; ++i){
|
|
|
|
if(cg[i]){
|
|
|
|
delete cg[i];
|
|
|
|
cg[i] = NULL;
|
|
|
|
}
|
|
|
|
}
|
2001-04-20 07:19:03 +00:00
|
|
|
delete d;
|
1999-10-11 02:00:06 +00:00
|
|
|
}
|
|
|
|
|
1999-10-10 03:22:21 +00:00
|
|
|
const QColor& Options::color(ColorType type, bool active)
|
|
|
|
{
|
|
|
|
return(colors[type + (active ? 0 : KWINCOLORS)]);
|
|
|
|
}
|
|
|
|
|
2000-07-12 12:46:58 +00:00
|
|
|
const QFont& Options::font(bool active, bool small)
|
1999-10-10 03:22:21 +00:00
|
|
|
{
|
2000-07-12 12:46:58 +00:00
|
|
|
if ( small )
|
2001-01-20 03:55:42 +00:00
|
|
|
return(active ? activeFontSmall : inactiveFontSmall);
|
2000-12-08 00:54:19 +00:00
|
|
|
else
|
2001-01-20 03:55:42 +00:00
|
|
|
return(active ? activeFont : inactiveFont);
|
1999-10-10 03:22:21 +00:00
|
|
|
}
|
|
|
|
|
1999-10-11 02:00:06 +00:00
|
|
|
const QColorGroup& Options::colorGroup(ColorType type, bool active)
|
|
|
|
{
|
|
|
|
int idx = type + (active ? 0 : KWINCOLORS);
|
|
|
|
if(cg[idx])
|
|
|
|
return(*cg[idx]);
|
|
|
|
cg[idx] = new QColorGroup(Qt::black, colors[idx], colors[idx].light(150),
|
|
|
|
colors[idx].dark(), colors[idx].dark(120),
|
2001-09-30 21:22:20 +00:00
|
|
|
Qt::black, QApplication::palette().active().
|
1999-11-07 15:48:24 +00:00
|
|
|
base());
|
1999-10-11 02:00:06 +00:00
|
|
|
return(*cg[idx]);
|
|
|
|
}
|
1999-10-10 03:22:21 +00:00
|
|
|
|
|
|
|
void Options::reload()
|
|
|
|
{
|
|
|
|
QPalette pal = QApplication::palette();
|
|
|
|
KConfig *config = KGlobal::config();
|
|
|
|
config->setGroup("WM");
|
|
|
|
|
|
|
|
// normal colors
|
2001-09-30 21:22:20 +00:00
|
|
|
colors[Frame] = pal.active().background();
|
1999-10-10 03:22:21 +00:00
|
|
|
colors[Frame] = config->readColorEntry("frame", &colors[Frame]);
|
2000-04-28 15:53:00 +00:00
|
|
|
colors[Handle] = colors[Frame];
|
1999-11-07 01:43:06 +00:00
|
|
|
colors[Handle] = config->readColorEntry("handle", &colors[Handle]);
|
2000-01-23 23:33:29 +00:00
|
|
|
|
|
|
|
// full button configuration (background, blend, and foreground
|
|
|
|
if(QPixmap::defaultDepth() > 8)
|
|
|
|
colors[ButtonBg] = colors[Frame].light(130);
|
|
|
|
else
|
|
|
|
colors[ButtonBg] = colors[Frame];
|
1999-11-11 01:16:41 +00:00
|
|
|
colors[ButtonBg] = config->readColorEntry("activeTitleBtnBg",
|
1999-10-10 03:22:21 +00:00
|
|
|
&colors[Frame]);
|
2001-09-30 21:22:20 +00:00
|
|
|
colors[TitleBar] = pal.active().highlight();
|
1999-10-10 03:22:21 +00:00
|
|
|
colors[TitleBar] = config->readColorEntry("activeBackground",
|
|
|
|
&colors[TitleBar]);
|
2000-01-23 23:33:29 +00:00
|
|
|
if(QPixmap::defaultDepth() > 8)
|
1999-12-08 02:44:50 +00:00
|
|
|
colors[TitleBlend] = colors[ TitleBar ].dark(110);
|
2000-01-23 23:33:29 +00:00
|
|
|
else
|
|
|
|
colors[TitleBlend] = colors[ TitleBar ];
|
1999-10-10 03:22:21 +00:00
|
|
|
colors[TitleBlend] = config->readColorEntry("activeBlend",
|
1999-11-07 01:43:06 +00:00
|
|
|
&colors[TitleBlend]);
|
1999-10-10 03:22:21 +00:00
|
|
|
|
2001-09-30 21:22:20 +00:00
|
|
|
colors[Font] = pal.active().highlightedText();
|
1999-10-10 03:22:21 +00:00
|
|
|
colors[Font] = config->readColorEntry("activeForeground", &colors[Font]);
|
|
|
|
|
|
|
|
// inactive
|
1999-11-07 15:48:24 +00:00
|
|
|
colors[Frame+KWINCOLORS] = config->readColorEntry("inactiveFrame",
|
|
|
|
&colors[Frame]);
|
1999-11-21 17:17:34 +00:00
|
|
|
colors[TitleBar+KWINCOLORS] = colors[Frame];
|
1999-10-10 03:22:21 +00:00
|
|
|
colors[TitleBar+KWINCOLORS] = config->
|
|
|
|
readColorEntry("inactiveBackground", &colors[TitleBar+KWINCOLORS]);
|
1999-11-07 15:48:24 +00:00
|
|
|
|
2000-01-23 23:33:29 +00:00
|
|
|
if(QPixmap::defaultDepth() > 8)
|
1999-12-08 02:44:50 +00:00
|
|
|
colors[TitleBlend+KWINCOLORS] = colors[ TitleBar+KWINCOLORS ].dark(110);
|
2000-01-23 23:33:29 +00:00
|
|
|
else
|
|
|
|
colors[TitleBlend+KWINCOLORS] = colors[ TitleBar+KWINCOLORS ];
|
1999-10-10 03:22:21 +00:00
|
|
|
colors[TitleBlend+KWINCOLORS] =
|
1999-11-07 15:48:24 +00:00
|
|
|
config->readColorEntry("inactiveBlend", &colors[TitleBlend+KWINCOLORS]);
|
|
|
|
|
2000-01-23 23:33:29 +00:00
|
|
|
// full button configuration
|
|
|
|
if(QPixmap::defaultDepth() > 8)
|
|
|
|
colors[ButtonBg+KWINCOLORS] = colors[Frame+KWINCOLORS].light(130);
|
|
|
|
else
|
|
|
|
colors[ButtonBg+KWINCOLORS] = colors[Frame+KWINCOLORS];
|
1999-10-10 03:22:21 +00:00
|
|
|
colors[ButtonBg+KWINCOLORS] =
|
1999-11-11 01:16:41 +00:00
|
|
|
config->readColorEntry("inactiveTitleBtnBg",
|
1999-10-11 02:00:06 +00:00
|
|
|
&colors[ButtonBg]);
|
1999-11-07 15:48:24 +00:00
|
|
|
|
1999-11-10 19:05:47 +00:00
|
|
|
colors[Handle+KWINCOLORS] = colors[Frame];
|
1999-10-11 02:00:06 +00:00
|
|
|
config->readColorEntry("inactiveHandle", &colors[Handle]);
|
1999-10-10 03:22:21 +00:00
|
|
|
|
1999-11-21 17:17:34 +00:00
|
|
|
colors[Font+KWINCOLORS] = colors[Frame].dark();
|
1999-10-10 03:22:21 +00:00
|
|
|
colors[Font+KWINCOLORS] = config->readColorEntry("inactiveForeground",
|
|
|
|
&colors[Font+KWINCOLORS]);
|
|
|
|
|
2000-09-23 19:58:45 +00:00
|
|
|
// Keep in sync with kglobalsettings.
|
1999-10-11 02:00:06 +00:00
|
|
|
|
2000-09-28 00:36:24 +00:00
|
|
|
QFont activeFontGuess("helvetica", 12, QFont::Bold);
|
2000-09-23 19:58:45 +00:00
|
|
|
activeFontGuess.setPixelSize(12);
|
|
|
|
|
|
|
|
activeFont = config->readFontEntry("activeFont", &activeFontGuess);
|
2000-12-08 00:54:19 +00:00
|
|
|
inactiveFont = config->readFontEntry("inactiveFont", &activeFont);
|
2000-09-23 19:58:45 +00:00
|
|
|
|
|
|
|
activeFontSmall = activeFont;
|
|
|
|
activeFontSmall.setPointSize(activeFont.pointSize() - 2);
|
2000-07-12 12:46:58 +00:00
|
|
|
activeFontSmall = config->readFontEntry("activeFontSmall", &activeFontSmall);
|
|
|
|
inactiveFontSmall = config->readFontEntry("inactiveFontSmall", &activeFontSmall);
|
|
|
|
|
1999-10-11 02:00:06 +00:00
|
|
|
int i;
|
|
|
|
for(i=0; i < KWINCOLORS*2; ++i){
|
|
|
|
if(cg[i]){
|
|
|
|
delete cg[i];
|
|
|
|
cg[i] = NULL;
|
|
|
|
}
|
|
|
|
}
|
1999-11-20 06:27:07 +00:00
|
|
|
|
1999-11-29 02:06:41 +00:00
|
|
|
config->setGroup( "Windows" );
|
|
|
|
moveMode = config->readEntry("MoveMode", "Opaque" ) == "Opaque"?Opaque:Transparent;
|
|
|
|
resizeMode = config->readEntry("ResizeMode", "Opaque" ) == "Opaque"?Opaque:Transparent;
|
2000-09-27 06:41:20 +00:00
|
|
|
moveResizeMaximizedWindows = config->readBoolEntry("MoveResizeMaximizedWindows", true );
|
1999-12-22 04:49:43 +00:00
|
|
|
|
|
|
|
|
1999-11-20 06:27:07 +00:00
|
|
|
QString val;
|
2000-03-24 22:23:02 +00:00
|
|
|
|
2000-06-22 18:08:35 +00:00
|
|
|
val = config->readEntry ("FocusPolicy", "ClickToFocus");
|
|
|
|
focusPolicy = ClickToFocus; // what a default :-)
|
|
|
|
if ( val == "FocusFollowsMouse" )
|
2001-01-20 03:55:42 +00:00
|
|
|
focusPolicy = FocusFollowsMouse;
|
2000-06-22 18:08:35 +00:00
|
|
|
else if ( val == "FocusUnderMouse" )
|
2001-01-20 03:55:42 +00:00
|
|
|
focusPolicy = FocusUnderMouse;
|
2000-06-22 18:08:35 +00:00
|
|
|
else if ( val == "FocusStrictlyUnderMouse" )
|
2001-01-20 03:55:42 +00:00
|
|
|
focusPolicy = FocusStrictlyUnderMouse;
|
2000-06-22 18:08:35 +00:00
|
|
|
|
|
|
|
val = config->readEntry ("AltTabStyle", "KDE");
|
|
|
|
altTabStyle = KDE; // what a default :-)
|
|
|
|
if ( val == "CDE" )
|
2001-01-20 03:55:42 +00:00
|
|
|
altTabStyle = CDE;
|
1999-12-22 04:49:43 +00:00
|
|
|
|
2001-06-03 09:04:03 +00:00
|
|
|
xineramaEnabled = config->readBoolEntry ("XineramaEnabled", FALSE ) &&
|
|
|
|
KApplication::desktop()->isVirtualDesktop();
|
|
|
|
if (xineramaEnabled) {
|
|
|
|
xineramaPlacementEnabled = config->readBoolEntry ("XineramaPlacementEnabled", FALSE);
|
|
|
|
xineramaMovementEnabled = config->readBoolEntry ("XineramaMovementEnabled", FALSE);
|
|
|
|
xineramaMaximizeEnabled = config->readBoolEntry ("XineramaMaximizeEnabled", FALSE);
|
|
|
|
}
|
|
|
|
|
1999-11-20 06:27:07 +00:00
|
|
|
val = config->readEntry("Placement","Smart");
|
|
|
|
if (val == "Smart") placement = Smart;
|
|
|
|
else if (val == "Random") placement = Random;
|
|
|
|
else if (val == "Cascade") placement = Cascade;
|
|
|
|
|
2000-07-09 20:29:53 +00:00
|
|
|
animateShade = config->readBoolEntry("AnimateShade", TRUE );
|
1999-11-20 06:27:07 +00:00
|
|
|
|
2000-09-25 15:30:51 +00:00
|
|
|
animateMinimize = config->readBoolEntry("AnimateMinimize", TRUE );
|
2000-10-23 14:56:55 +00:00
|
|
|
animateMinimizeSpeed = config->readNumEntry("AnimateMinimizeSpeed", 5 );
|
|
|
|
|
2000-07-09 20:29:53 +00:00
|
|
|
autoRaise = config->readBoolEntry("AutoRaise", FALSE );
|
|
|
|
autoRaiseInterval = config->readNumEntry("AutoRaiseInterval", 0 );
|
|
|
|
|
2001-01-20 03:55:42 +00:00
|
|
|
shadeHover = config->readBoolEntry("ShadeHover", FALSE );
|
2001-01-14 20:16:04 +00:00
|
|
|
shadeHoverInterval = config->readNumEntry("ShadeHoverInterval", 250 );
|
|
|
|
|
2000-07-09 20:29:53 +00:00
|
|
|
// important: autoRaise implies ClickRaise
|
|
|
|
clickRaise = autoRaise || config->readBoolEntry("ClickRaise", FALSE );
|
|
|
|
|
|
|
|
borderSnapZone = config->readNumEntry("BorderSnapZone", 10);
|
|
|
|
windowSnapZone = config->readNumEntry("WindowSnapZone", 10);
|
2000-11-02 18:15:39 +00:00
|
|
|
snapOnlyWhenOverlapping=config->readBoolEntry("SnapOnlyWhenOverlapping",FALSE);
|
2001-11-03 00:05:33 +00:00
|
|
|
d->electric_borders = config->readNumEntry("ElectricBorders", 0);
|
2001-09-06 19:44:06 +00:00
|
|
|
d->electric_border_delay = config->readNumEntry("ElectricBorderDelay", 150);
|
1999-12-22 04:49:43 +00:00
|
|
|
|
2000-06-28 13:20:42 +00:00
|
|
|
OpTitlebarDblClick = windowOperation( config->readEntry("TitlebarDoubleClickCommand", "Shade") );
|
1999-11-29 02:06:41 +00:00
|
|
|
|
2000-10-23 18:27:23 +00:00
|
|
|
ignorePositionClasses = config->readListEntry("IgnorePositionClasses");
|
|
|
|
|
1999-11-29 02:06:41 +00:00
|
|
|
// Mouse bindings
|
|
|
|
config->setGroup( "MouseBindings");
|
|
|
|
CmdActiveTitlebar1 = mouseCommand(config->readEntry("CommandActiveTitlebar1","Raise"));
|
|
|
|
CmdActiveTitlebar2 = mouseCommand(config->readEntry("CommandActiveTitlebar2","Lower"));
|
|
|
|
CmdActiveTitlebar3 = mouseCommand(config->readEntry("CommandActiveTitlebar3","Operations menu"));
|
|
|
|
CmdInactiveTitlebar1 = mouseCommand(config->readEntry("CommandInactiveTitlebar1","Activate and raise"));
|
|
|
|
CmdInactiveTitlebar2 = mouseCommand(config->readEntry("CommandInactiveTitlebar2","Activate and lower"));
|
|
|
|
CmdInactiveTitlebar3 = mouseCommand(config->readEntry("CommandInactiveTitlebar3","Activate"));
|
|
|
|
CmdWindow1 = mouseCommand(config->readEntry("CommandWindow1","Activate, raise and pass click"));
|
|
|
|
CmdWindow2 = mouseCommand(config->readEntry("CommandWindow2","Activate and pass click"));
|
|
|
|
CmdWindow3 = mouseCommand(config->readEntry("CommandWindow3","Activate and pass click"));
|
2001-11-16 23:21:43 +00:00
|
|
|
CmdAllModKey = (config->readEntry("CommandAllKey", KKeySequence::keyboardHasMetaKey() ? "Meta" : "Alt") == "Meta") ? Qt::Key_Meta : Qt::Key_Alt;
|
1999-11-29 02:06:41 +00:00
|
|
|
CmdAll1 = mouseCommand(config->readEntry("CommandAll1","Move"));
|
|
|
|
CmdAll2 = mouseCommand(config->readEntry("CommandAll2","Toggle raise and lower"));
|
|
|
|
CmdAll3 = mouseCommand(config->readEntry("CommandAll3","Resize"));
|
2000-01-23 23:33:29 +00:00
|
|
|
|
2001-05-03 08:06:28 +00:00
|
|
|
// custom button positions
|
|
|
|
config->setGroup("Style");
|
|
|
|
d->custom_button_positions = config->readBoolEntry("CustomButtonPositions", false);
|
2001-05-22 07:36:26 +00:00
|
|
|
if (d->custom_button_positions) {
|
2001-05-03 08:06:28 +00:00
|
|
|
d->title_buttons_left = config->readEntry("ButtonsOnLeft", "MS");
|
|
|
|
d->title_buttons_right = config->readEntry("ButtonsOnRight", "HIAX");
|
2001-05-22 07:36:26 +00:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
d->title_buttons_left = "MS";
|
|
|
|
d->title_buttons_right = "HIAX";
|
|
|
|
}
|
2001-06-07 18:17:24 +00:00
|
|
|
|
2001-07-01 10:10:17 +00:00
|
|
|
// button tooltips
|
|
|
|
d->show_tooltips = config->readBoolEntry("ShowToolTips", true);
|
|
|
|
|
2001-07-02 12:40:14 +00:00
|
|
|
// Read button tooltip animation effect from kdeglobals
|
|
|
|
// Since we want to allow users to enable window decoration tooltips
|
|
|
|
// and not kstyle tooltips and vise-versa, we don't read the
|
|
|
|
// "EffectNoTooltip" setting from kdeglobals.
|
|
|
|
KConfig globalConfig("kdeglobals");
|
|
|
|
globalConfig.setGroup("KDE");
|
|
|
|
d->fade_tooltips = globalConfig.readBoolEntry("EffectFadeTooltip", false);
|
|
|
|
d->animate_tooltips = globalConfig.readBoolEntry("EffectAnimateTooltip", false);
|
|
|
|
|
2001-04-22 05:39:17 +00:00
|
|
|
emit resetPlugin();
|
2000-01-23 23:33:29 +00:00
|
|
|
emit resetClients();
|
1999-11-29 02:06:41 +00:00
|
|
|
}
|
|
|
|
|
1999-11-25 23:12:32 +00:00
|
|
|
|
1999-11-29 02:06:41 +00:00
|
|
|
Options::WindowOperation Options::windowOperation(const QString &name){
|
|
|
|
if (name == "Move")
|
2001-01-20 03:55:42 +00:00
|
|
|
return MoveOp;
|
1999-11-29 02:06:41 +00:00
|
|
|
else if (name == "Resize")
|
2001-01-20 03:55:42 +00:00
|
|
|
return ResizeOp;
|
1999-11-29 02:06:41 +00:00
|
|
|
else if (name == "Maximize")
|
2001-01-20 03:55:42 +00:00
|
|
|
return MaximizeOp;
|
1999-11-29 02:06:41 +00:00
|
|
|
else if (name == "Iconify")
|
2001-01-20 03:55:42 +00:00
|
|
|
return IconifyOp;
|
1999-11-29 02:06:41 +00:00
|
|
|
else if (name == "Close")
|
2001-01-20 03:55:42 +00:00
|
|
|
return CloseOp;
|
1999-11-29 02:06:41 +00:00
|
|
|
else if (name == "Sticky")
|
2001-01-20 03:55:42 +00:00
|
|
|
return StickyOp;
|
1999-11-29 02:06:41 +00:00
|
|
|
else if (name == "Shade")
|
2001-01-20 03:55:42 +00:00
|
|
|
return ShadeOp;
|
1999-11-29 02:06:41 +00:00
|
|
|
else if (name == "Operations")
|
2001-01-20 03:55:42 +00:00
|
|
|
return OperationsOp;
|
2001-02-27 07:19:52 +00:00
|
|
|
else if (name == "Maximize (vertical only)")
|
|
|
|
return VMaximizeOp;
|
|
|
|
else if (name == "Maximize (horizontal only)")
|
|
|
|
return HMaximizeOp;
|
|
|
|
else if (name == "Lower")
|
|
|
|
return LowerOp;
|
1999-11-29 02:06:41 +00:00
|
|
|
return NoOp;
|
|
|
|
}
|
|
|
|
|
|
|
|
Options::MouseCommand Options::mouseCommand(const QString &name)
|
|
|
|
{
|
|
|
|
if (name == "Raise") return MouseRaise;
|
|
|
|
if (name == "Lower") return MouseLower;
|
|
|
|
if (name == "Operations menu") return MouseOperationsMenu;
|
|
|
|
if (name == "Toggle raise and lower") return MouseToggleRaiseAndLower;
|
|
|
|
if (name == "Activate and raise") return MouseActivateAndRaise;
|
|
|
|
if (name == "Activate and lower") return MouseActivateAndLower;
|
|
|
|
if (name == "Activate") return MouseActivate;
|
|
|
|
if (name == "Activate, raise and pass click") return MouseActivateRaiseAndPassClick;
|
|
|
|
if (name == "Activate and pass click") return MouseActivateAndPassClick;
|
|
|
|
if (name == "Move") return MouseMove;
|
|
|
|
if (name == "Resize") return MouseResize;
|
2001-04-02 08:31:58 +00:00
|
|
|
if (name == "Shade") return MouseShade;
|
1999-11-29 02:06:41 +00:00
|
|
|
if (name == "Nothing") return MouseNothing;
|
|
|
|
return MouseNothing;
|
1999-10-09 09:55:16 +00:00
|
|
|
}
|
2000-06-09 00:20:21 +00:00
|
|
|
|
2001-05-03 08:06:28 +00:00
|
|
|
QString Options::titleButtonsLeft()
|
2001-05-22 07:36:26 +00:00
|
|
|
{
|
2001-05-03 08:06:28 +00:00
|
|
|
return d->title_buttons_left;
|
2001-05-22 07:36:26 +00:00
|
|
|
}
|
2001-06-07 18:17:24 +00:00
|
|
|
|
2001-05-03 08:06:28 +00:00
|
|
|
QString Options::titleButtonsRight()
|
2001-05-22 07:36:26 +00:00
|
|
|
{
|
2001-05-03 08:06:28 +00:00
|
|
|
return d->title_buttons_right;
|
2001-05-22 07:36:26 +00:00
|
|
|
}
|
2001-06-07 18:17:24 +00:00
|
|
|
|
2001-05-03 08:06:28 +00:00
|
|
|
bool Options::customButtonPositions()
|
2001-05-22 07:36:26 +00:00
|
|
|
{
|
2001-05-03 08:06:28 +00:00
|
|
|
return d->custom_button_positions;
|
2001-05-22 07:36:26 +00:00
|
|
|
}
|
2001-06-07 18:17:24 +00:00
|
|
|
|
2001-07-02 12:40:14 +00:00
|
|
|
bool Options::showTooltips()
|
2001-07-01 10:10:17 +00:00
|
|
|
{
|
|
|
|
return d->show_tooltips;
|
|
|
|
}
|
|
|
|
|
2001-07-02 12:40:14 +00:00
|
|
|
bool Options::fadeTooltips()
|
|
|
|
{
|
|
|
|
return d->fade_tooltips;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool Options::animateTooltips()
|
|
|
|
{
|
|
|
|
return d->animate_tooltips;
|
|
|
|
}
|
|
|
|
|
2001-11-03 00:05:33 +00:00
|
|
|
int Options::electricBorders()
|
2001-08-27 05:42:32 +00:00
|
|
|
{
|
|
|
|
return d->electric_borders;
|
|
|
|
}
|
|
|
|
|
2001-09-06 19:44:06 +00:00
|
|
|
int Options::electricBorderDelay()
|
|
|
|
{
|
|
|
|
return d->electric_border_delay;
|
|
|
|
}
|
|
|
|
|
2000-06-09 00:20:21 +00:00
|
|
|
#include "options.moc"
|
|
|
|
|