To File/Preferences/Paths added path to export a layout.
--HG-- branch : develop
This commit is contained in:
parent
57c4813255
commit
886f347ba6
|
@ -42,6 +42,7 @@ const QString VSettings::SettingConfigurationLabelLanguage = QStringLiteral("
|
|||
|
||||
const QString VSettings::SettingPathsIndividualMeasurements = QStringLiteral("paths/individual_measurements");
|
||||
const QString VSettings::SettingPathsPattern = QStringLiteral("paths/pattern");
|
||||
const QString VSettings::SettingPathsLayout = QStringLiteral("paths/layout");
|
||||
|
||||
const QString VSettings::SettingPatternUser = QStringLiteral("pattern/user");
|
||||
const QString VSettings::SettingPatternGraphicalOutput = QStringLiteral("pattern/graphicalOutput");
|
||||
|
@ -185,6 +186,18 @@ void VSettings::SetPathPattern(const QString &value)
|
|||
setValue(SettingPathsPattern, value);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QString VSettings::GetPathLayout() const
|
||||
{
|
||||
return value(SettingPathsLayout, QDir::homePath()).toString();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void VSettings::SetPathLayout(const QString &value)
|
||||
{
|
||||
setValue(SettingPathsLayout, value);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
QString VSettings::GetUser() const
|
||||
{
|
||||
|
|
|
@ -65,6 +65,9 @@ public:
|
|||
QString GetPathPattern() const;
|
||||
void SetPathPattern(const QString &value);
|
||||
|
||||
QString GetPathLayout() const;
|
||||
void SetPathLayout(const QString &value);
|
||||
|
||||
QString GetUser() const;
|
||||
void SetUser(const QString &value);
|
||||
|
||||
|
@ -128,6 +131,7 @@ private:
|
|||
|
||||
static const QString SettingPathsIndividualMeasurements;
|
||||
static const QString SettingPathsPattern;
|
||||
static const QString SettingPathsLayout;
|
||||
|
||||
static const QString SettingPatternUser;
|
||||
static const QString SettingPatternGraphicalOutput;
|
||||
|
|
|
@ -64,6 +64,7 @@ void PathPage::Apply()
|
|||
{
|
||||
qApp->getSettings()->SetPathIndividualMeasurements(pathTable->item(0, 1)->text());
|
||||
qApp->getSettings()->SetPathPattern(pathTable->item(1, 1)->text());
|
||||
qApp->getSettings()->SetPathLayout(pathTable->item(2, 1)->text());
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
|
@ -125,10 +126,11 @@ QGroupBox *PathPage::PathGroup()
|
|||
return pathGroup;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------------------------------
|
||||
void PathPage::InitTable()
|
||||
{
|
||||
pathTable = new QTableWidget();
|
||||
pathTable->setRowCount(2);
|
||||
pathTable->setRowCount(3);
|
||||
pathTable->setColumnCount(2);
|
||||
pathTable->verticalHeader()->setVisible(false);
|
||||
pathTable->setEditTriggers(QAbstractItemView::NoEditTriggers);
|
||||
|
@ -145,6 +147,9 @@ void PathPage::InitTable()
|
|||
pathTable->setItem(1, 0, new QTableWidgetItem(tr("Patterns")));
|
||||
pathTable->setItem(1, 1, new QTableWidgetItem(qApp->getSettings()->GetPathPattern()));
|
||||
|
||||
pathTable->setItem(2, 0, new QTableWidgetItem(tr("Layout")));
|
||||
pathTable->setItem(2, 1, new QTableWidgetItem(qApp->getSettings()->GetPathLayout()));
|
||||
|
||||
pathTable->verticalHeader()->setDefaultSectionSize(20);
|
||||
pathTable->resizeColumnsToContents();
|
||||
pathTable->resizeRowsToContents();
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
#include "dialogsavelayout.h"
|
||||
#include "ui_dialogsavelayout.h"
|
||||
#include "../options.h"
|
||||
#include "../../core/vapplication.h"
|
||||
#include "../../core/vsettings.h"
|
||||
|
||||
#include <QDir>
|
||||
#include <QFileDialog>
|
||||
|
@ -49,6 +51,8 @@ DialogSaveLayout::DialogSaveLayout(const QMap<QString, QString> &formates, int c
|
|||
ui->lineEditFileName->setValidator(validator);
|
||||
ui->lineEditFileName->setText(fileName);
|
||||
|
||||
ui->lineEditPath->setText(qApp->getSettings()->GetPathLayout());
|
||||
|
||||
QMap<QString, QString>::const_iterator i = formates.constBegin();
|
||||
while (i != formates.constEnd())
|
||||
{
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include "ui_tablewindow.h"
|
||||
#include "widgets/vtablegraphicsview.h"
|
||||
#include "core/vapplication.h"
|
||||
#include "core/vsettings.h"
|
||||
#include "../../libs/vobj/vobjpaintdevice.h"
|
||||
#include "../dialogs/app/dialoglayoutsettings.h"
|
||||
#include "../../libs/vlayout/vlayoutgenerator.h"
|
||||
|
@ -174,8 +175,9 @@ void TableWindow::SaveLayout()
|
|||
QString suf = dialog.Formate();
|
||||
suf.replace(".", "");
|
||||
|
||||
QString path = dialog.Path();
|
||||
QString mask = dialog.FileName();
|
||||
const QString path = dialog.Path();
|
||||
qApp->getSettings()->SetPathLayout(path);
|
||||
const QString mask = dialog.FileName();
|
||||
|
||||
for (int i=0; i < scenes.size(); ++i)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user