On Tuesday 30 August 2011 03:37:49 you wrote:
> The issue is that this suggestion doesn't tell the appropriate
> information, after all, this is about sofware, not hardware. For
> example, I could be running the tablet UX on the Lenovo s10-3t instead
> of Netbook UX. If that was the case, I'd want the nonstandard
> "tablet" way of handling, framing /decorating, and window-managing
> applications; if the application finds itself on a desktop or netbook
> UX, I'd use code that attempted
> http://standards.freedesktop.org/wm-spec/latest/ compliance.
>
> Is there some "portable" Qt or QML code to do this? or a
> meego-compatible equivalent of http://apidocs.meego.com/1.2/qmsystem/
> -- which is present on Nokia's Harmattan but appears missing from
> MeeGo. Otherwise using
> http://apidocs.meego.com/1.2/qmsystem/classMeeGo_1_1QmKeys.html seems
> like a potential API for your suggestion.
The mantra I hear is 'check for features', and in that vein you have
mobility's QSysInfo for hardware (i.e. check for keyboard), and for software
you could do something like
QDeclarativeEngine engine;
QDeclarativeComponent component(&engine);
component.setData(QLatin1String("import QtQuick 1.0\nimport com.nokia.meego
1.0\nWindow {}"), QUrl());
QDeclarativeItem *item = qobject_cast<QDeclarativeItem *>(component.create());
if (item) {
// load com.nokia.meego based ui
}
There is a project that has a dynamic UI selection based on tricks like the
above one:
http://projects.developer.nokia.com/qtinfo
And it starts with a QWidgets UI to maintain compatibility with Qt4.6, then
switches to declarative if it is run on Qt4.7 and finally to a components based
UI.
Best regards,
Attila Csipa
_______________________________________________
MeeGo-dev mailing list
[email protected]
http://lists.meego.com/listinfo/meego-dev
http://wiki.meego.com/Mailing_list_guidelines