Notices


Reply
Thread Tools
qwazix's Avatar
Moderator | Posts: 2,621 | Thanked: 5,425 times | Joined on Jan 2010
#21
Code:
(/opt/QtSDK/Simulator/Qt/gcc/imports/org/hildon/components/libhildonplugin.so: undefined symbol: _ZTV12HildonPlugin)
The same appears on device too.

EDIT:

It worked

I just needed to move the declaration of the plugin class to a header file instead of a source file.
__________________
Proud coding competition 2012 winner: ρcam
My other apps: speedcrunch N9 N900 Jolla contactlaunch timenow

Nemo UX blog: Grog
My website: qwazix.com
My job: oob

Last edited by qwazix; 2013-01-20 at 01:53.
 

The Following 5 Users Say Thank You to qwazix For This Useful Post:
marxian's Avatar
Posts: 2,448 | Thanked: 9,507 times | Joined on Aug 2010 @ Wigan, UK
#22
Originally Posted by qwazix View Post
Code:
(/opt/QtSDK/Simulator/Qt/gcc/imports/org/hildon/components/libhildonplugin.so: undefined symbol: _ZTV12HildonPlugin)
The same appears on device too.

EDIT:

It worked

I just needed to move the declaration of the plugin class to a header file instead of a source file.
Thanks. Now that that obstacle is overcome, I'll get back to working on this.

EditBar now added:



Code:
EditBar {
    titleText: qsTr("Select items to edit")

    EditButton {
        text: qsTr("Edit")
        onClicked: doStuff()
    }
}
__________________
'Men of high position are allowed, by a special act of grace, to accomodate their reasoning to the answer they need. Logic is only required in those of lesser rank.' - J K Galbraith

My website

GitHub

Last edited by marxian; 2013-01-20 at 15:30.
 

The Following 3 Users Say Thank You to marxian For This Useful Post:
marxian's Avatar
Posts: 2,448 | Thanked: 9,507 times | Joined on Aug 2010 @ Wigan, UK
#23
Some more changes. FileSystemModel is fixed and FileBrowserDialog is changed to conform to Hildon style.





Latest source: https://github.com/marx1an/qt-components-hildon
__________________
'Men of high position are allowed, by a special act of grace, to accomodate their reasoning to the answer they need. Logic is only required in those of lesser rank.' - J K Galbraith

My website

GitHub
 

The Following 7 Users Say Thank You to marxian For This Useful Post:
qwazix's Avatar
Moderator | Posts: 2,621 | Thanked: 5,425 times | Joined on Jan 2010
#24
Thanks for the awesome work. Here is the first implementation using your components http://youtu.be/hVAtWl3oUHI

Source here https://github.com/qwazix/qmlBrowser

I also uploaded qt-components to github, if you got an account we can collaborate there: https://github.com/qwazix/hildon-qt-components

EDIT: stupid. I didn't see you already pushed there. I'll merge.

Finally some thoughts...
  1. Minimizing the application with screen.minimize() didn't work for me, I had to resort to using dbus 'exit-app-view'
  2. PageStackWindow crashes on device with
    Code:
    X Error: BadMatch (invalid parameter attributes) 8
      Major opcode: 42 (X_SetInputFocus)
     Resource id:  0x6200002
  3. We need all the icons in the status area, maybe using the pixmap from gtk as freemangordon suggested is the way to go. Other ideas?
  4. Or is it possible to use the system status bar and have qt menus bound into qml or some other such contraption? I know qml is supposed to be fullscreen and implement everything from scratch, but getting the icons might be harder than this.
  5. Maybe the Status Bar could be exposed so that it can be used in more creative ways. In my implementation I copied the code and modified it so that it can be used standalone, outside a pageStack, you may want to have a look at it

EDIT2: also selecting text in textfields doesn't work
__________________
Proud coding competition 2012 winner: ρcam
My other apps: speedcrunch N9 N900 Jolla contactlaunch timenow

Nemo UX blog: Grog
My website: qwazix.com
My job: oob

Last edited by qwazix; 2013-01-20 at 23:15.
 

The Following 2 Users Say Thank You to qwazix For This Useful Post:
marxian's Avatar
Posts: 2,448 | Thanked: 9,507 times | Joined on Aug 2010 @ Wigan, UK
#25
Originally Posted by qwazix View Post

Finally some thoughts...
  1. Minimizing the application with screen.minimize() didn't work for me, I had to resort to using dbus 'exit-app-view'
  2. PageStackWindow crashes on device with
    Code:
    X Error: BadMatch (invalid parameter attributes) 8
      Major opcode: 42 (X_SetInputFocus)
     Resource id:  0x6200002
  3. We need all the icons in the status area, maybe using the pixmap from gtk as freemangordon suggested is the way to go. Other ideas?
  4. Or is it possible to use the system status bar and have qt menus bound into qml or some other such contraption? I know qml is supposed to be fullscreen and implement everything from scratch, but getting the icons might be harder than this.
  5. Maybe the Status Bar could be exposed so that it can be used in more creative ways. In my implementation I copied the code and modified it so that it can be used standalone, outside a pageStack, you may want to have a look at it
Minimizing is done via the platformWindow context. I moved it from HildonScreenPlugin (which now just provides the screen dimensions and orientation) to HildonWindowPlugin. It seems I forgot to change the method call in MinimizeButton.qml. I've corrected it now.

I haven't tested on-device for a while, so I'm not sure about the crashing. It worked last time I tested, but there have been some code changes since then.

I think using the GTK pixmaps requires creating a widget instance. Whilst it is possible to render QWidgets in a QGraphicsScene, it's not recommended (according to the documentation), so it may be better to avoid that solution.

As far as the statusbar info is concerned, this can be obtained using QSystemInfo (HildonSystemPlugin currently uses it for battery, profile and network status), but I've had problems with this in Qt4.7.0, so lower-level alternatives may need to be considered. The icons are missing because I haven't finished the implementation on the QML side. The main thing missing from the status bar is the ability to raise the Hildon status menu. I wonder if a DBus method can be added to hildon-status-menu.

I couldn't see any difference in your StatusBar.qml. What use case do you have in mind?

EDIT: Text selection via mouse drag is now fixed. Just needed to set selectByMouse to true.
__________________
'Men of high position are allowed, by a special act of grace, to accomodate their reasoning to the answer they need. Logic is only required in those of lesser rank.' - J K Galbraith

My website

GitHub

Last edited by marxian; 2013-01-20 at 23:54.
 

The Following 2 Users Say Thank You to marxian For This Useful Post:
qwazix's Avatar
Moderator | Posts: 2,621 | Thanked: 5,425 times | Joined on Jan 2010
#26
Sorry, I wasn't clear enough. I was talking about this https://github.com/qwazix/qmlBrowser...omTitleBar.qml
__________________
Proud coding competition 2012 winner: ρcam
My other apps: speedcrunch N9 N900 Jolla contactlaunch timenow

Nemo UX blog: Grog
My website: qwazix.com
My job: oob
 
marxian's Avatar
Posts: 2,448 | Thanked: 9,507 times | Joined on Aug 2010 @ Wigan, UK
#27
StatusBar, Menu, and PageStack are now independent components, so they can be used outside of PageStackWindow. There is also a new ApplicationWindow component.

Code:
ApplicationWindow {
    id: appWindow

    StatusBar {
        id: statusBar

        property string backPressedState: backButtonPressed ? "Pressed" : ""

        anchors {
            top: parent.top
            left: parent.left
            right: parent.right
        }

        titleText: pageStack.currentPage === null ? "" : pageStack.currentPage.title
        showMenuIndicator: (pageStack.currentPage !== null) && (pageStack.currentPage.tools !== null)
        backButtonIconSource: (pageStack === null) || (pageStack.depth === 1) ? "image://theme/wmCloseIcon" + backPressedState : "image://theme/wmBackIcon" + backPressedState
        onTitleAreaClicked: menu.open()
        onBackClicked: (pageStack === null) || (pageStack.depth === 1) ? Qt.quit() : pageStack.pop()
        onBackPressAndHold: if ((pageStack !== null) && (pageStack.depth > 1)) pageStack.pop(null);
    }

    PageStack {
        id: pageStack

        anchors {
            top: statusBar.bottom
            left: parent.left
            right: parent.right
            bottom: parent.bottom
        }

        Component.onCompleted: push(Qt.resolvedUrl("HomePage.qml"), null, true)
    }

    Menu {
        id: menu

        tools: pageStack.currentPage === null ? null : pageStack.currentPage.tools
    }
}
__________________
'Men of high position are allowed, by a special act of grace, to accomodate their reasoning to the answer they need. Logic is only required in those of lesser rank.' - J K Galbraith

My website

GitHub
 

The Following 4 Users Say Thank You to marxian For This Useful Post:
marxian's Avatar
Posts: 2,448 | Thanked: 9,507 times | Joined on Aug 2010 @ Wigan, UK
#28
I've now added a QDeclarativeProcess plugin. This makes the the QProcess API accessible via QML. It doesn't depend on qt-components-hildon, so if you have a QML project and want to use QProcess, feel free to use my code.

Example:

Code:
import QtQuick 1.0
import org.hildon.components 1.0

Page {
    id: root

    title: qsTr("Process page")

    Process {
        id: process

        processEnvironment: { "PATH": "/usr/bin:/usr/local/bin", "USER": "stuart" }
        workingDirectory: "/home/stuart/Development/QtProjects"
        onError: resultLabel.text = "<font color='red'>" + qsTr("Error") + "</font>"
        onFinished: resultLabel.text = process.readAllStandardOutput()
    }

    Column {
        id: column

        spacing: 10

        anchors {
            left: parent.left
            right: parent.right
            top: parent.top
            margins: platformStyle.paddingNormal
        }

        Label {
            text: qsTr("Working directory") + ": " + process.workingDirectory
        }

        Label {
            text: "PATH: " + process.processEnvironment.PATH + ", USER: " + process.processEnvironment.USER
        }

        Label {
            text: qsTr("Command") + ":"
        }

        Row {
            spacing: platformStyle.paddingNormal

            TextField {
                id: commandEdit

                width: 300
                text: "echo hello world"
                onTextChanged: process.command = text
            }

            Button {
                id: startButton

                text: qsTr("Start")
                enabled: process.state === Processes.NotRunning
                onClicked: process.start()
            }

            Button {
                id: stopButton

                text: qsTr("Cancel")
                enabled: process.state === Processes.Running
                onClicked: process.terminate()
            }

        }

        Label {
            text: qsTr("Result") + ":"
        }
    }

    Flickable {
        id: flicker

        anchors {
            top: column.bottom
            left: parent.left
            right: parent.right
            bottom: parent.bottom
            margins: platformStyle.paddingNormal
        }
        clip: true
        contentHeight: resultLabel.height + platformStyle.paddingNormal

        Label {
            id: resultLabel

            width: parent.width
            wrapMode: Text.WordWrap
            color: "green"
        }
    }

    ScrollDecorator {
        flickableItem: flicker
    }
}
__________________
'Men of high position are allowed, by a special act of grace, to accomodate their reasoning to the answer they need. Logic is only required in those of lesser rank.' - J K Galbraith

My website

GitHub
 

The Following 3 Users Say Thank You to marxian For This Useful Post:
marxian's Avatar
Posts: 2,448 | Thanked: 9,507 times | Joined on Aug 2010 @ Wigan, UK
#29
I've added a Qt Components Hildon Gallery to demonstrate the currently available components.



https://github.com/marx1an/qt-compon...master/gallery

I'll add a couple of small example applications soon.
__________________
'Men of high position are allowed, by a special act of grace, to accomodate their reasoning to the answer they need. Logic is only required in those of lesser rank.' - J K Galbraith

My website

GitHub
 

The Following 13 Users Say Thank You to marxian For This Useful Post:
Posts: 3,007 | Thanked: 12,349 times | Joined on Mar 2010 @ Sofia,Bulgaria
#30
Impressive work
__________________
Never fear. I is here.

720p video support on N900,SmartReflex on N900,Keyboard and mouse support on N900
Nothing is impossible - Stable thumb2 on n900

Community SSU developer
kernel-power developer and maintainer

 

The Following 2 Users Say Thank You to freemangordon For This Useful Post:
Reply

Tags
hildon, qml components

Thread Tools

 
Forum Jump


All times are GMT. The time now is 22:10.