get rid of Plasma::Constraint
This commit is contained in:
parent
e07600a83f
commit
ad2fe77745
@ -293,12 +293,12 @@ Package Applet::package() const
|
|||||||
return d->package ? *d->package : Package();
|
return d->package ? *d->package : Package();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Applet::updateConstraints(Plasma::Constraints constraints)
|
void Applet::updateConstraints(Plasma::Types::Constraints constraints)
|
||||||
{
|
{
|
||||||
d->scheduleConstraintsUpdate(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
|
//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
|
// as it will not get called for any applet that reimplements constraintsEvent
|
||||||
@ -431,7 +431,7 @@ void Applet::flushPendingConstraintsEvents()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//kDebug() << "fushing constraints: " << d->pendingConstraints << "!!!!!!!!!!!!!!!!!!!!!!!!!!!";
|
//kDebug() << "fushing constraints: " << d->pendingConstraints << "!!!!!!!!!!!!!!!!!!!!!!!!!!!";
|
||||||
Plasma::Constraints c = d->pendingConstraints;
|
Plasma::Types::Constraints c = d->pendingConstraints;
|
||||||
d->pendingConstraints = Types::NoConstraint;
|
d->pendingConstraints = Types::NoConstraint;
|
||||||
|
|
||||||
if (c & Plasma::Types::StartupCompletedConstraint) {
|
if (c & Plasma::Types::StartupCompletedConstraint) {
|
||||||
|
@ -225,7 +225,7 @@ class PLASMA_EXPORT Applet : public QObject
|
|||||||
*
|
*
|
||||||
* @param constraints the type of constraints that were updated
|
* @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
|
//METADATA
|
||||||
@ -546,7 +546,7 @@ class PLASMA_EXPORT Applet : public QObject
|
|||||||
* @param constraints the type of constraints that were updated
|
* @param constraints the type of constraints that were updated
|
||||||
* @property constraint
|
* @property constraint
|
||||||
*/
|
*/
|
||||||
virtual void constraintsEvent(Plasma::Constraints constraints);
|
virtual void constraintsEvent(Plasma::Types::Constraints constraints);
|
||||||
|
|
||||||
//TODO: timerEvent should go into AppletPrivate
|
//TODO: timerEvent should go into AppletPrivate
|
||||||
/**
|
/**
|
||||||
|
@ -299,8 +299,8 @@ PLASMA_EXPORT Types::Direction locationToInverseDirection(Types::Location locati
|
|||||||
|
|
||||||
//For porting
|
//For porting
|
||||||
//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;
|
||||||
|
@ -317,7 +317,7 @@ QString AppletPrivate::globalName() const
|
|||||||
return appletDescription.service()->library();
|
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
|
// Don't start up a timer if we're just starting up
|
||||||
// flushPendingConstraints will be called by Corona
|
// flushPendingConstraints will be called by Corona
|
||||||
|
@ -62,7 +62,7 @@ public:
|
|||||||
void setIsContainment(bool isContainment, bool forceUpdate = false);
|
void setIsContainment(bool isContainment, bool forceUpdate = false);
|
||||||
|
|
||||||
QString globalName() const;
|
QString globalName() const;
|
||||||
void scheduleConstraintsUpdate(Plasma::Constraints c);
|
void scheduleConstraintsUpdate(Plasma::Types::Constraints c);
|
||||||
void scheduleModificationNotification();
|
void scheduleModificationNotification();
|
||||||
KConfigGroup *mainConfigGroup();
|
KConfigGroup *mainConfigGroup();
|
||||||
void resetConfigurationObject();
|
void resetConfigurationObject();
|
||||||
@ -89,7 +89,7 @@ public:
|
|||||||
|
|
||||||
// bookkeeping
|
// bookkeeping
|
||||||
KConfigGroup *mainConfig;
|
KConfigGroup *mainConfig;
|
||||||
Plasma::Constraints pendingConstraints;
|
Plasma::Types::Constraints pendingConstraints;
|
||||||
|
|
||||||
// sripting and package stuff
|
// sripting and package stuff
|
||||||
AppletScript *script;
|
AppletScript *script;
|
||||||
|
@ -187,7 +187,7 @@ void ContainmentPrivate::triggerShowAddWidgets()
|
|||||||
emit q->showAddWidgetsInterface(QPointF());
|
emit q->showAddWidgetsInterface(QPointF());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ContainmentPrivate::containmentConstraintsEvent(Plasma::Constraints constraints)
|
void ContainmentPrivate::containmentConstraintsEvent(Plasma::Types::Constraints constraints)
|
||||||
{
|
{
|
||||||
if (!q->isContainment()) {
|
if (!q->isContainment()) {
|
||||||
return;
|
return;
|
||||||
@ -218,7 +218,7 @@ void ContainmentPrivate::containmentConstraintsEvent(Plasma::Constraints constra
|
|||||||
}
|
}
|
||||||
|
|
||||||
// pass on the constraints that are relevant here
|
// pass on the constraints that are relevant here
|
||||||
Constraints appletConstraints = Types::NoConstraint;
|
Types::Constraints appletConstraints = Types::NoConstraint;
|
||||||
if (constraints & Types::FormFactorConstraint) {
|
if (constraints & Types::FormFactorConstraint) {
|
||||||
appletConstraints |= Types::FormFactorConstraint;
|
appletConstraints |= Types::FormFactorConstraint;
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@ public:
|
|||||||
* constraint services common to all containments. Containments should still
|
* constraint services common to all containments. Containments should still
|
||||||
* implement their own constraintsEvent method
|
* implement their own constraintsEvent method
|
||||||
*/
|
*/
|
||||||
void containmentConstraintsEvent(Plasma::Constraints constraints);
|
void containmentConstraintsEvent(Plasma::Types::Constraints constraints);
|
||||||
|
|
||||||
bool isPanelContainment() const;
|
bool isPanelContainment() const;
|
||||||
void setLockToolText();
|
void setLockToolText();
|
||||||
|
@ -66,7 +66,7 @@ void AppletScript::paintInterface(QPainter *painter,
|
|||||||
Q_UNUSED(contentsRect);
|
Q_UNUSED(contentsRect);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AppletScript::constraintsEvent(Plasma::Constraints constraints)
|
void AppletScript::constraintsEvent(Plasma::Types::Constraints constraints)
|
||||||
{
|
{
|
||||||
Q_UNUSED(constraints);
|
Q_UNUSED(constraints);
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,7 @@ public:
|
|||||||
*
|
*
|
||||||
* @param constraints the type of constraints that were updated
|
* @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.
|
* Returns a list of context-related QAction instances.
|
||||||
|
@ -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) {
|
if (constraints & Plasma::Types::FormFactorConstraint) {
|
||||||
emit formFactorChanged();
|
emit formFactorChanged();
|
||||||
|
@ -43,7 +43,7 @@ public:
|
|||||||
|
|
||||||
QList<QAction*> contextualActions();
|
QList<QAction*> contextualActions();
|
||||||
|
|
||||||
void constraintsEvent(Plasma::Constraints constraints);
|
void constraintsEvent(Plasma::Types::Constraints constraints);
|
||||||
|
|
||||||
bool include(const QString &path);
|
bool include(const QString &path);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user