Fixed build on OS X.

--HG--
branch : develop
This commit is contained in:
Roman Telezhynskyi 2016-07-23 12:56:22 +03:00
parent dfb8c387b6
commit 524419e53f
4 changed files with 33 additions and 17 deletions

View File

@ -462,6 +462,13 @@ void TMainWindow::CreateFromExisting()
}
}
//---------------------------------------------------------------------------------------------------------------------
void TMainWindow::Preferences()
{
TapeConfigDialog dlg(this);
dlg.exec();
}
//---------------------------------------------------------------------------------------------------------------------
void TMainWindow::closeEvent(QCloseEvent *event)
{
@ -1734,11 +1741,7 @@ void TMainWindow::SetupMenu()
connect(ui->actionExportToCSV, &QAction::triggered, this, &TMainWindow::ExportToCSV);
connect(ui->actionReadOnly, &QAction::triggered, this, &TMainWindow::ReadOnly);
connect(ui->actionPreferences, &QAction::triggered, [this]()
{
TapeConfigDialog dlg(this);
dlg.exec();
});
connect(ui->actionPreferences, &QAction::triggered, this, &TMainWindow::Preferences);
for (int i = 0; i < MaxRecentFiles; ++i)
{

View File

@ -75,6 +75,7 @@ private slots:
void OpenStandard();
void OpenTemplate();
void CreateFromExisting();
void Preferences();
void FileSave();
void FileSaveAs();

View File

@ -3553,18 +3553,7 @@ void MainWindow::CreateActions()
connect(ui->actionExit, &QAction::triggered, this, &MainWindow::close);
connect(ui->actionPreferences, &QAction::triggered, [this]()
{
ConfigDialog dlg(this);
connect(&dlg, &ConfigDialog::UpdateProperties, this, &MainWindow::WindowsLocale); // Must be first
connect(&dlg, &ConfigDialog::UpdateProperties, toolOptions, &VToolOptionsPropertyBrowser::RefreshOptions);
connect(&dlg, &ConfigDialog::UpdateProperties, this, &MainWindow::ToolBarStyles);
if (dlg.exec() == QDialog::Accepted)
{
InitAutoSave();
}
});
connect(ui->actionPreferences, &QAction::triggered, this, &MainWindow::Preferences);
connect(ui->actionReportBug, &QAction::triggered, [this]()
{
qCDebug(vMainWindow, "Reporting bug");
@ -3954,6 +3943,27 @@ void MainWindow::ShowPaper(int index)
ui->view->fitInView(ui->view->scene()->sceneRect(), Qt::KeepAspectRatio);
}
//---------------------------------------------------------------------------------------------------------------------
void MainWindow::Preferences()
{
ConfigDialog dlg(this);
connect(&dlg, &ConfigDialog::UpdateProperties, this, &MainWindow::WindowsLocale); // Must be first
connect(&dlg, &ConfigDialog::UpdateProperties, toolOptions, &VToolOptionsPropertyBrowser::RefreshOptions);
connect(&dlg, &ConfigDialog::UpdateProperties, this, &MainWindow::ToolBarStyles);
if (dlg.exec() == QDialog::Accepted)
{
InitAutoSave();
}
}
//---------------------------------------------------------------------------------------------------------------------
void MainWindow::CreateMeasurements()
{
const QString tape = qApp->TapeFilePath();
const QString workingDirectory = QFileInfo(tape).absoluteDir().absolutePath();
QProcess::startDetached(tape, QStringList(), workingDirectory);
}
//---------------------------------------------------------------------------------------------------------------------
void MainWindow::ToolBarStyle(QToolBar *bar)
{

View File

@ -111,6 +111,8 @@ private slots:
void WindowsLocale();
void ToolBarStyles();
void ShowPaper(int index);
void Preferences();
void CreateMeasurements();
void ArrowTool();
void ToolEndLine(bool checked);