--- a/src/dialogs/ldrawpathdialog.cpp Thu Jan 04 19:40:52 2018 +0200 +++ b/src/dialogs/ldrawpathdialog.cpp Thu Jan 04 19:44:26 2018 +0200 @@ -23,29 +23,29 @@ #include "ui_ldrawpathdialog.h" #include "../mainwindow.h" -LDrawPathDialog::LDrawPathDialog (const QString& defaultPath, bool validDefault, QWidget* parent, Qt::WindowFlags f) : - QDialog (parent, f), - m_hasValidDefault (validDefault), - ui (*new Ui_LDrawPathDialog) +LDrawPathDialog::LDrawPathDialog(const QString& defaultPath, bool validDefault, QWidget* parent, Qt::WindowFlags f) : + QDialog(parent, f), + m_hasValidDefault(validDefault), + ui(*new Ui_LDrawPathDialog) { - ui.setupUi (this); - ui.status->setText ("---"); + ui.setupUi(this); + ui.status->setText("---"); if (validDefault) ui.heading->hide(); else { - cancelButton()->setText ("Exit"); - cancelButton()->setIcon (GetIcon ("exit")); + cancelButton()->setText("Exit"); + cancelButton()->setIcon(GetIcon("exit")); } - okButton()->setEnabled (false); + okButton()->setEnabled(false); - connect (ui.path, SIGNAL (textChanged (QString)), this, SIGNAL (pathChanged (QString))); - connect (ui.searchButton, SIGNAL (clicked()), this, SLOT (searchButtonClicked())); - connect (ui.buttonBox, SIGNAL (rejected()), this, SLOT (reject())); - connect (ui.buttonBox, SIGNAL (accepted()), this, SLOT (accept())); - setPath (defaultPath); + connect(ui.path, SIGNAL(textChanged(QString)), this, SIGNAL(pathChanged(QString))); + connect(ui.searchButton, SIGNAL(clicked()), this, SLOT(searchButtonClicked())); + connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(reject())); + connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(accept())); + setPath(defaultPath); } LDrawPathDialog::~LDrawPathDialog() @@ -55,17 +55,17 @@ QPushButton* LDrawPathDialog::okButton() { - return ui.buttonBox->button (QDialogButtonBox::Ok); + return ui.buttonBox->button(QDialogButtonBox::Ok); } QPushButton* LDrawPathDialog::cancelButton() { - return ui.buttonBox->button (QDialogButtonBox::Cancel); + return ui.buttonBox->button(QDialogButtonBox::Cancel); } -void LDrawPathDialog::setPath (QString path) +void LDrawPathDialog::setPath(QString path) { - ui.path->setText (path); + ui.path->setText(path); } QString LDrawPathDialog::path() const @@ -75,22 +75,22 @@ void LDrawPathDialog::searchButtonClicked() { - QString newpath = QFileDialog::getExistingDirectory (this, "Find LDraw Path"); + QString newpath = QFileDialog::getExistingDirectory(this, "Find LDraw Path"); if (not newpath.isEmpty()) - setPath (newpath); + setPath(newpath); } -void LDrawPathDialog::setStatusText (const QString& statusText, bool ok) +void LDrawPathDialog::setStatusText(const QString& statusText, bool ok) { - okButton()->setEnabled (ok); + okButton()->setEnabled(ok); if (statusText.isEmpty() && ok == false) - ui.status->setText ("---"); + ui.status->setText("---"); else { - ui.status->setText (QString ("<span style=\"color: %1\">%2</span>") - .arg (ok ? "#270" : "#700") - .arg (statusText)); + ui.status->setText(QString("<span style=\"color: %1\">%2</span>") + .arg(ok ? "#270" : "#700") + .arg(statusText)); } } \ No newline at end of file