diff options
-rw-r--r-- | examples/script/calculator/calculator.pro | 3 | ||||
-rw-r--r-- | examples/script/calculator/calculator.ui | 770 | ||||
-rw-r--r-- | examples/script/context2d/context2d.pro | 2 | ||||
-rw-r--r-- | examples/script/context2d/main.cpp | 4 | ||||
-rw-r--r-- | examples/script/context2d/qcontext2dcanvas.cpp | 4 | ||||
-rw-r--r-- | examples/script/customclass/customclass.pro | 3 | ||||
-rw-r--r-- | examples/script/defaultprototypes/code.js | 2 | ||||
-rw-r--r-- | examples/script/defaultprototypes/defaultprototypes.pro | 1 | ||||
-rw-r--r-- | examples/script/defaultprototypes/main.cpp | 5 | ||||
-rw-r--r-- | examples/script/defaultprototypes/prototypes.cpp | 7 | ||||
-rw-r--r-- | examples/script/helloscript/helloscript.pro | 1 | ||||
-rw-r--r-- | examples/script/helloscript/main.cpp | 4 | ||||
-rw-r--r-- | examples/script/marshal/marshal.pro | 3 | ||||
-rw-r--r-- | examples/script/qscript/qscript.pro | 3 | ||||
-rw-r--r-- | examples/script/qsdbg/qsdbg.pro | 4 | ||||
-rw-r--r-- | examples/script/qstetrix/qstetrix.pro | 5 | ||||
-rw-r--r-- | examples/script/script.pro | 1 |
17 files changed, 437 insertions, 385 deletions
diff --git a/examples/script/calculator/calculator.pro b/examples/script/calculator/calculator.pro index 196d3fc..14d3e9a 100644 --- a/examples/script/calculator/calculator.pro +++ b/examples/script/calculator/calculator.pro @@ -13,3 +13,6 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtscript/script/calculator INSTALLS += target sources symbian: CONFIG += qt_example +maemo5: CONFIG += qt_example + +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.pro b/examples/script/context2d/context2d.pro index 58bc6ab..de1287a 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..b646869 100644 --- a/examples/script/context2d/main.cpp +++ b/examples/script/context2d/main.cpp @@ -49,11 +49,15 @@ int main(int argc, char **argv) Window win; bool smallScreen = QApplication::arguments().contains("-small-screen"); +#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) + win.showMaximized(); +#else if (!smallScreen) { win.show(); } else { win.showFullScreen(); } +#endif return app.exec(); } 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.pro b/examples/script/customclass/customclass.pro index f094074..612456b 100644 --- a/examples/script/customclass/customclass.pro +++ b/examples/script/customclass/customclass.pro @@ -13,3 +13,6 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtscript/script/customclass INSTALLS += target sources symbian: CONFIG += qt_example +maemo5: CONFIG += qt_example + +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..5f776fb 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.pro b/examples/script/defaultprototypes/defaultprototypes.pro index 483188c..590ae8d 100644 --- a/examples/script/defaultprototypes/defaultprototypes.pro +++ b/examples/script/defaultprototypes/defaultprototypes.pro @@ -10,3 +10,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtscript/script/defaultprototypes INSTALLS += target sources symbian: CONFIG += qt_example +maemo5: CONFIG += qt_example 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.pro b/examples/script/helloscript/helloscript.pro index fde0876..5bfbc86 100644 --- a/examples/script/helloscript/helloscript.pro +++ b/examples/script/helloscript/helloscript.pro @@ -9,3 +9,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtscript/script/helloscript INSTALLS += target sources symbian: CONFIG += qt_example +maemo5: CONFIG += qt_example 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.pro b/examples/script/marshal/marshal.pro index adcd249..8519d9f 100644 --- a/examples/script/marshal/marshal.pro +++ b/examples/script/marshal/marshal.pro @@ -9,3 +9,6 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtscript/script/marshal INSTALLS += target sources symbian: CONFIG += qt_example +maemo5: CONFIG += qt_example + +symbian: warning(This example does not work on Symbian platform) diff --git a/examples/script/qscript/qscript.pro b/examples/script/qscript/qscript.pro index 8a6aeb4..8005751 100644 --- a/examples/script/qscript/qscript.pro +++ b/examples/script/qscript/qscript.pro @@ -14,3 +14,6 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtscript/script/qscript INSTALLS += target sources symbian: CONFIG += qt_example +maemo5: CONFIG += qt_example + +symbian: warning(This example does not work on Symbian platform) diff --git a/examples/script/qsdbg/qsdbg.pro b/examples/script/qsdbg/qsdbg.pro index cb5c1ca..3b06661 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]/qtscript/script/qsdbg INSTALLS += target sources symbian: CONFIG += qt_example +maemo5: CONFIG += qt_example + +symbian: warning(This example does not work on Symbian platform) diff --git a/examples/script/qstetrix/qstetrix.pro b/examples/script/qstetrix/qstetrix.pro index c88635e..4a99a0a 100644 --- a/examples/script/qstetrix/qstetrix.pro +++ b/examples/script/qstetrix/qstetrix.pro @@ -14,3 +14,8 @@ target.path = $$[QT_INSTALL_EXAMPLES]/qtscript/script/qstetrix sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS qstetrix.pro *.js sources.path = $$[QT_INSTALL_EXAMPLES]/qtscript/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 faf24d6..69e3726 100644 --- a/examples/script/script.pro +++ b/examples/script/script.pro @@ -15,3 +15,4 @@ sources.path = $$[QT_INSTALL_EXAMPLES]/qtscript/script INSTALLS += target sources symbian: CONFIG += qt_example +maemo5: CONFIG += qt_example |