Showing posts with label qml. Show all posts
Showing posts with label qml. Show all posts

2014-08-01

Slitaz -- cool-old-term

20140802-cool-old-term.jpg

cool-old-term


Description

cool-old-term is a terminal emulator which tries to mimic the look and feel of the old cathode tube screens. It has been designed to be eye-candy, customizable, and reasonably lightweight.
It now uses the konsole engine which is powerful and mature.
This terminal emulator requires Qt 5.2 or higher to run.


/usr/src/cool-old-term # date
Sat Aug  2 10:33:46 UTC 2014

/usr/src/cool-old-term # uname -a
Linux slitaz 3.2-slitaz #1 SMP Sat May 18 22:32:35 CST 2013 i686 GNU/Linux

/usr/src/cool-old-term # ls -l konsole-qml-plugin/*.so
-rwxr-xr-x    1 root     root        575415 Aug  2 09:07 konsole-qml-plugin/libkdekonsole.so
/usr/src/cool-old-term # 

 

2013-05-20

Slitaz -- Qt5 / QtCreator



Qt, the cross-platform application framework


Qt 5.0.2
Qt Creator 2.7.0
qtfm 5.8

Introducing Qt 5

 [..]

Release content
The Qt 5 release includes the following modules:
  • Essentials :Qt Core, Qt GUI, Qt Multimedia, Qt Network, Qt Qml, Qt Quick, Qt SQL, Qt Test, Qt WebKit, Qt WebKit Widgets, Qt Widgets.
  • Add-ons : Qt D-Bus, Qt Graphical Effects, Qt Image Formats, Qt OpenGL, Qt Print Support, Qt Declarative, Qt Script, Qt Script Tools, Qt SVG, Qt XML and Qt XML Patterns.
Future releases might include more modules. See the full lists of modules available at Qt Essentials Modules and Qt Add-ons Modules .

What’s new
The following is a tour of what is new in Qt 5. It is an application written with Qt Quick based on Qt 5.
  • Amazing Graphics Capability and Performance
  • Qt Quick in Qt 5
  • WebKit and HTML5
  • Multimedia
  • Modularized Qt Libraries
  • Widgets in Qt 5
  • Qt Platform Abstraction
  • New Connection Syntax
  • Connectivity and Networking
  • JSON Support
  • User Input
The full list of features can be found at Qt 5 Features.

2011-07-07

Slitaz -- QML RestaurantApp -2




restaurant.xml

<?xml version="1.0" encoding="UTF-8" ?>

<restaurant>

<info>

<name>Diner</name>

<logo>content/logo.png</logo>

<address>

<street>1567 Broadway</street>

<city>New York</city>

<country>United States</country>

<coordinates>

<latitude>40.75930175423635</latitude>

<longitude>-73.98525953292847</longitude>

</coordinates>

</address>

<map>

<minZoomLevel>12</minZoomLevel>

<maxZoomLevel>17</maxZoomLevel>

</map>

<telephone>+2129189999</telephone>

<url>http://www.diner.com/</url>

<description>It takes guts to open a restaurant in Times Square that lacks a theme or strives to be classier than a carnival. Granted, Diner offers an audacious voyeur's paradise in its soaring staircase that rises alongside a suspended abstract sculpture of a fork. Mayson Bacon Jr. has succeeded finding a perfect balance between class and bacon. And to repeat what I'm saying: It takes guts to open a restaurant in Times Square that lacks a theme or strives to be classier than a carnival. Granted, Diner offers an audacious voyeur's paradise in its soaring staircase that rises alongside a suspended abstract sculpture of a fork. I'm on a horse.</description>

</info>

<menu>

<category id="category1" name="Soups" icon="content/soups_icon.png">

<dish name="The King of Prawns" icon="">Deep-fried king prawns and Sweet Chili sauce.</dish>

<dish name="Super Hot Jalapeno Pops" icon="">Deep-fried jalapenos filled with cheese. Served with garlic mayonnaise and out SuperHot Chilisauce.</dish>

<dish name="Muchos Nachos" icon="">Tortillaa chips, melted cheddar cheese, salsa sauce, jalapeno slices, sour cream & guacamole.</dish>

<dish name="Just Fries" icon="">Salted fries with bbq sauce.</dish>

<dish name="Blue Cheese 'n Fries" icon="">Seasoned Criss Cuts with blue cheese sauce.</dish>

<dish name="Sweet Fries" icon="">Sweet potato fries with our special mustard sauce.</dish>

</category>

<category id="category2" name="Vegetarian" icon="content/vegetarian_icon.png">

<dish name="THE Ceasar Salad" icon="">A mixed green salad with Caesar dressing, Parmesan cheese, croutons and arugula with a choice of chicken breast, marinated shrimps, bacon or chevre.</dish>

<dish name="All Vegs" icon="">A mixed green salad with cherry tomato, cucumber, fresh pineapple, orange, marinated red onion, watermelon, arugula & deep-fried spring rolls. Served with ranch dressing, toasted bread and Sweet Chili sauce.</dish>

<dish name="Fruity Fish Salad" icon="">A mixed green salad with salmon fillet, cherry tomato, cucumber, fresh pineapple, orange, marinated red onion, watermelon, lime & arugula. Oil & herb dressing and toasted bread.</dish>

</category>

<category id="category3" name="Sea Food" icon="content/sea_food_icon.png">

<dish name="Fish of the day" icon="">Whatever fish comes up, served with seasonal vegetables and Tartar sauce.</dish>

<dish name="Tons of Tuna" icon="">A huge steak of fresh tuna, baked sweet potato and lime mayo.</dish>

</category>

<category id="category4" name="Steaks" icon="content/steaks_icon.png">

<dish name="Giant BBQ Steak" icon="">A 250g sirloin steak, fries, seasonal veggies and BBQ mayo.</dish>

<dish name="Surf 'n Turf" icon="">A 180g sirloin steak, deep-fried king prawns, bell pepper, asparagus, red onion, whiskey- and Bearnaise sauce, Criss Cuts and garnished with arugula.</dish>

<dish name="Silence of the Lambs" icon="">Lamb Loin Chops with minty mushed peas, country fries and creamy mustard sauce.</dish>

<dish name="Latino Chick" icon="">Chicken breast with Latino sauce and salad of cherry tomatos, cucumber, marinated red onion & arugula. Fresh pineapple, garlic mayonnaise and Criss Cuts.</dish>

</category>

<category id="category5" name="Desserts" icon="content/desserts_icon.png">

<dish name="Master Muffin" icon="">Chocolate muffin with white-chock chips, served with vanilla whipped cream.</dish>

<dish name="The Big Apple" icon="">Apple pie with pecan nuts and raisins, served with vanilla ice cream and chocolate sauce.</dish>

<dish name="Shake it, shake it" icon="">A giant milk shake with a choice of banana-chocolate, chocolate, strawberry-vanilla or mint-chocolate. Made with real fruits and choc.</dish>

<dish name="Super Cheesecake" icon="">A home made cheesecake served with heaps of whipped cream and Goji-berry & strawberry sauces.</dish>

</category>

<category id="category5" name="Drinks" icon="content/drinks_icon.png">

<dish name="Master Muffin" icon="">Chocolate muffin with white-chock chips, served with vanilla whipped cream.</dish>

<dish name="The Big Apple" icon="">Apple pie with pecan nuts and raisins, served with vanilla ice cream and chocolate sauce.</dish>

<dish name="Shake it, shake it" icon="">A giant milk shake with a choice of banana-chocolate, chocolate, strawberry-vanilla or mint-chocolate. Made with real fruits and choc.</dish>

<dish name="Super Cheesecake" icon="">A home made cheesecake served with heaps of whipped cream and Goji-berry & strawberry sauces.</dish>

</category>

</menu>

</restaurant>

Slitaz -- QML RestaurantApp





QML RestaurantApp

The Restaurant example application demonstrates how QML can be used to build a simple, impressive catalog-type application based on local XML data. It is straightforward to convert the application to use internet resources instead of local XML-resources. The application is designed in such a way that it is easy to replace the content and visual style for different restaurants.

2010-08-17

Slitaz -- Qt Quick / qml-i18n


root@slitaz:~# ls -R /usr/local/Trolltech/Qt-4.7.0/examples/declarative/i18n
/usr/local/Trolltech/Qt-4.7.0/examples/declarative/i18n:
i18n i18n.qmlproject.user snapshot1-zh.png
i18n.qml snapshot1-en.png
i18n.qmlproject snapshot1-fr.png

/usr/local/Trolltech/Qt-4.7.0/examples/declarative/i18n/i18n:
base.ts qml_en_AU.ts qml_fr.ts qml_zh.ts
qml_en_AU.qm qml_fr.qm qml_zh.qm
root@slitaz:~# cat /usr/local/Trolltech/Qt-4.7.0/examples/declarative/i18n/i
18n/qml_zh.ts
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.0" language="zh" sourcelanguage="en">
<context>
<name>i18n</name>
<message>
<location filename="../i18n.qml" line="30"/>
<source>Hello</source>
<translation>哈囉</translation>
</message>
</context>
</TS>


i18n.qml

import Qt 4.7

//
// The QML runtime automatically loads a translation from the i18n subdirectory of the root
// QML file, based on the system language.
//
// The files are created/updated by running:
//
// lupdate i18n.qml -ts i18n/base.ts
//
// Translations for new languages are created by copying i18n/base.ts to i18n/qml_<lang>.ts
// The .ts files can then be edited with Linguist:
//
// linguist i18n/qml_fr.ts
//
// The run-time translation files are then generaeted by running:
//
// lrelease i18n/*.ts
//

Rectangle {
//width: 640; height: 480
width: 480; height: 240

Column {
anchors.fill: parent; spacing: 20

Text {
text: "If a translation is available for the system language (eg. French) then the string below will translated (eg. 'Bonjour'). Otherwise is will show 'Hello'."
width: parent.width; wrapMode: Text.WordWrap
}

Text {
text: qsTr("Hello")
font.pointSize: 25; anchors.horizontalCenter: parent.horizontalCenter
}
}
}

Slitaz -- Qt Quick / qml

plugins
Qt Quick examples

Slitaz -- Qt Quick / webview

paris - taipei
taipei - taichung


import Qt 4.7
import QtWebKit 1.0
import "content/Mapping"

root@slitaz:~# /opt/qtcreator-2.0.81/bin/qtcreator -version

Qt Creator 2.0.81 based on Qt 4.7.0

BinEditor 2.0.81 Binary editor component.
Bookmarks 2.0.81 Bookmarks in text editors.
CMakeProjectManager 2.0.81 CMake support
CVS 2.0.81 CVS integration.
CodePaster 2.0.81 Codepaster plugin for pushing/fetching diff from server
Core 2.0.81 The core plugin for the Qt IDE.
CppEditor 2.0.81 C/C++ editor component.
CppTools 2.0.81 Tools for analyzing C/C++ code.
Debugger 2.0.81 Debugger integration.
Designer 2.0.81 Qt Designer integration.
FakeVim 2.0.81 VI-style keyboard navigation.
Find 2.0.81 Provides the find widget and the hooks for find implementations.
GenericProjectManager 2.0.81 Generic support
Help 2.0.81 Help system.
Locator 2.0.81 Provides the Locator widget and the hooks for Locator filter implementations.
Mercurial 2.0.81 Mercurial integration.
Perforce 2.0.81 Perforce integration.
ProjectExplorer 2.0.81 ProjectExplorer framework that can be extended with different kind of project types.
QmlDesigner 2.0.81 Visual Designer for QML files.
QmlInspector 2.0.81 Debugger for QML files
QmlJSEditor 2.0.81 Editor for QML and JavaScript.
QmlProjectManager 2.0.81 Qt Quick support

Qt4ProjectManager 2.0.81 Provides project type for Qt 4 pro files and tools.
ResourceEditor 2.0.81 Editor for qrc files.
ScmGit 2.0.81 Git integration.
Subversion 2.0.81 Subversion integration.
TextEditor 2.0.81 Text editor framework and the implementation of the basic text editor.
VCSBase 2.0.81 Version Control System Base Plugin
Welcome 2.0.81 Default Welcome Screen Plugin

(C) 2010 Nokia Corporation

root@slitaz:~#

2010-08-11

Slitaz -- Qt Quick




Env: WinXP
Qt Quick

The key new feature of the Qt 4.7 and Qt Creator 2.1 releases is Qt Quick (Qt User Interface Creation Kit): a high-level UI technology that allows developers and UI designers to work together to create animated, touch-enabled UIs and lightweight applications. It includes:

1. QML (Qt Meta-Object Language): an easy to use, declarative language
2. New Tools in the Qt Creator IDE: including a preview visual editor that allows UI designers and developers to cooperate, working on the same code in an iterative approach. (Coming in Qt Creator 2.1)
3. QtDeclarative: a new module in the Qt library that enables a new declarative programming approach

And while no C++ programming skills are needed to use Qt Quick, it is 100% based on Qt and can be extended from C++, limited only by your creativity.


googlemaps.qml
// This example demonstrates how Web services such as Google Maps can be
// abstracted as QML types. Here we have a "Mapping" module with a "Map"
// type. The Map type has an address property. Setting that property moves
// the map. The underlying implementation uses WebView and the Google Maps
// API, but users from QML don't need to understand the implementation in
// order to create a Map.

import Qt 4.7
import org.webkit 1.0
import "content/Mapping"

Map {
id: map
width: 300
height: 300
address: "Taipei"

Rectangle {
x: 70
width: input.width + 20
height: input.height + 4
anchors.bottom: parent.bottom; anchors.bottomMargin: 5
radius: 5
opacity: map.status == "Ready" ? 1 : 0

TextInput {
id: input
text: map.address
anchors.centerIn: parent
Keys.onReturnPressed: map.address = input.text
}
}

Text {
id: loading
anchors.centerIn: parent
text: map.status == "Error" ? "Error" : "Loading"
opacity: map.status == "Ready" ? 0 : 1
font.pixelSize: 30

Behavior on opacity { NumberAnimation{} }
}
}
.

2010-07-21

Slitaz -- Qt Creator 2.0 / Qt-4.6.2



Env: slitaz-3.0
gcc-4.4.1 / g++-4.4.1
qt4.6.2 (cooking)

download
qt-creator-linux-x86-opensource-2.0.0.bin

1.# tazpkg get-install qt4
2.# tazpkg get-install-list qt-pkg.list
3.# ./qt-creator-linux-x86-opensource-2.0.0.bin

Qt Creator: Cross-Platform Qt IDE
Qt Creator is a cross-platform integrated development environment (IDE) tailored to the needs of Qt developers. It includes:

* An advanced C++ code editor
* Integrated GUI layout and forms designer
* Project and build management tools
* Integrated, context-sensitive help system
* Visual debugger
* Rapid code navigation tools
* Supports multiple platforms

root@slitaz:~# cat qt-pkg.list
Qt4-dev
qmake
fontconfig-dev
freetype-dev
xorg-libX11-dev
xorg-libXcursor-dev
xorg-libXext-dev
xorg-libXfixes-dev
xorg-libXft-dev
xorg-libXi-dev
xorg-libXrandr-dev
xorg-libXrender-dev
xorg-libXinerama
root@slitaz:~#

root@slitaz:~# qtcreator.bin -version

Qt Creator 2.0.0 based on Qt 4.7.0

BinEditor 2.0.0 Binary editor component.
Bookmarks 2.0.0 Bookmarks in text editors.
CMakeProjectManager 2.0.0 CMake support
CVS 2.0.0 CVS integration.
CodePaster 2.0.0 Codepaster plugin for pushing/fetching diff from server
Core 2.0.0 The core plugin for the Qt IDE.
CppEditor 2.0.0 C/C++ editor component.
CppTools 2.0.0 Tools for analyzing C/C++ code.
Debugger 2.0.0 Debugger integration.
Designer 2.0.0 Qt Designer integration.
FakeVim 2.0.0 VI-style keyboard navigation.
Find 2.0.0 Provides the find widget and the hooks for find implementations.
GenericProjectManager 2.0.0 Generic support
Help 2.0.0 Help system.
Locator 2.0.0 Provides the Locator widget and the hooks for Locator filter implementations.
Mercurial 2.0.0 Mercurial integration.
Perforce 2.0.0 Perforce integration.
ProjectExplorer 2.0.0 ProjectExplorer framework that can be extended with different kind of project types.
QmlJSEditor 2.0.0 Editor for QML and JavaScript.
QmlProjectManager 2.0.0 Qt Quick support
Qt4ProjectManager 2.0.0 Provides project type for Qt 4 pro files and tools.
ResourceEditor 2.0.0 Editor for qrc files.
ScmGit 2.0.0 Git integration.
Subversion 2.0.0 Subversion integration.
TextEditor 2.0.0 Text editor framework and the implementation of the basic text editor.
VCSBase 2.0.0 Version Control System Base Plugin
Welcome 2.0.0 Default Welcome Screen Plugin

(C) 2010 Nokia Corporation

root@slitaz:~#