configdialog.cpp
00001 #include <kdialog.h>
00002 #include <klocale.h>
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include "configdialog.h"
00013
00014 #include <qvariant.h>
00015 #include <qbuttongroup.h>
00016 #include <qradiobutton.h>
00017 #include <qcheckbox.h>
00018 #include <qlayout.h>
00019 #include <qtooltip.h>
00020 #include <qwhatsthis.h>
00021
00022
00023
00024
00025
00026 ConfigDialog::ConfigDialog( QWidget* parent, const char* name, WFlags fl )
00027 : QWidget( parent, name, fl )
00028 {
00029 if ( !name )
00030 setName( "ConfigDialog" );
00031 ConfigDialogLayout = new QGridLayout( this, 1, 1, 0, 6, "ConfigDialogLayout");
00032
00033 titleAlign = new QButtonGroup( this, "titleAlign" );
00034 titleAlign->setColumnLayout(0, Qt::Vertical );
00035 titleAlign->layout()->setSpacing( 6 );
00036 titleAlign->layout()->setMargin( 11 );
00037 titleAlignLayout = new QHBoxLayout( titleAlign->layout() );
00038 titleAlignLayout->setAlignment( Qt::AlignTop );
00039
00040 AlignLeft = new QRadioButton( titleAlign, "AlignLeft" );
00041 titleAlignLayout->addWidget( AlignLeft );
00042
00043 AlignHCenter = new QRadioButton( titleAlign, "AlignHCenter" );
00044 titleAlignLayout->addWidget( AlignHCenter );
00045
00046 AlignRight = new QRadioButton( titleAlign, "AlignRight" );
00047 titleAlignLayout->addWidget( AlignRight );
00048
00049 ConfigDialogLayout->addMultiCellWidget( titleAlign, 0, 0, 0, 3 );
00050
00051 titleShadow = new QCheckBox( this, "titleShadow" );
00052
00053 ConfigDialogLayout->addMultiCellWidget( titleShadow, 1, 1, 0, 3 );
00054
00055 animateButtons = new QCheckBox( this, "animateButtons" );
00056
00057 ConfigDialogLayout->addMultiCellWidget( animateButtons, 2, 2, 0, 2 );
00058
00059 menuClose = new QCheckBox( this, "menuClose" );
00060
00061 ConfigDialogLayout->addMultiCellWidget( menuClose, 3, 3, 0, 3 );
00062 languageChange();
00063 resize( QSize(541, 167).expandedTo(minimumSizeHint()) );
00064 clearWState( WState_Polished );
00065
00066
00067 setTabOrder( AlignLeft, AlignHCenter );
00068 setTabOrder( AlignHCenter, AlignRight );
00069 setTabOrder( AlignRight, animateButtons );
00070 setTabOrder( animateButtons, titleShadow );
00071 }
00072
00073
00074
00075
00076 ConfigDialog::~ConfigDialog()
00077 {
00078
00079 }
00080
00081
00082
00083
00084
00085 void ConfigDialog::languageChange()
00086 {
00087 setCaption( tr2i18n( "Config Dialog" ) );
00088 titleAlign->setTitle( tr2i18n( "Title &Alignment" ) );
00089 AlignLeft->setText( tr2i18n( "Left" ) );
00090 AlignHCenter->setText( tr2i18n( "Center" ) );
00091 AlignRight->setText( tr2i18n( "Right" ) );
00092 titleShadow->setText( tr2i18n( "Use shadowed &text" ) );
00093 QWhatsThis::add( titleShadow, tr2i18n( "Check this option if you want the titlebar text to have a 3D look with a shadow behind it." ) );
00094 animateButtons->setText( tr2i18n( "Animate buttons" ) );
00095 QWhatsThis::add( animateButtons, tr2i18n( "Check this option if you want the buttons to fade in when the mouse pointer hovers over them and fade out again when it moves away." ) );
00096 menuClose->setText( tr2i18n( "Close windows by double clicking the menu button" ) );
00097 QWhatsThis::add( menuClose, tr2i18n( "Check this option if you want windows to be closed when you double click the menu button, similar to Microsoft Windows." ) );
00098 }
00099
00100 #include "configdialog.moc"
This file is part of the documentation for kwin Library Version 3.4.1.