33 #include <QHBoxLayout>
35 #include <QPushButton>
36 #include <QCloseEvent>
41 setWindowTitle(tr(
"Open Project"));
42 setFileMode(ExistingFile);
44 filters << tr(
"SciDAVis project") +
" (*.sciprj)"
45 << tr(
"Compressed SciDAVis project") +
" (*.sciprj.gz)"
46 << tr(
"QtiPlot project") +
" (*.qti)"
47 << tr(
"Compressed QtiPlot project") +
" (*.qti.gz)"
49 << tr(
"Origin project") +
" (*.opj *.OPJ)"
50 << tr(
"Origin matrix") +
" (*.ogm *.OGM)"
51 << tr(
"Origin worksheet") +
" (*.ogw *.OGW)"
52 << tr(
"Origin graph") +
" (*.ogg *.OGG)"
53 << tr(
"Origin 3.5 project") +
" (*.org *.ORG)"
55 << tr(
"Backup files") +
" (*.sciprj~)"
57 << tr(
"All files") +
" (*)";
58 setNameFilters(filters);
60 QWidget *advanced_options =
new QWidget();
61 QHBoxLayout *advanced_layout =
new QHBoxLayout();
62 advanced_options->setLayout(advanced_layout);
63 advanced_layout->addWidget(
new QLabel(tr(
"Open As")));
71 #if QT_VERSION >= 0x040300
72 connect(
this, SIGNAL(filterSelected (
const QString & )),
75 QList<QComboBox*> combo_boxes = findChildren<QComboBox*>();
76 if (combo_boxes.size() >= 2)
77 connect(combo_boxes[1], SIGNAL(currentIndexChanged (
const QString & )),
85 if (filter.contains(
"*.ogm") || filter.contains(
"*.ogw")) {