diff options
author | David Boddie <dboddie@trolltech.com> | 2010-06-18 15:38:40 (GMT) |
---|---|---|
committer | David Boddie <dboddie@trolltech.com> | 2010-06-18 15:38:40 (GMT) |
commit | fc0e74d5661da0a678a60082dae60d4564da94b0 (patch) | |
tree | 512256a8bfc49ed4a17a821b8e683662b65e6ddc /examples | |
parent | e5302035d91f4337db25cf805c6b13339c552cbf (diff) | |
parent | b82466a64e305af8c557b2b7fdbb4a386e3d9cd7 (diff) | |
download | Qt-fc0e74d5661da0a678a60082dae60d4564da94b0.zip Qt-fc0e74d5661da0a678a60082dae60d4564da94b0.tar.gz Qt-fc0e74d5661da0a678a60082dae60d4564da94b0.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
Diffstat (limited to 'examples')
-rw-r--r--[-rwxr-xr-x] | examples/declarative/toys/clocks/content/center.png | bin | 765 -> 765 bytes | |||
-rw-r--r--[-rwxr-xr-x] | examples/declarative/toys/clocks/content/clock-night.png | bin | 23359 -> 23359 bytes | |||
-rw-r--r--[-rwxr-xr-x] | examples/declarative/toys/clocks/content/clock.png | bin | 20653 -> 20653 bytes | |||
-rw-r--r--[-rwxr-xr-x] | examples/declarative/toys/clocks/content/hour.png | bin | 625 -> 625 bytes | |||
-rw-r--r--[-rwxr-xr-x] | examples/declarative/toys/clocks/content/minute.png | bin | 625 -> 625 bytes | |||
-rw-r--r--[-rwxr-xr-x] | examples/declarative/toys/clocks/content/second.png | bin | 303 -> 303 bytes | |||
-rw-r--r-- | examples/multimedia/videographicsitem/videoplayer.cpp | 15 | ||||
-rw-r--r-- | examples/multimedia/videowidget/videoplayer.cpp | 15 |
8 files changed, 28 insertions, 2 deletions
diff --git a/examples/declarative/toys/clocks/content/center.png b/examples/declarative/toys/clocks/content/center.png Binary files differindex 7fbd802..7fbd802 100755..100644 --- a/examples/declarative/toys/clocks/content/center.png +++ b/examples/declarative/toys/clocks/content/center.png diff --git a/examples/declarative/toys/clocks/content/clock-night.png b/examples/declarative/toys/clocks/content/clock-night.png Binary files differindex cc7151a..cc7151a 100755..100644 --- a/examples/declarative/toys/clocks/content/clock-night.png +++ b/examples/declarative/toys/clocks/content/clock-night.png diff --git a/examples/declarative/toys/clocks/content/clock.png b/examples/declarative/toys/clocks/content/clock.png Binary files differindex 462edac..462edac 100755..100644 --- a/examples/declarative/toys/clocks/content/clock.png +++ b/examples/declarative/toys/clocks/content/clock.png diff --git a/examples/declarative/toys/clocks/content/hour.png b/examples/declarative/toys/clocks/content/hour.png Binary files differindex f8061a1..f8061a1 100755..100644 --- a/examples/declarative/toys/clocks/content/hour.png +++ b/examples/declarative/toys/clocks/content/hour.png diff --git a/examples/declarative/toys/clocks/content/minute.png b/examples/declarative/toys/clocks/content/minute.png Binary files differindex 1297ec7..1297ec7 100755..100644 --- a/examples/declarative/toys/clocks/content/minute.png +++ b/examples/declarative/toys/clocks/content/minute.png diff --git a/examples/declarative/toys/clocks/content/second.png b/examples/declarative/toys/clocks/content/second.png Binary files differindex 4aa9fb5..4aa9fb5 100755..100644 --- a/examples/declarative/toys/clocks/content/second.png +++ b/examples/declarative/toys/clocks/content/second.png diff --git a/examples/multimedia/videographicsitem/videoplayer.cpp b/examples/multimedia/videographicsitem/videoplayer.cpp index 281cd6e..f98f542 100644 --- a/examples/multimedia/videographicsitem/videoplayer.cpp +++ b/examples/multimedia/videographicsitem/videoplayer.cpp @@ -115,7 +115,20 @@ VideoPlayer::~VideoPlayer() void VideoPlayer::openFile() { - QString fileName = QFileDialog::getOpenFileName(this, tr("Open Movie")); + QStringList supportedFormats; + foreach (QString fmt, QMovie::supportedFormats()) + supportedFormats << fmt; + foreach (QString fmt, QImageReader::supportedImageFormats()) + supportedFormats << fmt; + + QString filter = "Images ("; + foreach ( QString fmt, supportedFormats) { + filter.append(QString("*.%1 ").arg(fmt)); + } + filter.append(")"); + + QString fileName = QFileDialog::getOpenFileName(this, tr("Open Movie"), + QDir::homePath(), filter); if (!fileName.isEmpty()) { videoItem->stop(); diff --git a/examples/multimedia/videowidget/videoplayer.cpp b/examples/multimedia/videowidget/videoplayer.cpp index 87a2621..ad12069 100644 --- a/examples/multimedia/videowidget/videoplayer.cpp +++ b/examples/multimedia/videowidget/videoplayer.cpp @@ -96,7 +96,20 @@ VideoPlayer::~VideoPlayer() void VideoPlayer::openFile() { - QString fileName = QFileDialog::getOpenFileName(this, tr("Open Movie")); + QStringList supportedFormats; + foreach (QString fmt, QMovie::supportedFormats()) + supportedFormats << fmt; + foreach (QString fmt, QImageReader::supportedImageFormats()) + supportedFormats << fmt; + + QString filter = "Images ("; + foreach ( QString fmt, supportedFormats) { + filter.append(QString("*.%1 ").arg(fmt)); + } + filter.append(")"); + + QString fileName = QFileDialog::getOpenFileName(this, tr("Open Movie"), + QDir::homePath(), filter); if (!fileName.isEmpty()) { surface->stop(); |