From 2abe1e6f4022109b1e179242aa9765810d7f680c Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 18 Dec 2009 02:32:16 +0000 Subject: * ark context un[tar/zip/bz] crash repair * gcc4.4 compilation fixes * superkaramba xmms sensor addition * automake updates git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeutils@1063396 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kmilo/kmilod/defaultskin.cpp | 32 +++++++++++ kmilo/kmilod/defaultskin.h | 1 + kmilo/kmilod/defaultwidget.ui | 127 +++--------------------------------------- 3 files changed, 42 insertions(+), 118 deletions(-) (limited to 'kmilo/kmilod') diff --git a/kmilo/kmilod/defaultskin.cpp b/kmilo/kmilod/defaultskin.cpp index f0324de..a0ef2b0 100644 --- a/kmilo/kmilod/defaultskin.cpp +++ b/kmilo/kmilod/defaultskin.cpp @@ -33,6 +33,7 @@ #include #include #include +#include #include "defaultskin.h" @@ -49,6 +50,9 @@ DefaultSkin::DefaultSkin() { KWin::setType(_widget->winId(), NET::Override); _widget->hide(); + + KConfig config("kmilodrc"); + reconfigure( &config ); } @@ -57,6 +61,34 @@ DefaultSkin::~DefaultSkin() { _widget = 0; } +void DefaultSkin::reconfigure( KConfig *config ) { + + config->setGroup("DefaultSkin"); + + QFont *defaultFont = new QFont("Sans", 10, QFont::Bold ); + QSize *defaultSize = new QSize( 80, 30 ); + QColor *defaultpaletteForegroundColor = new QColor( 200, 200, 200 ); + QColor *defaultpaletteBackgroundColor = new QColor( 100, 100, 100 ); + QFont *defaultProgressFont = new QFont("Sans", 8, QFont::Bold ); + + _widget->resize( config->readSizeEntry("Size", defaultSize ) ); + _widget->setFont( config->readFontEntry("Font", defaultFont ) ); + _widget->setPaletteForegroundColor( config->readColorEntry("paletteForegroundColor", defaultpaletteForegroundColor ) ); + _widget->setPaletteBackgroundColor( config->readColorEntry("paletteBackgroundColor", defaultpaletteBackgroundColor ) ); + _widget->_progress->setFont( config->readFontEntry("ProgressFont", defaultProgressFont ) ); + + if ( ! config->hasGroup("DefaultSkin") ) + { + + config->writeEntry("Size", *defaultSize ); + config->writeEntry("Font", *defaultFont ); + config->writeEntry("paletteForegroundColor", *defaultpaletteForegroundColor ); + config->writeEntry("paletteBackgroundColor", *defaultpaletteBackgroundColor ); + config->writeEntry("ProgressFont", *defaultProgressFont ); + + } + +} void DefaultSkin::clear() { _timer.stop(); diff --git a/kmilo/kmilod/defaultskin.h b/kmilo/kmilod/defaultskin.h index 0e01f23..1610152 100644 --- a/kmilo/kmilod/defaultskin.h +++ b/kmilo/kmilod/defaultskin.h @@ -37,6 +37,7 @@ class DefaultSkin : public QObject, public KMilo::DisplaySkin { virtual ~DefaultSkin(); virtual void clear(); + virtual void reconfigure( KConfig *config ); virtual void displayText(const QString& text, const QPixmap& customPixmap=QPixmap()); virtual void displayProgress(const QString& text, diff --git a/kmilo/kmilod/defaultwidget.ui b/kmilo/kmilod/defaultwidget.ui index b4809fe..65c19d8 100644 --- a/kmilo/kmilod/defaultwidget.ui +++ b/kmilo/kmilod/defaultwidget.ui @@ -7,21 +7,6 @@ Released under the terms of the GNU GPL. DefaultWidget - - - 0 - 0 - 566 - 180 - - - - - 214 - 213 - 212 - - unnamed @@ -30,19 +15,6 @@ Released under the terms of the GNU GPL. _widgetStack - - - 214 - 213 - 212 - - - - StyledPanel - - - Sunken - page @@ -58,26 +30,6 @@ Released under the terms of the GNU GPL. _textOnly - - - 26 - 69 - 198 - - - - - 214 - 213 - 212 - - - - - 28 - 1 - - @@ -98,41 +50,18 @@ Released under the terms of the GNU GPL. unnamed - - - spacer1 - - - Horizontal - - - Expanding - - - - 81 - 31 - - - - + - spacer1_2 - - - Horizontal + _progressText - - Expanding + + - - - 81 - 31 - + + AlignCenter - - + + _progress @@ -144,52 +73,14 @@ Released under the terms of the GNU GPL. 0 - - - 214 - 213 - 212 - - false - - - _progressText - - - - 26 - 69 - 198 - - - - - 214 - 213 - 212 - - - - - 28 - 1 - - - - - - - AlignCenter - - - + -- cgit v1.2.1