Commit 7fb3d070 authored by Matthieu Gallien's avatar Matthieu Gallien 🎵 Committed by Matthieu Gallien
Browse files

export DataTypes to qml such that enums inside it are usable

parent daf35e3d
Pipeline #69996 passed with stage
in 9 minutes and 4 seconds
......@@ -142,6 +142,7 @@ void ElisaQmlTestPlugin::registerTypes(const char *uri)
qmlRegisterUncreatableType<DatabaseInterface>(uri, 1, 0, "DatabaseInterface", QStringLiteral("Only created in c++"));
qmlRegisterUncreatableType<QAbstractItemModel>(uri, 1, 0, "AbstractItemModel", QStringLiteral("Abstract Qt type"));
qmlRegisterUncreatableType<QAbstractProxyModel>(uri, 1, 0, "AbstractProxyModel", QStringLiteral("Abstract Qt type"));
qmlRegisterUncreatableType<DataTypes>(uri, 1, 0, "DataTypes", QStringLiteral("Abstract type not to be used in aml directtly"));
#if defined Qt5DBus_FOUND && Qt5DBus_FOUND
qmlRegisterType<Mpris2>(uri, 1, 0, "Mpris2");
......
......@@ -245,6 +245,63 @@ Module {
Parameter { name: "dataFilter"; type: "DataTypes::DataType" }
}
}
Component {
name: "DataTypes"
prototype: "QObject"
exports: ["org.kde.elisa/DataTypes 1.0"]
isCreatable: false
exportMetaObjectRevisions: [0]
Enum {
name: "ColumnsRoles"
values: {
"TitleRole": 257,
"SecondaryTextRole": 258,
"ImageUrlRole": 259,
"ShadowForImageRole": 260,
"ChildModelRole": 261,
"DurationRole": 262,
"StringDurationRole": 263,
"ArtistRole": 264,
"AllArtistsRole": 265,
"HighestTrackRating": 266,
"AlbumRole": 267,
"AlbumArtistRole": 268,
"IsValidAlbumArtistRole": 269,
"TrackNumberRole": 270,
"DiscNumberRole": 271,
"RatingRole": 272,
"GenreRole": 273,
"LyricistRole": 274,
"ComposerRole": 275,
"CommentRole": 276,
"YearRole": 277,
"ChannelsRole": 278,
"BitRateRole": 279,
"SampleRateRole": 280,
"ResourceRole": 281,
"IdRole": 282,
"ParentIdRole": 283,
"DatabaseIdRole": 284,
"IsSingleDiscAlbumRole": 285,
"ContainerDataRole": 286,
"IsPartialDataRole": 287,
"AlbumIdRole": 288,
"HasEmbeddedCover": 289,
"FileModificationTime": 290,
"FirstPlayDate": 291,
"LastPlayDate": 292,
"PlayCounter": 293,
"PlayFrequency": 294,
"ElementTypeRole": 295,
"LyricsRole": 296,
"FullDataRole": 297,
"IsDirectoryRole": 298,
"IsPlayListRole": 299,
"FilePathRole": 300,
"HasChildrenRole": 301
}
}
}
Component {
name: "DatabaseInterface"
prototype: "QObject"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment