get rid of Plasma::FormFactor

This commit is contained in:
Marco Martin 2013-05-14 18:19:33 +02:00
parent ad2fe77745
commit 9b9fbf6eb9
9 changed files with 23 additions and 23 deletions

View File

@ -517,7 +517,7 @@ KActionCollection *Applet::actions() const
return d->actions; return d->actions;
} }
FormFactor Applet::formFactor() const Types::FormFactor Applet::formFactor() const
{ {
Containment *c = containment(); Containment *c = containment();
QObject *pw = qobject_cast<QObject *>(parent()); QObject *pw = qobject_cast<QObject *>(parent());

View File

@ -138,21 +138,21 @@ class PLASMA_EXPORT Applet : public QObject
* @return the status of the applet * @return the status of the applet
* @since 4.4 * @since 4.4
*/ */
ItemStatus status() const; Types::ItemStatus status() const;
/** /**
* Returns the current form factor the applet is being displayed in. * Returns the current form factor the applet is being displayed in.
* *
* @see Plasma::FormFactor * @see Plasma::FormFactor
*/ */
FormFactor formFactor() const; Types::FormFactor formFactor() const;
/** /**
* Returns the location of the scene which is displaying applet. * Returns the location of the scene which is displaying applet.
* *
* @see Plasma::Location * @see Plasma::Location
*/ */
Location location() const; Types::Location location() const;
//CONFIGURATION //CONFIGURATION
/** /**

View File

@ -178,8 +178,8 @@ void Containment::restore(KConfigGroup &group)
return; return;
} }
setLocation((Plasma::Location)group.readEntry("location", (int)d->location)); setLocation((Plasma::Types::Location)group.readEntry("location", (int)d->location));
setFormFactor((Plasma::FormFactor)group.readEntry("formfactor", (int)d->formFactor)); setFormFactor((Plasma::Types::FormFactor)group.readEntry("formfactor", (int)d->formFactor));
//kDebug() << "setScreen from restore"; //kDebug() << "setScreen from restore";
d->setScreen(group.readEntry("screen", d->screen)); d->setScreen(group.readEntry("screen", d->screen));
d->activityId = group.readEntry("activityId", QString()); d->activityId = group.readEntry("activityId", QString());
@ -310,7 +310,7 @@ Corona *Containment::corona() const
return qobject_cast<Corona*>(parent()); return qobject_cast<Corona*>(parent());
} }
void Containment::setFormFactor(FormFactor formFactor) void Containment::setFormFactor(Types::FormFactor formFactor)
{ {
if (d->formFactor == formFactor) { if (d->formFactor == formFactor) {
return; return;
@ -327,7 +327,7 @@ void Containment::setFormFactor(FormFactor formFactor)
emit formFactorChanged(formFactor); emit formFactorChanged(formFactor);
} }
void Containment::setLocation(Location location) void Containment::setLocation(Types::Location location)
{ {
if (d->location == location) { if (d->location == location) {
return; return;

View File

@ -260,7 +260,7 @@ Q_SIGNALS:
* Emitted when the formFactor has changed * Emitted when the formFactor has changed
* @since 5.0 * @since 5.0
*/ */
void formFactorChanged(Plasma::FormFactor formFactor); void formFactorChanged(Plasma::Types::FormFactor formFactor);
public Q_SLOTS: public Q_SLOTS:
/** /**
@ -277,7 +277,7 @@ Q_SIGNALS:
* the arrangement of Applets as well as the display choices of individual * the arrangement of Applets as well as the display choices of individual
* Applets. * Applets.
*/ */
void setFormFactor(Plasma::FormFactor formFactor); void setFormFactor(Plasma::Types::FormFactor formFactor);
/** /**
* Sets the type of this containment. * Sets the type of this containment.

View File

@ -301,7 +301,7 @@ PLASMA_EXPORT Types::Direction locationToInverseDirection(Types::Location locati
//TODO: remove //TODO: remove
//typedef Types::Constraint Constraint; //typedef Types::Constraint Constraint;
//Q_DECLARE_FLAGS(Constraints, Constraint) //Q_DECLARE_FLAGS(Constraints, Constraint)
typedef Types::FormFactor FormFactor; //typedef Types::FormFactor FormFactor;
typedef Types::ContainmentType ContainmentType; typedef Types::ContainmentType ContainmentType;
typedef Types::ActionType ActionType; typedef Types::ActionType ActionType;
typedef Types::Direction Direction; typedef Types::Direction Direction;

View File

@ -95,8 +95,8 @@ public:
static void addDefaultActions(KActionCollection *actions, Containment *c = 0); static void addDefaultActions(KActionCollection *actions, Containment *c = 0);
Containment *q; Containment *q;
FormFactor formFactor; Types::FormFactor formFactor;
Location location; Types::Location location;
QList<Applet *> applets; QList<Applet *> applets;
QString wallpaper; QString wallpaper;
QHash<QString, ContainmentActions*> localActionPlugins; QHash<QString, ContainmentActions*> localActionPlugins;

View File

@ -86,8 +86,8 @@ void Panel::setLocation(const QString &locationString)
} }
const QString lower = locationString.toLower(); const QString lower = locationString.toLower();
Plasma::Location loc = Plasma::Types::Floating; Plasma::Types::Location loc = Plasma::Types::Floating;
Plasma::FormFactor ff = Plasma::Types::Planar; Plasma::Types::FormFactor ff = Plasma::Types::Planar;
if (lower == "desktop") { if (lower == "desktop") {
loc = Plasma::Types::Desktop; loc = Plasma::Types::Desktop;
} else if (lower == "fullscreen") { } else if (lower == "fullscreen") {

View File

@ -75,8 +75,8 @@ void View::init()
void View::setContainment(Plasma::Containment *cont) void View::setContainment(Plasma::Containment *cont)
{ {
Plasma::Location oldLoc = (Plasma::Location)location(); Plasma::Types::Location oldLoc = (Plasma::Types::Location)location();
Plasma::FormFactor oldForm = formFactor(); Plasma::Types::FormFactor oldForm = formFactor();
if (m_containment) { if (m_containment) {
disconnect(m_containment.data(), 0, this, 0); disconnect(m_containment.data(), 0, this, 0);
@ -90,7 +90,7 @@ void View::setContainment(Plasma::Containment *cont)
m_containment = cont; m_containment = cont;
if (oldLoc != location()) { if (oldLoc != location()) {
emit locationChanged((Plasma::Location)location()); emit locationChanged((Plasma::Types::Location)location());
} }
if (oldForm != formFactor()) { if (oldForm != formFactor()) {
emit formFactorChanged(formFactor()); emit formFactorChanged(formFactor());
@ -133,7 +133,7 @@ Plasma::Containment *View::containment() const
//FIXME: wrong types //FIXME: wrong types
void View::setLocation(int location) void View::setLocation(int location)
{ {
m_containment.data()->setLocation((Plasma::Location)location); m_containment.data()->setLocation((Plasma::Types::Location)location);
} }
//FIXME: wrong types //FIXME: wrong types
@ -145,7 +145,7 @@ int View::location() const
return m_containment.data()->location(); return m_containment.data()->location();
} }
Plasma::FormFactor View::formFactor() const Plasma::Types::FormFactor View::formFactor() const
{ {
if (!m_containment) { if (!m_containment) {
return Plasma::Types::Planar; return Plasma::Types::Planar;

View File

@ -51,7 +51,7 @@ public:
int location() const; int location() const;
void setLocation(int location); void setLocation(int location);
Plasma::FormFactor formFactor() const; Plasma::Types::FormFactor formFactor() const;
QRectF screenGeometry(); QRectF screenGeometry();
@ -59,8 +59,8 @@ protected Q_SLOTS:
void showConfigurationInterface(Plasma::Applet *applet); void showConfigurationInterface(Plasma::Applet *applet);
Q_SIGNALS: Q_SIGNALS:
void locationChanged(Plasma::Location location); void locationChanged(Plasma::Types::Location location);
void formFactorChanged(Plasma::FormFactor formFactor); void formFactorChanged(Plasma::Types::FormFactor formFactor);
void containmentChanged(); void containmentChanged();
void screenGeometryChanged(); void screenGeometryChanged();