diff options
author | Lauro Neto <lauro.neto@openbossa.org> | 2011-09-22 17:51:13 -0300 |
---|---|---|
committer | Lauro Neto <lauro.neto@openbossa.org> | 2011-09-22 17:55:28 -0300 |
commit | 5536fa97892b2b873c182dc41bcf650333df17ec (patch) | |
tree | a541fad356ea9375bf5cfa03d83a876c3912dbd5 /mobility | |
parent | c517bc84902cd233f296075e010b6d933ca765b5 (diff) |
More updates.
* Do not use GLWidget
* Add -no-fs to show in a window
* Inlined the setupAll function
* view.setSource must be called after setting our context value
* Fix component reference
* Using UiConstants margins
Diffstat (limited to 'mobility')
-rw-r--r-- | mobility/sysinfo/qml/DevicePage.qml | 2 | ||||
-rw-r--r-- | mobility/sysinfo/qml/DisplayPage.qml | 3 | ||||
-rw-r--r-- | mobility/sysinfo/qml/GeneralPage.qml | 6 | ||||
-rw-r--r-- | mobility/sysinfo/qml/TabBarPage.qml | 3 | ||||
-rw-r--r-- | mobility/sysinfo/qml/main.py | 30 |
5 files changed, 21 insertions, 23 deletions
diff --git a/mobility/sysinfo/qml/DevicePage.qml b/mobility/sysinfo/qml/DevicePage.qml index bdb2ead..8dae22f 100644 --- a/mobility/sysinfo/qml/DevicePage.qml +++ b/mobility/sysinfo/qml/DevicePage.qml @@ -68,6 +68,6 @@ Page { } } ScrollDecorator { - flickableItem: flickableColumn + flickableItem: flickableDevice } } diff --git a/mobility/sysinfo/qml/DisplayPage.qml b/mobility/sysinfo/qml/DisplayPage.qml index 582f874..0c88e2a 100644 --- a/mobility/sysinfo/qml/DisplayPage.qml +++ b/mobility/sysinfo/qml/DisplayPage.qml @@ -3,6 +3,7 @@ import com.nokia.meego 1.0 Page { id: displayPage + anchors.margins: UiConstants.DefaultMargin orientationLock: PageOrientation.LockLandscape Flickable { id: flickableDisplay @@ -52,6 +53,6 @@ Page { } } ScrollDecorator { - flickableItem: flickableColumn + flickableItem: flickableDisplay } } diff --git a/mobility/sysinfo/qml/GeneralPage.qml b/mobility/sysinfo/qml/GeneralPage.qml index 69b4722..3767c1b 100644 --- a/mobility/sysinfo/qml/GeneralPage.qml +++ b/mobility/sysinfo/qml/GeneralPage.qml @@ -4,12 +4,10 @@ import com.nokia.meego 1.0 Page { id: generalPage orientationLock: PageOrientation.LockLandscape + anchors.margins: UiConstants.DefaultMargin Column { - anchors.top: parent.top - anchors.topMargin: 20 - anchors.left: parent.left - anchors.leftMargin: 20 + anchors.fill: parent spacing: 25 Row { spacing: 20 diff --git a/mobility/sysinfo/qml/TabBarPage.qml b/mobility/sysinfo/qml/TabBarPage.qml index fdc8481..8cc24de 100644 --- a/mobility/sysinfo/qml/TabBarPage.qml +++ b/mobility/sysinfo/qml/TabBarPage.qml @@ -3,8 +3,9 @@ import com.nokia.meego 1.0 Page { id: tabBarPage - + anchors.margins: UiConstants.DefaultMargin orientationLock: PageOrientation.LockLandscape + tools: ToolBarLayout { id: toolBarLayout ButtonRow { diff --git a/mobility/sysinfo/qml/main.py b/mobility/sysinfo/qml/main.py index 77d700a..a37a706 100644 --- a/mobility/sysinfo/qml/main.py +++ b/mobility/sysinfo/qml/main.py @@ -15,6 +15,10 @@ class SystemInfoModel(QtCore.QObject): def __init__(self): super(SystemInfoModel, self).__init__() + self.systemInfo = QSystemInfo(self) + self.setupGeneral() + self.setupDevice() + self.setupDisplay() @QtCore.Property(str, notify=changed) def currentLanguage(self): @@ -72,14 +76,7 @@ class SystemInfoModel(QtCore.QObject): def bluetoothState(self): return self._bluetoothState - def setupAll(self): - self.setupGeneral() - self.setupDevice() - self.setupDisplay() - def setupGeneral(self): - self.systemInfo = QSystemInfo(self) - self._currentLanguage = self.systemInfo.currentLanguage() self._availableLanguages = self.systemInfo.availableLanguages() self.emit(QtCore.SIGNAL('changed()')) @@ -185,19 +182,20 @@ class SystemInfoUI(QtCore.QObject): def __init__(self): super(SystemInfoUI, self).__init__() self.view = QtDeclarative.QDeclarativeView() - self.glw = QtOpenGL.QGLWidget() - self.view.setViewport(self.glw) - - #self.view.setSource(os.path.join('qml','main.qml')) - self.view.setSource('main.qml') self.rc = self.view.rootContext() + self.model = SystemInfoModel() - self.model.setupAll() self.rc.setContextProperty('dataModel', self.model) - self.view.showFullScreen() + + self.view.setSource('main.qml') + + if "-no-fs" in sys.argv: + self.view.show() + else: + self.view.showFullScreen() + self.systemInfo = QSystemInfo(self) - - + if __name__ == "__main__": app = QtGui.QApplication([]) ui = SystemInfoUI() |