Sailfish OS GUI Application for the convenient introspection of D-System- and D-Session-Bus
Disclaimer :-)
This is my first serious application for SailfishOS and the first time I use QML or Qt. So comments are welcome.
It's main purpose is for me to find out how to do things on this (for me) new platform.
But it also serves a purpose:
What services are available on the D-Buses of a SailfishOS device and how can we make use of them?
The application uses the two Qt C++ classes in
dSessionBusNamesModel
dSystemBusNamesModel
to provide list models of the services registered on the D-Session- or D-System-Bus.
Could this have been done in QML (like all the others)? By all means, but I wanted to try the C++ / QML collaboration.
The models are made available to QML in main()
in harbour-dbus-inspector.cpp
.
From here on everything is QML only.
Some interesting stuff is in ServiceListPage.qml
. We show how to use:
The InterfaceListPage.qml
shows how to access the information of a specific interface in an XML string.
Also e.g. in InterfaceListPage.qml
we
adjust the height and width of a SilicaFlickable
according to the height and the width of multiple ListViews
it contains and use a VerticalScollDecarator
and a HorizontalScrollDecarator
if the screen is to small
to show all list entries.
In IntrospectServicePage.qml
we use a standard Qt TextEdit
instead the Silica TextArea
to provide vertical and
horizontal scrolling of an unwraped XML document.