Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Multimedia
Elisa
Commits
7fb3d070
Commit
7fb3d070
authored
Jul 09, 2021
by
Matthieu Gallien
🎵
Committed by
Matthieu Gallien
Jul 11, 2021
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
Changes
2
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
src/elisaqmlplugin.cpp
View file @
7fb3d070
...
...
@@ -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"
);
...
...
src/plugins.qmltypes
View file @
7fb3d070
...
...
@@ -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"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment