used UI for main config dialog
svn path=/trunk/KDE/kdebase/workspace/; revision=1042928icc-effect-5.14.5
parent
cc91de00aa
commit
83c5c770fa
|
@ -17,6 +17,7 @@ set(kwin_oxygen_config_PART_SRCS
|
|||
)
|
||||
|
||||
kde4_add_ui_files(kwin_oxygen_config_PART_SRCS
|
||||
oxygenconfigurationui.ui
|
||||
oxygendetectwidget.ui
|
||||
oxygenexceptiondialog.ui
|
||||
oxygenexceptionlistwidget.ui
|
||||
|
|
|
@ -91,7 +91,7 @@ namespace Oxygen
|
|||
{ exceptions = OxygenExceptionList::defaultList(); }
|
||||
|
||||
// install in ui
|
||||
userInterface_->exceptions->setExceptions( exceptions );
|
||||
userInterface_->ui.exceptions->setExceptions( exceptions );
|
||||
|
||||
|
||||
}
|
||||
|
@ -108,30 +108,30 @@ namespace Oxygen
|
|||
// to the configuration file are *not* translated using current locale
|
||||
configurationGroup.writeEntry(
|
||||
OxygenConfig::TITLE_ALIGNMENT,
|
||||
OxygenConfiguration::titleAlignmentName( OxygenConfiguration::titleAlignment( userInterface_->titleAlignment->currentText(), true ), false ) );
|
||||
OxygenConfiguration::titleAlignmentName( OxygenConfiguration::titleAlignment( userInterface_->ui.titleAlignment->currentText(), true ), false ) );
|
||||
|
||||
configurationGroup.writeEntry(
|
||||
OxygenConfig::BUTTON_SIZE,
|
||||
OxygenConfiguration::buttonSizeName( OxygenConfiguration::buttonSize( userInterface_->buttonSize->currentText(), true ), false ) );
|
||||
OxygenConfiguration::buttonSizeName( OxygenConfiguration::buttonSize( userInterface_->ui.buttonSize->currentText(), true ), false ) );
|
||||
|
||||
configurationGroup.writeEntry(
|
||||
OxygenConfig::BLEND_COLOR,
|
||||
OxygenConfiguration::blendColorName( OxygenConfiguration::blendColor( userInterface_->blendColor->currentText(), true ), false ) );
|
||||
OxygenConfiguration::blendColorName( OxygenConfiguration::blendColor( userInterface_->ui.blendColor->currentText(), true ), false ) );
|
||||
|
||||
configurationGroup.writeEntry(
|
||||
OxygenConfig::FRAME_BORDER,
|
||||
OxygenConfiguration::frameBorderName( OxygenConfiguration::frameBorder( userInterface_->frameBorder->currentText(), true ), false ) );
|
||||
OxygenConfiguration::frameBorderName( OxygenConfiguration::frameBorder( userInterface_->ui.frameBorder->currentText(), true ), false ) );
|
||||
|
||||
configurationGroup.writeEntry(
|
||||
OxygenConfig::SIZE_GRIP_MODE,
|
||||
OxygenConfiguration::sizeGripModeName( OxygenConfiguration::sizeGripMode( userInterface_->sizeGripMode->currentText(), true ), false ) );
|
||||
OxygenConfiguration::sizeGripModeName( OxygenConfiguration::sizeGripMode( userInterface_->ui.sizeGripMode->currentText(), true ), false ) );
|
||||
|
||||
configurationGroup.writeEntry( OxygenConfig::DRAW_SEPARATOR, userInterface_->drawSeparator->isChecked() );
|
||||
configurationGroup.writeEntry( OxygenConfig::DRAW_TITLE_OUTLINE, userInterface_->titleOutline->isChecked() );
|
||||
configurationGroup.writeEntry( OxygenConfig::USE_OXYGEN_SHADOWS, userInterface_->useOxygenShadows->isChecked() );
|
||||
configurationGroup.writeEntry( OxygenConfig::DRAW_SEPARATOR, userInterface_->ui.drawSeparator->isChecked() );
|
||||
configurationGroup.writeEntry( OxygenConfig::DRAW_TITLE_OUTLINE, userInterface_->ui.titleOutline->isChecked() );
|
||||
configurationGroup.writeEntry( OxygenConfig::USE_OXYGEN_SHADOWS, userInterface_->ui.useOxygenShadows->isChecked() );
|
||||
|
||||
// write exceptions
|
||||
userInterface_->exceptions->exceptions().write( *configuration_ );
|
||||
userInterface_->ui.exceptions->exceptions().write( *configuration_ );
|
||||
|
||||
// write shadow configuration
|
||||
saveShadowConfiguration( QPalette::Active, *userInterface_->shadowConfigurations[0] );
|
||||
|
@ -171,7 +171,7 @@ namespace Oxygen
|
|||
loadShadowConfiguration( QPalette::Inactive, OxygenShadowConfiguration( QPalette::Inactive ) );
|
||||
|
||||
// install default exceptions
|
||||
userInterface_->exceptions->setExceptions( OxygenExceptionList::defaultList() );
|
||||
userInterface_->ui.exceptions->setExceptions( OxygenExceptionList::defaultList() );
|
||||
|
||||
// emit changed signal
|
||||
emit changed();
|
||||
|
@ -182,15 +182,15 @@ namespace Oxygen
|
|||
void Config::loadConfiguration( const OxygenConfiguration& configuration )
|
||||
{
|
||||
|
||||
userInterface_->titleAlignment->setCurrentIndex( userInterface_->titleAlignment->findText( configuration.titleAlignmentName( true ) ) );
|
||||
userInterface_->buttonSize->setCurrentIndex( userInterface_->buttonSize->findText( configuration.buttonSizeName( true ) ) );
|
||||
userInterface_->blendColor->setCurrentIndex( userInterface_->blendColor->findText( configuration.blendColorName( true ) ) );
|
||||
userInterface_->frameBorder->setCurrentIndex( userInterface_->frameBorder->findText( configuration.frameBorderName( true ) ) );
|
||||
userInterface_->sizeGripMode->setCurrentIndex( userInterface_->sizeGripMode->findText( configuration.sizeGripModeName( true ) ) );
|
||||
userInterface_->ui.titleAlignment->setCurrentIndex( userInterface_->ui.titleAlignment->findText( configuration.titleAlignmentName( true ) ) );
|
||||
userInterface_->ui.buttonSize->setCurrentIndex( userInterface_->ui.buttonSize->findText( configuration.buttonSizeName( true ) ) );
|
||||
userInterface_->ui.blendColor->setCurrentIndex( userInterface_->ui.blendColor->findText( configuration.blendColorName( true ) ) );
|
||||
userInterface_->ui.frameBorder->setCurrentIndex( userInterface_->ui.frameBorder->findText( configuration.frameBorderName( true ) ) );
|
||||
userInterface_->ui.sizeGripMode->setCurrentIndex( userInterface_->ui.sizeGripMode->findText( configuration.sizeGripModeName( true ) ) );
|
||||
|
||||
userInterface_->drawSeparator->setChecked( configuration.drawSeparator() );
|
||||
userInterface_->titleOutline->setChecked( configuration.drawTitleOutline() );
|
||||
userInterface_->useOxygenShadows->setChecked( configuration.useOxygenShadows() );
|
||||
userInterface_->ui.drawSeparator->setChecked( configuration.drawSeparator() );
|
||||
userInterface_->ui.titleOutline->setChecked( configuration.drawTitleOutline() );
|
||||
userInterface_->ui.useOxygenShadows->setChecked( configuration.useOxygenShadows() );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -39,206 +39,80 @@ namespace Oxygen
|
|||
|
||||
//_________________________________________________________
|
||||
OxygenConfigurationUI::OxygenConfigurationUI( QWidget* parent ):
|
||||
QWidget( parent ),
|
||||
titleAlignment(0),
|
||||
buttonSize(0),
|
||||
frameBorder(0),
|
||||
blendColor(0),
|
||||
sizeGripMode(0),
|
||||
drawSeparator(0),
|
||||
titleOutline(0)
|
||||
{ setupUI(); }
|
||||
QWidget( parent )
|
||||
{
|
||||
|
||||
//_________________________________________________________
|
||||
void OxygenConfigurationUI::setupUI( void )
|
||||
{
|
||||
|
||||
QVBoxLayout* mainLayout = new QVBoxLayout( this );
|
||||
mainLayout->setMargin(0);
|
||||
|
||||
// tab widget for basic and advanced mode
|
||||
KTabWidget* tab( new KTabWidget( this ) );
|
||||
mainLayout->addWidget( tab );
|
||||
ui.setupUi( this );
|
||||
|
||||
// basic configuration
|
||||
{
|
||||
QWidget *basicWidget = new QWidget();
|
||||
int index = tab->addTab( basicWidget, i18n("&General") );
|
||||
tab->setTabToolTip( index, i18n( "Basic window decoration configuration options" ) );
|
||||
ui.frameBorder->insertItems(0, QStringList()
|
||||
<< OxygenConfiguration::frameBorderName( OxygenConfiguration::BorderNone, true )
|
||||
<< OxygenConfiguration::frameBorderName( OxygenConfiguration::BorderNoSide, true )
|
||||
<< OxygenConfiguration::frameBorderName( OxygenConfiguration::BorderTiny, true )
|
||||
<< OxygenConfiguration::frameBorderName( OxygenConfiguration::BorderDefault, true )
|
||||
<< OxygenConfiguration::frameBorderName( OxygenConfiguration::BorderLarge, true )
|
||||
<< OxygenConfiguration::frameBorderName( OxygenConfiguration::BorderVeryLarge, true )
|
||||
<< OxygenConfiguration::frameBorderName( OxygenConfiguration::BorderHuge, true )
|
||||
<< OxygenConfiguration::frameBorderName( OxygenConfiguration::BorderVeryHuge, true )
|
||||
<< OxygenConfiguration::frameBorderName( OxygenConfiguration::BorderOversized, true )
|
||||
);
|
||||
|
||||
QVBoxLayout* vboxLayout = new QVBoxLayout();
|
||||
basicWidget->setLayout( vboxLayout );
|
||||
ui.label->setBuddy( ui.frameBorder );
|
||||
|
||||
QGridLayout* gridLayout = new QGridLayout();
|
||||
gridLayout->setMargin(0);
|
||||
vboxLayout->addLayout( gridLayout );
|
||||
ui.titleAlignment->insertItems(0, QStringList()
|
||||
<< OxygenConfiguration::titleAlignmentName( Qt::AlignLeft, true )
|
||||
<< OxygenConfiguration::titleAlignmentName( Qt::AlignHCenter, true )
|
||||
<< OxygenConfiguration::titleAlignmentName( Qt::AlignRight, true )
|
||||
);
|
||||
|
||||
gridLayout->setColumnStretch(2, 1);
|
||||
ui.label_2->setBuddy( ui.titleAlignment );
|
||||
|
||||
// frame border
|
||||
QLabel* label;
|
||||
gridLayout->addWidget( label = new QLabel( i18n("Border size:"), basicWidget ), 0, 0, 1, 1);
|
||||
gridLayout->addWidget( frameBorder = new KComboBox(basicWidget), 0, 1, 1, 1);
|
||||
frameBorder->setObjectName(QString::fromUtf8("frameBorder"));
|
||||
frameBorder->insertItems(0, QStringList()
|
||||
<< OxygenConfiguration::frameBorderName( OxygenConfiguration::BorderNone, true )
|
||||
<< OxygenConfiguration::frameBorderName( OxygenConfiguration::BorderNoSide, true )
|
||||
<< OxygenConfiguration::frameBorderName( OxygenConfiguration::BorderTiny, true )
|
||||
<< OxygenConfiguration::frameBorderName( OxygenConfiguration::BorderDefault, true )
|
||||
<< OxygenConfiguration::frameBorderName( OxygenConfiguration::BorderLarge, true )
|
||||
<< OxygenConfiguration::frameBorderName( OxygenConfiguration::BorderVeryLarge, true )
|
||||
<< OxygenConfiguration::frameBorderName( OxygenConfiguration::BorderHuge, true )
|
||||
<< OxygenConfiguration::frameBorderName( OxygenConfiguration::BorderVeryHuge, true )
|
||||
<< OxygenConfiguration::frameBorderName( OxygenConfiguration::BorderOversized, true )
|
||||
);
|
||||
|
||||
label->setAlignment( Qt::AlignRight|Qt::AlignVCenter );
|
||||
label->setBuddy( frameBorder );
|
||||
|
||||
// title alignment
|
||||
gridLayout->addWidget( label = new QLabel( i18n("Title alignment:"), basicWidget ), 1, 0, 1, 1 );
|
||||
gridLayout->addWidget( titleAlignment = new KComboBox(basicWidget), 1, 1, 1, 1 );
|
||||
titleAlignment->setObjectName(QString::fromUtf8("titleAlignment"));
|
||||
titleAlignment->insertItems(0, QStringList()
|
||||
<< OxygenConfiguration::titleAlignmentName( Qt::AlignLeft, true )
|
||||
<< OxygenConfiguration::titleAlignmentName( Qt::AlignHCenter, true )
|
||||
<< OxygenConfiguration::titleAlignmentName( Qt::AlignRight, true )
|
||||
);
|
||||
|
||||
label->setAlignment( Qt::AlignRight|Qt::AlignVCenter );
|
||||
label->setBuddy( titleAlignment );
|
||||
|
||||
// button size
|
||||
gridLayout->addWidget( label = new QLabel( i18n("Button size:"), basicWidget ), 2, 0, 1, 1 );
|
||||
gridLayout->addWidget( buttonSize = new KComboBox(basicWidget), 2, 1, 1, 1 );
|
||||
buttonSize->setObjectName(QString::fromUtf8("buttonSize"));
|
||||
buttonSize->insertItems(0, QStringList()
|
||||
<< OxygenConfiguration::buttonSizeName( OxygenConfiguration::ButtonSmall, true )
|
||||
<< OxygenConfiguration::buttonSizeName( OxygenConfiguration::ButtonDefault, true )
|
||||
<< OxygenConfiguration::buttonSizeName( OxygenConfiguration::ButtonLarge, true )
|
||||
<< OxygenConfiguration::buttonSizeName( OxygenConfiguration::ButtonHuge, true )
|
||||
);
|
||||
|
||||
label->setAlignment( Qt::AlignRight|Qt::AlignVCenter );
|
||||
label->setBuddy( buttonSize );
|
||||
vboxLayout->addStretch(1);
|
||||
|
||||
}
|
||||
ui.buttonSize->insertItems(0, QStringList()
|
||||
<< OxygenConfiguration::buttonSizeName( OxygenConfiguration::ButtonSmall, true )
|
||||
<< OxygenConfiguration::buttonSizeName( OxygenConfiguration::ButtonDefault, true )
|
||||
<< OxygenConfiguration::buttonSizeName( OxygenConfiguration::ButtonLarge, true )
|
||||
<< OxygenConfiguration::buttonSizeName( OxygenConfiguration::ButtonHuge, true )
|
||||
);
|
||||
|
||||
ui.label_3->setBuddy( ui.buttonSize );
|
||||
|
||||
// advanced configuration
|
||||
{
|
||||
QWidget *advancedWidget = new QWidget();
|
||||
int index = tab->addTab( advancedWidget, i18n( "&Fine Tuning" ) );
|
||||
tab->setTabToolTip( index, i18n( "Additional window decoration configuration options" ) );
|
||||
ui.blendColor->insertItems(0, QStringList()
|
||||
<< OxygenConfiguration::blendColorName( OxygenConfiguration::NoBlending, true )
|
||||
<< OxygenConfiguration::blendColorName( OxygenConfiguration::RadialBlending, true )
|
||||
);
|
||||
|
||||
QVBoxLayout* vboxLayout = new QVBoxLayout();
|
||||
advancedWidget->setLayout( vboxLayout );
|
||||
ui.label_4->setBuddy( ui.blendColor );
|
||||
|
||||
QGridLayout* gridLayout = new QGridLayout();
|
||||
gridLayout->setMargin(0);
|
||||
vboxLayout->addLayout( gridLayout );
|
||||
// draw size grip
|
||||
ui.sizeGripMode->insertItems(0, QStringList()
|
||||
<< OxygenConfiguration::sizeGripModeName( OxygenConfiguration::SizeGripNever, true )
|
||||
<< OxygenConfiguration::sizeGripModeName( OxygenConfiguration::SizeGripWhenNeeded, true )
|
||||
);
|
||||
|
||||
gridLayout->setColumnStretch(2, 1);
|
||||
ui.label_5->setBuddy( ui.sizeGripMode );
|
||||
|
||||
// title bar blending
|
||||
QLabel* label;
|
||||
gridLayout->addWidget( label = new QLabel( i18n("Background style:" ), advancedWidget ), 1, 0, 1, 1 );
|
||||
gridLayout->addWidget( blendColor = new KComboBox(advancedWidget), 1, 1, 1, 1 );
|
||||
blendColor->setObjectName(QString::fromUtf8("blendColor"));
|
||||
blendColor->insertItems(0, QStringList()
|
||||
<< OxygenConfiguration::blendColorName( OxygenConfiguration::NoBlending, true )
|
||||
<< OxygenConfiguration::blendColorName( OxygenConfiguration::RadialBlending, true )
|
||||
);
|
||||
|
||||
label->setAlignment( Qt::AlignRight|Qt::AlignVCenter );
|
||||
label->setBuddy( blendColor );
|
||||
|
||||
// draw size grip
|
||||
gridLayout->addWidget( label = new QLabel( i18n("Extra size grip display:"), advancedWidget ), 2, 0, 1, 1 );
|
||||
gridLayout->addWidget( sizeGripMode = new KComboBox(advancedWidget), 2, 1, 1, 1 );
|
||||
sizeGripMode->setObjectName(QString::fromUtf8("sizeGripMode"));
|
||||
sizeGripMode->setWhatsThis(i18n(
|
||||
"The extra size grip is a small triangle, shown in the bottom-right corner of a window,\n"
|
||||
"which allows the window to be resized. This option controls in which cases the size grip \n"
|
||||
"is shown."));
|
||||
sizeGripMode->insertItems(0, QStringList()
|
||||
<< OxygenConfiguration::sizeGripModeName( OxygenConfiguration::SizeGripNever, true )
|
||||
<< OxygenConfiguration::sizeGripModeName( OxygenConfiguration::SizeGripWhenNeeded, true )
|
||||
);
|
||||
|
||||
label->setAlignment( Qt::AlignRight|Qt::AlignVCenter );
|
||||
label->setBuddy( sizeGripMode );
|
||||
|
||||
// active window title outline
|
||||
vboxLayout->addWidget( titleOutline = new QCheckBox( i18n("Outline active window title"), advancedWidget) );
|
||||
titleOutline->setObjectName(QString::fromUtf8("titleOutline"));
|
||||
titleOutline->setWhatsThis(i18n(
|
||||
"When enabled, an additional frame is shown around the active window as well as its title."));
|
||||
|
||||
// draw separator
|
||||
vboxLayout->addWidget( drawSeparator = new QCheckBox( i18n("Draw separator between title bar and active window contents"), advancedWidget ) );
|
||||
drawSeparator->setObjectName(QString::fromUtf8("drawSeparator"));
|
||||
drawSeparator->setWhatsThis(i18n(
|
||||
"When enabled, this option makes an horizontal separator appear between the window title bar and the window contents."));
|
||||
|
||||
vboxLayout->addStretch(1);
|
||||
|
||||
}
|
||||
|
||||
// shadow configurations
|
||||
{
|
||||
shadowConfigurations = QVector<OxygenShadowConfigurationUI*>( 2, 0 );
|
||||
QWidget* widget = new QWidget();
|
||||
int index = tab->addTab( widget, i18n( "&Shadows" ) );
|
||||
tab->setTabToolTip( index, i18n( "Configure shadow colors for active and inactive windows" ) );
|
||||
|
||||
QGridLayout* gridLayout( new QGridLayout() );
|
||||
widget->setLayout( gridLayout );
|
||||
|
||||
// oxygen shadow
|
||||
gridLayout->addWidget( useOxygenShadows = new QCheckBox( i18n("Glow active window" ), this ), 0, 0, 1, 1 );
|
||||
useOxygenShadows->setObjectName(QString::fromUtf8("useOxygenShadows"));
|
||||
useOxygenShadows->setWhatsThis(i18n(
|
||||
"When this option is enabled, the oxygen signature blue glow is used for the active window shadow."));
|
||||
|
||||
// regular shadow configuration
|
||||
gridLayout->addWidget( shadowConfigurations[1] = new OxygenShadowConfigurationUI( i18n( "Window Drop-Down Shadow" ), widget ), 1, 0, 1, 1 );
|
||||
shadowConfigurations[1]->setObjectName( "inactiveShadowConfiguration" );
|
||||
|
||||
// active window glow
|
||||
gridLayout->addWidget( shadowConfigurations[0] = new OxygenShadowConfigurationUI( i18n( "Active Window Glow" ), widget ), 1, 1, 1, 1 );
|
||||
shadowConfigurations[0]->setObjectName( "activeShadowConfiguration" );
|
||||
shadowConfigurations[0]->setEnabled( false );
|
||||
|
||||
}
|
||||
|
||||
// exceptions
|
||||
{
|
||||
exceptions = new OxygenExceptionListWidget();
|
||||
exceptions->setObjectName(QString::fromUtf8("exceptions"));
|
||||
int index = tab->addTab( exceptions, i18n( "&Window-Specific Overrides" ) );
|
||||
tab->setTabToolTip( index, i18n( "Configure window decoration option overrides for specific windows" ) );
|
||||
}
|
||||
// shadows
|
||||
shadowConfigurations.push_back( ui.activeShadowConfiguration );
|
||||
shadowConfigurations.push_back( ui.inactiveShadowConfiguration );
|
||||
ui.activeShadowConfiguration->setEnabled( false );
|
||||
|
||||
// connections
|
||||
QMetaObject::connectSlotsByName(this);
|
||||
|
||||
connect( titleOutline, SIGNAL(toggled( bool )), drawSeparator, SLOT( setDisabled( bool ) ) );
|
||||
connect( useOxygenShadows, SIGNAL(toggled( bool )), shadowConfigurations[0], SLOT( setEnabled( bool ) ) );
|
||||
connect( ui.titleOutline, SIGNAL(toggled( bool )), ui.drawSeparator, SLOT( setDisabled( bool ) ) );
|
||||
connect( ui.useOxygenShadows, SIGNAL(toggled( bool )), shadowConfigurations[0], SLOT( setEnabled( bool ) ) );
|
||||
|
||||
connect( shadowConfigurations[0], SIGNAL( changed() ), SIGNAL( changed() ) );
|
||||
connect( shadowConfigurations[1], SIGNAL( changed() ), SIGNAL( changed() ) );
|
||||
connect( titleAlignment, SIGNAL(currentIndexChanged(int)), SIGNAL( changed() ) );
|
||||
connect( buttonSize, SIGNAL(currentIndexChanged(int)), SIGNAL(changed()) );
|
||||
connect( frameBorder, SIGNAL(currentIndexChanged(int)), SIGNAL(changed()) );
|
||||
connect( blendColor, SIGNAL(currentIndexChanged(int)), SIGNAL(changed()) );
|
||||
connect( sizeGripMode, SIGNAL(currentIndexChanged(int)), SIGNAL(changed()) );
|
||||
connect( ui.titleAlignment, SIGNAL(currentIndexChanged(int)), SIGNAL( changed() ) );
|
||||
connect( ui.buttonSize, SIGNAL(currentIndexChanged(int)), SIGNAL(changed()) );
|
||||
connect( ui.frameBorder, SIGNAL(currentIndexChanged(int)), SIGNAL(changed()) );
|
||||
connect( ui.blendColor, SIGNAL(currentIndexChanged(int)), SIGNAL(changed()) );
|
||||
connect( ui.sizeGripMode, SIGNAL(currentIndexChanged(int)), SIGNAL(changed()) );
|
||||
|
||||
connect( drawSeparator, SIGNAL(clicked()), SIGNAL(changed()) );
|
||||
connect( titleOutline, SIGNAL(clicked()), SIGNAL(changed()) );
|
||||
connect( useOxygenShadows, SIGNAL(clicked()), SIGNAL(changed()) );
|
||||
connect( exceptions, SIGNAL(changed()), SIGNAL(changed()) );
|
||||
connect( ui.drawSeparator, SIGNAL(clicked()), SIGNAL(changed()) );
|
||||
connect( ui.titleOutline, SIGNAL(clicked()), SIGNAL(changed()) );
|
||||
connect( ui.useOxygenShadows, SIGNAL(clicked()), SIGNAL(changed()) );
|
||||
connect( ui.exceptions, SIGNAL(changed()), SIGNAL(changed()) );
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
#include <QtGui/QCheckBox>
|
||||
#include <QtCore/QVector>
|
||||
|
||||
#include "ui_oxygenconfigurationui.h"
|
||||
#include "oxygenshadowconfigurationui.h"
|
||||
#include "oxygenexceptionlistwidget.h"
|
||||
|
||||
|
@ -48,42 +49,12 @@ namespace Oxygen
|
|||
//! constructor
|
||||
OxygenConfigurationUI( QWidget* );
|
||||
|
||||
//! setup ui
|
||||
void setupUI( void );
|
||||
|
||||
//! title alignment
|
||||
KComboBox *titleAlignment;
|
||||
|
||||
//! button size
|
||||
KComboBox* buttonSize;
|
||||
|
||||
//! frame border
|
||||
KComboBox *frameBorder;
|
||||
|
||||
//! blend color
|
||||
KComboBox *blendColor;
|
||||
|
||||
//! size grip
|
||||
KComboBox *sizeGripMode;
|
||||
|
||||
//! draw separator
|
||||
QCheckBox *drawSeparator;
|
||||
|
||||
//! active window title outline
|
||||
QCheckBox *titleOutline;
|
||||
|
||||
//! oxygen shadow
|
||||
QCheckBox *useOxygenShadows;
|
||||
|
||||
//! about oxygen
|
||||
QPushButton *aboutOxygen;
|
||||
//! ui
|
||||
Ui_OxygenConfigurationUI ui;
|
||||
|
||||
// shadow configuration
|
||||
QVector<OxygenShadowConfigurationUI*> shadowConfigurations;
|
||||
|
||||
//! exceptions
|
||||
OxygenExceptionListWidget *exceptions;
|
||||
|
||||
signals:
|
||||
|
||||
//! emmited when changed
|
||||
|
|
|
@ -0,0 +1,230 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>OxygenConfigurationUI</class>
|
||||
<widget class="QWidget" name="OxygenConfigurationUI">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>500</width>
|
||||
<height>292</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="KTabWidget" name="ktabwidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
<string>General</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Border size:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="KComboBox" name="frameBorder"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Title alignment:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="KComboBox" name="titleAlignment"/>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Button size:</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="KComboBox" name="buttonSize"/>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_2">
|
||||
<attribute name="title">
|
||||
<string>Fine Tuning</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Background style: </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="KComboBox" name="blendColor"/>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_5">
|
||||
<property name="text">
|
||||
<string>Extra size grip display: </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="KComboBox" name="sizeGripMode"/>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="4" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="titleOutline">
|
||||
<property name="text">
|
||||
<string>Outline active window title</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="drawSeparator">
|
||||
<property name="text">
|
||||
<string>Draw Separator between title bar and active window contents </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_3">
|
||||
<attribute name="title">
|
||||
<string>Shadows</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<widget class="QCheckBox" name="useOxygenShadows">
|
||||
<property name="text">
|
||||
<string>Glow active window</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="Oxygen::OxygenShadowConfigurationUI" name="inactiveShadowConfiguration">
|
||||
<property name="title">
|
||||
<string>Window Drop-Down Shadow</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="Oxygen::OxygenShadowConfigurationUI" name="activeShadowConfiguration">
|
||||
<property name="title">
|
||||
<string>Active Window Glow</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_4">
|
||||
<attribute name="title">
|
||||
<string>Window-Specific Overrides</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="Oxygen::OxygenExceptionListWidget" name="exceptions" native="true"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>KComboBox</class>
|
||||
<extends>QComboBox</extends>
|
||||
<header>kcombobox.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>KTabWidget</class>
|
||||
<extends>QTabWidget</extends>
|
||||
<header>ktabwidget.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Oxygen::OxygenShadowConfigurationUI</class>
|
||||
<extends>QGroupBox</extends>
|
||||
<header>oxygenshadowconfigurationui.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>Oxygen::OxygenExceptionListWidget</class>
|
||||
<extends>QWidget</extends>
|
||||
<header>oxygenexceptionlistwidget.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
|
@ -33,8 +33,8 @@ namespace Oxygen
|
|||
{
|
||||
|
||||
//_________________________________________________________
|
||||
OxygenShadowConfigurationUI::OxygenShadowConfigurationUI( const QString& name, QWidget* parent ):
|
||||
QGroupBox( name, parent )
|
||||
OxygenShadowConfigurationUI::OxygenShadowConfigurationUI( QWidget* parent ):
|
||||
QGroupBox( parent )
|
||||
{
|
||||
ui.setupUi( this );
|
||||
ui.label->setBuddy( ui.shadowSize );
|
||||
|
|
|
@ -40,7 +40,7 @@ namespace Oxygen
|
|||
public:
|
||||
|
||||
//! constructor
|
||||
OxygenShadowConfigurationUI( const QString&, QWidget* );
|
||||
OxygenShadowConfigurationUI( QWidget* );
|
||||
Ui_ShadowConfiguraionUI ui;
|
||||
|
||||
signals:
|
||||
|
|
Loading…
Reference in New Issue