2010-08-18

Slitaz -- Qt / aqp / browserwindow



Advanced Qt Programming by Mark Summerfield
ISBN: 978-0321635907

QWebInspector: QSettings couldn't read configuration setting [debuggerEnabled].
QWebInspector: QSettings couldn't read configuration setting [profilerEnabled].
QWebInspector: QSettings couldn't read configuration setting [frontendSettings].
QWebInspector: QSettings couldn't persist configuration setting [lastActivePanel].
QWebInspector: QSettings couldn't persist configuration setting [lastActivePanel].
QWebInspector: QSettings couldn't persist configuration setting [frontendSettings].
QWebInspector: QSettings couldn't persist configuration setting [frontendSettings].

main.cpp
[..]
#ifdef DEBUG
webSettings->setAttribute(QWebSettings::DeveloperExtrasEnabled,
true);
#endif
[..]

QWebSettings::DeveloperExtrasEnabled 7

Enables extra tools for Web developers. Currently this enables the "Inspect" element in the context menu as well as the use of QWebInspector which controls the web inspector for web site debugging. This is disabled by default.

----
browserwindow.cpp
[..]
#ifdef DEBUG
actions << webView->pageAction(QWebPage::InspectElement);
#endif
[..]

QWebPage::InspectElement 49
Show the Web Inspector with the currently highlighted HTML element.


QWebInspector Class Reference
The QWebInspector class allows the placement and control of a QWebPage's inspector. The inspector can display a page's hierarchy, its loading statistics and the current state of its individual elements. It is mostly used by web developers. More...

Detailed Description
The QWebInspector class allows the placement and control of a QWebPage's inspector. The inspector can display a page's hierarchy, its loading statistics and the current state of its individual elements. It is mostly used by web developers.
The QWebPage to be inspected must be specified using the setPage() method.
A typical use of QWebInspector follows:
// ...
QWebPage *page = new QWebPage;
// ...

QWebInspector *inspector = new QWebInspector;
inspector->setPage(page);
A QWebInspector can be made visible either programmatically using setVisible(), or by the user through the attached QWebPage's context menu.

Note: A QWebInspector will display a blank widget if either:
page() is null
QWebSettings::DeveloperExtrasEnabled is false

Resources
This class acts mostly as a container and a controller for the inspector. Most of the resources needed by the inspector are owned by the associated QWebPage and are allocated the first time that:
an element is inspected
the QWebInspector is shown.

Inspector configuration persistence
The inspector allows the user to configure some options through its user interface (e.g. the resource tracking "Always enable" option). These settings will be persisted automatically by QtWebKit only if your application previously called QCoreApplication::setOrganizationName() and QCoreApplication::setApplicationName(). See QSettings's default constructor documentation for an explanation of why this is necessary.
.

Slitaz -- Qt / aqp / weathertrayicon



Advanced Qt Programming by Mark Summerfield
ISBN: 978-0321635907

weathertrayicon.cpp
[..]
void WeatherTrayIcon::createContextMenu()
{
QStringList airports;
airports << "Austin-Bergstrom International Airport (KAUS)"
<< "Chicago/Ohare (KORD)"
<< "Dallas / Fort Worth International Airport (KDFW)"
<< "Detroit City Airport (KDET)"
<< "Houston Intercontinental Airport (KIAH)"
<< "Indianapolis International Airport (KIND)"
<< "Jacksonville International Airport (KJAX)"
<< "Los Angeles Intl Airport (KLAX)"
<< "New York/John F. Kennedy Intl Airport (KJFK)"
<< "Philadelphia International Airport (KPHL)"
<< "Phoenix/Sky Harbor (KPHX)"
<< "Port Columbus International Airport (KCMH)"
<< "San Antonio International Airport (KSAT)"
<< "San Diego/Brown Fld (KSDM)"
<< "San Francisco Intl Airport (KSFO)"
<< "San Jose International Airport (KSJC)";
QSettings settings;
airport = settings.value("airport", QVariant(airports.at(0)))
.toString();

QActionGroup *group = new QActionGroup(this);
foreach (const QString &anAirport, airports) {
QAction *action = menu.addAction(anAirport);
group->addAction(action);
action->setCheckable(true);
action->setChecked(anAirport == airport);
action->setData(anAirport);
}
connect(group, SIGNAL(triggered(QAction*)),
this, SLOT(setAirport(QAction*)));
menu.addSeparator();
menu.addAction(QIcon(":/exit.png"), tr("E&xit"), qApp,
SLOT(quit()));

AQP::accelerateMenu(&menu);
setContextMenu(&menu);
}

void WeatherTrayIcon::requestXml()
{
#ifdef NO_REGEX
QString airportId = airport.right(6);
if (airportId.startsWith("(") && airportId.endsWith(")")) {
QString url = QString("http://www.weather.gov/xml/"
"current_obs/%1.xml").arg(airportId.mid(1, 4));
networkXmlAccess->get(QNetworkRequest(QUrl(url)));
}
#else
QRegExp airportIdRx("^.*[(]([A-Z]{4})[)]$");
airportIdRx.setPatternSyntax(QRegExp::RegExp2);
if (airportIdRx.exactMatch(airport)) {
QString url = QString("http://www.weather.gov/xml/"
"current_obs/%1.xml").arg(airportIdRx.cap(1));
networkXmlAccess->get(QNetworkRequest(QUrl(url)));
}
#endif
setToolTip(tr("Failed to connect to network.\n"
"A proxy can be set on the command line:\n"
"weathertrayicon --help"));
}

[..]

Slitaz -- Qt / aqp

Alt_Key

aqp

Advanced Qt Programming by Mark Summerfield

ISBN: 978-0321635907

Chapter 1: Hybrid Desktop/Internet Applications
weathertrayicon
rsspanel
browserwindow
nyrbviewer
matrixquiz

Chapter 2: Audio and Video
moviejingle
playmusic
playvideo

Chapter 3: Model/View Table Models
zipcodes1
zipcodes2

Chapter 4: Model/View Tree Models
timelog1
timelog2

Chapter 5: Model/View Delegates
folderview
timelog1
zipcodes1

Chapter 6: Model/View Views
censusvisualizer
tiledlistview

Chapter 7: Threading with QtConcurrent
image2image
numbergrid

Chapter 8: Threading with QThread
crossfader
findduplicates

Chapter 9: Creating Rich Text Editors
findduplicates
xmledit
timelog1
textedit

Chapter 10: Creating Rich Text Documents
outputsampler

Chapter 11: Creating Graphics/View Windows
petridish1

Chapter 12: Creating Graphics/View Scenes
pagedesigner1

Chapter 13: The Animation and State Machine Frameworks
finddialog
petridish2
pagedesigner2


Alt_Key
The program makes it straightforward for developers to find the right characters to use as accelerators for menu option texts and for dialog labels. This helps make GUI programs more usable by catering for users who can't use the mouse and for fast typists who don't want to use the mouse.

2010-08-17

Slitaz -- arm / mips / powerpc / sh4 / sparc

wok

http://hg.slitaz.org/wok/rev/8da46cc14f57

changeset 5987:8da46cc14f57
Add uclibc-cross-compiler
author Pascal Bellard
date Sat Aug 14 14:20:45 2010 +0200 (3 days ago)
parents f71157a571d0
children 8ee0c3ca610f
files uclibc-cross-compiler-armv4eb/receipt uclibc-cross-compiler-armv4l/receipt uclibc-cross-compiler-armv4tl/receipt uclibc-cross-compiler-armv5l/receipt uclibc-cross-compiler-armv6l/receipt uclibc-cross-compiler-i486/receipt uclibc-cross-compiler-mips/receipt uclibc-cross-compiler-mips64/receipt uclibc-cross-compiler-mipsel/receipt uclibc-cross-compiler-powerpc-440fp/receipt uclibc-cross-compiler-powerpc/receipt uclibc-cross-compiler-sh4/receipt uclibc-cross-compiler-sparc/receipt




http://impactlinux.com/aboriginal/README

Aboriginal Linux: We cross compile so you don't have to.

===============================================================================
--- What is it?

Aboriginal Linux provides virtual Linux images you can boot under QEMU,
within which you can compile and test any software you like.

The build scripts automatically create cross compilers and bootable system
images for various targets, such as arm, mips, powerpc, and x86. You can
download the resulting binaries from the website if you don't want to bother
compiling them yourself.

The system images provide minimal native development environments which you
can boot under an emulator (or on real hardware if you have it) to compile
code natively. This includes a full native compiler (for both C and C++),
and the (optional) ability to run the cross compiler on the host (via distcc)
to speed up the build without reqiring the packages you're building to
know anything about cross compiling.
[..]

Slitaz -- Qt / qconfig


depend

http://www.cuteqt.com/blog/?p=26
減少Qt編譯時間暨簡單Qt裁剪

The qconfig tool's interface displays all of Qt's functionality, and allows the user to both disable and enable features. The user can open and edit any custom configuration file located in the src/corelib/global directory. When creating a custom configuration file manually, a description of the currently available Qt features can be found in the src/corelib/global/qfeatures.txt file.
Note that some features depend on others; disabling any feature will automatically disable all features depending on it. The feature dependencies can be explored using the qconfig tool, but they are also described in the src/corelib/global/qfeatures.h file.
To be able to apply the custom configuration, it must be saved in a file called qconfig-myfile.h in the src/corelib/global directory. Then use the configure tool's -qconfig option and pass the configuration's file name without the qconfig- prefix and .h extension, as argument. The following examples show how this is invoked on each of the embedded platforms for a file called qconfig-myfile.h:

Embedded Linux:
./configure -qconfig myfile


root@slitaz:/opt/qt-470# ./configure --help
Usage: configure [-h] [-prefix <:dir>] [-prefix-install] [-bindir <:dir>] [-libdir <:dir>]
[-docdir <:dir>] [-headerdir <:dir>] [-plugindir <:dir> ] [-importdir <:dir>] [-datadir <:dir>]
[-translationdir <:dir>] [-sysconfdir <:dir>] [-examplesdir <:dir>]
[-demosdir <:dir>] [-buildkey <:key>] [-release] [-debug]
[-debug-and-release] [-developer-build] [-shared] [-static] [-no-fast] [-fast] [-no-largefile]
[-largefile] [-no-exceptions] [-exceptions] [-no-accessibility]
[-accessibility] [-no-stl] [-stl] [-no-sql-<:driver>] [-sql-<:driver>]
[-plugin-sql-<:driver>] [-system-sqlite] [-no-qt3support] [-qt3support]
[-platform] [-D <:string>] [-I <:string>] [-L <:string>] [-help]
[-qt-zlib] [-system-zlib] [-no-gif] [-qt-gif] [-no-libtiff] [-qt-libtiff] [-system-libtiff]
[-no-libpng] [-qt-libpng] [-system-libpng] [-no-libmng] [-qt-libmng]
[-system-libmng] [-no-libjpeg] [-qt-libjpeg] [-system-libjpeg] [-make <:part>]
[-nomake <:part>] [-R <:string>] [-l <:string>] [-no-rpath] [-rpath] [-continue]
[-verbose] [-v] [-silent] [-no-nis] [-nis] [-no-cups] [-cups] [-no-iconv]
[-iconv] [-no-pch] [-pch] [-no-dbus] [-dbus] [-dbus-linked] [-no-gui]
[-no-separate-debug-info] [-no-mmx] [-no-3dnow] [-no-sse] [-no-sse2]
[-qtnamespace <:namespace>] [-qtlibinfix <:infix>] [-separate-debug-info] [-armfpa]
[-no-optimized-qmake] [-optimized-qmake] [-no-xmlpatterns] [-xmlpatterns]
[-no-multimedia] [-multimedia] [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend]
[-no-media-backend] [-media-backend] [-no-audio-backend] [-audio-backend]
[-no-openssl] [-openssl] [-openssl-linked]
[-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit] [-no-javascript-jit] [-javascript-jit]
[-no-script] [-script] [-no-scripttools] [-scripttools] [-no-declarative] [-declarative]

[additional platform specific options (see below)]


Installation options:

These are optional, but you may specify install directories.


-prefix <:dir> ...... This will install everything relative to <:dir>
(default /usr/local/Trolltech/Qt-4.7.0)

* -prefix-install .... Force a sandboxed "local" installation of
Qt. This will install into
/usr/local/Trolltech/Qt-4.7.0, if this option is
disabled then some platforms will attempt a
"system" install by placing default values to
be placed in a system location other than
PREFIX.

You may use these to separate different parts of the install:

-bindir <:dir> ......... Executables will be installed to <:dir>
(default PREFIX/bin)
-libdir <:dir> ......... Libraries will be installed to <:dir>
(default PREFIX/lib)
-docdir <:dir> ......... Documentation will be installed to <:dir>
(default PREFIX/doc)
-headerdir <:dir> ...... Headers will be installed to <:dir>
(default PREFIX/include)
-plugindir <:dir> ...... Plugins will be installed to <:dir>
(default PREFIX/plugins)
-importdir <:dir> ...... Imports for QML will be installed to <:dir>
(default PREFIX/imports)
-datadir <:dir> ........ Data used by Qt programs will be installed to <:dir>
(default PREFIX)
-translationdir <:dir> . Translations of Qt programs will be installed to <:dir>
(default PREFIX/translations)
-sysconfdir <:dir> ..... Settings used by Qt programs will be looked for in <:dir>
(default PREFIX/etc/settings)
-examplesdir <:dir> .... Examples will be installed to <:dir>
(default PREFIX/examples)
-demosdir <:dir> ....... Demos will be installed to <:dir>
(default PREFIX/demos)

You may use these options to turn on strict plugin loading.

-buildkey <:key> .... Build the Qt library and plugins using the specified
<:key>. When the library loads plugins, it will only
load those that have a matching key.

Configure options:

The defaults (*) are usually acceptable. A plus (+) denotes a default value
that needs to be evaluated. If the evaluation succeeds, the feature is
included. Here is a short explanation of each option:

* -release ........... Compile and link Qt with debugging turned off.
-debug ............. Compile and link Qt with debugging turned on.
-debug-and-release . Compile and link two versions of Qt, with and without
debugging turned on (Mac only).

-developer-build ... Compile and link Qt with Qt developer options (including auto-tests exporting)

-opensource ........ Compile and link the Open-Source Edition of Qt.
-commercial ........ Compile and link the Commercial Edition of Qt.


* -shared ............ Create and use shared Qt libraries.
-static ............ Create and use static Qt libraries.

* -no-fast ........... Configure Qt normally by generating Makefiles for all
project files.
-fast .............. Configure Qt quickly by generating Makefiles only for
library and subdirectory targets. All other Makefiles
are created as wrappers, which will in turn run qmake.

-no-largefile ...... Disables large file support.
+ -largefile ......... Enables Qt to access files larger than 4 GB.

-no-exceptions ..... Disable exceptions on compilers that support it.
* -exceptions ........ Enable exceptions on compilers that support it.

-no-accessibility .. Do not compile Accessibility support.
* -accessibility ..... Compile Accessibility support.

-no-stl ............ Do not compile STL support.
* -stl ............... Compile STL support.

-no-sql-<:driver> ... Disable SQL <:driver> entirely.
-qt-sql-<:driver> ... Enable a SQL <:driver> in the QtSql library, by default
none are turned on.
-plugin-sql-<:driver> Enable SQL <:driver> as a plugin to be linked to
at run time.

Possible values for <:driver>:
[ db2 ibase mysql oci odbc psql sqlite sqlite2 sqlite_symbian tds ]

-system-sqlite ..... Use sqlite from the operating system.

-no-qt3support ..... Disables the Qt 3 support functionality.
* -qt3support ........ Enables the Qt 3 support functionality.

-no-xmlpatterns .... Do not build the QtXmlPatterns module.
+ -xmlpatterns ....... Build the QtXmlPatterns module.
QtXmlPatterns is built if a decent C++ compiler
is used and exceptions are enabled.

-no-multimedia ..... Do not build the QtMultimedia module.
+ -multimedia ........ Build the QtMultimedia module.

-no-audio-backend .. Do not build the platform audio backend into QtMultimedia.
+ -audio-backend ..... Build the platform audio backend into QtMultimedia if available.

-no-phonon ......... Do not build the Phonon module.
+ -phonon ............ Build the Phonon module.
Phonon is built if a decent C++ compiler is used.
-no-phonon-backend.. Do not build the platform phonon plugin.
+ -phonon-backend..... Build the platform phonon plugin.

-no-svg ............ Do not build the SVG module.
+ -svg ............... Build the SVG module.

-no-webkit ......... Do not build the WebKit module.
+ -webkit ............ Build the WebKit module.
WebKit is built if a decent C++ compiler is used.

-no-javascript-jit . Do not build the JavaScriptCore JIT compiler.
+ -javascript-jit .... Build the JavaScriptCore JIT compiler.

-no-script ......... Do not build the QtScript module.
+ -script ............ Build the QtScript module.

-no-scripttools .... Do not build the QtScriptTools module.
+ -scripttools ....... Build the QtScriptTools module.

+ -no-declarative .....Do not build the declarative module.
-declarative ....... Build the declarative module.

-platform target ... The operating system and compiler you are building
on (linux-g++).

See the README file for a list of supported
operating systems and compilers.
-graphicssystem <:sys> Sets an alternate graphics system. Available options are:
raster - Software rasterizer
opengl - Rendering via OpenGL, Experimental!

-no-mmx ............ Do not compile with use of MMX instructions.
-no-3dnow .......... Do not compile with use of 3DNOW instructions.
-no-sse ............ Do not compile with use of SSE instructions.
-no-sse2 ........... Do not compile with use of SSE2 instructions.

-qtnamespace <:name> Wraps all Qt library code in 'namespace <:name> {...}'.
-qtlibinfix <:infix> Renames all libQt*.so to libQt*<:infix>.so.

-D <:string> ........ Add an explicit define to the preprocessor.
-I <:string> ........ Add an explicit include path.
-L <:string> ........ Add an explicit library path.

-help, -h .......... Display this information.

Third Party Libraries:

-qt-zlib ........... Use the zlib bundled with Qt.
+ -system-zlib ....... Use zlib from the operating system.
See http://www.gzip.org/zlib

-no-gif ............ Do not compile the plugin for GIF reading support.
* -qt-gif ............ Compile the plugin for GIF reading support.
See also src/plugins/imageformats/gif/qgifhandler.h

-no-libtiff ........ Do not compile the plugin for TIFF support.
-qt-libtiff ........ Use the libtiff bundled with Qt.
+ -system-libtiff .... Use libtiff from the operating system.
See http://www.libtiff.org

-no-libpng ......... Do not compile in PNG support.
-qt-libpng ......... Use the libpng bundled with Qt.
+ -system-libpng ..... Use libpng from the operating system.
See http://www.libpng.org/pub/png

-no-libmng ......... Do not compile the plugin for MNG support.
-qt-libmng ......... Use the libmng bundled with Qt.
+ -system-libmng ..... Use libmng from the operating system.
See http://www.libmng.com

-no-libjpeg ........ Do not compile the plugin for JPEG support.
-qt-libjpeg ........ Use the libjpeg bundled with Qt.
+ -system-libjpeg .... Use libjpeg from the operating system.
See http://www.ijg.org

-no-openssl ........ Do not compile support for OpenSSL.
+ -openssl ........... Enable run-time OpenSSL support.
-openssl-linked .... Enabled linked OpenSSL support.

-ptmalloc .......... Override the system memory allocator with ptmalloc.
(Experimental.)

Additional options:

-make <:part> ....... Add part to the list of parts to be built at make time.
(libs tools examples demos docs translations)
-nomake <:part> ..... Exclude part from the list of parts to be built.

-R <:string> ........ Add an explicit runtime library path to the Qt
libraries.
-l <:string> ........ Add an explicit library.

-no-rpath .......... Do not use the library install path as a runtime
library path.
+ -rpath ............. Link Qt libraries and executables using the library
install path as a runtime library path. Equivalent
to -R install_libpath

-continue .......... Continue as far as possible if an error occurs.

-verbose, -v ....... Print verbose information about each step of the
configure process.

-silent ............ Reduce the build output so that warnings and errors
can be seen more easily.

* -no-optimized-qmake ... Do not build qmake optimized.
-optimized-qmake ...... Build qmake optimized.

-no-gui ............ Don't build the Qt GUI library

-no-nis ............ Do not compile NIS support.
* -nis ............... Compile NIS support.

-no-cups ........... Do not compile CUPS support.
* -cups .............. Compile CUPS support.
Requires cups/cups.h and libcups.so.2.

-no-iconv .......... Do not compile support for iconv(3).
* -iconv ............. Compile support for iconv(3).

-no-pch ............ Do not use precompiled header support.
* -pch ............... Use precompiled header support.

-no-dbus ........... Do not compile the QtDBus module.
+ -dbus .............. Compile the QtDBus module and dynamically load libdbus-1.
-dbus-linked ....... Compile the QtDBus module and link to libdbus-1.

-reduce-relocations ..... Reduce relocations in the libraries through extra
linker optimizations (Qt/X11 and Qt for Embedded Linux only;
experimental; needs GNU ld >= 2.18).

-no-separate-debug-info . Do not store debug information in a separate file.
* -separate-debug-info .... Strip debug information into a separate .debug file.


Qt/X11 only:

-no-gtkstyle ....... Do not build the GTK theme integration.
+ -gtkstyle .......... Build the GTK theme integration.

* -no-nas-sound ...... Do not compile in NAS sound support.
-system-nas-sound .. Use NAS libaudio from the operating system.
See http://radscan.com/nas.html

-egl ............... Use EGL instead of GLX to manage contexts.
When building for desktop OpenGL, this option will
make Qt use EGL to manage contexts rather than the
GLX, which is the default. Note: For OpenGL ES, EGL
is always used.

-no-opengl ......... Do not support OpenGL.
+ -opengl <:api> ...... Enable OpenGL support.
With no parameter, this will auto-detect the "best"
OpenGL API to use. If desktop OpenGL is available, it
will be used. Use desktop, es1, or es2 for <:api>
to force the use of the Desktop (OpenGL 1.x or 2.x),
OpenGL ES 1.x Common profile, or 2.x APIs instead.

-no-openvg ........ Do not support OpenVG.
+ -openvg ........... Enable OpenVG support.
Requires EGL support, typically supplied by an OpenGL
or other graphics implementation.

-no-sm ............. Do not support X Session Management.
* -sm ................ Support X Session Management, links in -lSM -lICE.

-no-xshape ......... Do not compile XShape support.
* -xshape ............ Compile XShape support.
Requires X11/extensions/shape.h.

-no-xvideo ......... Do not compile XVideo support.
* -xvideo ............ Compile XVideo support.
Requires X11/extensions/Xv.h & Xvlib.h.

-no-xsync .......... Do not compile XSync support.
* -xsync ............. Compile XSync support.
Requires X11/extensions/sync.h.

-no-xinerama ....... Do not compile Xinerama (multihead) support.
* -xinerama .......... Compile Xinerama support.
Requires X11/extensions/Xinerama.h and libXinerama.
By default, Xinerama support will be compiled if
available and the shared libraries are dynamically
loaded at runtime.

-no-xcursor ........ Do not compile Xcursor support.
* -xcursor ........... Compile Xcursor support.
Requires X11/Xcursor/Xcursor.h and libXcursor.
By default, Xcursor support will be compiled if
available and the shared libraries are dynamically
loaded at runtime.

-no-xfixes ......... Do not compile Xfixes support.
* -xfixes ............ Compile Xfixes support.
Requires X11/extensions/Xfixes.h and libXfixes.
By default, Xfixes support will be compiled if
available and the shared libraries are dynamically
loaded at runtime.

-no-xrandr ......... Do not compile Xrandr (resize and rotate) support.
* -xrandr ............ Compile Xrandr support.
Requires X11/extensions/Xrandr.h and libXrandr.

-no-xrender ........ Do not compile Xrender support.
* -xrender ........... Compile Xrender support.
Requires X11/extensions/Xrender.h and libXrender.

-no-mitshm ......... Do not compile MIT-SHM support.
* -mitshm ............ Compile MIT-SHM support.
Requires sys/ipc.h, sys/shm.h and X11/extensions/XShm.h

-no-fontconfig ..... Do not compile FontConfig (anti-aliased font) support.
* -fontconfig ........ Compile FontConfig support.
Requires fontconfig/fontconfig.h, libfontconfig,
freetype.h and libfreetype.

-no-xinput ......... Do not compile Xinput support.
* -xinput ............ Compile Xinput support. This also enabled tablet support
which requires IRIX with wacom.h and libXi or
XFree86 with X11/extensions/XInput.h and libXi.

-no-xkb ............ Do not compile XKB (X KeyBoard extension) support.
* -xkb ............... Compile XKB support.

-no-glib ........... Do not compile Glib support.
+ -glib .............. Compile Glib support.

root@slitaz:/opt/qt-470#

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-08-07

Slitaz -- QTextEdit


QTextEdit
The QTextEdit widget is an advanced editor that supports formatted rich text. It can be used to display HTML and other rich document formats. Internally, QTextEdit uses the QTextDocument class to describe both the high-level structure of each document and the low-level formatting of paragraphs.
If you are viewing this document in the textedit demo, you can edit this document to explore Qt's rich text editing features. We have included some comments in each of the following sections to encourage you to experiment.

Slitaz -- Qt / pathstrok


Slitaz -Qt / robot

Slitaz -- Qt / canvas


Slitaz -- Q7z / P7Zip GUI

Q7z

Q7z-create

Q7z-extract

http://code.google.com/p/k7z/

#7Z is a 7-Zip GUI for Windows; Q7Z is a P7Zip GUI for Linux. #7Z and Q7Z attempt to simplify data compression and backup.

7-Zip is a file archiver for Windows with a high compression ratio; P7Zip is a port of 7-Zip from Windows to Linux.

Use Q7Z or #7Z if you want to:

* Update existing archives quickly
* Backup multiple folders to a storage location
* Create or extract protected archives
* Lessen effort by using archiving profiles and lists

Additional product information, including installation instructions, is available on the above Wiki tab.

root@slitaz:~# tazpkg info q7z

Tazpkg information
================================================================================
Package : q7z
Version : 0.8.0
Category : misc
Short desc : P7Zip GUI
Maintainer : nobody@slitaz.org
Depends : PyQt-x11-gpl p7zip-full tar make
Web site : http://code.google.com/p/k7z/
================================================================================

root@slitaz:~#

2010-08-04

Slitaz -- Qt / coverflow



coverflow.cpp
#include <qdiriterator>
#include <qimagereader>
#include <qthreadpool>
#include <qpaintevent>
#include <qfileinfo>
#include <qpainter>
#include <qcache>

#include "coverflow_p.h"
#include "coverflow.h"

#define COVERFLOW_IMAGE_HEIGHT (200)
#define COVERFLOW_IMAGE_WIDTH (250)

/* ============================================================================
* PRIVATE Methods
*/
static QImage *mirrorImage (const QImage *image) {
QImage *tmpImage = new QImage(image->mirrored(false, true));

QPoint p1, p2;
p2.setY(tmpImage->height());

QLinearGradient gradient(p1, p2);
gradient.setColorAt(0, QColor(0, 0, 0, 100));
gradient.setColorAt(1, Qt::transparent);

QPainter p(tmpImage);
p.setCompositionMode(QPainter::CompositionMode_DestinationIn);
p.fillRect(0, 0, tmpImage->width(), tmpImage->height(), gradient);
p.end();

return(tmpImage);
}
[..]

Slitaz -- Qt / pictureflow


#ifndef PICTUREFLOW_H
#define PICTUREFLOW_H

#include <qwidget.h>

class PictureFlowPrivate;

/*!

Class PictureFlow implements an image show widget with animation effect
like Apple's CoverFlow (in iTunes and iPod). Images are arranged in form
of slides, one main slide is shown at the center with few slides on
the left and right sides of the center slide. When the next or previous
slide is brought to the front, the whole slides flow to the right or
the right with smooth animation effect; until the new slide is finally
placed at the center.


*/
class PictureFlow : public QWidget
{
Q_OBJECT

Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setBackgroundColor)
Q_PROPERTY(QSize slideSize READ slideSize WRITE setSlideSize)
Q_PROPERTY(int slideCount READ slideCount)
Q_PROPERTY(int centerIndex READ centerIndex WRITE setCenterIndex)
[..]