summaryrefslogtreecommitdiffstats
path: root/examples/painting/basicdrawing/window.cpp
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-05-25 01:11:52 +1000
committerQt Continuous Integration System <qt-info@nokia.com>2011-05-25 01:11:52 +1000
commit6bd691dc5402f22840a3354b08cb6bdc99b01006 (patch)
tree6ef3847a93f501d52fcb01927c6c9f36a94570e5 /examples/painting/basicdrawing/window.cpp
parente60f05201f5bc412ec8c02625bcbbca5ba50812c (diff)
parent4d10065c54f9b277f44ed042f4e18858dafdd1df (diff)
Merge branch 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging
* 'master' of git://scm.dev.nokia.troll.no/qt/qtbase-staging: (21 commits) Fixed line endings. Update licenseheader text in source files for qtbase Qt module New configure.exe binary Add -qpa option on Windows Use qglobal.h's VERSION number instead of hardcoded current version More examples adjusted to Symbian and Maemo5. (cherry picked from commit a97b9620a584c9b1a2e006873183526b3d7e001e) Doc: Added some details to the accessibility events API documentation. Doc: Fixed qdoc warnings. Doc: Fixed qdoc warnings. Doc: Made an additional change for clarity. Doc: Noted that the example will not work as expected with a mouse. Doc: Fixed qdoc warnings. Doc: Applying a pending change from previous merges. Doc: Fixed qdoc warning. Doc: Fixed qdoc warnings. Doc: Applied pending fixes to API documentation. Doc: Various fixes to documentation, some based on changes in master. Doc: Added missing project and desktop files. Doc: Documented the value returned when no field can be found. Squashed commit of changes from the 4.8-temp branch. ...
Diffstat (limited to 'examples/painting/basicdrawing/window.cpp')
-rw-r--r--examples/painting/basicdrawing/window.cpp43
1 files changed, 24 insertions, 19 deletions
diff --git a/examples/painting/basicdrawing/window.cpp b/examples/painting/basicdrawing/window.cpp
index 54422a0104..072c3e08aa 100644
--- a/examples/painting/basicdrawing/window.cpp
+++ b/examples/painting/basicdrawing/window.cpp
@@ -74,7 +74,11 @@ Window::Window()
//! [2]
penWidthSpinBox = new QSpinBox;
penWidthSpinBox->setRange(0, 20);
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+ penWidthSpinBox->setSpecialValueText(tr("0"));
+#else
penWidthSpinBox->setSpecialValueText(tr("0 (cosmetic pen)"));
+#endif
penWidthLabel = new QLabel(tr("Pen &Width:"));
penWidthLabel->setBuddy(penWidthSpinBox);
@@ -134,12 +138,12 @@ Window::Window()
brushStyleComboBox->addItem(tr("Dense 7"), Qt::Dense7Pattern);
brushStyleComboBox->addItem(tr("None"), Qt::NoBrush);
- brushStyleLabel = new QLabel(tr("&Brush Style:"));
+ brushStyleLabel = new QLabel(tr("&Brush:"));
brushStyleLabel->setBuddy(brushStyleComboBox);
//! [4]
//! [5]
- otherOptionsLabel = new QLabel(tr("Other Options:"));
+ otherOptionsLabel = new QLabel(tr("Options:"));
//! [5] //! [6]
antialiasingCheckBox = new QCheckBox(tr("&Antialiasing"));
//! [6] //! [7]
@@ -168,26 +172,27 @@ Window::Window()
//! [9]
QGridLayout *mainLayout = new QGridLayout;
//! [9] //! [10]
+#if defined(Q_OS_SYMBIAN) || defined(Q_WS_MAEMO_5) || defined(Q_WS_SIMULATOR)
+ mainLayout->setSizeConstraint(QLayout::SetNoConstraint);
+#endif
mainLayout->setColumnStretch(0, 1);
mainLayout->setColumnStretch(3, 1);
mainLayout->addWidget(renderArea, 0, 0, 1, 4);
- mainLayout->setRowMinimumHeight(1, 6);
- mainLayout->addWidget(shapeLabel, 2, 1, Qt::AlignRight);
- mainLayout->addWidget(shapeComboBox, 2, 2);
- mainLayout->addWidget(penWidthLabel, 3, 1, Qt::AlignRight);
- mainLayout->addWidget(penWidthSpinBox, 3, 2);
- mainLayout->addWidget(penStyleLabel, 4, 1, Qt::AlignRight);
- mainLayout->addWidget(penStyleComboBox, 4, 2);
- mainLayout->addWidget(penCapLabel, 5, 1, Qt::AlignRight);
- mainLayout->addWidget(penCapComboBox, 5, 2);
- mainLayout->addWidget(penJoinLabel, 6, 1, Qt::AlignRight);
- mainLayout->addWidget(penJoinComboBox, 6, 2);
- mainLayout->addWidget(brushStyleLabel, 7, 1, Qt::AlignRight);
- mainLayout->addWidget(brushStyleComboBox, 7, 2);
- mainLayout->setRowMinimumHeight(8, 6);
- mainLayout->addWidget(otherOptionsLabel, 9, 1, Qt::AlignRight);
- mainLayout->addWidget(antialiasingCheckBox, 9, 2);
- mainLayout->addWidget(transformationsCheckBox, 10, 2);
+ mainLayout->addWidget(shapeLabel, 2, 0, Qt::AlignRight);
+ mainLayout->addWidget(shapeComboBox, 2, 1);
+ mainLayout->addWidget(penWidthLabel, 3, 0, Qt::AlignRight);
+ mainLayout->addWidget(penWidthSpinBox, 3, 1);
+ mainLayout->addWidget(penStyleLabel, 4, 0, Qt::AlignRight);
+ mainLayout->addWidget(penStyleComboBox, 4, 1);
+ mainLayout->addWidget(penCapLabel, 3, 2, Qt::AlignRight);
+ mainLayout->addWidget(penCapComboBox, 3, 3);
+ mainLayout->addWidget(penJoinLabel, 2, 2, Qt::AlignRight);
+ mainLayout->addWidget(penJoinComboBox, 2, 3);
+ mainLayout->addWidget(brushStyleLabel, 4, 2, Qt::AlignRight);
+ mainLayout->addWidget(brushStyleComboBox, 4, 3);
+ mainLayout->addWidget(otherOptionsLabel, 5, 0, Qt::AlignRight);
+ mainLayout->addWidget(antialiasingCheckBox, 5, 1, 1, 1, Qt::AlignRight);
+ mainLayout->addWidget(transformationsCheckBox, 5, 2, 1, 2, Qt::AlignRight);
setLayout(mainLayout);
shapeChanged();