diff --git a/private/actionwidgetinterface_p.h b/private/actionwidgetinterface_p.h index ba8943315..59ce0671d 100644 --- a/private/actionwidgetinterface_p.h +++ b/private/actionwidgetinterface_p.h @@ -34,7 +34,7 @@ public: QAction *action; ActionWidgetInterface(T *parent) - : ThemedWidgetInterface(parent) + : ThemedWidgetInterface(parent), action(0) { } @@ -57,20 +57,20 @@ public: void syncToAction() { if (!action) { - q->setIcon(QIcon()); - q->setText(QString()); - q->setEnabled(false); + ThemedWidgetInterface::q->setIcon(QIcon()); + ThemedWidgetInterface::q->setText(QString()); + ThemedWidgetInterface::q->setEnabled(false); return; } //we don't get told *what* changed, just that something changed //so we update everything we care about - q->setIcon(action->icon()); - q->setText(action->iconText()); - q->setEnabled(action->isEnabled()); - q->setVisible(action->isVisible()); + ThemedWidgetInterface::q->setIcon(action->icon()); + ThemedWidgetInterface::q->setText(action->iconText()); + ThemedWidgetInterface::q->setEnabled(action->isEnabled()); + ThemedWidgetInterface::q->setVisible(action->isVisible()); - if (!q->toolTip().isEmpty()) { - q->setToolTip(action->text()); + if (!ThemedWidgetInterface::q->toolTip().isEmpty()) { + ThemedWidgetInterface::q->setToolTip(action->text()); } changed(); @@ -79,16 +79,16 @@ public: void setAction(QAction *a) { if (action) { - QObject::disconnect(action, 0, t, 0); - QObject::disconnect(t, 0, action, 0); + QObject::disconnect(action, 0, ThemedWidgetInterface::q, 0); + QObject::disconnect(ThemedWidgetInterface::q, 0, action, 0); } action = a; if (action) { - QObject::connect(action, SIGNAL(changed()), t, SLOT(syncToAction())); - QObject::connect(action, SIGNAL(destroyed(QObject*)), t, SLOT(clearAction())); - QObject::connect(t, SIGNAL(clicked()), action, SLOT(trigger())); + QObject::connect(action, SIGNAL(changed()), ThemedWidgetInterface::q, SLOT(syncToAction())); + QObject::connect(action, SIGNAL(destroyed(QObject*)), ThemedWidgetInterface::q, SLOT(clearAction())); + QObject::connect(ThemedWidgetInterface::q, SIGNAL(clicked()), action, SLOT(trigger())); syncToAction(); } } diff --git a/private/storage.cpp b/private/storage.cpp index 654b94ca8..0e732ce11 100644 --- a/private/storage.cpp +++ b/private/storage.cpp @@ -2,6 +2,7 @@ // storage.cpp // // // // Copyright (C) 2010 Brian Pritchett // +// Copyright (C) 2010 Marco Martin // // // // This library is free software; you can redistribute it and/or // // modify it under the terms of the GNU Lesser General Public // diff --git a/private/storage_p.h b/private/storage_p.h index c4ca5d395..3aa50509b 100644 --- a/private/storage_p.h +++ b/private/storage_p.h @@ -2,6 +2,7 @@ // storage.h // // // // Copyright (C) 2010 Brian Pritchett // +// Copyright (C) 2010 Marco Martin // // // // This library is free software; you can redistribute it and/or // // modify it under the terms of the GNU Lesser General Public // diff --git a/private/themedwidgetinterface_p.h b/private/themedwidgetinterface_p.h index 2731f246f..20d308dc5 100644 --- a/private/themedwidgetinterface_p.h +++ b/private/themedwidgetinterface_p.h @@ -17,8 +17,8 @@ * Boston, MA 02110-1301, USA. * *******************************************************************************/ -#ifndef ACTIONWIDGETINTERFACE_P_H -#define ACTIONWIDGETINTERFACE_P_H +#ifndef THEMEDWIDGETINTERFACE_P_H +#define THEMEDWIDGETINTERFACE_P_H #include "kglobalsettings.h" #include @@ -88,7 +88,7 @@ public: break; case QEvent::PaletteChange: - customPalette = true; + // customPalette = true; break; default: diff --git a/widgets/frame.cpp b/widgets/frame.cpp index 0345f63ca..6d1dd391b 100644 --- a/widgets/frame.cpp +++ b/widgets/frame.cpp @@ -36,10 +36,10 @@ namespace Plasma { -class FramePrivate +class FramePrivate : public ThemedWidgetInterface { public: - FramePrivate(Frame *parent) : ThemedWidgetInterface + FramePrivate(Frame *parent) : ThemedWidgetInterface(parent), svg(0), image(0), diff --git a/widgets/groupbox.cpp b/widgets/groupbox.cpp index d4fe80dec..171ad5f14 100644 --- a/widgets/groupbox.cpp +++ b/widgets/groupbox.cpp @@ -32,7 +32,7 @@ namespace Plasma { -class GroupBoxPrivate : ThemedWidgetInterface +class GroupBoxPrivate : public ThemedWidgetInterface { public: GroupBoxPrivate(GroupBox *groupBox) diff --git a/widgets/iconwidget.cpp b/widgets/iconwidget.cpp index 82707388b..859fd4bc9 100644 --- a/widgets/iconwidget.cpp +++ b/widgets/iconwidget.cpp @@ -116,7 +116,7 @@ IconWidgetPrivate::IconWidgetPrivate(IconWidget *i) drawBg(false), textBgCustomized(false) { - d->initTheming(); + initTheming(); } IconWidgetPrivate::~IconWidgetPrivate() diff --git a/widgets/iconwidget_p.h b/widgets/iconwidget_p.h index ded51c039..369ec613a 100644 --- a/widgets/iconwidget_p.h +++ b/widgets/iconwidget_p.h @@ -30,6 +30,7 @@ #include #include +#include #include #include #include @@ -216,13 +217,11 @@ public: void readColors(); void colorConfigChanged(); void iconConfigChanged(); - QFont widgetFont() const; void hoverAnimationFinished(); void init(); void layoutIcons(const QStyleOptionGraphicsItem *option); void animateMainIcon(bool, const IconWidgetStates state); - IconWidget *q; QString text; QString infoText; Svg *iconSvg; @@ -280,7 +279,7 @@ void IconWidgetPrivate::setLayoutOptions(QTextLayout &layout, textoption.setWrapMode(QTextOption::WordWrap); // NOTE: assumption as well - layout.setFont(widgetFont()); + layout.setFont(q->font()); layout.setTextOption(textoption); } diff --git a/widgets/lineedit.cpp b/widgets/lineedit.cpp index 0c917710a..0179999dc 100644 --- a/widgets/lineedit.cpp +++ b/widgets/lineedit.cpp @@ -36,10 +36,10 @@ namespace Plasma { -class LineEditPrivate +class LineEditPrivate : public ThemedWidgetInterface { public: - LineEditPrivate(LineEdit *lineEdit) : ThemedWidgetInterface