equal
deleted
inserted
replaced
94 { |
94 { |
95 } |
95 } |
96 |
96 |
97 void VideoPlayer::openFile() |
97 void VideoPlayer::openFile() |
98 { |
98 { |
99 QString fileName = QFileDialog::getOpenFileName(this, tr("Open Movie")); |
99 QStringList supportedFormats; |
|
100 foreach (QString fmt, QMovie::supportedFormats()) |
|
101 supportedFormats << fmt; |
|
102 foreach (QString fmt, QImageReader::supportedImageFormats()) |
|
103 supportedFormats << fmt; |
|
104 |
|
105 QString filter = "Images ("; |
|
106 foreach ( QString fmt, supportedFormats) { |
|
107 filter.append(QString("*.%1 ").arg(fmt)); |
|
108 } |
|
109 filter.append(")"); |
|
110 |
|
111 QString fileName = QFileDialog::getOpenFileName(this, tr("Open Movie"), |
|
112 QDir::homePath(), filter); |
100 |
113 |
101 if (!fileName.isEmpty()) { |
114 if (!fileName.isEmpty()) { |
102 surface->stop(); |
115 surface->stop(); |
103 |
116 |
104 movie.setFileName(fileName); |
117 movie.setFileName(fileName); |