Notices


Reply
Thread Tools
Posts: 1,179 | Thanked: 770 times | Joined on Nov 2009
#21
Don't have my N900 out so can't try this out now but would someone be a hero and explain to me what a web widget does? It shows a web page with you being able to set size as well as how often it refreshes?
 
Posts: 52 | Thanked: 13 times | Joined on Nov 2010
#22
yes thats pretty much it, you can scroll up/down and browser normally like you do from a browser, and u can use the keyboard for input, its a web browser widget .
 

The Following User Says Thank You to maddude For This Useful Post:
GreatGonzo's Avatar
Posts: 275 | Thanked: 389 times | Joined on Feb 2010 @ Sydney
#23
quick-widgets-0.2.0 has been uploaded. The new features are:
  • access to QProcess qml wrapper, see example in MyDocs/quick-widgets/examples
  • dynamically resize widget to content size

This basically means any system command output can be accessed. So this is in alternative to the Desktop Command execution widget and/or beecons.

Last edited by GreatGonzo; 2010-11-22 at 04:35.
 

The Following 4 Users Say Thank You to GreatGonzo For This Useful Post:
GreatGonzo's Avatar
Posts: 275 | Thanked: 389 times | Joined on Feb 2010 @ Sydney
#24
quick-widgets-0.2.1 has a fix to the installer.
 

The Following 2 Users Say Thank You to GreatGonzo For This Useful Post:
GreatGonzo's Avatar
Posts: 275 | Thanked: 389 times | Joined on Feb 2010 @ Sydney
#25
here is the first useful example
It displays memory info. Note that it updates very rapidly. You can change it to your liking.

* download attachment
* unzip it
* start quick-widgets and load meminfo.qml from the labelexample folder.
Attached Files
File Type: zip labelexample.zip (1.5 KB, 221 views)
__________________
Quick Widgets - http://wiki.maemo.org/Quick_Widgets
 

The Following 5 Users Say Thank You to GreatGonzo For This Useful Post:
Posts: 25 | Thanked: 3 times | Joined on Aug 2010
#26
Great work, congratulations to the author. I see a lot of potential here.
 
fpp's Avatar
Posts: 2,853 | Thanked: 968 times | Joined on Nov 2005
#27
Originally Posted by GreatGonzo View Post
This application is for use of qml as desktop widgets. If you want to run qml as separate applications you can use the qmlviewer which is in the package qt4-declarative-qmlviewer. Then just run the qmlviewer and load the qml file.
Sorry for the off-topic, but where does one find that package with the qmlviewer ? I don't see it anywhere...
__________________
maemo blog
 
GreatGonzo's Avatar
Posts: 275 | Thanked: 389 times | Joined on Feb 2010 @ Sydney
#28
Originally Posted by fpp View Post
Sorry for the off-topic, but where does one find that package with the qmlviewer ? I don't see it anywhere...
it should bed in the main repository.

Code:
apt-cache policy  qt4-declarative-qmlviewer  
qt4-declarative-qmlviewer:
  Installed: 4.7.0~git20100909-0maemo1+0m5
  Candidate: 4.7.0~git20100909-0maemo1+0m5
  Version table:
 *** 4.7.0~git20100909-0maemo1+0m5 0
        500 https://downloads.maemo.nokia.com ./ Packages
        100 /var/lib/dpkg/status
If you can't find it in the package manager try the command-line.
in a terminal type:
Code:
sudo gainroot
apt-get install qt4-declarative-qmlviewer
__________________
Quick Widgets - http://wiki.maemo.org/Quick_Widgets
 

The Following User Says Thank You to GreatGonzo For This Useful Post:
GreatGonzo's Avatar
Posts: 275 | Thanked: 389 times | Joined on Feb 2010 @ Sydney
#29
Originally Posted by yosarian View Post
Great work, congratulations to the author. I see a lot of potential here.
yep that's why I didi it. With more qt mobility qml bindings it would be even better.

If anybody can think of a widget I can have a go at it. The main constraint is that it should be limited to tap actions as the home screen scrolling is taking over dragging or flicking.

The main highlights of qml are ease of use and animation eye candy.

I will have a look at passing on orientation events to qml so the widgets could be working in portrait mode.
__________________
Quick Widgets - http://wiki.maemo.org/Quick_Widgets
 
GreatGonzo's Avatar
Posts: 275 | Thanked: 389 times | Joined on Feb 2010 @ Sydney
#30
Here is a better version of the web browser widget:

To scroll you have to tap on the right hand side of the widget. Upper half scrolls up , lower half down. Note that this prevents from clicking any links in that area (30 pixels)

It defaults to a facebook touch view.
Either cut-n-paste this code into a file named 'webwidget.qml'
or save the attached file (note it has to be renamed or saved as webwidget.qml as this site doesn't allow qml extensions).

Then load into quick widget.

Code:
import Qt 4.7
import QtWebKit 1.0

Item {
    // Modify these to customize

    // widget width
    width: 300

    // widget height
    height: 350

    // the url to display
    property string url: "http://touch.facebook.com"

    // the optimum width for the website. The page is scaled down
    // from this width to the widget's width
    property int optimal_width: 340

    // interval when to reload the page
    // setting it to 0 means never refresh
    property real reload_in_minutes: 10

    // end user mods.

    id: main
     MouseArea {
     	  anchors.right: parent.right
	  width: 30
	  height: parent.height
	  onClicked: {
          }
     }

    Rectangle {
         anchors.fill: parent
         radius: 10
	 color: "gray"
	 opacity: 0.6
    }

    Text {
         id: txt
         anchors.centerIn: parent
	 text: "loading..."
	 color: "white"
    }     

    WebView {
     	  id: browser
          transformOrigin: Item.TopLeft
	  property bool scaled: false

	  smooth: true
	  visible: false
          preferredWidth: optimal_width
          preferredHeight: parent.height
	  url: parent.url
          Behavior on y  { PropertyAnimation {} }
	  onUrlChanged: {
              y = 0
          }
	  onLoadFinished: {
              if (!scaled) {
                  browser.contentsScale = main.width/browser.width
                  scaled = true;
              }
              browser.visible = true
              //console.log('loaded')
              txt.z = 0
	 }
      }


     MouseArea {
     	  anchors.right: parent.right
	  width: 30
	  height: parent.height
	  onClicked: {
             var inc = main.height*0.9
             if (mouse.y > main.height/2) {
                var dy = Math.min(inc,
                          browser.contentsSize.height-main.height+browser.y)
                browser.y -= dy
            } else {
                var dy = Math.min(inc, Math.abs(browser.y))
                browser.y += dy
            }
	  }

     }

     Timer {
     	   id: refresh
     	   interval: 1000*60*parent.reload_in_minutes
	   running: runtime.isActiveWindow
	   repeat: true
           onTriggered: { txt.z = 1
                           browser.reload.trigger()
			  }
     }

}
Attached Images
 
Attached Files
File Type: txt webwidget.qml.txt (2.2 KB, 166 views)
__________________
Quick Widgets - http://wiki.maemo.org/Quick_Widgets

Last edited by GreatGonzo; 2010-11-24 at 02:11.
 

The Following 7 Users Say Thank You to GreatGonzo For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 16:55.