#include <CQSBMLFileDialog.h>
|
static std::pair< QString,
std::pair< unsigned C_INT32,
unsigned C_INT32 > > | getSaveFileName (QWidget *parent, const char *name, const QString &startWith, const QString &caption, unsigned int sbmlLevel=2, unsigned int sbmlVersion=4) |
|
Definition at line 28 of file CQSBMLFileDialog.h.
std::pair< QString, std::pair< unsigned C_INT32, unsigned C_INT32 > > CQSBMLFileDialog::getSaveFileName |
( |
QWidget * |
parent, |
|
|
const char * |
name, |
|
|
const QString & |
startWith, |
|
|
const QString & |
caption, |
|
|
unsigned int |
sbmlLevel = 2 , |
|
|
unsigned int |
sbmlVersion = 4 |
|
) |
| |
|
static |
Definition at line 23 of file CQSBMLFileDialog.cpp.
References CopasiFileDialog::getSaveFileName().
Referenced by CopasiUI3Window::slotExportSBML().
30 std::pair< QString, std::pair< unsigned C_INT32, unsigned C_INT32 > > NameAndVersion;
32 QString Filter =
"Level 1 Version 1 (*.xml);;"
33 "Level 1 Version 2 (*.xml);;"
34 "Level 2 Version 1 (*.xml);;"
35 "Level 2 Version 2 (*.xml);;"
36 "Level 2 Version 3 (*.xml);;"
37 "Level 2 Version 4 (*.xml);;"
38 "Level 2 Version 5 (*.xml);;"
39 "Level 3 Version 1 (*.xml)";
41 QString SelectedFilter =
42 QString(
"Level %1 Version %2 (*.xml)").arg(QString::number(sbmlLevel)).arg(QString::number(sbmlVersion));;
45 if (Filter.indexOf(SelectedFilter) == -1)
47 SelectedFilter =
"Level 2 Version 4 (*.xml)";
52 QFileDialog::Options DontUseNativeDialog = 0;
55 DontUseNativeDialog = QFileDialog::DontUseNativeDialog;
58 NameAndVersion.first =
61 QRegExp Pattern(
"Level (\\d) Version (\\d) \\(\\*\\.xml\\)");
63 if (Pattern.exactMatch(SelectedFilter))
65 NameAndVersion.second.first = Pattern.cap(1).toInt();
66 NameAndVersion.second.second = Pattern.cap(2).toInt();
70 NameAndVersion.second.first = 2;
71 NameAndVersion.second.second = 4;
74 return NameAndVersion;
static QString getSaveFileName(QWidget *parent=0, const char *name=0, const QString &startWith=QString::null, const QString &filter=QString::null, const QString &caption=QString::null, QString *pSelectedFilter=NULL, QFileDialog::Options options=0)
The documentation for this class was generated from the following files: