convert most of the Q3*ButtonGroup'es to QGroupBox

svn path=/trunk/KDE/kdebase/workspace/; revision=707431
This commit is contained in:
Pino Toscano 2007-09-01 21:09:26 +00:00
parent 16f7462e03
commit 2bbe834a5b
2 changed files with 29 additions and 32 deletions

View file

@ -33,7 +33,6 @@
#include <QLabel>
#include <QComboBox>
#include <qdesktopwidget.h>
//Added by qt3to4:
#include <QGridLayout>
#include <QHBoxLayout>
#include <QBoxLayout>
@ -127,12 +126,10 @@ KFocusConfig::KFocusConfig (bool _standAlone, KConfig *_config, const KComponent
//lay->addWidget(plcBox);
// focus policy
fcsBox = new Q3ButtonGroup(i18n("Focus"),this);
fcsBox->setColumnLayout( 0, Qt::Horizontal );
fcsBox = new QGroupBox(i18n("Focus"),this);
QBoxLayout *fLay = new QVBoxLayout();
QBoxLayout *fLay = new QVBoxLayout(fcsBox);
fLay->setSpacing(KDialog::spacingHint());
fcsBox->layout()->addItem( fLay );
QBoxLayout *cLay = new QHBoxLayout();
fLay->addLayout( cLay );
@ -243,11 +240,9 @@ KFocusConfig::KFocusConfig (bool _standAlone, KConfig *_config, const KComponent
lay->addWidget(fcsBox);
kbdBox = new Q3ButtonGroup(i18n("Navigation"), this);
kbdBox->setColumnLayout( 0, Qt::Horizontal );
QVBoxLayout *kLay = new QVBoxLayout();
kbdBox = new QGroupBox(i18n("Navigation"), this);
QVBoxLayout *kLay = new QVBoxLayout(kbdBox);
kLay->setSpacing(KDialog::spacingHint());
kbdBox->layout()->addItem( kLay );
altTabPopup = new QCheckBox( i18n("Show window list while switching windows"), kbdBox );
kLay->addWidget( altTabPopup );
@ -590,17 +585,21 @@ KAdvancedConfig::KAdvancedConfig (bool _standAlone, KConfig *_config, const KCom
//lay->addWidget(plcBox);
shBox = new Q3VButtonGroup(i18n("Shading"), this);
shBox = new QGroupBox(i18n("Shading"), this);
QVBoxLayout *shBoxLayout = new QVBoxLayout(shBox);
animateShade = new QCheckBox(i18n("Anima&te"), shBox);
shBoxLayout->addWidget(animateShade);
animateShade->setWhatsThis( i18n("Animate the action of reducing the window to its titlebar (shading)"
" as well as the expansion of a shaded window") );
shadeHoverOn = new QCheckBox(i18n("&Enable hover"), shBox);
shBoxLayout->addWidget(shadeHoverOn);
connect(shadeHoverOn, SIGNAL(toggled(bool)), this, SLOT(shadeHoverChanged(bool)));
shadeHover = new KIntNumInput(500, shBox);
shBoxLayout->addWidget(shadeHover);
shadeHover->setLabel(i18n("Dela&y:"), Qt::AlignVCenter|Qt::AlignLeft);
shadeHover->setRange(0, 3000, 100, true);
shadeHover->setSteps(100, 100);
@ -841,37 +840,32 @@ KMovingConfig::KMovingConfig (bool _standAlone, KConfig *_config, const KCompone
lay->setMargin(0);
lay->setSpacing(KDialog::spacingHint());
windowsBox = new Q3ButtonGroup(i18n("Windows"), this);
windowsBox->setColumnLayout( 0, Qt::Horizontal );
windowsBox = new QGroupBox(i18n("Windows"), this);
QBoxLayout *wLay = new QVBoxLayout ();
QBoxLayout *wLay = new QVBoxLayout(windowsBox);
wLay->setSpacing(KDialog::spacingHint());
windowsBox->layout()->addItem( wLay );
QBoxLayout *bLay = new QVBoxLayout;
wLay->addLayout(bLay);
opaque = new QCheckBox(i18n("Di&splay content in moving windows"), windowsBox);
bLay->addWidget(opaque);
wLay->addWidget(opaque);
opaque->setWhatsThis( 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 QCheckBox(i18n("Display content in &resizing windows"), windowsBox);
bLay->addWidget(resizeOpaqueOn);
wLay->addWidget(resizeOpaqueOn);
resizeOpaqueOn->setWhatsThis( 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 QCheckBox(i18n("Display window &geometry when moving or resizing"), windowsBox);
bLay->addWidget(geometryTipOn);
wLay->addWidget(geometryTipOn);
geometryTipOn->setWhatsThis( i18n("Enable this option if you want a window's geometry to be displayed"
" while it is being moved or resized. The window position relative"
" to the top-left corner of the screen is displayed together with"
" its size."));
QGridLayout *rLay = new QGridLayout();
bLay->addLayout(rLay);
wLay->addLayout(rLay);
rLay->setColumnStretch(0,0);
rLay->setColumnStretch(1,1);
@ -908,13 +902,13 @@ KMovingConfig::KMovingConfig (bool _standAlone, KConfig *_config, const KCompone
minimizeAnimFastLabel->setWhatsThis( wtstr );
moveResizeMaximized = new QCheckBox( i18n("Allow moving and resizing o&f maximized windows"), windowsBox);
bLay->addWidget(moveResizeMaximized);
wLay->addWidget(moveResizeMaximized);
moveResizeMaximized->setWhatsThis( i18n("When enabled, this feature activates the border of maximized windows"
" and allows you to move or resize them,"
" just like for normal windows"));
QBoxLayout *vLay = new QHBoxLayout();
bLay->addLayout( vLay );
wLay->addLayout( vLay );
QLabel *plcLabel = new QLabel(i18n("&Placement:"),windowsBox);
@ -952,7 +946,7 @@ KMovingConfig::KMovingConfig (bool _standAlone, KConfig *_config, const KCompone
vLay->addWidget(plcLabel, 0);
vLay->addWidget(placementCombo, 1, Qt::AlignLeft);
bLay->addSpacing(10);
wLay->addSpacing(10);
lay->addWidget(windowsBox);
@ -971,10 +965,12 @@ KMovingConfig::KMovingConfig (bool _standAlone, KConfig *_config, const KCompone
//CT 15mar98 - add EdgeResistance, BorderAttractor, WindowsAttractor config
MagicBox = new Q3VButtonGroup(i18n("Snap Zones"), this);
MagicBox->layout()->setMargin(15);
MagicBox = new QGroupBox(i18n("Snap Zones"), this);
QVBoxLayout *MagicBoxLayout = new QVBoxLayout(MagicBox);
MagicBoxLayout->setMargin(15);
BrdrSnap = new KIntNumInput(10, MagicBox);
MagicBoxLayout->addWidget(BrdrSnap);
BrdrSnap->setSpecialValueText( i18n("none") );
BrdrSnap->setRange( 0, MAX_BRDR_SNAP);
BrdrSnap->setLabel(i18n("&Border snap zone:"));
@ -984,6 +980,7 @@ KMovingConfig::KMovingConfig (bool _standAlone, KConfig *_config, const KCompone
" moved near it.") );
WndwSnap = new KIntNumInput(10, MagicBox);
MagicBoxLayout->addWidget(WndwSnap);
WndwSnap->setSpecialValueText( i18n("none") );
WndwSnap->setRange( 0, MAX_WNDW_SNAP);
WndwSnap->setLabel(i18n("&Window snap zone:"));
@ -993,6 +990,7 @@ KMovingConfig::KMovingConfig (bool _standAlone, KConfig *_config, const KCompone
" they are moved near another window.") );
OverlapSnap=new QCheckBox(i18n("Snap windows onl&y when overlapping"),MagicBox);
MagicBoxLayout->addWidget(OverlapSnap);
OverlapSnap->setWhatsThis( i18n("Here you can set that windows will be only"
" snapped if you try to overlap them, i.e. they will not be snapped if the windows"
" comes only near another window or border.") );

View file

@ -33,7 +33,6 @@ class QComboBox;
class QGroupBox;
class QLabel;
class QSlider;
class Q3ButtonGroup;
class QSpinBox;
class Q3VButtonGroup;
@ -109,7 +108,7 @@ private:
void setRollOverDesktops(bool);
void setShowPopupinfo(bool);
Q3ButtonGroup *fcsBox;
QGroupBox *fcsBox;
QComboBox *focusCombo;
QCheckBox *autoRaiseOn;
QCheckBox *delayFocusOn;
@ -119,7 +118,7 @@ private:
QCheckBox *separateScreenFocus;
QCheckBox *activeMouseScreen;
Q3ButtonGroup *kbdBox;
QGroupBox *kbdBox;
QCheckBox *altTabPopup;
QCheckBox *traverseAll;
QCheckBox *rollOverDesktops;
@ -161,7 +160,7 @@ private:
void setPlacement(int); //CT
void setMoveResizeMaximized(bool);
Q3ButtonGroup *windowsBox;
QGroupBox *windowsBox;
QCheckBox *opaque;
QCheckBox *resizeOpaqueOn;
QCheckBox *geometryTipOn;
@ -180,7 +179,7 @@ private:
int getWindowSnapZone();
void setWindowSnapZone( int );
Q3VButtonGroup *MagicBox;
QGroupBox *MagicBox;
KIntNumInput *BrdrSnap, *WndwSnap;
QCheckBox *OverlapSnap;
@ -213,7 +212,7 @@ private:
void setShadeHoverInterval(int);
QCheckBox *animateShade;
Q3ButtonGroup *shBox;
QGroupBox *shBox;
QCheckBox *shadeHoverOn;
KIntNumInput *shadeHover;