On Mon, Aug 29, 2011 at 9:44 AM, Kok, Auke-jan H <[email protected]> wrote: > A better approach is to look at the device itself. Does it have a > 102key keyboard? Then it's a laptop, desktop or netbook. Touch screen? > Then it's not a netbook or at least a hybrid, and the touch model > applies.
Hi Auke -- thanks for the reply. 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. > Using random files on disk sounds bad too, why not just parse > /etc/meego-release? I wanted to do that, but unfortunately, it's the same for both netbook and tablet: meegotab-2-~> cat /etc/meego-release #Tablet-UX: MeeGo release 1.2.0.90 (MeeGo) meegolem-8-~> cat /etc/meego-release #Netbook UX: MeeGo release 1.2.0.90 (MeeGo) > Ultimately, if you need 100% coverage, you need to read /etc/boardname > and maintain a mapping table of all 'boards' out there. Unfortunately, that would just tell me hardware. So it wouldn't solve the case of running tablet-UX on the Lenovo s10-3t or other hybrid netbook/touchscreen. meegotab-3-~> cat /etc/boardname 10-pegatron meegolem-9-~> cat /etc/boardname ia32_lenovo_caucasus2_rev_1_0_ > This is a very debatable topic. Especially using preprocessor symbols > might not be the right thing, it's quite likely that other people will > just turn those on in order to make a piece of software work on > another platform I didn't mention that some of the preprocessor symbols are generated by qmake and passed on during compilation. For example: http://ytd-meego.googlecode.com/svn/trunk/playground/qmltube/qmltube.pro ................ ## NPM workaround to missing define(MEEGO_EDITION_HARMATTAN) suggested by ## http://wiki.meego.com/index.php?title=Porting_Fremantle_Applications_to_Harmattan&oldid=44545#Harmattan_scope exists($$QMAKE_INCDIR_QT"/../qmsystem2/qmkeys.h"):!contains(MEEGO_EDITION,harmattan): { MEEGO_VERSION_MAJOR = 1 MEEGO_VERSION_MINOR = 2 MEEGO_VERSION_PATCH = 0 MEEGO_EDITION = harmattan DEFINES += MEEGO_EDITION_HARMATTAN ## Other harmattan-specific things: ## Add qmsystem2 http://apidocs.meego.com/1.2/qmsystem/main.html ## for MeeGo::QmDisplayState()::setBlankingPause(), etc. CONFIG += qmsystem2 \ mobility MOBILITY += multimedia } ## NPM: Add libresourceqt1 to support resource policy manager and define MEEGO_HAS_POLICY_FRAMEWORK ## ( http://www.developer.nokia.com/Community/Wiki/Harmattan:Developer_Library/Best_practices_for_application_development/Selecting_the_resource_application_class ) ## NPM: Although this is also Harmattan-specific, make it a separate configuration option in-case ## running on MeeGo platform employing the policy framework. If the header is absent then skip the ## extra configurations in controller.h, controller.cpp and main.cpp exists($$QMAKE_INCDIR_QT"/../resource/qt4/policy/resource-set.h") { DEFINES += MEEGO_HAS_POLICY_FRAMEWORK CONFIG += link_pkgconfig PKGCONFIG += libresourceqt1 } ....................... -- Niels http://nielsmayer.com _______________________________________________ MeeGo-dev mailing list [email protected] http://lists.meego.com/listinfo/meego-dev http://wiki.meego.com/Mailing_list_guidelines
