diff options
author | onestone <onestone> | 2006-12-19 00:31:09 +0000 |
---|---|---|
committer | onestone <onestone> | 2006-12-19 00:31:09 +0000 |
commit | e44afc75929e20f93ed53bc9880d59d1feb66044 (patch) | |
tree | 33786a03bd64d8b75ae078ccc74da44887e17d20 /kcm | |
parent | 2f44397a29a96715e919bc5173e7dcfacbd16c78 (diff) | |
download | aquamarine-e44afc75929e20f93ed53bc9880d59d1feb66044.tar.gz aquamarine-e44afc75929e20f93ed53bc9880d59d1feb66044.tar.bz2 |
aquamarine: added aquamarine configuration to the kcontrol module
Diffstat (limited to 'kcm')
-rw-r--r-- | kcm/Makefile.am | 5 | ||||
-rw-r--r-- | kcm/aqsettings.kcfgc | 9 | ||||
-rw-r--r-- | kcm/aquamarine_ui.ui | 293 | ||||
-rw-r--r-- | kcm/beryl.desktop | 2 | ||||
-rw-r--r-- | kcm/main.cpp | 29 | ||||
-rw-r--r-- | kcm/main.h | 4 |
6 files changed, 339 insertions, 3 deletions
diff --git a/kcm/Makefile.am b/kcm/Makefile.am index 92d7acc..69bb3a6 100644 --- a/kcm/Makefile.am +++ b/kcm/Makefile.am @@ -2,7 +2,10 @@ INCLUDES = -I$(srcdir)/lib $(all_includes) kcm_beryl_la_LDFLAGS = -module -avoid-version -no-undefined $(all_libraries) kcm_beryl_la_LIBADD = $(BERYLSETTINGS_LIBS) $(LIB_KDECORE) $(LIB_KDEUI) -kcm_beryl_la_SOURCES = main.cpp +kcm_beryl_la_SOURCES = main.cpp \ + aquamarine_ui.ui \ + aqsettings.kcfgc + KDE_CXXFLAGS = $(BERYLSETTINGS_CFLAGS) diff --git a/kcm/aqsettings.kcfgc b/kcm/aqsettings.kcfgc new file mode 100644 index 0000000..51736df --- /dev/null +++ b/kcm/aqsettings.kcfgc @@ -0,0 +1,9 @@ +# Code generation options for kconfig_compiler +File=../src/aquamarine.kcfg +ClassName=AqSettings +Singleton=true +Mutators=false +# Inherits=KConfigSkeleton +# IncludeFiles= +# MemberVariables=public + diff --git a/kcm/aquamarine_ui.ui b/kcm/aquamarine_ui.ui new file mode 100644 index 0000000..b8592f3 --- /dev/null +++ b/kcm/aquamarine_ui.ui @@ -0,0 +1,293 @@ +<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> +<class>AquamarineWidget</class> +<widget class="QWidget"> + <property name="name"> + <cstring>AquamarineWidget</cstring> + </property> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>716</width> + <height>376</height> + </rect> + </property> + <property name="sizePolicy"> + <sizepolicy> + <hsizetype>5</hsizetype> + <vsizetype>5</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="caption"> + <string>AquamarineWidget</string> + </property> + <widget class="QGroupBox"> + <property name="name"> + <cstring>Shadows</cstring> + </property> + <property name="geometry"> + <rect> + <x>310</x> + <y>20</y> + <width>280</width> + <height>210</height> + </rect> + </property> + <property name="title"> + <string>Shadows</string> + </property> + <widget class="QLabel"> + <property name="name"> + <cstring>textLabel6</cstring> + </property> + <property name="geometry"> + <rect> + <x>10</x> + <y>80</y> + <width>151</width> + <height>20</height> + </rect> + </property> + <property name="text"> + <string>Shadow color:</string> + </property> + </widget> + <widget class="QLabel"> + <property name="name"> + <cstring>textLabel2</cstring> + </property> + <property name="geometry"> + <rect> + <x>10</x> + <y>110</y> + <width>161</width> + <height>20</height> + </rect> + </property> + <property name="text"> + <string>Shadow opacity:</string> + </property> + </widget> + <widget class="QLabel"> + <property name="name"> + <cstring>textLabel5</cstring> + </property> + <property name="geometry"> + <rect> + <x>10</x> + <y>140</y> + <width>171</width> + <height>20</height> + </rect> + </property> + <property name="text"> + <string>Shadow offset X:</string> + </property> + </widget> + <widget class="QLabel"> + <property name="name"> + <cstring>textLabel1</cstring> + </property> + <property name="geometry"> + <rect> + <x>10</x> + <y>50</y> + <width>150</width> + <height>20</height> + </rect> + </property> + <property name="text"> + <string>Shadow radius:</string> + </property> + </widget> + <widget class="QCheckBox"> + <property name="name"> + <cstring>kcfg_DrawShadows</cstring> + </property> + <property name="geometry"> + <rect> + <x>10</x> + <y>20</y> + <width>250</width> + <height>20</height> + </rect> + </property> + <property name="text"> + <string>Enab&le Shadows</string> + </property> + <property name="accel"> + <string>Alt+L</string> + </property> + </widget> + <widget class="QSpinBox"> + <property name="name"> + <cstring>kcfg_ShadowRadius</cstring> + </property> + <property name="geometry"> + <rect> + <x>180</x> + <y>50</y> + <width>60</width> + <height>20</height> + </rect> + </property> + </widget> + <widget class="QSpinBox"> + <property name="name"> + <cstring>kcfg_ShadowOpacity</cstring> + </property> + <property name="geometry"> + <rect> + <x>180</x> + <y>110</y> + <width>60</width> + <height>20</height> + </rect> + </property> + </widget> + <widget class="QSpinBox"> + <property name="name"> + <cstring>kcfg_ShadowOffsetX</cstring> + </property> + <property name="geometry"> + <rect> + <x>180</x> + <y>140</y> + <width>60</width> + <height>20</height> + </rect> + </property> + </widget> + <widget class="KColorButton"> + <property name="name"> + <cstring>kcfg_ShadowColor</cstring> + </property> + <property name="geometry"> + <rect> + <x>180</x> + <y>80</y> + <width>60</width> + <height>20</height> + </rect> + </property> + <property name="text"> + <string></string> + </property> + </widget> + <widget class="QSpinBox"> + <property name="name"> + <cstring>kcfg_ShadowOffsetY</cstring> + </property> + <property name="geometry"> + <rect> + <x>180</x> + <y>170</y> + <width>60</width> + <height>20</height> + </rect> + </property> + </widget> + <widget class="QLabel"> + <property name="name"> + <cstring>textLabel4</cstring> + </property> + <property name="geometry"> + <rect> + <x>10</x> + <y>170</y> + <width>150</width> + <height>20</height> + </rect> + </property> + <property name="text"> + <string>Shadow offset Y:</string> + </property> + </widget> + </widget> + <widget class="QGroupBox"> + <property name="name"> + <cstring>groupBox3</cstring> + </property> + <property name="geometry"> + <rect> + <x>20</x> + <y>20</y> + <width>270</width> + <height>210</height> + </rect> + </property> + <property name="title"> + <string>Opacity</string> + </property> + <widget class="QSpinBox"> + <property name="name"> + <cstring>kcfg_ActiveOpacity</cstring> + </property> + <property name="geometry"> + <rect> + <x>190</x> + <y>50</y> + <width>60</width> + <height>20</height> + </rect> + </property> + </widget> + <widget class="QLabel"> + <property name="name"> + <cstring>textLabel7</cstring> + </property> + <property name="geometry"> + <rect> + <x>10</x> + <y>50</y> + <width>150</width> + <height>20</height> + </rect> + </property> + <property name="text"> + <string>Active window opacity:</string> + </property> + </widget> + <widget class="QSpinBox"> + <property name="name"> + <cstring>kcfg_InactiveOpacity</cstring> + </property> + <property name="geometry"> + <rect> + <x>190</x> + <y>80</y> + <width>60</width> + <height>20</height> + </rect> + </property> + </widget> + <widget class="QLabel"> + <property name="name"> + <cstring>textLabel3</cstring> + </property> + <property name="geometry"> + <rect> + <x>10</x> + <y>80</y> + <width>140</width> + <height>20</height> + </rect> + </property> + <property name="text"> + <string>Inactive window opacity:</string> + </property> + </widget> + </widget> +</widget> +<customwidgets> +</customwidgets> +<slots> + <slot>kcfg_DrawShadows_clicked()</slot> +</slots> +<layoutdefaults spacing="6" margin="11"/> +<includehints> + <includehint>kcolorbutton.h</includehint> +</includehints> +</UI> diff --git a/kcm/beryl.desktop b/kcm/beryl.desktop index 00a7b5b..c139022 100644 --- a/kcm/beryl.desktop +++ b/kcm/beryl.desktop @@ -8,4 +8,6 @@ X-KDE-Library=beryl X-KDE-FactoryName=beryl X-KDE-ParentApp=kcontrol +Name=Beryl + Categories=Qt;KDE;X-KDE-settings-looknfeel; diff --git a/kcm/main.cpp b/kcm/main.cpp index 4157bec..7cdfdc0 100644 --- a/kcm/main.cpp +++ b/kcm/main.cpp @@ -19,21 +19,27 @@ * */ +#include "aqsettings.h" + +#include <qtabwidget.h> +#include <qlayout.h> + #include <kapplication.h> #include <kaboutdata.h> #include <kconfig.h> +#include <kdialog.h> #include <kdebug.h> #include <dcopclient.h> #include <kgenericfactory.h> #include "main.h" +#include "aquamarine_ui.h" typedef KGenericFactory<KCMBeryl, QWidget> KCMBerylFactory; K_EXPORT_COMPONENT_FACTORY( kcm_beryl, KCMBerylFactory("kcmberyl")) KCMBeryl::~KCMBeryl( ) { - printf("Unload\n"); } KCMBeryl::KCMBeryl(QWidget *parent, const char *name, const QStringList &) @@ -47,17 +53,38 @@ KCMBeryl::KCMBeryl(QWidget *parent, const char *name, const QStringList &) about->addAuthor("Dennis Kasprzyk", 0, "onestone@beryl-project.org"); setAboutData( about ); + + m_tabs = new QTabWidget( this ); + + + AquamarineWidget *aq = new AquamarineWidget(m_tabs, "Aquamarine"); + m_tabs->addTab(aq, "Aquamarine"); + + addConfig(AqSettings::self(),aq); + + QVBoxLayout *top = new QVBoxLayout( this, 0, KDialog::spacingHint() ); + top->addWidget( m_tabs ); + + load(); } + void KCMBeryl::load() { + KCModule::load(); } void KCMBeryl::save() { + KCModule::save(); + DCOPClient *client = kapp->dcopClient(); + if (!client->isAttached()) + client->attach(); + client->send("kwin", "KWinInterface", "reconfigure()", ""); } void KCMBeryl::defaults() { + KCModule::defaults(); } @@ -24,7 +24,7 @@ #include <kcmodule.h> - +class QTabWidget; class KCMBeryl: public KCModule { @@ -40,6 +40,8 @@ public: private: + QTabWidget *m_tabs; + }; |