Debian Codegraph @

src/exportdialog.cpp

raw
1 /* dvbcut
2 Copyright (c) 2005 Sven Over <[email protected]>
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 */
18
19 /* $Id$ */
20
21 #include <qlineedit.h>
22 #include <qfiledialog.h>
23 #include "exportdialog.h"
24
25 exportdialog::exportdialog(const QString &filename, QWidget *parent)
26 :QDialog(parent)
27 {
28 ui = new Ui::exportdialogbase();
29 ui->setupUi(this);
30 setModal(true);
31 ui->filenameline->setText(filename);
32 }
33
34 exportdialog::~exportdialog()
35 {
36 delete ui;
37 }
38
39 void exportdialog::fileselector()
40 {
41 QString newfilename(QFileDialog::getSaveFileName(
42 this,
43 tr("Export video..."),
44 ui->filenameline->text(),
45 tr("MPEG program streams (*.mpg)"
46 ";;All files (*)") ));
47
48 if (!newfilename.isEmpty())
49 ui->filenameline->setText(newfilename);
50 }