summaryrefslogtreecommitdiffstats
path: root/twin/kcmtwin/twinoptions/windows.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'twin/kcmtwin/twinoptions/windows.cpp')
-rw-r--r--twin/kcmtwin/twinoptions/windows.cpp718
1 files changed, 440 insertions, 278 deletions
diff --git a/twin/kcmtwin/twinoptions/windows.cpp b/twin/kcmtwin/twinoptions/windows.cpp
index 66249d474..9d8e8d617 100644
--- a/twin/kcmtwin/twinoptions/windows.cpp
+++ b/twin/kcmtwin/twinoptions/windows.cpp
@@ -29,6 +29,7 @@
#include <tqslider.h>
#include <tqwhatsthis.h>
#include <tqvbuttongroup.h>
+#include <tqvbox.h>
#include <tqcheckbox.h>
#include <tqradiobutton.h>
#include <tqlabel.h>
@@ -55,34 +56,39 @@
// twin config keywords
-#define KWIN_FOCUS "FocusPolicy"
-#define KWIN_PLACEMENT "Placement"
-#define KWIN_MOVE "MoveMode"
-#define KWIN_MINIMIZE_ANIM "AnimateMinimize"
-#define KWIN_MINIMIZE_ANIM_SPEED "AnimateMinimizeSpeed"
-#define KWIN_RESIZE_OPAQUE "ResizeMode"
-#define KWIN_GEOMETRY "GeometryTip"
-#define KWIN_AUTORAISE_INTERVAL "AutoRaiseInterval"
-#define KWIN_AUTORAISE "AutoRaise"
-#define KWIN_DELAYFOCUS_INTERVAL "DelayFocusInterval"
-#define KWIN_DELAYFOCUS "DelayFocus"
-#define KWIN_CLICKRAISE "ClickRaise"
-#define KWIN_ANIMSHADE "AnimateShade"
-#define KWIN_MOVE_RESIZE_MAXIMIZED "MoveResizeMaximizedWindows"
-#define KWIN_ALTTABMODE "AltTabStyle"
-#define KWIN_TRAVERSE_ALL "TraverseAll"
-#define KWIN_SHOW_POPUP "ShowPopup"
-#define KWIN_ROLL_OVER_DESKTOPS "RollOverDesktops"
-#define KWIN_SHADEHOVER "ShadeHover"
-#define KWIN_SHADEHOVER_INTERVAL "ShadeHoverInterval"
-#define KWIN_FOCUS_STEALING "FocusStealingPreventionLevel"
-#define KWIN_HIDE_UTILITY "HideUtilityWindowsForInactive"
-#define KWIN_SEPARATE_SCREEN_FOCUS "SeparateScreenFocus"
-#define KWIN_ACTIVE_MOUSE_SCREEN "ActiveMouseScreen"
-
-// kwm config keywords
-#define KWM_ELECTRIC_BORDER "ElectricBorders"
-#define KWM_ELECTRIC_BORDER_DELAY "ElectricBorderDelay"
+#define KWIN_FOCUS "FocusPolicy"
+#define KWIN_PLACEMENT "Placement"
+#define KWIN_MOVE_MODE "MoveMode"
+#define KWIN_RESIZE_MODE "ResizeMode"
+#define KWIN_TILING_MODE "TilingMode"
+#define KWIN_MINIMIZE_ANIM "AnimateMinimize"
+#define KWIN_MINIMIZE_ANIM_SPEED "AnimateMinimizeSpeed"
+#define KWIN_GEOMETRY "GeometryTip"
+#define KWIN_AUTORAISE_INTERVAL "AutoRaiseInterval"
+#define KWIN_AUTORAISE "AutoRaise"
+#define KWIN_DELAYFOCUS_INTERVAL "DelayFocusInterval"
+#define KWIN_DELAYFOCUS "DelayFocus"
+#define KWIN_CLICKRAISE "ClickRaise"
+#define KWIN_ANIMSHADE "AnimateShade"
+#define KWIN_MOVE_RESIZE_MAXIMIZED "MoveResizeMaximizedWindows"
+#define KWIN_RESET_MAX_WIN_GEOM "ResetMaximizedWindowGeometry"
+#define KWIN_ALTTABMODE "AltTabStyle"
+#define KWIN_TRAVERSE_ALL "TraverseAll"
+#define KWIN_SHOW_POPUP "ShowPopup"
+#define KWIN_ROLL_OVER_DESKTOPS "RollOverDesktops"
+#define KWIN_SHADEHOVER "ShadeHover"
+#define KWIN_SHADEHOVER_INTERVAL "ShadeHoverInterval"
+#define KWIN_FOCUS_STEALING "FocusStealingPreventionLevel"
+#define KWIN_HIDE_UTILITY "HideUtilityWindowsForInactive"
+#define KWIN_SEPARATE_SCREEN_FOCUS "SeparateScreenFocus"
+#define KWIN_ACTIVE_MOUSE_SCREEN "ActiveMouseScreen"
+#define KWIN_ACTIVE_BORDERS "ActiveBorders"
+#define KWIN_ACTIVE_BORDER_DELAY "ActiveBorderDelay"
+#define KWIN_ACTIVE_BORDER_DISTANCE "ActiveBorderDistance"
+
+// legacy options
+#define KWIN_OLD_ACTIVE_BORDERS "ElectricBorders"
+#define KWIN_OLD_ACTIVE_BORDER_DELAY "ElectricBorderDelay"
//CT 15mar 98 - magics
#define KWM_BRDR_SNAP_ZONE "BorderSnapZone"
@@ -124,7 +130,7 @@ KFocusConfig::KFocusConfig (bool _standAlone, TDEConfig *_config, TQWidget * par
// focus policy
fcsBox = new TQButtonGroup(i18n("Focus"),this);
- fcsBox->setColumnLayout( 0, Qt::Horizontal );
+ fcsBox->setColumnLayout( 0, TQt::Horizontal );
TQBoxLayout *fLay = new TQVBoxLayout(fcsBox->layout(),
KDialog::spacingHint());
@@ -137,7 +143,7 @@ KFocusConfig::KFocusConfig (bool _standAlone, TDEConfig *_config, TQWidget * par
focusCombo->insertItem(i18n("Focus Follows Mouse"), FOCUS_FOLLOWS_MOUSE);
focusCombo->insertItem(i18n("Focus Under Mouse"), FOCUS_UNDER_MOUSE);
focusCombo->insertItem(i18n("Focus Strictly Under Mouse"), FOCUS_STRICTLY_UNDER_MOUSE);
- cLay->addWidget(focusCombo,1 ,Qt::AlignLeft);
+ cLay->addWidget(focusCombo,1 ,TQt::AlignLeft);
fLabel->setBuddy(focusCombo);
// FIXME, when more policies have been added to TWin
@@ -163,35 +169,35 @@ KFocusConfig::KFocusConfig (bool _standAlone, TDEConfig *_config, TQWidget * par
TQWhatsThis::add( focusCombo, wtstr);
TQWhatsThis::add(fLabel, wtstr);
- connect(focusCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setAutoRaiseEnabled()) );
+ connect(focusCombo, TQ_SIGNAL(activated(int)), this, TQ_SLOT(setAutoRaiseEnabled()) );
// autoraise delay
autoRaiseOn = new TQCheckBox(i18n("Auto &raise"), fcsBox);
fLay->addWidget(autoRaiseOn);
- connect(autoRaiseOn,TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(autoRaiseOnTog(bool)));
+ connect(autoRaiseOn,TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(autoRaiseOnTog(bool)));
autoRaise = new KIntNumInput(500, fcsBox);
- autoRaise->setLabel(i18n("Dela&y:"), Qt::AlignVCenter|Qt::AlignLeft);
+ autoRaise->setLabel(i18n("Dela&y:"), TQt::AlignVCenter|TQt::AlignLeft);
autoRaise->setRange(0, 3000, 100, true);
autoRaise->setSteps(100,100);
autoRaise->setSuffix(i18n(" msec"));
fLay->addWidget(autoRaise);
- connect(focusCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(setDelayFocusEnabled()) );
+ connect(focusCombo, TQ_SIGNAL(activated(int)), this, TQ_SLOT(setDelayFocusEnabled()) );
delayFocusOn = new TQCheckBox(i18n("Delay focus"), fcsBox);
fLay->addWidget(delayFocusOn);
- connect(delayFocusOn,TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(delayFocusOnTog(bool)));
+ connect(delayFocusOn,TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(delayFocusOnTog(bool)));
delayFocus = new KIntNumInput(500, fcsBox);
- delayFocus->setLabel(i18n("Dela&y:"), Qt::AlignVCenter|Qt::AlignLeft);
+ delayFocus->setLabel(i18n("Dela&y:"), TQt::AlignVCenter|TQt::AlignLeft);
delayFocus->setRange(0, 3000, 100, true);
delayFocus->setSteps(100,100);
delayFocus->setSuffix(i18n(" msec"));
fLay->addWidget(delayFocus);
clickRaiseOn = new TQCheckBox(i18n("Click &raises active window"), fcsBox);
- connect(clickRaiseOn,TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(clickRaiseOnTog(bool)));
+ connect(clickRaiseOn,TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(clickRaiseOnTog(bool)));
fLay->addWidget(clickRaiseOn);
// fLay->addColSpacing(0,TQMAX(autoRaiseOn->sizeHint().width(),
@@ -206,7 +212,7 @@ KFocusConfig::KFocusConfig (bool _standAlone, TDEConfig *_config, TQWidget * par
focusStealing->insertItem( i18n( "Focus Stealing Prevention Level", "High" ));
focusStealing->insertItem( i18n( "Focus Stealing Prevention Level", "Extreme" ));
focusStealingLabel->setBuddy( focusStealing );
- cLay->addWidget(focusStealing,2 ,Qt::AlignLeft);
+ cLay->addWidget(focusStealing,2 ,TQt::AlignLeft);
wtstr = i18n( "<p>This option specifies how much TWin will try to prevent unwanted focus stealing "
"caused by unexpected activation of new windows. (Note: This feature does not "
"work with the Focus Under Mouse or Focus Strictly Under Mouse focus policies.)"
@@ -228,7 +234,7 @@ KFocusConfig::KFocusConfig (bool _standAlone, TDEConfig *_config, TQWidget * par
"in the Notifications control module.</p>" );
TQWhatsThis::add( focusStealing, wtstr );
TQWhatsThis::add( focusStealingLabel, wtstr );
-
+
TQWhatsThis::add( autoRaiseOn, i18n("When this option is enabled, a window in the background will automatically"
" come to the front when the mouse pointer has been over it for some time.") );
wtstr = i18n("This is the delay after which the window that the mouse pointer is over will automatically"
@@ -257,10 +263,10 @@ KFocusConfig::KFocusConfig (bool _standAlone, TDEConfig *_config, TQWidget * par
" with the focused window. This option is by default disabled for Click to focus and"
" enabled for other focus policies." );
TQWhatsThis::add( activeMouseScreen, wtstr );
- connect(focusCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateActiveMouseScreen()));
+ connect(focusCombo, TQ_SIGNAL(activated(int)), this, TQ_SLOT(updateActiveMouseScreen()));
if (!TQApplication::desktop()->isVirtualDesktop() ||
- TQApplication::desktop()->numScreens() == 1) // No Ximerama
+ TQApplication::desktop()->numScreens() == 1) // No Ximerama
{
separateScreenFocus->hide();
activeMouseScreen->hide();
@@ -269,7 +275,7 @@ KFocusConfig::KFocusConfig (bool _standAlone, TDEConfig *_config, TQWidget * par
lay->addWidget(fcsBox);
kbdBox = new TQButtonGroup(i18n("Navigation"), this);
- kbdBox->setColumnLayout( 0, Qt::Horizontal );
+ kbdBox->setColumnLayout( 0, TQt::Horizontal );
TQVBoxLayout *kLay = new TQVBoxLayout(kbdBox->layout(), KDialog::spacingHint());
altTabPopup = new TQCheckBox( i18n("Show window list while switching windows"), kbdBox );
@@ -285,7 +291,7 @@ KFocusConfig::KFocusConfig (bool _standAlone, TDEConfig *_config, TQWidget * par
" is pressed, with no popup widget. In addition, the previously"
" activated window will be sent to the back in this mode.");
TQWhatsThis::add( altTabPopup, wtstr );
- connect(focusCombo, TQT_SIGNAL(activated(int)), this, TQT_SLOT(updateAltTabMode()));
+ connect(focusCombo, TQ_SIGNAL(activated(int)), this, TQ_SLOT(updateAltTabMode()));
traverseAll = new TQCheckBox( i18n( "&Traverse windows on all desktops" ), kbdBox );
kLay->addWidget( traverseAll );
@@ -313,17 +319,17 @@ KFocusConfig::KFocusConfig (bool _standAlone, TDEConfig *_config, TQWidget * par
lay->addStretch();
// Any changes goes to slotChanged()
- connect(focusCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
- connect(fcsBox, TQT_SIGNAL(clicked(int)), TQT_SLOT(changed()));
- connect(autoRaise, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
- connect(delayFocus, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
- connect(separateScreenFocus, TQT_SIGNAL(clicked()), TQT_SLOT(changed()));
- connect(activeMouseScreen, TQT_SIGNAL(clicked()), TQT_SLOT(changed()));
- connect(altTabPopup, TQT_SIGNAL(clicked()), TQT_SLOT(changed()));
- connect(traverseAll, TQT_SIGNAL(clicked()), TQT_SLOT(changed()));
- connect(rollOverDesktops, TQT_SIGNAL(clicked()), TQT_SLOT(changed()));
- connect(showPopupinfo, TQT_SIGNAL(clicked()), TQT_SLOT(changed()));
- connect(focusStealing, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
+ connect(focusCombo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed()));
+ connect(fcsBox, TQ_SIGNAL(clicked(int)), TQ_SLOT(changed()));
+ connect(autoRaise, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed()));
+ connect(delayFocus, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed()));
+ connect(separateScreenFocus, TQ_SIGNAL(clicked()), TQ_SLOT(changed()));
+ connect(activeMouseScreen, TQ_SIGNAL(clicked()), TQ_SLOT(changed()));
+ connect(altTabPopup, TQ_SIGNAL(clicked()), TQ_SLOT(changed()));
+ connect(traverseAll, TQ_SIGNAL(clicked()), TQ_SLOT(changed()));
+ connect(rollOverDesktops, TQ_SIGNAL(clicked()), TQ_SLOT(changed()));
+ connect(showPopupinfo, TQ_SIGNAL(clicked()), TQ_SLOT(changed()));
+ connect(focusStealing, TQ_SIGNAL(activated(int)), TQ_SLOT(changed()));
load();
}
@@ -493,7 +499,7 @@ void KFocusConfig::load( void )
setClickRaise(key != "off");
setAutoRaiseEnabled(); // this will disable/hide the auto raise delay widget if focus==click
setDelayFocusEnabled();
-
+
setSeparateScreenFocus( config->readBoolEntry(KWIN_SEPARATE_SCREEN_FOCUS, false));
// on by default for non click to focus policies
setActiveMouseScreen( config->readBoolEntry(KWIN_ACTIVE_MOUSE_SCREEN, focusCombo->currentItem() != 0 ));
@@ -607,6 +613,220 @@ void KFocusConfig::defaults()
emit TDECModule::changed(true);
}
+KActiveBorderConfig::~KActiveBorderConfig() {
+ if (standAlone) delete config;
+}
+
+KActiveBorderConfig::KActiveBorderConfig(bool _standAlone, TDEConfig *_config, TQWidget *parent, const char*)
+ : TDECModule(parent, "kcmkwm"), config(_config), standAlone(_standAlone) {
+
+ TQBoxLayout *lay = new TQVBoxLayout(this, 0, KDialog::spacingHint());
+
+ active_box = new TQButtonGroup(i18n("Active Desktop Borders"), this);
+ TQVBoxLayout *active_vbox = new TQVBoxLayout(active_box);
+ active_vbox->setSpacing(5);
+ active_vbox->setMargin(15);
+ TQWhatsThis::add( active_box, i18n("If this option is enabled, moving the mouse to a screen border"
+ " will perform an action. It will either change your desktop or tile the window that is currently"
+ " dragged.") );
+
+ TQLabel *active_func_label = new TQLabel(i18n("Function:"), active_box);
+
+ active_disable = new TQRadioButton(i18n("D&isabled"), active_box);
+
+ active_desktop = new TQRadioButton(i18n("Switch &desktop"), active_box);
+ active_desktop_conf = new TQWidget(active_box);
+ TQHBoxLayout *active_desktop_conf_hbox = new TQHBoxLayout(active_desktop_conf);
+ active_desktop_conf_hbox->addSpacing(20);
+ active_desktop_conf_hbox->setAutoAdd(true);
+ active_move = new TQCheckBox(i18n("Switch desktop only when &moving a window"), active_desktop_conf);
+
+ active_tile = new TQRadioButton(i18n("Tile &window"), active_box);
+ active_tile_conf = new TQWidget(active_box);
+ TQHBoxLayout *active_tile_conf_hbox = new TQHBoxLayout(active_tile_conf);
+ active_tile_conf_hbox->addSpacing(20);
+ TQVBox *active_tile_conf_vbox = new TQVBox(active_tile_conf);
+ active_tile_conf_hbox->addWidget(active_tile_conf_vbox);
+ active_maximize = new TQCheckBox(i18n("Maximize windows by dragging them to the &top of the screen"), active_tile_conf_vbox);
+ tilingOpaque = new TQCheckBox(i18n("Display content &while tiling windows"), active_tile_conf_vbox);
+ TQWhatsThis::add(tilingOpaque, i18n("Enable this option if you want a window's"
+ " content to be shown while tiling it,"
+ " instead of just showing a window"
+ " 'skeleton'. The result may not be "
+ " satisfying on slow machines."));
+
+ delays = new KIntNumInput(10, active_box);
+ delays->setRange(0, MAX_EDGE_RES, 50, true);
+ delays->setSuffix(i18n(" msec"));
+ delays->setLabel(i18n("Border &activation delay:"));
+ TQWhatsThis::add( delays, i18n("Here you can set a delay for the activation of"
+ " active borders feature. The selected action will be performed after the mouse "
+ " has been pushed against a screen border for the specified number of milliseconds.") );
+
+ distance = new KIntNumInput(10, active_box);
+ distance->setRange(1, 100, 1, true);
+ distance->setSuffix(i18n(" px"));
+ distance->setLabel(i18n("Border &activation distance:"));
+ TQWhatsThis::add( distance, i18n("The distance from which an active border can"
+ " be activated. A lower value requires you to push repeatedly into the edge."
+ " Setting this to a higher value (e.g. 30) activates the borders when the"
+ " mouse is close enough, making them easier to activate but also more prone"
+ " to false activations."));
+
+ active_vbox->addSpacing(10);
+ active_vbox->addWidget(active_func_label);
+ active_vbox->addWidget(active_disable);
+ active_vbox->addWidget(active_desktop);
+ active_vbox->addWidget(active_desktop_conf);
+ active_vbox->addWidget(active_tile);
+ active_vbox->addWidget(active_tile_conf);
+ active_vbox->addSpacing(15);
+ active_vbox->addWidget(delays);
+ active_vbox->addWidget(distance);
+ active_vbox->addSpacing(15);
+ active_vbox->addWidget(tilingOpaque);
+
+ connect(active_box, TQ_SIGNAL(clicked(int)), this, TQ_SLOT(updateActiveBorders()));
+
+ // Any changes go to slotChanged()
+ connect(active_box, TQ_SIGNAL(clicked(int)), this, TQ_SLOT(changed()));
+ connect(active_move, TQ_SIGNAL(clicked()), this, TQ_SLOT(changed()));
+ connect(active_maximize, TQ_SIGNAL(clicked()), this, TQ_SLOT(changed()));
+ connect(delays, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(changed()));
+ connect(distance, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(changed()));
+ connect(tilingOpaque, TQ_SIGNAL(clicked()), this, TQ_SLOT(changed()));
+
+ lay->addWidget(active_box);
+ lay->addStretch();
+ load();
+}
+
+void KActiveBorderConfig::load() {
+ config->setGroup("Windows");
+
+ // compatibility with old option names
+ int active_borders = config->readNumEntry(KWIN_ACTIVE_BORDERS, -1);
+ if (active_borders == -1) {
+ active_borders = config->readNumEntry(KWIN_OLD_ACTIVE_BORDERS, 0);
+ }
+
+ int active_borders_delay = config->readNumEntry(KWIN_ACTIVE_BORDER_DELAY, -1);
+ if (active_borders_delay == -1) {
+ active_borders_delay = config->readNumEntry(KWIN_OLD_ACTIVE_BORDER_DELAY, 150);
+ }
+
+ setActiveBorders(active_borders);
+ setActiveBorderDelay(active_borders_delay);
+ setActiveBorderDistance(config->readNumEntry(KWIN_ACTIVE_BORDER_DISTANCE, 10));
+
+ TQString tilingMode = config->readEntry(KWIN_TILING_MODE, "Opaque");
+ if (tilingMode == "Opaque")
+ setTilingMode(OPAQUE);
+ else if (tilingMode == "Transparent")
+ setTilingMode(TRANSPARENT);
+
+ emit TDECModule::changed(false);
+}
+
+void KActiveBorderConfig::save() {
+ config->setGroup("Windows");
+
+ config->writeEntry(KWIN_ACTIVE_BORDERS, getActiveBorders());
+ config->writeEntry(KWIN_ACTIVE_BORDER_DELAY, getActiveBorderDelay());
+ config->writeEntry(KWIN_ACTIVE_BORDER_DISTANCE, getActiveBorderDistance());
+
+ // remove replaced legacy entries
+ config->deleteEntry(KWIN_OLD_ACTIVE_BORDERS);
+ config->deleteEntry(KWIN_OLD_ACTIVE_BORDER_DELAY);
+
+ int tilingMode = getTilingMode();
+ if (tilingMode == OPAQUE)
+ config->writeEntry(KWIN_TILING_MODE, "Opaque");
+ else
+ config->writeEntry(KWIN_TILING_MODE, "Transparent");
+
+ if (standAlone)
+ {
+ config->sync();
+ if (!kapp->dcopClient()->isAttached())
+ kapp->dcopClient()->attach();
+ kapp->dcopClient()->send("twin*", "", "reconfigure()", TQString(""));
+ }
+ emit TDECModule::changed(false);
+}
+
+void KActiveBorderConfig::defaults() {
+ setActiveBorders(0);
+ setActiveBorderDelay(150);
+ setActiveBorderDistance(10);
+ setTilingMode(TRANSPARENT);
+ emit TDECModule::changed(true);
+}
+
+int KActiveBorderConfig::getTilingMode() {
+ return tilingOpaque->isChecked() ? OPAQUE : TRANSPARENT;
+}
+
+void KActiveBorderConfig::setTilingMode(int opaque) {
+ tilingOpaque->setChecked(opaque == OPAQUE);
+}
+
+void KActiveBorderConfig::updateActiveBorders() {
+ active_desktop_conf->setEnabled(active_desktop->isChecked());
+ active_tile_conf->setEnabled(active_tile->isChecked());
+}
+
+int KActiveBorderConfig::getActiveBorders() {
+ if (active_desktop->isChecked())
+ {
+ return active_move->isChecked() ? 1 : 2;
+ }
+
+ if (active_tile->isChecked())
+ {
+ return active_maximize->isChecked() ? 4 : 3;
+ }
+
+ return 0;
+}
+
+int KActiveBorderConfig::getActiveBorderDelay() {
+ return delays->value();
+}
+
+int KActiveBorderConfig::getActiveBorderDistance() {
+ return distance->value();
+}
+
+void KActiveBorderConfig::setActiveBorders(int i) {
+ switch(i)
+ {
+ case 1:
+ active_move->setChecked(true);
+ case 2:
+ active_desktop->setChecked(true);
+ break;
+ case 4:
+ active_maximize->setChecked(true);
+ case 3:
+ active_tile->setChecked(true);
+ break;
+ default:
+ active_disable->setChecked(true);
+ break;
+ }
+ updateActiveBorders();
+}
+
+void KActiveBorderConfig::setActiveBorderDelay(int delay)
+{
+ delays->setValue(delay);
+}
+
+void KActiveBorderConfig::setActiveBorderDistance(int d) {
+ distance->setValue(d);
+}
+
KAdvancedConfig::~KAdvancedConfig ()
{
if (standAlone)
@@ -640,10 +860,10 @@ KAdvancedConfig::KAdvancedConfig (bool _standAlone, TDEConfig *_config, TQWidget
shadeHoverOn = new TQCheckBox(i18n("&Enable hover"), shBox);
- connect(shadeHoverOn, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(shadeHoverChanged(bool)));
+ connect(shadeHoverOn, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(shadeHoverChanged(bool)));
shadeHover = new KIntNumInput(500, shBox);
- shadeHover->setLabel(i18n("Dela&y:"), Qt::AlignVCenter|Qt::AlignLeft);
+ shadeHover->setLabel(i18n("Dela&y:"), TQt::AlignVCenter|TQt::AlignLeft);
shadeHover->setRange(0, 3000, 100, true);
shadeHover->setSteps(100, 100);
shadeHover->setSuffix(i18n(" msec"));
@@ -658,42 +878,16 @@ KAdvancedConfig::KAdvancedConfig (bool _standAlone, TDEConfig *_config, TQWidget
lay->addWidget(shBox);
// Any changes goes to slotChanged()
- connect(animateShade, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(shadeHoverOn, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(shadeHover, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
-
- electricBox = new TQVButtonGroup(i18n("Active Desktop Borders"), this);
- electricBox->setMargin(15);
-
- TQWhatsThis::add( electricBox, i18n("If this option is enabled, moving the mouse to a screen border"
- " will change your desktop. This is e.g. useful if you want to drag windows from one desktop"
- " to the other.") );
- active_disable = new TQRadioButton(i18n("D&isabled"), electricBox);
- active_move = new TQRadioButton(i18n("Only &when moving windows"), electricBox);
- active_always = new TQRadioButton(i18n("A&lways enabled"), electricBox);
-
- delays = new KIntNumInput(10, electricBox);
- delays->setRange(0, MAX_EDGE_RES, 50, true);
- delays->setSuffix(i18n(" msec"));
- delays->setLabel(i18n("Desktop &switch delay:"));
- TQWhatsThis::add( delays, i18n("Here you can set a delay for switching desktops using the active"
- " borders feature. Desktops will be switched after the mouse has been pushed against a screen border"
- " for the specified number of milliseconds.") );
-
- connect( electricBox, TQT_SIGNAL(clicked(int)), this, TQT_SLOT(setEBorders()));
-
- // Any changes goes to slotChanged()
- connect(electricBox, TQT_SIGNAL(clicked(int)), TQT_SLOT(changed()));
- connect(delays, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
-
- lay->addWidget(electricBox);
+ connect(animateShade, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(shadeHoverOn, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(shadeHover, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed()));
hideUtilityWindowsForInactive = new TQCheckBox( i18n( "Hide utility windows for inactive applications" ), this );
TQWhatsThis::add( hideUtilityWindowsForInactive,
- i18n( "When turned on, utility windows (tool windows, torn-off menus,...) of inactive applications will be"
+ i18n( "When turned on, utility windows (tool windows, torn-off menus,…) of inactive applications will be"
" hidden and will be shown only when the application becomes active. Note that applications"
" have to mark the windows with the proper window type for this feature to work." ));
- connect(hideUtilityWindowsForInactive, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
+ connect(hideUtilityWindowsForInactive, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
lay->addWidget( hideUtilityWindowsForInactive );
lay->addStretch();
@@ -736,9 +930,6 @@ void KAdvancedConfig::load( void )
setShadeHover(config->readBoolEntry(KWIN_SHADEHOVER, false));
setShadeHoverInterval(config->readNumEntry(KWIN_SHADEHOVER_INTERVAL, 250));
- setElectricBorders(config->readNumEntry(KWM_ELECTRIC_BORDER, 0));
- setElectricBorderDelay(config->readNumEntry(KWM_ELECTRIC_BORDER_DELAY, 150));
-
setHideUtilityWindowsForInactive( config->readBoolEntry( KWIN_HIDE_UTILITY, true ));
emit TDECModule::changed(false);
@@ -758,10 +949,6 @@ void KAdvancedConfig::save( void )
v = getShadeHoverInterval();
if (v<0) v = 0;
config->writeEntry(KWIN_SHADEHOVER_INTERVAL, v);
-
- config->writeEntry(KWM_ELECTRIC_BORDER, getElectricBorders());
- config->writeEntry(KWM_ELECTRIC_BORDER_DELAY,getElectricBorderDelay());
-
config->writeEntry(KWIN_HIDE_UTILITY, hideUtilityWindowsForInactive->isChecked());
if (standAlone)
@@ -779,47 +966,10 @@ void KAdvancedConfig::defaults()
setAnimateShade(true);
setShadeHover(false);
setShadeHoverInterval(250);
- setElectricBorders(0);
- setElectricBorderDelay(150);
setHideUtilityWindowsForInactive( true );
emit TDECModule::changed(true);
}
-void KAdvancedConfig::setEBorders()
-{
- delays->setEnabled(!active_disable->isChecked());
-}
-
-int KAdvancedConfig::getElectricBorders()
-{
- if (active_move->isChecked())
- return 1;
- if (active_always->isChecked())
- return 2;
- return 0;
-}
-
-int KAdvancedConfig::getElectricBorderDelay()
-{
- return delays->value();
-}
-
-void KAdvancedConfig::setElectricBorders(int i){
- switch(i)
- {
- case 1: active_move->setChecked(true); break;
- case 2: active_always->setChecked(true); break;
- default: active_disable->setChecked(true); break;
- }
- setEBorders();
-}
-
-void KAdvancedConfig::setElectricBorderDelay(int delay)
-{
- delays->setValue(delay);
-}
-
-
KMovingConfig::~KMovingConfig ()
{
if (standAlone)
@@ -833,24 +983,24 @@ KMovingConfig::KMovingConfig (bool _standAlone, TDEConfig *_config, TQWidget *pa
TQBoxLayout *lay = new TQVBoxLayout (this, 0, KDialog::spacingHint());
windowsBox = new TQButtonGroup(i18n("Windows"), this);
- windowsBox->setColumnLayout( 0, Qt::Horizontal );
+ windowsBox->setColumnLayout( 0, TQt::Horizontal );
TQBoxLayout *wLay = new TQVBoxLayout (windowsBox->layout(), KDialog::spacingHint());
TQBoxLayout *bLay = new TQVBoxLayout;
wLay->addLayout(bLay);
- opaque = new TQCheckBox(i18n("Di&splay content in moving windows"), windowsBox);
- bLay->addWidget(opaque);
- TQWhatsThis::add( opaque, i18n("Enable this option if you want a window's content to be fully shown"
- " while moving it, instead of just showing a window 'skeleton'. The result may not be satisfying"
- " on slow machines without graphic acceleration.") );
+ moveOpaque = new TQCheckBox(i18n("Di&splay content in moving windows"), windowsBox);
+ bLay->addWidget(moveOpaque);
+ TQWhatsThis::add(moveOpaque, i18n("Enable this option if you want a window's content to be fully shown"
+ " while moving it, instead of just showing a window 'skeleton'. The result may not be satisfying"
+ " on slow machines without graphic acceleration."));
- resizeOpaqueOn = new TQCheckBox(i18n("Display content in &resizing windows"), windowsBox);
- bLay->addWidget(resizeOpaqueOn);
- TQWhatsThis::add( resizeOpaqueOn, i18n("Enable this option if you want a window's content to be shown"
- " while resizing it, instead of just showing a window 'skeleton'. The result may not be satisfying"
- " on slow machines.") );
+ resizeOpaque = new TQCheckBox(i18n("Display content in &resizing windows"), windowsBox);
+ bLay->addWidget(resizeOpaque);
+ TQWhatsThis::add(resizeOpaque, i18n("Enable this option if you want a window's content to be shown"
+ " while resizing it, instead of just showing a window 'skeleton'. The result may not be satisfying"
+ " on slow machines."));
geometryTipOn = new TQCheckBox(i18n("Display window &geometry when moving or resizing"), windowsBox);
bLay->addWidget(geometryTipOn);
@@ -860,7 +1010,7 @@ KMovingConfig::KMovingConfig (bool _standAlone, TDEConfig *_config, TQWidget *pa
" its size."));
TQGridLayout *rLay = new TQGridLayout(2,3);
- bLay->addLayout(TQT_TQLAYOUT(rLay));
+ bLay->addLayout(rLay);
rLay->setColStretch(0,0);
rLay->setColStretch(1,1);
@@ -870,22 +1020,22 @@ KMovingConfig::KMovingConfig (bool _standAlone, TDEConfig *_config, TQWidget *pa
" windows are minimized or restored." ) );
rLay->addWidget(minimizeAnimOn,0,0);
- minimizeAnimSlider = new TQSlider(0,10,10,0,Qt::Horizontal, windowsBox);
+ minimizeAnimSlider = new TQSlider(0,10,10,0,TQt::Horizontal, windowsBox);
minimizeAnimSlider->setSteps(1, 1);
// TQSlider::Below clashes with a X11/X.h #define
#undef Below
minimizeAnimSlider->setTickmarks(TQSlider::Below);
rLay->addMultiCellWidget(minimizeAnimSlider,0,0,1,2);
- connect(minimizeAnimOn, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setMinimizeAnim(bool)));
- connect(minimizeAnimSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(setMinimizeAnimSpeed(int)));
+ connect(minimizeAnimOn, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(setMinimizeAnim(bool)));
+ connect(minimizeAnimSlider, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(setMinimizeAnimSpeed(int)));
minimizeAnimSlowLabel= new TQLabel(i18n("Slow"),windowsBox);
- minimizeAnimSlowLabel->setAlignment(Qt::AlignTop|Qt::AlignLeft);
+ minimizeAnimSlowLabel->setAlignment(TQt::AlignTop|TQt::AlignLeft);
rLay->addWidget(minimizeAnimSlowLabel,1,1);
minimizeAnimFastLabel= new TQLabel(i18n("Fast"),windowsBox);
- minimizeAnimFastLabel->setAlignment(Qt::AlignTop|Qt::AlignRight);
+ minimizeAnimFastLabel->setAlignment(TQt::AlignTop|TQt::AlignRight);
rLay->addWidget(minimizeAnimFastLabel,1,2);
wtstr = i18n("Here you can set the speed of the animation shown when windows are"
@@ -900,6 +1050,11 @@ KMovingConfig::KMovingConfig (bool _standAlone, TDEConfig *_config, TQWidget *pa
" and allows you to move or resize them,"
" just like for normal windows"));
+ resetMaximizedWindowGeometry = new TQCheckBox( i18n("Restore size of maximized/tiled windows when moving"), windowsBox);
+ bLay->addWidget(resetMaximizedWindowGeometry);
+ TQWhatsThis::add(resetMaximizedWindowGeometry, i18n("If this feature is enabled, dragging a maximized or tiled window"
+ " will restore the window to its original size."));
+
TQBoxLayout *vLay = new TQHBoxLayout(bLay);
TQLabel *plcLabel = new TQLabel(i18n("&Placement:"),windowsBox);
@@ -935,7 +1090,7 @@ KMovingConfig::KMovingConfig (bool _standAlone, TDEConfig *_config, TQWidget *pa
plcLabel->setBuddy(placementCombo);
vLay->addWidget(plcLabel, 0);
- vLay->addWidget(placementCombo, 1, Qt::AlignLeft);
+ vLay->addWidget(placementCombo, 1, TQt::AlignLeft);
bLay->addSpacing(10);
@@ -988,34 +1143,25 @@ KMovingConfig::KMovingConfig (bool _standAlone, TDEConfig *_config, TQWidget *pa
load();
// Any changes goes to slotChanged()
- connect( opaque, TQT_SIGNAL(clicked()), TQT_SLOT(changed()));
- connect( resizeOpaqueOn, TQT_SIGNAL(clicked()), TQT_SLOT(changed()));
- connect( geometryTipOn, TQT_SIGNAL(clicked()), TQT_SLOT(changed()));
- connect( minimizeAnimOn, TQT_SIGNAL(clicked() ), TQT_SLOT(changed()));
- connect( minimizeAnimSlider, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
- connect( moveResizeMaximized, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect( placementCombo, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
- connect( BrdrSnap, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
- connect( BrdrSnap, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotBrdrSnapChanged(int)));
- connect( WndwSnap, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
- connect( WndwSnap, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(slotWndwSnapChanged(int)));
- connect( OverlapSnap, TQT_SIGNAL(clicked()), TQT_SLOT(changed()));
+ connect( moveOpaque, TQ_SIGNAL(clicked()), TQ_SLOT(changed()));
+ connect( resizeOpaque, TQ_SIGNAL(clicked()), TQ_SLOT(changed()));
+ connect( geometryTipOn, TQ_SIGNAL(clicked()), TQ_SLOT(changed()));
+ connect( minimizeAnimOn, TQ_SIGNAL(clicked() ), TQ_SLOT(changed()));
+ connect( minimizeAnimSlider, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed()));
+ connect( moveResizeMaximized, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect( resetMaximizedWindowGeometry, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect( placementCombo, TQ_SIGNAL(activated(int)), TQ_SLOT(changed()));
+ connect( BrdrSnap, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed()));
+ connect( BrdrSnap, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(slotBrdrSnapChanged(int)));
+ connect( WndwSnap, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed()));
+ connect( WndwSnap, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(slotWndwSnapChanged(int)));
+ connect( OverlapSnap, TQ_SIGNAL(clicked()), TQ_SLOT(changed()));
// To get suffix to BrdrSnap and WndwSnap inputs with default values.
slotBrdrSnapChanged(BrdrSnap->value());
slotWndwSnapChanged(WndwSnap->value());
}
-int KMovingConfig::getMove()
-{
- return (opaque->isChecked())? OPAQUE : TRANSPARENT;
-}
-
-void KMovingConfig::setMove(int trans)
-{
- opaque->setChecked(trans == OPAQUE);
-}
-
void KMovingConfig::setGeometryTip(bool showGeometryTip)
{
geometryTipOn->setChecked(showGeometryTip);
@@ -1060,20 +1206,33 @@ void KMovingConfig::setMinimizeAnimSpeed(int speed)
minimizeAnimSlider->setValue(speed);
}
-int KMovingConfig::getResizeOpaque()
+int KMovingConfig::getMoveMode() {
+ return moveOpaque->isChecked() ? OPAQUE : TRANSPARENT;
+}
+
+void KMovingConfig::setMoveMode(int opaque)
+{
+ moveOpaque->setChecked(opaque == OPAQUE);
+}
+
+int KMovingConfig::getResizeMode()
{
- return (resizeOpaqueOn->isChecked())? RESIZE_OPAQUE : RESIZE_TRANSPARENT;
+ return resizeOpaque->isChecked() ? OPAQUE : TRANSPARENT;
}
-void KMovingConfig::setResizeOpaque(int opaque)
+void KMovingConfig::setResizeMode(int opaque)
{
- resizeOpaqueOn->setChecked(opaque == RESIZE_OPAQUE);
+ resizeOpaque->setChecked(opaque == OPAQUE);
}
void KMovingConfig::setMoveResizeMaximized(bool a) {
moveResizeMaximized->setChecked(a);
}
+void KMovingConfig::setResetMaximizedWindowGeometry(bool a) {
+ resetMaximizedWindowGeometry->setChecked(a);
+}
+
void KMovingConfig::slotBrdrSnapChanged(int value) {
BrdrSnap->setSuffix(i18n(" pixel", " pixels", value));
}
@@ -1088,11 +1247,18 @@ void KMovingConfig::load( void )
config->setGroup( "Windows" );
- key = config->readEntry(KWIN_MOVE, "Opaque");
- if( key == "Transparent")
- setMove(TRANSPARENT);
- else if( key == "Opaque")
- setMove(OPAQUE);
+ // DF: please keep the default consistent with twin (options.cpp)
+ key = config->readEntry(KWIN_MOVE_MODE, "Opaque");
+ if (key == "Opaque")
+ setMoveMode(OPAQUE);
+ else if (key == "Transparent")
+ setMoveMode(TRANSPARENT);
+
+ key = config->readEntry(KWIN_RESIZE_MODE, "Opaque");
+ if (key == "Opaque")
+ setResizeMode(OPAQUE);
+ else if (key == "Transparent")
+ setResizeMode(TRANSPARENT);
//CT 17Jun1998 - variable animation speed from 0 (none!!) to 10 (max)
bool anim = config->readBoolEntry(KWIN_MINIMIZE_ANIM, true );
@@ -1102,13 +1268,6 @@ void KMovingConfig::load( void )
setMinimizeAnim( anim );
setMinimizeAnimSpeed( animSpeed );
- // DF: please keep the default consistent with twin (options.cpp line 145)
- key = config->readEntry(KWIN_RESIZE_OPAQUE, "Opaque");
- if( key == "Opaque")
- setResizeOpaque(RESIZE_OPAQUE);
- else if ( key == "Transparent")
- setResizeOpaque(RESIZE_TRANSPARENT);
-
//KS 10Jan2003 - Geometry Tip during window move/resize
bool showGeomTip = config->readBoolEntry(KWIN_GEOMETRY, false);
setGeometryTip( showGeomTip );
@@ -1149,6 +1308,7 @@ void KMovingConfig::load( void )
// }
setMoveResizeMaximized(config->readBoolEntry(KWIN_MOVE_RESIZE_MAXIMIZED, false));
+ setResetMaximizedWindowGeometry(config->readBoolEntry(KWIN_RESET_MAX_WIN_GEOM, false));
int v;
@@ -1172,16 +1332,22 @@ void KMovingConfig::save( void )
config->setGroup( "Windows" );
- v = getMove();
- if (v == TRANSPARENT)
- config->writeEntry(KWIN_MOVE,"Transparent");
+ v = getMoveMode();
+ if (v == OPAQUE)
+ config->writeEntry(KWIN_MOVE_MODE, "Opaque");
+ else
+ config->writeEntry(KWIN_MOVE_MODE, "Transparent");
+
+ v = getResizeMode();
+ if (v == OPAQUE)
+ config->writeEntry(KWIN_RESIZE_MODE, "Opaque");
else
- config->writeEntry(KWIN_MOVE,"Opaque");
+ config->writeEntry(KWIN_RESIZE_MODE, "Transparent");
config->writeEntry(KWIN_GEOMETRY, getGeometryTip());
// placement policy --- CT 31jan98 ---
- v =getPlacement();
+ v = getPlacement();
if (v == RANDOM_PLACEMENT)
config->writeEntry(KWIN_PLACEMENT, "Random");
else if (v == CASCADE_PLACEMENT)
@@ -1205,13 +1371,8 @@ void KMovingConfig::save( void )
config->writeEntry(KWIN_MINIMIZE_ANIM, getMinimizeAnim());
config->writeEntry(KWIN_MINIMIZE_ANIM_SPEED, getMinimizeAnimSpeed());
- v = getResizeOpaque();
- if (v == RESIZE_OPAQUE)
- config->writeEntry(KWIN_RESIZE_OPAQUE, "Opaque");
- else
- config->writeEntry(KWIN_RESIZE_OPAQUE, "Transparent");
-
config->writeEntry(KWIN_MOVE_RESIZE_MAXIMIZED, moveResizeMaximized->isChecked());
+ config->writeEntry(KWIN_RESET_MAX_WIN_GEOM, resetMaximizedWindowGeometry->isChecked());
config->writeEntry(KWM_BRDR_SNAP_ZONE,getBorderSnapZone());
@@ -1230,11 +1391,12 @@ void KMovingConfig::save( void )
void KMovingConfig::defaults()
{
- setMove(OPAQUE);
- setResizeOpaque(RESIZE_TRANSPARENT);
+ setMoveMode(OPAQUE);
+ setResizeMode(TRANSPARENT);
setGeometryTip(false);
setPlacement(SMART_PLACEMENT);
setMoveResizeMaximized(false);
+ setResetMaximizedWindowGeometry(false);
//copied from kcontrol/konq/twindesktop, aleXXX
setWindowSnapZone(KWM_WNDW_SNAP_ZONE_DEFAULT);
@@ -1297,12 +1459,12 @@ KTranslucencyConfig::KTranslucencyConfig (bool _standAlone, TDEConfig *_config,
TQWidget *tGroup = new TQWidget(tabW);
TQVBoxLayout *vLay = new TQVBoxLayout (tGroup,KDialog::marginHint(), KDialog::spacingHint());
vLay->addSpacing(11); // to get the proper gb top offset
-
+
onlyDecoTranslucent = new TQCheckBox(i18n("Apply translucency only to decoration"),tGroup);
vLay->addWidget(onlyDecoTranslucent);
-
+
vLay->addSpacing(11);
-
+
TQGridLayout *gLay = new TQGridLayout(vLay,4,2,KDialog::spacingHint());
gLay->setColStretch(1,1);
@@ -1440,7 +1602,7 @@ KTranslucencyConfig::KTranslucencyConfig (bool _standAlone, TDEConfig *_config,
TQLabel *label6 = new TQLabel(i18n("Shadow color:"),sGroup);
gLay2->addWidget(label6,7,0);
- shadowColor = new KColorButton(Qt::black,sGroup);
+ shadowColor = new KColorButton(TQt::black,sGroup);
gLay2->addWidget(shadowColor,7,1);
gLay2->setColStretch(1,1);
vLay2->addSpacing(11);
@@ -1478,84 +1640,84 @@ KTranslucencyConfig::KTranslucencyConfig (bool _standAlone, TDEConfig *_config,
lay->addWidget(useTranslucency);
lay->addWidget(tabW);
- connect(useTranslucency, TQT_SIGNAL(toggled(bool)), tabW, TQT_SLOT(setEnabled(bool)));
-
- connect(activeWindowTransparency, TQT_SIGNAL(toggled(bool)), activeWindowOpacity, TQT_SLOT(setEnabled(bool)));
- connect(inactiveWindowTransparency, TQT_SIGNAL(toggled(bool)), inactiveWindowOpacity, TQT_SLOT(setEnabled(bool)));
- connect(movingWindowTransparency, TQT_SIGNAL(toggled(bool)), movingWindowOpacity, TQT_SLOT(setEnabled(bool)));
- connect(dockWindowTransparency, TQT_SIGNAL(toggled(bool)), dockWindowOpacity, TQT_SLOT(setEnabled(bool)));
-
- connect(useTranslucency, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(onlyDecoTranslucent, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(activeWindowTransparency, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(inactiveWindowTransparency, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(movingWindowTransparency, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(dockWindowTransparency, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(keepAboveAsActive, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(disableARGB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(useOpenGL, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(useOpenGL, TQT_SIGNAL(toggled(bool)), blurBackground, TQT_SLOT(setEnabled(bool)));
- connect(blurBackground, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(useOpenGL, TQT_SIGNAL(toggled(bool)), greyscaleBackground, TQT_SLOT(setEnabled(bool)));
- connect(greyscaleBackground, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(useShadows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(useShadowsOnMenuWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(useShadowsOnToolTipWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(useShadowsOnDockWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(removeShadowsOnResize, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(removeShadowsOnMove, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
-
- connect(activeWindowOpacity, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
- connect(inactiveWindowOpacity, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
- connect(movingWindowOpacity, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
- connect(dockWindowOpacity, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
- connect(dockWindowShadowSize, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
- connect(menuWindowShadowSize, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
- connect(activeWindowShadowSize, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
- connect(inactiveWindowShadowSize, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
- connect(baseShadowSize, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
- connect(shadowTopOffset, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
- connect(shadowLeftOffset, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
- connect(shadowColor, TQT_SIGNAL(changed(const TQColor&)), TQT_SLOT(changed()));
- connect(fadeInWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(fadeInMenuWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(fadeInToolTipWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(fadeOnOpacityChange, TQT_SIGNAL(toggled(bool)), TQT_SLOT(changed()));
- connect(fadeInSpeed, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
- connect(fadeOutSpeed, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(changed()));
-
- connect(useShadows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(processShadowLockouts()));
- connect(useShadowsOnMenuWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(processShadowLockouts()));
- connect(useShadowsOnToolTipWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(processShadowLockouts()));
- connect(useShadowsOnDockWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(processShadowLockouts()));
+ connect(useTranslucency, TQ_SIGNAL(toggled(bool)), tabW, TQ_SLOT(setEnabled(bool)));
+
+ connect(activeWindowTransparency, TQ_SIGNAL(toggled(bool)), activeWindowOpacity, TQ_SLOT(setEnabled(bool)));
+ connect(inactiveWindowTransparency, TQ_SIGNAL(toggled(bool)), inactiveWindowOpacity, TQ_SLOT(setEnabled(bool)));
+ connect(movingWindowTransparency, TQ_SIGNAL(toggled(bool)), movingWindowOpacity, TQ_SLOT(setEnabled(bool)));
+ connect(dockWindowTransparency, TQ_SIGNAL(toggled(bool)), dockWindowOpacity, TQ_SLOT(setEnabled(bool)));
+
+ connect(useTranslucency, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(onlyDecoTranslucent, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(activeWindowTransparency, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(inactiveWindowTransparency, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(movingWindowTransparency, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(dockWindowTransparency, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(keepAboveAsActive, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(disableARGB, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(useOpenGL, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(useOpenGL, TQ_SIGNAL(toggled(bool)), blurBackground, TQ_SLOT(setEnabled(bool)));
+ connect(blurBackground, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(useOpenGL, TQ_SIGNAL(toggled(bool)), greyscaleBackground, TQ_SLOT(setEnabled(bool)));
+ connect(greyscaleBackground, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(useShadows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(useShadowsOnMenuWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(useShadowsOnToolTipWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(useShadowsOnDockWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(removeShadowsOnResize, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(removeShadowsOnMove, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+
+ connect(activeWindowOpacity, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed()));
+ connect(inactiveWindowOpacity, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed()));
+ connect(movingWindowOpacity, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed()));
+ connect(dockWindowOpacity, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed()));
+ connect(dockWindowShadowSize, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed()));
+ connect(menuWindowShadowSize, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed()));
+ connect(activeWindowShadowSize, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed()));
+ connect(inactiveWindowShadowSize, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed()));
+ connect(baseShadowSize, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed()));
+ connect(shadowTopOffset, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed()));
+ connect(shadowLeftOffset, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed()));
+ connect(shadowColor, TQ_SIGNAL(changed(const TQColor&)), TQ_SLOT(changed()));
+ connect(fadeInWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(fadeInMenuWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(fadeInToolTipWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(fadeOnOpacityChange, TQ_SIGNAL(toggled(bool)), TQ_SLOT(changed()));
+ connect(fadeInSpeed, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed()));
+ connect(fadeOutSpeed, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(changed()));
+
+ connect(useShadows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(processShadowLockouts()));
+ connect(useShadowsOnMenuWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(processShadowLockouts()));
+ connect(useShadowsOnToolTipWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(processShadowLockouts()));
+ connect(useShadowsOnDockWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(processShadowLockouts()));
load();
tabW->setEnabled(useTranslucency->isChecked());
- connect(useTranslucency, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(showWarning(bool)));
+ connect(useTranslucency, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(showWarning(bool)));
// handle kompmgr restarts if necessary
- connect(useTranslucency, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr()));
- connect(disableARGB, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr()));
- connect(useOpenGL, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr()));
- connect(blurBackground, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr()));
- connect(greyscaleBackground, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr()));
- connect(useShadows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr()));
- connect(useShadowsOnMenuWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr()));
- connect(useShadowsOnToolTipWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr()));
- connect(useShadowsOnDockWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr()));
- connect(inactiveWindowShadowSize, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(resetKompmgr()));
- connect(baseShadowSize, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(resetKompmgr()));
- connect(shadowTopOffset, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(resetKompmgr()));
- connect(shadowLeftOffset, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(resetKompmgr()));
- connect(shadowColor, TQT_SIGNAL(changed(const TQColor&)), TQT_SLOT(resetKompmgr()));
- connect(fadeInWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr()));
- connect(fadeInMenuWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr()));
- connect(fadeInToolTipWindows, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr()));
- connect(fadeOnOpacityChange, TQT_SIGNAL(toggled(bool)), TQT_SLOT(resetKompmgr()));
- connect(fadeInSpeed, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(resetKompmgr()));
- connect(fadeOutSpeed, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(resetKompmgr()));
+ connect(useTranslucency, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr()));
+ connect(disableARGB, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr()));
+ connect(useOpenGL, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr()));
+ connect(blurBackground, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr()));
+ connect(greyscaleBackground, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr()));
+ connect(useShadows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr()));
+ connect(useShadowsOnMenuWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr()));
+ connect(useShadowsOnToolTipWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr()));
+ connect(useShadowsOnDockWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr()));
+ connect(inactiveWindowShadowSize, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(resetKompmgr()));
+ connect(baseShadowSize, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(resetKompmgr()));
+ connect(shadowTopOffset, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(resetKompmgr()));
+ connect(shadowLeftOffset, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(resetKompmgr()));
+ connect(shadowColor, TQ_SIGNAL(changed(const TQColor&)), TQ_SLOT(resetKompmgr()));
+ connect(fadeInWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr()));
+ connect(fadeInMenuWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr()));
+ connect(fadeInToolTipWindows, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr()));
+ connect(fadeOnOpacityChange, TQ_SIGNAL(toggled(bool)), TQ_SLOT(resetKompmgr()));
+ connect(fadeInSpeed, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(resetKompmgr()));
+ connect(fadeOutSpeed, TQ_SIGNAL(valueChanged(int)), TQ_SLOT(resetKompmgr()));
}
}
@@ -1642,7 +1804,7 @@ void KTranslucencyConfig::load( void )
r = g = b = 256;
if (sscanf(hex.latin1(), "0x%02x%02x%02x", &r, &g, &b)!=3 || r > 255 || g > 255 || b > 255)
- shadowColor->setColor(Qt::black);
+ shadowColor->setColor(TQt::black);
else
shadowColor->setColor(TQColor(r,g,b));
@@ -1850,7 +2012,7 @@ void KTranslucencyConfig::defaults()
useShadowsOnDockWindows->setChecked(FALSE);
removeShadowsOnMove->setChecked(FALSE);
removeShadowsOnResize->setChecked(FALSE);
- shadowColor->setColor(Qt::black);
+ shadowColor->setColor(TQt::black);
fadeInWindows->setChecked(FALSE);
fadeInMenuWindows->setChecked(TRUE);
fadeInToolTipWindows->setChecked(TRUE);