📄 configdialog.cpp
字号:
/*************************************************************************** confdialog.cpp - description ------------------- begin : May 7 22:18:34 BST 2004 copyright : (C) 2003-2005 by KSmoothDock team email : dangvd@yahoo.com ***************************************************************************//*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************//// @TODO: re-format the file according to KSmoothDock v4.0's coding style#include "configdialog.h"#include <klocale.h>#include <qvariant.h>#include <qpushbutton.h>#include <qtabwidget.h>#include <qwidget.h>#include <qgroupbox.h>#include <qbuttongroup.h>#include <qlabel.h>#include <qradiobutton.h>#include <qcombobox.h>#include <qcheckbox.h>#include <qlineedit.h>#include <qslider.h>#include <kcolorbutton.h>#include <knuminput.h>#include <qlayout.h>#include <qtooltip.h>#include <qwhatsthis.h>#include <kmessagebox.h>#include <kfontdialog.h>#include "constants.h"#include "ksmoothdock.h"/* * Constructs a ConfigDialog as a child of 'parent', with the * name 'name' and widget flags set to 'f'. * * The dialog will by default be modeless, unless you set 'modal' to * TRUE to construct a modal dialog. */ConfigDialog::ConfigDialog( KSmoothDock* parent, const char* name, bool modal, WFlags fl ) : QDialog( (QWidget*) parent, name, modal, fl ){ m_parent = parent; if ( !name ) setName( "KSmoothDock Preferences" ); setSizeGripEnabled( TRUE ); buttonApply = new QPushButton( this, "buttonApply" ); buttonApply->setGeometry( QRect( 240, 530, 130, 30 ) ); buttonApply->setAutoDefault( TRUE ); buttonApply->setDefault( TRUE ); buttonQuit = new QPushButton( this, "buttonQuit" ); buttonQuit->setGeometry( QRect( 460, 530, 110, 30 ) ); buttonQuit->setAutoDefault( TRUE ); tabPrefs = new QTabWidget( this, "tabPrefs" ); tabPrefs->setGeometry( QRect( 20, 10, 770, 510 ) ); Widget2 = new QWidget( tabPrefs, "Widget2" ); groupBox2 = new QGroupBox( Widget2, "groupBox2" ); groupBox2->setGeometry( QRect( 30, 30, 670, 250 ) ); textLabel1_3 = new QLabel( groupBox2, "textLabel1_3" ); textLabel1_3->setGeometry( QRect( 160, 160, 261, 41 ) ); textLabel6 = new QLabel( groupBox2, "textLabel6" ); textLabel6->setGeometry( QRect( 80, 20, 340, 41 ) ); cbPager = new QCheckBox( groupBox2, "cbPager" ); cbPager->setGeometry( QRect( 30, 80, 20, 20 ) ); cbTaskbar = new QCheckBox( groupBox2, "cbTaskbar" ); cbTaskbar->setGeometry( QRect( 30, 130, 20, 20 ) ); cbClock = new QCheckBox( groupBox2, "cbClock" ); cbClock->setGeometry( QRect( 30, 210, 20, 20 ) ); cbShowWinAllDesks = new QCheckBox( groupBox2, "cbShowWinAllDesks" ); cbShowWinAllDesks->setGeometry( QRect( 110, 170, 20, 20 ) ); cbQuickLaunch = new QCheckBox( groupBox2, "cbQuickLaunch" ); cbQuickLaunch->setEnabled( FALSE ); cbQuickLaunch->setGeometry( QRect( 30, 30, 20, 21 ) ); cbQuickLaunch->setChecked( TRUE ); textLabel7 = new QLabel( groupBox2, "textLabel7" ); textLabel7->setGeometry( QRect( 80, 74, 171, 31 ) ); textLabel2_3 = new QLabel( groupBox2, "textLabel2_3" ); textLabel2_3->setGeometry( QRect( 80, 125, 70, 31 ) ); textLabel9 = new QLabel( groupBox2, "textLabel9" ); textLabel9->setGeometry( QRect( 80, 200, 141, 41 ) ); tabPrefs->insertTab( Widget2, QString("") ); Widget3 = new QWidget( tabPrefs, "Widget3" ); grbParabolic = new QGroupBox( Widget3, "grbParabolic" ); grbParabolic->setGeometry( QRect( 30, 330, 671, 120 ) ); textLabel1_6_2 = new QLabel( grbParabolic, "textLabel1_6_2" ); textLabel1_6_2->setGeometry( QRect( 120, 55, 141, 31 ) ); textLabel2_5_2 = new QLabel( grbParabolic, "textLabel2_5_2" ); textLabel2_5_2->setGeometry( QRect( 270, 80, 50, 31 ) ); textLabel3_4_2 = new QLabel( grbParabolic, "textLabel3_4_2" ); textLabel3_4_2->setGeometry( QRect( 610, 80, 40, 31 ) ); sldSpeedPZ = new QSlider( grbParabolic, "sldSpeedPZ" ); sldSpeedPZ->setGeometry( QRect( 280, 60, 350, 21 ) ); sldSpeedPZ->setMinValue( 1 ); sldSpeedPZ->setMaxValue( 31 ); sldSpeedPZ->setOrientation( QSlider::Horizontal ); grbNormal = new QGroupBox( Widget3, "grbNormal" ); grbNormal->setGeometry( QRect( 30, 210, 671, 100 ) ); textLabel1_6 = new QLabel( grbNormal, "textLabel1_6" ); textLabel1_6->setGeometry( QRect( 120, 34, 141, 31 ) ); textLabel2_5 = new QLabel( grbNormal, "textLabel2_5" ); textLabel2_5->setGeometry( QRect( 270, 60, 50, 31 ) ); textLabel3_4 = new QLabel( grbNormal, "textLabel3_4" ); textLabel3_4->setGeometry( QRect( 610, 60, 40, 31 ) ); sldSpeedNZ = new QSlider( grbNormal, "sldSpeedNZ" ); sldSpeedNZ->setGeometry( QRect( 280, 40, 350, 21 ) ); sldSpeedNZ->setMinValue( 1 ); sldSpeedNZ->setMaxValue( 31 ); sldSpeedNZ->setOrientation( QSlider::Horizontal ); groupBox1 = new QGroupBox( Widget3, "groupBox1" ); groupBox1->setGeometry( QRect( 30, 30, 670, 160 ) ); buttonGroup2 = new QButtonGroup( groupBox1, "buttonGroup2" ); buttonGroup2->setGeometry( QRect( 20, 30, 350, 70 ) ); buttonGroup2->setLineWidth( 0 ); textLabel3 = new QLabel( buttonGroup2, "textLabel3" ); textLabel3->setGeometry( QRect( 130, -10, 221, 41 ) ); textLabel4 = new QLabel( buttonGroup2, "textLabel4" ); textLabel4->setGeometry( QRect( 130, 28, 180, 40 ) ); rbNormalZoom = new QRadioButton( buttonGroup2, "rbNormalZoom" ); rbNormalZoom->setGeometry( QRect( 80, 0, 16, 21 ) ); rbParabolicZoom = new QRadioButton( buttonGroup2, "rbParabolicZoom" ); rbParabolicZoom->setGeometry( QRect( 80, 32, 16, 31 ) ); textLabel1_2 = new QLabel( groupBox1, "textLabel1_2" ); textLabel1_2->setGeometry( QRect( 90, 110, 520, 40 ) ); tabPrefs->insertTab( Widget3, QString("") ); TabPage = new QWidget( tabPrefs, "TabPage" ); gbPosition = new QGroupBox( TabPage, "gbPosition" ); gbPosition->setGeometry( QRect( 20, 10, 700, 60 ) ); lbPosition = new QLabel( gbPosition, "lbPosition" ); lbPosition->setGeometry( QRect( 20, 20, 520, 30 ) ); cbbPosition = new QComboBox( gbPosition, "cbbPosition" ); cbbPosition->setGeometry( QRect( 120, 20, 100, 30 ) ); groupBox15 = new QGroupBox( TabPage, "groupBox15" ); groupBox15->setGeometry( QRect( 20, 80, 700, 380 ) ); groupBox3 = new QGroupBox( groupBox15, "groupBox3" ); groupBox3->setGeometry( QRect( 20, 20, 660, 160 ) ); sldSmallIconNZ = new QSlider( groupBox3, "sldSmallIconNZ" ); sldSmallIconNZ->setGeometry( QRect( 160, 30, 340, 24 ) ); sldSmallIconNZ->setOrientation( QSlider::Horizontal ); sldSmallIconNZ->setTickmarks( QSlider::NoMarks ); textLabel2_2 = new QLabel( groupBox3, "textLabel2_2" ); textLabel2_2->setGeometry( QRect( 20, 22, 131, 31 ) ); sldBigIconNZ = new QSlider( groupBox3, "sldBigIconNZ" ); sldBigIconNZ->setGeometry( QRect( 160, 70, 340, 24 ) ); sldBigIconNZ->setOrientation( QSlider::Horizontal ); sldBigIconNZ->setTickmarks( QSlider::NoMarks ); edtSmallIconNZ = new QLineEdit( groupBox3, "edtSmallIconNZ" ); edtSmallIconNZ->setGeometry( QRect( 570, 20, 51, 31 ) ); edtSmallIconNZ->setReadOnly( TRUE ); textLabel2_2_2 = new QLabel( groupBox3, "textLabel2_2_2" ); textLabel2_2_2->setGeometry( QRect( 20, 64, 131, 31 ) ); textLabel8 = new QLabel( groupBox3, "textLabel8" ); textLabel8->setGeometry( QRect( 20, 110, 384, 31 ) ); cbbBaseIconSizeNZ = new QComboBox( FALSE, groupBox3, "cbbBaseIconSizeNZ" ); cbbBaseIconSizeNZ->setGeometry( QRect( 440, 110, 110, 31 ) ); edtBigIconNZ = new QLineEdit( groupBox3, "edtBigIconNZ" ); edtBigIconNZ->setGeometry( QRect( 570, 64, 51, 31 ) ); edtBigIconNZ->setReadOnly( TRUE ); groupBox4 = new QGroupBox( groupBox15, "groupBox4" ); groupBox4->setGeometry( QRect( 20, 190, 660, 161 ) ); sldSmallIconPZ = new QSlider( groupBox4, "sldSmallIconPZ" ); sldSmallIconPZ->setGeometry( QRect( 160, 30, 340, 24 ) ); sldSmallIconPZ->setOrientation( QSlider::Horizontal ); sldSmallIconPZ->setTickmarks( QSlider::NoMarks ); textLabel2_2_3 = new QLabel( groupBox4, "textLabel2_2_3" ); textLabel2_2_3->setGeometry( QRect( 20, 25, 131, 31 ) ); sldBigIconPZ = new QSlider( groupBox4, "sldBigIconPZ" ); sldBigIconPZ->setGeometry( QRect( 160, 70, 340, 24 ) ); sldBigIconPZ->setOrientation( QSlider::Horizontal ); sldBigIconPZ->setTickmarks( QSlider::NoMarks ); edtSmallIconPZ = new QLineEdit( groupBox4, "edtSmallIconPZ" ); edtSmallIconPZ->setGeometry( QRect( 570, 20, 51, 31 ) ); edtSmallIconPZ->setReadOnly( TRUE ); textLabel2_2_2_2 = new QLabel( groupBox4, "textLabel2_2_2_2" ); textLabel2_2_2_2->setGeometry( QRect( 20, 64, 110, 31 ) ); textLabel8_2 = new QLabel( groupBox4, "textLabel8_2" ); textLabel8_2->setGeometry( QRect( 20, 110, 390, 31 ) ); cbbBaseIconSizePZ = new QComboBox( FALSE, groupBox4, "cbbBaseIconSizePZ" ); cbbBaseIconSizePZ->setGeometry( QRect( 440, 110, 110, 31 ) ); edtBigIconPZ = new QLineEdit( groupBox4, "edtBigIconPZ" ); edtBigIconPZ->setGeometry( QRect( 570, 65, 51, 31 ) ); edtBigIconPZ->setReadOnly( TRUE ); tabPrefs->insertTab( TabPage, QString("") ); TabPage_2 = new QWidget( tabPrefs, "TabPage_2" ); groupBox17 = new QGroupBox( TabPage_2, "groupBox17" ); groupBox17->setGeometry( QRect( 20, 20, 680, 80 ) ); textLabel5_3 = new QLabel( groupBox17, "textLabel5_3" ); textLabel5_3->setGeometry( QRect( 70, 20, 261, 41 ) ); cbAutohide = new QCheckBox( groupBox17, "cbAutohide" ); cbAutohide->setGeometry( QRect( 30, 30, 20, 20 ) ); tabPrefs->insertTab( TabPage_2, QString("") ); TabPage_3 = new QWidget( tabPrefs, "TabPage_3" ); groupBox5 = new QGroupBox( TabPage_3, "groupBox5" ); groupBox5->setGeometry( QRect( 20, 20, 640, 130 ) ); textLabel4_2 = new QLabel( groupBox5, "textLabel4_2" ); textLabel4_2->setGeometry( QRect( 130, 80, 110, 31 ) ); btnBorderColor = new KColorButton( groupBox5, "btnBorderColor" ); btnBorderColor->setGeometry( QRect( 250, 70, 60, 40 ) ); cbBorders = new QCheckBox( groupBox5, "cbBorders" ); cbBorders->setGeometry( QRect( 30, 40, 20, 20 ) ); textLabel3_2 = new QLabel( groupBox5, "textLabel3_2" ); textLabel3_2->setGeometry( QRect( 71, 34, 121, 31 ) ); groupBox6 = new QGroupBox( TabPage_3, "groupBox6" ); groupBox6->setGeometry( QRect( 20, 170, 640, 250 ) ); textLabel5_2 = new QLabel( groupBox6, "textLabel5_2" ); textLabel5_2->setGeometry( QRect( 40, 40, 141, 31 ) ); btnBgColor = new KColorButton( groupBox6, "btnBgColor" ); btnBgColor->setGeometry( QRect( 250, 30, 60, 40 ) ); btnSepColor = new KColorButton( groupBox6, "btnSepColor" ); btnSepColor->setGeometry( QRect( 250, 80, 60, 40 ) );
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -