From 9b9fbf6eb9d2b92ef908860169c9755201e7595d Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Tue, 14 May 2013 18:19:33 +0200 Subject: [PATCH] get rid of Plasma::FormFactor --- src/plasma/applet.cpp | 2 +- src/plasma/applet.h | 6 +++--- src/plasma/containment.cpp | 8 ++++---- src/plasma/containment.h | 4 ++-- src/plasma/plasma.h | 2 +- src/plasma/private/containment_p.h | 4 ++-- src/shell/scripting/panel.cpp | 4 ++-- src/shell/view.cpp | 10 +++++----- src/shell/view.h | 6 +++--- 9 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/plasma/applet.cpp b/src/plasma/applet.cpp index c477497a4..950515052 100644 --- a/src/plasma/applet.cpp +++ b/src/plasma/applet.cpp @@ -517,7 +517,7 @@ KActionCollection *Applet::actions() const return d->actions; } -FormFactor Applet::formFactor() const +Types::FormFactor Applet::formFactor() const { Containment *c = containment(); QObject *pw = qobject_cast(parent()); diff --git a/src/plasma/applet.h b/src/plasma/applet.h index 24d200e62..51ebd2ea9 100644 --- a/src/plasma/applet.h +++ b/src/plasma/applet.h @@ -138,21 +138,21 @@ class PLASMA_EXPORT Applet : public QObject * @return the status of the applet * @since 4.4 */ - ItemStatus status() const; + Types::ItemStatus status() const; /** * Returns the current form factor the applet is being displayed in. * * @see Plasma::FormFactor */ - FormFactor formFactor() const; + Types::FormFactor formFactor() const; /** * Returns the location of the scene which is displaying applet. * * @see Plasma::Location */ - Location location() const; + Types::Location location() const; //CONFIGURATION /** diff --git a/src/plasma/containment.cpp b/src/plasma/containment.cpp index f7aeea575..39c8814cc 100644 --- a/src/plasma/containment.cpp +++ b/src/plasma/containment.cpp @@ -178,8 +178,8 @@ void Containment::restore(KConfigGroup &group) return; } - setLocation((Plasma::Location)group.readEntry("location", (int)d->location)); - setFormFactor((Plasma::FormFactor)group.readEntry("formfactor", (int)d->formFactor)); + setLocation((Plasma::Types::Location)group.readEntry("location", (int)d->location)); + setFormFactor((Plasma::Types::FormFactor)group.readEntry("formfactor", (int)d->formFactor)); //kDebug() << "setScreen from restore"; d->setScreen(group.readEntry("screen", d->screen)); d->activityId = group.readEntry("activityId", QString()); @@ -310,7 +310,7 @@ Corona *Containment::corona() const return qobject_cast(parent()); } -void Containment::setFormFactor(FormFactor formFactor) +void Containment::setFormFactor(Types::FormFactor formFactor) { if (d->formFactor == formFactor) { return; @@ -327,7 +327,7 @@ void Containment::setFormFactor(FormFactor formFactor) emit formFactorChanged(formFactor); } -void Containment::setLocation(Location location) +void Containment::setLocation(Types::Location location) { if (d->location == location) { return; diff --git a/src/plasma/containment.h b/src/plasma/containment.h index 007e7f6eb..79c4be5e6 100644 --- a/src/plasma/containment.h +++ b/src/plasma/containment.h @@ -260,7 +260,7 @@ Q_SIGNALS: * Emitted when the formFactor has changed * @since 5.0 */ - void formFactorChanged(Plasma::FormFactor formFactor); + void formFactorChanged(Plasma::Types::FormFactor formFactor); public Q_SLOTS: /** @@ -277,7 +277,7 @@ Q_SIGNALS: * the arrangement of Applets as well as the display choices of individual * Applets. */ - void setFormFactor(Plasma::FormFactor formFactor); + void setFormFactor(Plasma::Types::FormFactor formFactor); /** * Sets the type of this containment. diff --git a/src/plasma/plasma.h b/src/plasma/plasma.h index f3613cc8e..43d7144f4 100644 --- a/src/plasma/plasma.h +++ b/src/plasma/plasma.h @@ -301,7 +301,7 @@ PLASMA_EXPORT Types::Direction locationToInverseDirection(Types::Location locati //TODO: remove //typedef Types::Constraint Constraint; //Q_DECLARE_FLAGS(Constraints, Constraint) -typedef Types::FormFactor FormFactor; +//typedef Types::FormFactor FormFactor; typedef Types::ContainmentType ContainmentType; typedef Types::ActionType ActionType; typedef Types::Direction Direction; diff --git a/src/plasma/private/containment_p.h b/src/plasma/private/containment_p.h index 7e681160d..41d39ea7f 100644 --- a/src/plasma/private/containment_p.h +++ b/src/plasma/private/containment_p.h @@ -95,8 +95,8 @@ public: static void addDefaultActions(KActionCollection *actions, Containment *c = 0); Containment *q; - FormFactor formFactor; - Location location; + Types::FormFactor formFactor; + Types::Location location; QList applets; QString wallpaper; QHash localActionPlugins; diff --git a/src/shell/scripting/panel.cpp b/src/shell/scripting/panel.cpp index fc2936b8d..b1135c24f 100644 --- a/src/shell/scripting/panel.cpp +++ b/src/shell/scripting/panel.cpp @@ -86,8 +86,8 @@ void Panel::setLocation(const QString &locationString) } const QString lower = locationString.toLower(); - Plasma::Location loc = Plasma::Types::Floating; - Plasma::FormFactor ff = Plasma::Types::Planar; + Plasma::Types::Location loc = Plasma::Types::Floating; + Plasma::Types::FormFactor ff = Plasma::Types::Planar; if (lower == "desktop") { loc = Plasma::Types::Desktop; } else if (lower == "fullscreen") { diff --git a/src/shell/view.cpp b/src/shell/view.cpp index 3411078d4..710f5fd3f 100644 --- a/src/shell/view.cpp +++ b/src/shell/view.cpp @@ -75,8 +75,8 @@ void View::init() void View::setContainment(Plasma::Containment *cont) { - Plasma::Location oldLoc = (Plasma::Location)location(); - Plasma::FormFactor oldForm = formFactor(); + Plasma::Types::Location oldLoc = (Plasma::Types::Location)location(); + Plasma::Types::FormFactor oldForm = formFactor(); if (m_containment) { disconnect(m_containment.data(), 0, this, 0); @@ -90,7 +90,7 @@ void View::setContainment(Plasma::Containment *cont) m_containment = cont; if (oldLoc != location()) { - emit locationChanged((Plasma::Location)location()); + emit locationChanged((Plasma::Types::Location)location()); } if (oldForm != formFactor()) { emit formFactorChanged(formFactor()); @@ -133,7 +133,7 @@ Plasma::Containment *View::containment() const //FIXME: wrong types void View::setLocation(int location) { - m_containment.data()->setLocation((Plasma::Location)location); + m_containment.data()->setLocation((Plasma::Types::Location)location); } //FIXME: wrong types @@ -145,7 +145,7 @@ int View::location() const return m_containment.data()->location(); } -Plasma::FormFactor View::formFactor() const +Plasma::Types::FormFactor View::formFactor() const { if (!m_containment) { return Plasma::Types::Planar; diff --git a/src/shell/view.h b/src/shell/view.h index ff859ee89..1ae339454 100644 --- a/src/shell/view.h +++ b/src/shell/view.h @@ -51,7 +51,7 @@ public: int location() const; void setLocation(int location); - Plasma::FormFactor formFactor() const; + Plasma::Types::FormFactor formFactor() const; QRectF screenGeometry(); @@ -59,8 +59,8 @@ protected Q_SLOTS: void showConfigurationInterface(Plasma::Applet *applet); Q_SIGNALS: - void locationChanged(Plasma::Location location); - void formFactorChanged(Plasma::FormFactor formFactor); + void locationChanged(Plasma::Types::Location location); + void formFactorChanged(Plasma::Types::FormFactor formFactor); void containmentChanged(); void screenGeometryChanged();