get rid of Plasma::Constraint

This commit is contained in:
Marco Martin 2013-05-14 18:08:58 +02:00
parent e07600a83f
commit ad2fe77745
11 changed files with 17 additions and 17 deletions

View File

@ -293,12 +293,12 @@ Package Applet::package() const
return d->package ? *d->package : Package();
}
void Applet::updateConstraints(Plasma::Constraints constraints)
void Applet::updateConstraints(Plasma::Types::Constraints constraints)
{
d->scheduleConstraintsUpdate(constraints);
}
void Applet::constraintsEvent(Plasma::Constraints constraints)
void Applet::constraintsEvent(Plasma::Types::Constraints constraints)
{
//NOTE: do NOT put any code in here that reacts to constraints updates
// as it will not get called for any applet that reimplements constraintsEvent
@ -431,7 +431,7 @@ void Applet::flushPendingConstraintsEvents()
}
//kDebug() << "fushing constraints: " << d->pendingConstraints << "!!!!!!!!!!!!!!!!!!!!!!!!!!!";
Plasma::Constraints c = d->pendingConstraints;
Plasma::Types::Constraints c = d->pendingConstraints;
d->pendingConstraints = Types::NoConstraint;
if (c & Plasma::Types::StartupCompletedConstraint) {

View File

@ -225,7 +225,7 @@ class PLASMA_EXPORT Applet : public QObject
*
* @param constraints the type of constraints that were updated
*/
void updateConstraints(Plasma::Constraints constraints = Plasma::Types::AllConstraints);
void updateConstraints(Plasma::Types::Constraints constraints = Plasma::Types::AllConstraints);
//METADATA
@ -546,7 +546,7 @@ class PLASMA_EXPORT Applet : public QObject
* @param constraints the type of constraints that were updated
* @property constraint
*/
virtual void constraintsEvent(Plasma::Constraints constraints);
virtual void constraintsEvent(Plasma::Types::Constraints constraints);
//TODO: timerEvent should go into AppletPrivate
/**

View File

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

View File

@ -317,7 +317,7 @@ QString AppletPrivate::globalName() const
return appletDescription.service()->library();
}
void AppletPrivate::scheduleConstraintsUpdate(Plasma::Constraints c)
void AppletPrivate::scheduleConstraintsUpdate(Plasma::Types::Constraints c)
{
// Don't start up a timer if we're just starting up
// flushPendingConstraints will be called by Corona

View File

@ -62,7 +62,7 @@ public:
void setIsContainment(bool isContainment, bool forceUpdate = false);
QString globalName() const;
void scheduleConstraintsUpdate(Plasma::Constraints c);
void scheduleConstraintsUpdate(Plasma::Types::Constraints c);
void scheduleModificationNotification();
KConfigGroup *mainConfigGroup();
void resetConfigurationObject();
@ -89,7 +89,7 @@ public:
// bookkeeping
KConfigGroup *mainConfig;
Plasma::Constraints pendingConstraints;
Plasma::Types::Constraints pendingConstraints;
// sripting and package stuff
AppletScript *script;

View File

@ -187,7 +187,7 @@ void ContainmentPrivate::triggerShowAddWidgets()
emit q->showAddWidgetsInterface(QPointF());
}
void ContainmentPrivate::containmentConstraintsEvent(Plasma::Constraints constraints)
void ContainmentPrivate::containmentConstraintsEvent(Plasma::Types::Constraints constraints)
{
if (!q->isContainment()) {
return;
@ -218,7 +218,7 @@ void ContainmentPrivate::containmentConstraintsEvent(Plasma::Constraints constra
}
// pass on the constraints that are relevant here
Constraints appletConstraints = Types::NoConstraint;
Types::Constraints appletConstraints = Types::NoConstraint;
if (constraints & Types::FormFactorConstraint) {
appletConstraints |= Types::FormFactorConstraint;
}

View File

@ -73,7 +73,7 @@ public:
* constraint services common to all containments. Containments should still
* implement their own constraintsEvent method
*/
void containmentConstraintsEvent(Plasma::Constraints constraints);
void containmentConstraintsEvent(Plasma::Types::Constraints constraints);
bool isPanelContainment() const;
void setLockToolText();

View File

@ -66,7 +66,7 @@ void AppletScript::paintInterface(QPainter *painter,
Q_UNUSED(contentsRect);
}
void AppletScript::constraintsEvent(Plasma::Constraints constraints)
void AppletScript::constraintsEvent(Plasma::Types::Constraints constraints)
{
Q_UNUSED(constraints);
}

View File

@ -94,7 +94,7 @@ public:
*
* @param constraints the type of constraints that were updated
*/
virtual void constraintsEvent(Plasma::Constraints constraints);
virtual void constraintsEvent(Plasma::Types::Constraints constraints);
/**
* Returns a list of context-related QAction instances.

View File

@ -129,7 +129,7 @@ QObject *DeclarativeAppletScript::loadui(const QString &filename)
}
void DeclarativeAppletScript::constraintsEvent(Plasma::Constraints constraints)
void DeclarativeAppletScript::constraintsEvent(Plasma::Types::Constraints constraints)
{
if (constraints & Plasma::Types::FormFactorConstraint) {
emit formFactorChanged();

View File

@ -43,7 +43,7 @@ public:
QList<QAction*> contextualActions();
void constraintsEvent(Plasma::Constraints constraints);
void constraintsEvent(Plasma::Types::Constraints constraints);
bool include(const QString &path);