Active Topics

 


Reply
Thread Tools
marxian's Avatar
Posts: 2,448 | Thanked: 9,523 times | Joined on Aug 2010 @ Wigan, UK
#61
Some further progress:

TextEdit component, with kinetic scrolling:



ListSelector, DateSelector and TimeSelector components:



ListView component:



As with QtQuick, the models can be constructed from JS types, e.g:

Code:
ValueButton {
     width: parent.width
     text: qsTr("Select a number")
     selector: ListSelector {
         model: 10
         currentIndex: 1
     }
}
Code:
ListView {
    anchors.fill: parent
    model: qsTr("This is a model constructed from a list of strings").split(" ")
}
No support for custom delegates yet, but that will come next.
__________________
'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; 2014-03-01 at 03:24. Reason: Spelling
 

The Following 6 Users Say Thank You to marxian For This Useful Post:
Posts: 3,328 | Thanked: 4,476 times | Joined on May 2011 @ Poland
#62
marxian: any plans of replacing the -devel version with the rewrite?
__________________
If you want to support my work, you can donate by PayPal or Flattr

Projects no longer actively developed: here
 
marxian's Avatar
Posts: 2,448 | Thanked: 9,523 times | Joined on Aug 2010 @ Wigan, UK
#63
Originally Posted by marmistrz View Post
marxian: any plans of replacing the -devel version with the rewrite?
I'll do it soon. I just need to make sure any packages I have in -devel that depend on the existing version are updated.
__________________
'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,523 times | Joined on Aug 2010 @ Wigan, UK
#64
Update.

Qt Components Hildon is now updated to version 0.3.0. Here's the changelogs for 0.2.0 and 0.3.0:

qt-components-hildon (0.3.0)

* Added Page component.
* WindowStack is now PageStack (accessible via the 'pageStack' context property).
* It is now possible to create multiple top-level Window components, each with its own PageStack instance.
* Improvements to existing components.
* Don't install desktop files for the example applications.

qt-components-hildon (0.2.0)

* Added DoubleSpinBox, Image, BorderImage, MultiListSelector, Rectangle and ScreenShot components (ScreenShot requires org.hildon.utils).
* Added 'theme' image provider (usage: image://theme/$IMAGE_FILENAME_WITHOUT_SUFFIX).
* Added QML ScreenShot example application.
* Improvements to Flickable and ListView components.

QML Browser has also been updated to use the latest version of Qt Components Hildon:

qml-browser (0.1.0)

* Use separate browser windows (like MicroB).
* Update to comply with changes to qt-components-hildon.
* Bug fixes.

The source code for QML Browser is now hosted at GitHub: https://github.com/marxoft/qml-browser

Some screenshots of QML Browser:




__________________
'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; 2014-07-03 at 21:38.
 

The Following 14 Users Say Thank You to marxian For This Useful Post:
Posts: 3,328 | Thanked: 4,476 times | Joined on May 2011 @ Poland
#65
What exactly (which apps) blocks it from being in devel?

// Aaa, ok, should've apt-cache policy'ed before posting. I was pretty sure it's one more git-only update.
__________________
If you want to support my work, you can donate by PayPal or Flattr

Projects no longer actively developed: here

Last edited by marmistrz; 2014-07-13 at 13:47.
 
marxian's Avatar
Posts: 2,448 | Thanked: 9,523 times | Joined on Aug 2010 @ Wigan, UK
#66
Originally Posted by marmistrz View Post
What exactly (which apps) blocks it from being in devel?
None (check my previous post).
__________________
'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 User Says Thank You to marxian For This Useful Post:
Posts: 1,203 | Thanked: 3,027 times | Joined on Dec 2010
#67
thanks for the update, especially as qmlbrowser has been really handy this week. microb generates an xml error on allegro forums so i've been using it for that. additionally it will help a great deal when i resume work on microbe with a little tweaking.
 

The Following User Says Thank You to Android_808 For This Useful Post:
marxian's Avatar
Posts: 2,448 | Thanked: 9,523 times | Joined on Aug 2010 @ Wigan, UK
#68
I finally added support for custom delegates.

Screenshot:



Example code:

Code:
ListView {
        id: view

        width: parent.width
        height: parent.height
        model: [
            { title: "Classic Game Room - ACCLAIM DUAL TURBO SNES Controller review", subTitle: "This is a list item", duration: "01:32", thumbnail: "file:///home/user/MyDocs/Classic Game Room - ACCLAIM DUAL TURBO SNES Controller review.jpg", progress: 17 },
        { title: "Classic Game Room - CASTLEVANIA CIRCLE OF THE MOON review", subTitle: "This is another list item", duration: "03:13", thumbnail: "file:///home/user/MyDocs/Classic Game Room - CASTLEVANIA_ CIRCLE OF THE MOON review.jpg", progress: 84 },
        { title: "Classic Game Room - CRYSIS 3 review", subTitle: "And another list item", duration: "06:43", thumbnail: "file:///home/user/MyDocs/Classic Game Room - CRYSIS 3 review.jpg", progress: 56 },
        { title: "Classic Game Room - PANASONIC 3DO console review model FZ-1", subTitle: "And another list item", duration: "10:15", thumbnail: "file:///home/user/MyDocs/Classic Game Room - PANASONIC 3DO console review model FZ-1.jpg", progress: 34 },
        { title: "Classic Game Room - SQUEEZE BOX review for Atari 2600", subTitle: "This is the last list item", duration: "07:27", thumbnail: "file:///home/user/MyDocs/Classic Game Room - SQUEEZE BOX review for Atari 2600.jpg", progress: 29 }
        ]
        delegate: ListItem {
            width: view.width
            height: 112

            ListItemRectangle {
                id: rectangle

                width: 122
                height: 92
                anchors {
                    left: parent.left
                    leftMargin: 10
                    verticalCenter: parent.verticalCenter
                }
                border {
                    width: 1
                    color: platformStyle.secondaryTextColor
                }
                color: "black"

                ListItemImage {
                    id: image

                    anchors {
                        fill: parent
                        margins: 1
                    }
                    source: modelData.thumbnail
                    smooth: true
                    opacity: mouseArea.pressed ? 0.5 : 1

                    ListItemRectangle {
                        id: background

                        width: 50
                        height: 20
                        anchors {
                            right: parent.right
                            bottom: parent.bottom
                        }
                        opacity: 0.7
                        color: "black"
                    }

                    ListItemText {
                        anchors.fill: background
                        font.pixelSize: 18
                        alignment: Qt.AlignCenter
                        text: modelData.duration
                    }
                }

                ListItemMouseArea {
                    id: mouseArea

                    anchors.fill: parent
                    onClicked: console.log("clicked")
                    onDoubleClicked: console.log("double clicked")
                    onPressAndHold: console.log("press and hold")
                }
            }

            ListItemText {
                anchors {
                    top: parent.top
                    bottom: parent.bottom
                    left: rectangle.right
                    right: progressBar.left
                    margins: 10
                }
                alignment: Qt.AlignLeft | Qt.AlignVCenter
                text: modelData.title + "\n\n" + modelData.subTitle
            }

            ListItemProgressBar {
                id: progressBar

                width: 150
                height: 70
                anchors {
                    right: parent.right
                    rightMargin: 10
                    verticalCenter: parent.verticalCenter
                }
                maximum: 100
                progress: modelData.progress
                text: progress + "%"
                textVisible: true
                textAlignment: Qt.AlignCenter
            }            
        }
    }
I intially considered using a widget-based approach for the delegates, but ended up going with the item delegate solution.

Pros:
  • Faster performance.
  • Only requires one instance of the delegate, saving memory and avoiding the need to create/destroy items when the item view is scrolled.

Cons:
  • Requires a different API for delegates.

The API is kept as similar as possible to the widgets. It's only the class name that differs, with a 'ListItem' prefix (despite the name, they will also be useable with table and tree views). In future, I may implement a custom parser to avoid this.

I'll push an update to devel as soon as I've finished implementing a few other things.
__________________
'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:
marxian's Avatar
Posts: 2,448 | Thanked: 9,523 times | Joined on Aug 2010 @ Wigan, UK
#69
Another update.

qt-components-hildon (0.4.0)

* Added org.hildon.filesystemmodel module with FileSystemModel component.
* Added org.hildon.dbus module with DBusAdaptor and DBusMessage components.
* Added global 'webSettings' and 'webHistory' properties to the org.hildon.webkit module.
* Added 'settings' and 'history' properties to the WebView component.
* Added Repeater, TableView and HeaderView components to the org.hildon.components module.
* Added QModelIndex global property to the org.hildon.components module, to allow access to functions of QModelIndex (e.g var row = QModelIndex.row(view.currentIndex))
* Added support for custom delegates in item views (ListItem* components).
* Improvements and bug-fixes for existing components.

qml-browser (0.2.0)

* Access browsing history with long-press on 'back' button or swipe from right.
* Update to comply with changes to qt-components-hildon.
* Bug fixes.

Screenshot of browsing history:

__________________
'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 8 Users Say Thank You to marxian For This Useful Post:
Posts: 1,203 | Thanked: 3,027 times | Joined on Dec 2010
#70
i forgot to say the other day, i experienced a small glitch with qml-brower. not sure where fault lies (widget or webkit) without sure way to reproduce, but i suspect webkit library.

i was on slashdot and scrolled down causing green menu bar to be redrawn slightly lower everytime without removing the old version of it until eventually I had green bars all the way down.
 
Reply

Tags
hildon, qml components


 
Forum Jump


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