Add missing screenGeometryChanged signal; use in AppletInterface; fix typos.

Reviewed-by: Marco Martin

BUG:373075
This commit is contained in:
Eike Hein 2017-01-19 03:09:22 +09:00
parent 593f8183dd
commit 2c69d22546
3 changed files with 21 additions and 4 deletions

View File

@ -292,15 +292,20 @@ Q_SIGNALS:
void configSynced();
/**
* This signal indicates that a change in available screen gemetry occurred.
* This signal indicates that a change in available screen geometry occurred.
*/
void availableScreenRegionChanged();
/**
* This signal indicates that a change in available screen gemetry occurred.
* This signal indicates that a change in available screen geometry occurred.
*/
void availableScreenRectChanged();
/**
* This signal indicates that a change in geometry for the screen occurred.
*/
void screenGeometryChanged(int id);
/**
* emitted when immutability changes.
* this is for use by things that don't get constraints events, like plasmaapp.

View File

@ -107,7 +107,18 @@ AppletInterface::AppletInterface(DeclarativeAppletScript *script, const QVariant
if (applet()->containment()) {
connect(applet()->containment(), &Plasma::Containment::screenChanged,
this, &ContainmentInterface::screenChanged);
this, &AppletInterface::screenChanged);
// Screen change implies geo change for good measure.
connect(applet()->containment(), &Plasma::Containment::screenChanged,
this, &AppletInterface::screenGeometryChanged);
connect(applet()->containment()->corona(), &Plasma::Corona::screenGeometryChanged, this, [this](int id) {
if (id == applet()->containment()->screen()) {
emit screenGeometryChanged();
}
});
}
connect(this, &AppletInterface::expandedChanged, [=](bool expanded) {

View File

@ -195,7 +195,7 @@ class AppletInterface : public PlasmaQuick::AppletQuickItem
* Provides access to the geometry of the applet is in.
* Can be useful to figure out what's the absolute position of the applet.
*/
Q_PROPERTY(QRect screenGeometry READ screenGeometry NOTIFY screenChanged)
Q_PROPERTY(QRect screenGeometry READ screenGeometry NOTIFY screenGeometryChanged)
/**
* Whether the dialog should be hidden when the dialog loses focus.
@ -429,6 +429,7 @@ Q_SIGNALS:
void backgroundHintsChanged();
void busyChanged();
void screenChanged();
void screenGeometryChanged();
void hideOnWindowDeactivateChanged();
void associatedApplicationChanged();
void associatedApplicationUrlsChanged();