summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-10-25 23:26:53 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-10-25 23:26:53 (GMT)
commitcbb1b29d397c063fc3bcae04c5b062f20cbd12c5 (patch)
treed89cebe45c9f6dfdcab34a95da19ee0d670e30f5 /demos
parented7d58f6668be4ffb5f915722dee81c864f74844 (diff)
parent9aa00de1d277763c0f7a380fde27face60e5f686 (diff)
downloadQt-cbb1b29d397c063fc3bcae04c5b062f20cbd12c5.zip
Qt-cbb1b29d397c063fc3bcae04c5b062f20cbd12c5.tar.gz
Qt-cbb1b29d397c063fc3bcae04c5b062f20cbd12c5.tar.bz2
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into kinetic-declarativeui
Conflicts: tools/qdoc3/cppcodemarker.cpp
Diffstat (limited to 'demos')
-rw-r--r--demos/embedded/digiflip/digiflip.cpp8
-rw-r--r--demos/embedded/flickable/main.cpp2
-rw-r--r--demos/embedded/lightmaps/lightmaps.cpp4
-rw-r--r--demos/embedded/raycasting/raycasting.cpp6
-rw-r--r--demos/qmediaplayer/mediaplayer.cpp11
-rw-r--r--demos/qmediaplayer/mediaplayer.h1
-rw-r--r--demos/spreadsheet/spreadsheet.cpp1
7 files changed, 22 insertions, 11 deletions
diff --git a/demos/embedded/digiflip/digiflip.cpp b/demos/embedded/digiflip/digiflip.cpp
index 2edb752..9d6265d 100644
--- a/demos/embedded/digiflip/digiflip.cpp
+++ b/demos/embedded/digiflip/digiflip.cpp
@@ -117,7 +117,7 @@ protected:
QPixmap drawDigits(int n, const QRect &rect) {
int scaleFactor = 2;
-#if defined(Q_OS_SYMBIAN)
+#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WINCE_WM)
if (rect.height() > 240)
scaleFactor = 1;
#endif
@@ -192,7 +192,7 @@ protected:
void paintFlip() {
QPainter p(this);
-#if !defined(Q_OS_SYMBIAN)
+#if !defined(Q_OS_SYMBIAN) && !defined(Q_OS_WINCE_WM)
p.setRenderHint(QPainter::SmoothPixmapTransform, true);
p.setRenderHint(QPainter::Antialiasing, true);
#endif
@@ -319,7 +319,7 @@ public:
connect(slideAction, SIGNAL(triggered()), SLOT(chooseSlide()));
connect(flipAction, SIGNAL(triggered()), SLOT(chooseFlip()));
connect(rotateAction, SIGNAL(triggered()), SLOT(chooseRotate()));
-#if defined(Q_OS_SYMBIAN)
+#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WINCE_WM)
menuBar()->addAction(slideAction);
menuBar()->addAction(flipAction);
menuBar()->addAction(rotateAction);
@@ -414,7 +414,7 @@ int main(int argc, char *argv[])
QApplication app(argc, argv);
DigiFlip time;
-#if defined(Q_OS_SYMBIAN)
+#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WINCE_WM)
time.showMaximized();
#else
time.resize(320, 240);
diff --git a/demos/embedded/flickable/main.cpp b/demos/embedded/flickable/main.cpp
index 403085a..eb2c3c0 100644
--- a/demos/embedded/flickable/main.cpp
+++ b/demos/embedded/flickable/main.cpp
@@ -222,7 +222,7 @@ int main(int argc, char *argv[])
ColorList list;
list.setWindowTitle("Kinetic Scrolling");
-#ifdef Q_OS_SYMBIAN
+#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WINCE_WM)
list.showMaximized();
#else
list.resize(320, 320);
diff --git a/demos/embedded/lightmaps/lightmaps.cpp b/demos/embedded/lightmaps/lightmaps.cpp
index 52297d2..ea34ae6 100644
--- a/demos/embedded/lightmaps/lightmaps.cpp
+++ b/demos/embedded/lightmaps/lightmaps.cpp
@@ -510,7 +510,7 @@ public:
connect(nightModeAction, SIGNAL(triggered()), map, SLOT(toggleNightMode()));
connect(osmAction, SIGNAL(triggered()), SLOT(aboutOsm()));
-#if defined(Q_OS_SYMBIAN)
+#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WINCE_WM)
menuBar()->addAction(osloAction);
menuBar()->addAction(berlinAction);
menuBar()->addAction(jakartaAction);
@@ -568,7 +568,7 @@ int main(int argc, char **argv)
MapZoom w;
w.setWindowTitle("OpenStreetMap");
-#if defined(Q_OS_SYMBIAN)
+#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WINCE_WM)
w.showMaximized();
#else
w.resize(600, 450);
diff --git a/demos/embedded/raycasting/raycasting.cpp b/demos/embedded/raycasting/raycasting.cpp
index c3b21b6..cb08b51 100644
--- a/demos/embedded/raycasting/raycasting.cpp
+++ b/demos/embedded/raycasting/raycasting.cpp
@@ -251,7 +251,9 @@ public:
protected:
void resizeEvent(QResizeEvent*) {
-#if defined(Q_OS_SYMBIAN)
+#if defined(Q_OS_WINCE_WM)
+ touchDevice = true;
+#elif defined(Q_OS_SYMBIAN)
// FIXME: use HAL
if (width() > 480 || height() > 480)
touchDevice = true;
@@ -378,7 +380,7 @@ int main(int argc, char **argv)
Raycasting w;
w.setWindowTitle("Raycasting");
-#if defined(Q_OS_SYMBIAN)
+#if defined(Q_OS_SYMBIAN) || defined(Q_OS_WINCE_WM)
w.showMaximized();
#else
w.resize(640, 480);
diff --git a/demos/qmediaplayer/mediaplayer.cpp b/demos/qmediaplayer/mediaplayer.cpp
index baac236..624bab7 100644
--- a/demos/qmediaplayer/mediaplayer.cpp
+++ b/demos/qmediaplayer/mediaplayer.cpp
@@ -321,6 +321,7 @@ MediaPlayer::MediaPlayer(const QString &filePath,
connect(&m_MediaObject, SIGNAL(finished()), this, SLOT(finished()));
connect(&m_MediaObject, SIGNAL(stateChanged(Phonon::State, Phonon::State)), this, SLOT(stateChanged(Phonon::State, Phonon::State)));
connect(&m_MediaObject, SIGNAL(bufferStatus(int)), this, SLOT(bufferStatus(int)));
+ connect(&m_MediaObject, SIGNAL(hasVideoChanged(bool)), this, SLOT(hasVideoChanged(bool)));
rewindButton->setEnabled(false);
playButton->setEnabled(false);
@@ -339,8 +340,6 @@ void MediaPlayer::stateChanged(Phonon::State newstate, Phonon::State oldstate)
Q_UNUSED(oldstate);
if (oldstate == Phonon::LoadingState) {
- m_videoWindow.setVisible(m_MediaObject.hasVideo());
- info->setVisible(!m_MediaObject.hasVideo());
QRect videoHintRect = QRect(QPoint(0, 0), m_videoWindow.sizeHint());
QRect newVideoRect = QApplication::desktop()->screenGeometry().intersected(videoHintRect);
if (!m_hasSmallScreen) {
@@ -367,6 +366,9 @@ void MediaPlayer::stateChanged(Phonon::State newstate, Phonon::State oldstate)
case Phonon::PausedState:
case Phonon::StoppedState:
playButton->setIcon(playIcon);
+
+ m_videoWidget->setFullScreen(false);
+
if (m_MediaObject.currentSource().type() != Phonon::MediaSource::Invalid){
playButton->setEnabled(true);
rewindButton->setEnabled(true);
@@ -843,3 +845,8 @@ void MediaPlayer::aspectChanged(QAction *act)
m_videoWidget->setAspectRatio(Phonon::VideoWidget::AspectRatioAuto);
}
+void MediaPlayer::hasVideoChanged(bool bHasVideo)
+{
+ info->setVisible(!bHasVideo);
+ m_videoWindow.setVisible(bHasVideo);
+}
diff --git a/demos/qmediaplayer/mediaplayer.h b/demos/qmediaplayer/mediaplayer.h
index 40ffa40..83f14e8 100644
--- a/demos/qmediaplayer/mediaplayer.h
+++ b/demos/qmediaplayer/mediaplayer.h
@@ -93,6 +93,7 @@ public slots:
void playPause();
void scaleChanged(QAction *);
void aspectChanged(QAction *);
+ void hasVideoChanged(bool);
private slots:
void setAspect(int);
diff --git a/demos/spreadsheet/spreadsheet.cpp b/demos/spreadsheet/spreadsheet.cpp
index 7f057a2..00045c6 100644
--- a/demos/spreadsheet/spreadsheet.cpp
+++ b/demos/spreadsheet/spreadsheet.cpp
@@ -523,6 +523,7 @@ void SpreadSheet::setupContents()
table->setItem(8, 2, new SpreadSheetItem("1240"));
table->setItem(9, 2, new SpreadSheetItem());
+ table->item(9, 2)->setBackgroundColor(Qt::lightGray);
// column 3
table->setItem(0, 3, new SpreadSheetItem("Currency"));