mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-29 04:08:54 +03:00
Minor preps for c++ ActivityListModel impl. in QML
This commit is contained in:
parent
c6ff66be79
commit
03c0d8ba5a
2 changed files with 10 additions and 4 deletions
|
@ -31,7 +31,7 @@ namespace OCC {
|
|||
void Systray::showMessage(const QString &title, const QString &message, MessageIcon icon, int millisecondsTimeoutHint)
|
||||
{
|
||||
#ifdef USE_FDO_NOTIFICATIONS
|
||||
if(QDBusInterface(NOTIFICATIONS_SERVICE, NOTIFICATIONS_PATH, NOTIFICATIONS_IFACE).isValid()) {
|
||||
if (QDBusInterface(NOTIFICATIONS_SERVICE, NOTIFICATIONS_PATH, NOTIFICATIONS_IFACE).isValid()) {
|
||||
QList<QVariant> args = QList<QVariant>() << APPLICATION_NAME << quint32(0) << APPLICATION_ICON_NAME
|
||||
<< title << message << QStringList() << QVariantMap() << qint32(-1);
|
||||
QDBusMessage method = QDBusMessage::createMethodCall(NOTIFICATIONS_SERVICE, NOTIFICATIONS_PATH, NOTIFICATIONS_IFACE, "Notify");
|
||||
|
|
|
@ -305,6 +305,10 @@ Window {
|
|||
}
|
||||
} // Rectangle trayWindowHeaderBackground
|
||||
|
||||
ListModel {
|
||||
id: activityListModel
|
||||
}
|
||||
|
||||
ListView {
|
||||
id: activityListView
|
||||
anchors.top: trayWindowHeaderBackground.bottom
|
||||
|
@ -312,7 +316,7 @@ Window {
|
|||
height: trayWindowBackground.height - trayWindowHeaderBackground.height
|
||||
clip: true
|
||||
|
||||
model: ListModel {}
|
||||
model: activityListModel
|
||||
|
||||
delegate: RowLayout {
|
||||
id: activityItem
|
||||
|
@ -388,8 +392,10 @@ Window {
|
|||
}
|
||||
|
||||
focus: true
|
||||
Keys.onSpacePressed: model.insert(0, { "name": "Item " + model.count })
|
||||
Keys.onTabPressed: model.remove(3)
|
||||
|
||||
// For interactive ListView/Animation testing only
|
||||
//Keys.onSpacePressed: model.insert(0, { "name": "Item " + model.count })
|
||||
//Keys.onTabPressed: model.remove(3)
|
||||
}
|
||||
|
||||
} // Rectangle trayWindowBackground
|
||||
|
|
Loading…
Reference in a new issue