equal
deleted
inserted
replaced
113 { |
113 { |
114 } |
114 } |
115 |
115 |
116 void VideoPlayer::openFile() |
116 void VideoPlayer::openFile() |
117 { |
117 { |
118 QString fileName = QFileDialog::getOpenFileName(this, tr("Open Movie")); |
118 QStringList supportedFormats; |
|
119 foreach (QString fmt, QMovie::supportedFormats()) |
|
120 supportedFormats << fmt; |
|
121 foreach (QString fmt, QImageReader::supportedImageFormats()) |
|
122 supportedFormats << fmt; |
|
123 |
|
124 QString filter = "Images ("; |
|
125 foreach ( QString fmt, supportedFormats) { |
|
126 filter.append(QString("*.%1 ").arg(fmt)); |
|
127 } |
|
128 filter.append(")"); |
|
129 |
|
130 QString fileName = QFileDialog::getOpenFileName(this, tr("Open Movie"), |
|
131 QDir::homePath(), filter); |
119 |
132 |
120 if (!fileName.isEmpty()) { |
133 if (!fileName.isEmpty()) { |
121 videoItem->stop(); |
134 videoItem->stop(); |
122 |
135 |
123 movie.setFileName(fileName); |
136 movie.setFileName(fileName); |