Use pattern file name in mask.

--HG--
branch : develop
This commit is contained in:
dismine 2015-01-23 13:40:17 +02:00
parent bc2df2b1b3
commit 878cc2d573
3 changed files with 6 additions and 3 deletions

View File

@ -35,7 +35,8 @@
#include <QMessageBox> #include <QMessageBox>
//--------------------------------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------------------------------------
DialogSaveLayout::DialogSaveLayout(const QMap<QString, QString> &formates, int count, QWidget *parent) DialogSaveLayout::DialogSaveLayout(const QMap<QString, QString> &formates, int count, const QString &mask,
QWidget *parent)
:QDialog(parent), ui(new Ui::DialogSaveLAyout), count(count) :QDialog(parent), ui(new Ui::DialogSaveLAyout), count(count)
{ {
ui->setupUi(this); ui->setupUi(this);
@ -46,6 +47,7 @@ DialogSaveLayout::DialogSaveLayout(const QMap<QString, QString> &formates, int c
QRegExpValidator *validator = new QRegExpValidator(QRegExp("^[\\w\\-. ]+$"), this); QRegExpValidator *validator = new QRegExpValidator(QRegExp("^[\\w\\-. ]+$"), this);
ui->lineEditMask->setValidator(validator); ui->lineEditMask->setValidator(validator);
ui->lineEditMask->setText(mask);
QMap<QString, QString>::const_iterator i = formates.constBegin(); QMap<QString, QString>::const_iterator i = formates.constBegin();
while (i != formates.constEnd()) while (i != formates.constEnd())

View File

@ -41,7 +41,8 @@ class DialogSaveLayout : public QDialog
Q_OBJECT Q_OBJECT
public: public:
DialogSaveLayout(const QMap<QString, QString> &formates, int count, QWidget *parent = 0); DialogSaveLayout(const QMap<QString, QString> &formates, int count, const QString &mask = QString(),
QWidget *parent = 0);
~DialogSaveLayout(); ~DialogSaveLayout();
QString Path() const; QString Path() const;

View File

@ -164,7 +164,7 @@ void TableWindow::StopTable()
void TableWindow::saveScene() void TableWindow::saveScene()
{ {
QMap<QString, QString> extByMessage = InitFormates(); QMap<QString, QString> extByMessage = InitFormates();
DialogSaveLayout dialog(extByMessage, scenes.size(), this); DialogSaveLayout dialog(extByMessage, scenes.size(), fileName, this);
if (dialog.exec() == QDialog::Rejected) if (dialog.exec() == QDialog::Rejected)
{ {