export compactRepresentationExpander

still have to decide if this is a really bad idea
This commit is contained in:
Marco Martin 2014-01-30 22:38:44 +01:00
parent bf648ceeb6
commit 9e65dbc789
2 changed files with 18 additions and 3 deletions

View File

@ -218,6 +218,21 @@ void AppletLoader::setFullRepresentation(QQmlComponent *component)
emit fullRepresentationChanged(component);
}
QQmlComponent *AppletLoader::compactRepresentationExpander()
{
return m_compactRepresentationExpander.data();
}
void AppletLoader::setCompactRepresentationExpander(QQmlComponent *component)
{
if (m_compactRepresentationExpander.data() == component) {
return;
}
m_compactRepresentationExpander = component;
emit compactRepresentationExpanderChanged(component);
}
QQmlComponent *AppletLoader::preferredRepresentation()
{
return m_preferredRepresentation.data();
@ -254,7 +269,7 @@ void AppletLoader::setExpanded(bool expanded)
createCompactRepresentationExpanderItem();
m_expanded = expanded;
emit expandedChanged();
emit expandedChanged(expanded);
}
////////////Internals

View File

@ -59,7 +59,7 @@ class AppletLoader : public QQuickItem
Q_PROPERTY(QQmlComponent *preferredRepresentation READ preferredRepresentation WRITE setPreferredRepresentation NOTIFY preferredRepresentationChanged)
//FIXME: is it wise to expose this?
Q_PROPERTY(QQmlComponent *compactRepresentation READ compactRepresentation WRITE setCompactRepresentation NOTIFY compactRepresentationChanged)
Q_PROPERTY(QQmlComponent *compactRepresentationExpander READ compactRepresentationExpander WRITE setCompactRepresentationExpander NOTIFY compactRepresentationExpanderChanged)
/**
* True when the applet is showing its full representation. either as the main only view, or in a popup.
@ -128,7 +128,7 @@ Q_SIGNALS:
void fullRepresentationItemChanged(QObject *fullRepresentationItem);
void compactRepresentationExpanderItemChanged(QObject *compactRepresentationExpanderItem);
void expandedChanged();
void expandedChanged(bool expanded);
protected:
KDeclarative::QmlObject *qmlObject();