summaryrefslogtreecommitdiffstats
path: root/examples/script
diff options
context:
space:
mode:
Diffstat (limited to 'examples/script')
-rw-r--r--examples/script/calculator/calculator.desktop11
-rw-r--r--examples/script/calculator/calculator.pro3
-rw-r--r--examples/script/calculator/calculator.ui770
-rw-r--r--examples/script/context2d/context2d.desktop11
-rw-r--r--examples/script/context2d/context2d.pro2
-rw-r--r--examples/script/context2d/main.cpp5
-rw-r--r--examples/script/context2d/qcontext2dcanvas.cpp4
-rw-r--r--examples/script/customclass/customclass.desktop11
-rw-r--r--examples/script/customclass/customclass.pro3
-rw-r--r--examples/script/defaultprototypes/code.js2
-rw-r--r--examples/script/defaultprototypes/defaultprototypes.desktop11
-rw-r--r--examples/script/defaultprototypes/defaultprototypes.pro2
-rw-r--r--examples/script/defaultprototypes/main.cpp5
-rw-r--r--examples/script/defaultprototypes/prototypes.cpp7
-rw-r--r--examples/script/helloscript/helloscript.desktop11
-rw-r--r--examples/script/helloscript/helloscript.pro2
-rw-r--r--examples/script/helloscript/main.cpp4
-rw-r--r--examples/script/marshal/marshal.desktop11
-rw-r--r--examples/script/marshal/marshal.pro3
-rw-r--r--examples/script/qscript/qscript.desktop11
-rw-r--r--examples/script/qscript/qscript.pro3
-rw-r--r--examples/script/qsdbg/qsdbg.desktop11
-rw-r--r--examples/script/qsdbg/qsdbg.pro4
-rw-r--r--examples/script/qstetrix/qstetrix.desktop11
-rw-r--r--examples/script/qstetrix/qstetrix.pro5
-rw-r--r--examples/script/script.pro1
26 files changed, 538 insertions, 386 deletions
diff --git a/examples/script/calculator/calculator.desktop b/examples/script/calculator/calculator.desktop
new file mode 100644
index 0000000..64d6f33
--- /dev/null
+++ b/examples/script/calculator/calculator.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=QtScript Calculator
+Exec=/opt/usr/bin/calculator
+Icon=calculator
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/script/calculator/calculator.pro b/examples/script/calculator/calculator.pro
index f328fc3..314b6b8 100644
--- a/examples/script/calculator/calculator.pro
+++ b/examples/script/calculator/calculator.pro
@@ -13,3 +13,6 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/script/calculator
INSTALLS += target sources
symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+symbian: warning(This example does not work on Symbian platform)
diff --git a/examples/script/calculator/calculator.ui b/examples/script/calculator/calculator.ui
index bb519ba..42e612d 100644
--- a/examples/script/calculator/calculator.ui
+++ b/examples/script/calculator/calculator.ui
@@ -1,7 +1,8 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
<class>Calculator</class>
- <widget class="QWidget" name="Calculator" >
- <property name="geometry" >
+ <widget class="QWidget" name="Calculator">
+ <property name="geometry">
<rect>
<x>0</x>
<y>0</y>
@@ -9,397 +10,406 @@
<height>301</height>
</rect>
</property>
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize" >
+ <property name="minimumSize">
<size>
<width>314</width>
<height>301</height>
</size>
</property>
- <property name="maximumSize" >
+ <property name="maximumSize">
<size>
- <width>314</width>
- <height>301</height>
+ <width>1024</width>
+ <height>768</height>
</size>
</property>
- <property name="windowTitle" >
+ <property name="windowTitle">
<string>Calculator</string>
</property>
- <widget class="QToolButton" name="backspaceButton" >
- <property name="geometry" >
- <rect>
- <x>10</x>
- <y>50</y>
- <width>91</width>
- <height>41</height>
- </rect>
- </property>
- <property name="text" >
- <string>Backspace</string>
- </property>
- </widget>
- <widget class="QToolButton" name="clearButton" >
- <property name="geometry" >
- <rect>
- <x>110</x>
- <y>50</y>
- <width>91</width>
- <height>41</height>
- </rect>
- </property>
- <property name="text" >
- <string>Clear</string>
- </property>
- </widget>
- <widget class="QToolButton" name="clearAllButton" >
- <property name="geometry" >
- <rect>
- <x>210</x>
- <y>50</y>
- <width>91</width>
- <height>41</height>
- </rect>
- </property>
- <property name="text" >
- <string>Clear All</string>
- </property>
- </widget>
- <widget class="QToolButton" name="clearMemoryButton" >
- <property name="geometry" >
- <rect>
- <x>10</x>
- <y>100</y>
- <width>41</width>
- <height>41</height>
- </rect>
- </property>
- <property name="text" >
- <string>MC</string>
- </property>
- </widget>
- <widget class="QToolButton" name="readMemoryButton" >
- <property name="geometry" >
- <rect>
- <x>10</x>
- <y>150</y>
- <width>41</width>
- <height>41</height>
- </rect>
- </property>
- <property name="text" >
- <string>MR</string>
- </property>
- </widget>
- <widget class="QToolButton" name="setMemoryButton" >
- <property name="geometry" >
- <rect>
- <x>10</x>
- <y>200</y>
- <width>41</width>
- <height>41</height>
- </rect>
- </property>
- <property name="text" >
- <string>MS</string>
- </property>
- </widget>
- <widget class="QToolButton" name="addToMemoryButton" >
- <property name="geometry" >
- <rect>
- <x>10</x>
- <y>250</y>
- <width>41</width>
- <height>41</height>
- </rect>
- </property>
- <property name="text" >
- <string>M+</string>
- </property>
- </widget>
- <widget class="QToolButton" name="sevenButton" >
- <property name="geometry" >
- <rect>
- <x>60</x>
- <y>100</y>
- <width>41</width>
- <height>41</height>
- </rect>
- </property>
- <property name="text" >
- <string>7</string>
- </property>
- </widget>
- <widget class="QToolButton" name="eightButton" >
- <property name="geometry" >
- <rect>
- <x>110</x>
- <y>100</y>
- <width>41</width>
- <height>41</height>
- </rect>
- </property>
- <property name="text" >
- <string>8</string>
- </property>
- </widget>
- <widget class="QToolButton" name="nineButton" >
- <property name="geometry" >
- <rect>
- <x>160</x>
- <y>100</y>
- <width>41</width>
- <height>41</height>
- </rect>
- </property>
- <property name="text" >
- <string>9</string>
- </property>
- </widget>
- <widget class="QToolButton" name="fourButton" >
- <property name="geometry" >
- <rect>
- <x>60</x>
- <y>150</y>
- <width>41</width>
- <height>41</height>
- </rect>
- </property>
- <property name="text" >
- <string>4</string>
- </property>
- </widget>
- <widget class="QToolButton" name="fiveButton" >
- <property name="geometry" >
- <rect>
- <x>110</x>
- <y>150</y>
- <width>41</width>
- <height>41</height>
- </rect>
- </property>
- <property name="text" >
- <string>5</string>
- </property>
- </widget>
- <widget class="QToolButton" name="sixButton" >
- <property name="geometry" >
- <rect>
- <x>160</x>
- <y>150</y>
- <width>41</width>
- <height>41</height>
- </rect>
- </property>
- <property name="text" >
- <string>6</string>
- </property>
- </widget>
- <widget class="QToolButton" name="oneButton" >
- <property name="geometry" >
- <rect>
- <x>60</x>
- <y>200</y>
- <width>41</width>
- <height>41</height>
- </rect>
- </property>
- <property name="text" >
- <string>1</string>
- </property>
- </widget>
- <widget class="QToolButton" name="twoButton" >
- <property name="geometry" >
- <rect>
- <x>110</x>
- <y>200</y>
- <width>41</width>
- <height>41</height>
- </rect>
- </property>
- <property name="text" >
- <string>2</string>
- </property>
- </widget>
- <widget class="QToolButton" name="threeButton" >
- <property name="geometry" >
- <rect>
- <x>160</x>
- <y>200</y>
- <width>41</width>
- <height>41</height>
- </rect>
- </property>
- <property name="text" >
- <string>3</string>
- </property>
- </widget>
- <widget class="QToolButton" name="zeroButton" >
- <property name="geometry" >
- <rect>
- <x>60</x>
- <y>250</y>
- <width>41</width>
- <height>41</height>
- </rect>
- </property>
- <property name="text" >
- <string>0</string>
- </property>
- </widget>
- <widget class="QToolButton" name="pointButton" >
- <property name="geometry" >
- <rect>
- <x>110</x>
- <y>250</y>
- <width>41</width>
- <height>41</height>
- </rect>
- </property>
- <property name="text" >
- <string>.</string>
- </property>
- </widget>
- <widget class="QToolButton" name="changeSignButton" >
- <property name="geometry" >
- <rect>
- <x>160</x>
- <y>250</y>
- <width>41</width>
- <height>41</height>
- </rect>
- </property>
- <property name="text" >
- <string>+-</string>
- </property>
- </widget>
- <widget class="QToolButton" name="plusButton" >
- <property name="geometry" >
- <rect>
- <x>210</x>
- <y>250</y>
- <width>41</width>
- <height>41</height>
- </rect>
- </property>
- <property name="text" >
- <string>+</string>
- </property>
- </widget>
- <widget class="QToolButton" name="divisionButton" >
- <property name="geometry" >
- <rect>
- <x>210</x>
- <y>100</y>
- <width>41</width>
- <height>41</height>
- </rect>
- </property>
- <property name="text" >
- <string>/</string>
- </property>
- </widget>
- <widget class="QToolButton" name="timesButton" >
- <property name="geometry" >
- <rect>
- <x>210</x>
- <y>150</y>
- <width>41</width>
- <height>41</height>
- </rect>
- </property>
- <property name="text" >
- <string>*</string>
- </property>
- </widget>
- <widget class="QToolButton" name="minusButton" >
- <property name="geometry" >
- <rect>
- <x>210</x>
- <y>200</y>
- <width>41</width>
- <height>41</height>
- </rect>
- </property>
- <property name="text" >
- <string>-</string>
- </property>
- </widget>
- <widget class="QToolButton" name="squareRootButton" >
- <property name="geometry" >
- <rect>
- <x>260</x>
- <y>100</y>
- <width>41</width>
- <height>41</height>
- </rect>
- </property>
- <property name="text" >
- <string>Sqrt</string>
- </property>
- </widget>
- <widget class="QToolButton" name="powerButton" >
- <property name="geometry" >
- <rect>
- <x>260</x>
- <y>150</y>
- <width>41</width>
- <height>41</height>
- </rect>
- </property>
- <property name="text" >
- <string>x^2</string>
- </property>
- </widget>
- <widget class="QToolButton" name="reciprocalButton" >
- <property name="geometry" >
- <rect>
- <x>260</x>
- <y>200</y>
- <width>41</width>
- <height>41</height>
- </rect>
- </property>
- <property name="text" >
- <string>1/x</string>
- </property>
- </widget>
- <widget class="QToolButton" name="equalButton" >
- <property name="geometry" >
- <rect>
- <x>260</x>
- <y>250</y>
- <width>41</width>
- <height>41</height>
- </rect>
- </property>
- <property name="text" >
- <string>=</string>
- </property>
- </widget>
- <widget class="QLineEdit" name="display" >
- <property name="geometry" >
- <rect>
- <x>10</x>
- <y>10</y>
- <width>291</width>
- <height>31</height>
- </rect>
- </property>
- <property name="maxLength" >
- <number>15</number>
- </property>
- <property name="alignment" >
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- <property name="readOnly" >
- <bool>true</bool>
- </property>
- </widget>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <layout class="QGridLayout" name="gridLayout">
+ <property name="spacing">
+ <number>10</number>
+ </property>
+ <item row="1" column="0" colspan="2">
+ <widget class="QToolButton" name="backspaceButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Backspace</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QToolButton" name="clearMemoryButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>MC</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QToolButton" name="sevenButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>7</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="2">
+ <widget class="QToolButton" name="eightButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>8</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="3">
+ <widget class="QToolButton" name="nineButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>9</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="4">
+ <widget class="QToolButton" name="divisionButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>/</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="5">
+ <widget class="QToolButton" name="squareRootButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Sqrt</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2" colspan="2">
+ <widget class="QToolButton" name="clearButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Clear</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="4" colspan="2">
+ <widget class="QToolButton" name="clearAllButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Clear All</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0" colspan="6">
+ <widget class="QLineEdit" name="display">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maxLength">
+ <number>15</number>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ <property name="readOnly">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QToolButton" name="readMemoryButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>MR</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="QToolButton" name="fourButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>4</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="2">
+ <widget class="QToolButton" name="fiveButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>5</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="3">
+ <widget class="QToolButton" name="sixButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>6</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="4">
+ <widget class="QToolButton" name="timesButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>*</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="5">
+ <widget class="QToolButton" name="powerButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>x^2</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0">
+ <widget class="QToolButton" name="setMemoryButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>MS</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1">
+ <widget class="QToolButton" name="oneButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>1</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="2">
+ <widget class="QToolButton" name="twoButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>2</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="3">
+ <widget class="QToolButton" name="threeButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>3</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="4">
+ <widget class="QToolButton" name="minusButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>-</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="5">
+ <widget class="QToolButton" name="reciprocalButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>1/x</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="0">
+ <widget class="QToolButton" name="addToMemoryButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>M+</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="1">
+ <widget class="QToolButton" name="zeroButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>0</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="2">
+ <widget class="QToolButton" name="pointButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>.</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="3">
+ <widget class="QToolButton" name="changeSignButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>+-</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="4">
+ <widget class="QToolButton" name="plusButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>+</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="5">
+ <widget class="QToolButton" name="equalButton">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>=</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
</widget>
<resources/>
<connections/>
diff --git a/examples/script/context2d/context2d.desktop b/examples/script/context2d/context2d.desktop
new file mode 100644
index 0000000..16f7df2
--- /dev/null
+++ b/examples/script/context2d/context2d.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Context2D
+Exec=/opt/usr/bin/context2d
+Icon=context2d
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/script/context2d/context2d.pro b/examples/script/context2d/context2d.pro
index 6a0e397..85901d6 100644
--- a/examples/script/context2d/context2d.pro
+++ b/examples/script/context2d/context2d.pro
@@ -30,3 +30,5 @@ symbian:{
contextScripts.files = scripts
DEPLOYMENT += contextScripts
}
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
diff --git a/examples/script/context2d/main.cpp b/examples/script/context2d/main.cpp
index 3d56910..20df178 100644
--- a/examples/script/context2d/main.cpp
+++ b/examples/script/context2d/main.cpp
@@ -48,7 +48,12 @@ int main(int argc, char **argv)
QApplication app(argc, argv);
Window win;
+#ifdef Q_OS_SYMBIAN
+ bool smallScreen = true;
+#else
bool smallScreen = QApplication::arguments().contains("-small-screen");
+#endif
+
if (!smallScreen) {
win.show();
} else {
diff --git a/examples/script/context2d/qcontext2dcanvas.cpp b/examples/script/context2d/qcontext2dcanvas.cpp
index bb08b79..f6799e8 100644
--- a/examples/script/context2d/qcontext2dcanvas.cpp
+++ b/examples/script/context2d/qcontext2dcanvas.cpp
@@ -84,8 +84,8 @@ void QContext2DCanvas::contentsChanged(const QImage &image)
void QContext2DCanvas::paintEvent(QPaintEvent *e)
{
QPainter p(this);
-#ifdef Q_WS_S60
-// Draw white rect first since in with some themes the js-file content will produce black-on-black.
+#ifdef Q_OS_SYMBIAN
+ // Draw white rect first since in with some themes the js-file content will produce black-on-black.
QBrush whiteBgBrush(Qt::white);
p.fillRect(e->rect(), whiteBgBrush);
#endif
diff --git a/examples/script/customclass/customclass.desktop b/examples/script/customclass/customclass.desktop
new file mode 100644
index 0000000..2e3ffa6
--- /dev/null
+++ b/examples/script/customclass/customclass.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Custom Script Class
+Exec=/opt/usr/bin/customclass
+Icon=customclass
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/script/customclass/customclass.pro b/examples/script/customclass/customclass.pro
index 3302d54..b8b4c16 100644
--- a/examples/script/customclass/customclass.pro
+++ b/examples/script/customclass/customclass.pro
@@ -13,3 +13,6 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/script/customclass
INSTALLS += target sources
symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+symbian: warning(This example does not work on Symbian platform)
diff --git a/examples/script/defaultprototypes/code.js b/examples/script/defaultprototypes/code.js
index 048e131..5f776fbb 100644
--- a/examples/script/defaultprototypes/code.js
+++ b/examples/script/defaultprototypes/code.js
@@ -16,5 +16,3 @@ listWidget.currentItemChanged.connect(
}
);
//! [1]
-
-listWidget.show();
diff --git a/examples/script/defaultprototypes/defaultprototypes.desktop b/examples/script/defaultprototypes/defaultprototypes.desktop
new file mode 100644
index 0000000..6381546
--- /dev/null
+++ b/examples/script/defaultprototypes/defaultprototypes.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Default Prototypes
+Exec=/opt/usr/bin/defaultprototypes
+Icon=defaultprototypes
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/script/defaultprototypes/defaultprototypes.pro b/examples/script/defaultprototypes/defaultprototypes.pro
index 7cf44d2..98954af 100644
--- a/examples/script/defaultprototypes/defaultprototypes.pro
+++ b/examples/script/defaultprototypes/defaultprototypes.pro
@@ -10,3 +10,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/script/defaultprototypes
INSTALLS += target sources
symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
diff --git a/examples/script/defaultprototypes/main.cpp b/examples/script/defaultprototypes/main.cpp
index 688bcd3..8fc17e3 100644
--- a/examples/script/defaultprototypes/main.cpp
+++ b/examples/script/defaultprototypes/main.cpp
@@ -79,5 +79,10 @@ int main(int argc, char **argv)
qWarning() << "line" << lineNo << ":" << result.toString();
}
+#if defined(Q_OS_SYMBIAN)
+ listWidget.showMaximized();
+#else
+ listWidget.show();
+#endif
return app.exec();
}
diff --git a/examples/script/defaultprototypes/prototypes.cpp b/examples/script/defaultprototypes/prototypes.cpp
index 5a3065b..15c2661 100644
--- a/examples/script/defaultprototypes/prototypes.cpp
+++ b/examples/script/defaultprototypes/prototypes.cpp
@@ -43,6 +43,7 @@
#include <QtGui/QListWidget>
#include <QtScript/QScriptValue>
#include <QtScript/QScriptEngine>
+#include <QDebug>
Q_DECLARE_METATYPE(QListWidgetItem*)
Q_DECLARE_METATYPE(QListWidget*)
@@ -100,10 +101,16 @@ void ListWidgetPrototype::setBackgroundColor(const QString &colorName)
{
QListWidget *widget = qscriptvalue_cast<QListWidget*>(thisObject());
if (widget) {
+#ifdef Q_WS_MAEMO_5
+ QString style = QString("QListWidget::item {background-color: %1;}").arg(colorName);
+ style += "QListWidget::item {selection-color: black;}";
+ widget->setStyleSheet(style);
+#else
QPalette palette = widget->palette();
QColor color(colorName);
palette.setBrush(QPalette::Base, color);
widget->setPalette(palette);
+#endif
}
}
//! [1]
diff --git a/examples/script/helloscript/helloscript.desktop b/examples/script/helloscript/helloscript.desktop
new file mode 100644
index 0000000..7dafad9
--- /dev/null
+++ b/examples/script/helloscript/helloscript.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Hello Script
+Exec=/opt/usr/bin/helloscript
+Icon=helloscript
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/script/helloscript/helloscript.pro b/examples/script/helloscript/helloscript.pro
index 850629e..714218c 100644
--- a/examples/script/helloscript/helloscript.pro
+++ b/examples/script/helloscript/helloscript.pro
@@ -9,3 +9,5 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/script/helloscript
INSTALLS += target sources
symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
diff --git a/examples/script/helloscript/main.cpp b/examples/script/helloscript/main.cpp
index 3bf91a0..9c5b631 100644
--- a/examples/script/helloscript/main.cpp
+++ b/examples/script/helloscript/main.cpp
@@ -78,6 +78,10 @@ int main(int argc, char *argv[])
scriptFile.close();
//! [3]
+#ifdef Q_OS_SYMBIAN
+ contents.replace("button.show()", "button.showMaximized()");
+#endif
+
//! [4]
QScriptValue result = engine.evaluate(contents, fileName);
//! [4]
diff --git a/examples/script/marshal/marshal.desktop b/examples/script/marshal/marshal.desktop
new file mode 100644
index 0000000..8abed70
--- /dev/null
+++ b/examples/script/marshal/marshal.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Qt Script Marshalling
+Exec=/opt/usr/bin/marshal
+Icon=marshal
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/script/marshal/marshal.pro b/examples/script/marshal/marshal.pro
index 4a1fc27..b278423 100644
--- a/examples/script/marshal/marshal.pro
+++ b/examples/script/marshal/marshal.pro
@@ -9,3 +9,6 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/script/marshal
INSTALLS += target sources
symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+symbian: warning(This example does not work on Symbian platform)
diff --git a/examples/script/qscript/qscript.desktop b/examples/script/qscript/qscript.desktop
new file mode 100644
index 0000000..d580981
--- /dev/null
+++ b/examples/script/qscript/qscript.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Qt Script Interpreter
+Exec=/opt/usr/bin/qscript
+Icon=qscript
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/script/qscript/qscript.pro b/examples/script/qscript/qscript.pro
index 4f33459..d88dcaa 100644
--- a/examples/script/qscript/qscript.pro
+++ b/examples/script/qscript/qscript.pro
@@ -14,3 +14,6 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/script/qscript
INSTALLS += target sources
symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+symbian: warning(This example does not work on Symbian platform)
diff --git a/examples/script/qsdbg/qsdbg.desktop b/examples/script/qsdbg/qsdbg.desktop
new file mode 100644
index 0000000..359b93c
--- /dev/null
+++ b/examples/script/qsdbg/qsdbg.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Qt Script Debugger
+Exec=/opt/usr/bin/qsdbg
+Icon=qsdbg
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/script/qsdbg/qsdbg.pro b/examples/script/qsdbg/qsdbg.pro
index 424e0fb..3f03a4a 100644
--- a/examples/script/qsdbg/qsdbg.pro
+++ b/examples/script/qsdbg/qsdbg.pro
@@ -1,5 +1,4 @@
TEMPLATE = app
-TARGET =
DEPENDPATH += .
INCLUDEPATH += .
QT += script
@@ -17,3 +16,6 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/script/qsdbg
INSTALLS += target sources
symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+symbian: warning(This example does not work on Symbian platform)
diff --git a/examples/script/qstetrix/qstetrix.desktop b/examples/script/qstetrix/qstetrix.desktop
new file mode 100644
index 0000000..4795b13
--- /dev/null
+++ b/examples/script/qstetrix/qstetrix.desktop
@@ -0,0 +1,11 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=1.0
+Type=Application
+Terminal=false
+Name=Qt Script Tetrix
+Exec=/opt/usr/bin/qstetrix
+Icon=qstetrix
+X-Window-Icon=
+X-HildonDesk-ShowInToolbar=true
+X-Osso-Type=application/x-executable
diff --git a/examples/script/qstetrix/qstetrix.pro b/examples/script/qstetrix/qstetrix.pro
index 65d5a67..345e919 100644
--- a/examples/script/qstetrix/qstetrix.pro
+++ b/examples/script/qstetrix/qstetrix.pro
@@ -14,3 +14,8 @@ target.path = $$[QT_INSTALL_EXAMPLES]/script/qstetrix
sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS qstetrix.pro *.js
sources.path = $$[QT_INSTALL_EXAMPLES]/script/qstetrix
INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+maemo5: include($$QT_SOURCE_TREE/examples/maemo5pkgrules.pri)
+
+symbian: warning(This example does not work on Symbian platform)
diff --git a/examples/script/script.pro b/examples/script/script.pro
index a95ad13..690a69f 100644
--- a/examples/script/script.pro
+++ b/examples/script/script.pro
@@ -14,4 +14,3 @@ sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS script.pro README
sources.path = $$[QT_INSTALL_EXAMPLES]/script
INSTALLS += target sources
-symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)