8 #include "ui_modelconverterxsetupcomponent.h"
17 CModelConverterXSetupComponent::CModelConverterXSetupComponent(QWidget *parent)
21 connect(ui->pb_DirBrowser, &QPushButton::clicked,
this, &CModelConverterXSetupComponent::selectBinary);
22 connect(ui->le_McxBinary, &QLineEdit::returnPressed,
this, &CModelConverterXSetupComponent::saveSettings);
23 ui->le_McxBinary->setText(m_setting.
get());
28 void CModelConverterXSetupComponent::selectBinary()
30 QString defaultValue = m_setting.
get();
31 if (defaultValue.isEmpty()) { defaultValue = QDir::currentPath(); }
32 const QString fileName =
33 QFileDialog::getOpenFileName(
nullptr, tr(
"ModelConverterX binary"), defaultValue,
"*.exe");
34 ui->le_McxBinary->setText(fileName);
38 void CModelConverterXSetupComponent::saveSettings()
40 const QString t = ui->le_McxBinary->text();
42 CLogMessage::preformatted(msg);
Setup to start ModelConverterX.
virtual ~CModelConverterXSetupComponent()
Dtor.
CStatusMessage setAndSave(const T &value, qint64 timestamp=0)
Write and save in the same step. Must be called from the thread in which the owner lives.
T get() const
Get a copy of the current value.
Streamable status message, e.g.
High level reusable GUI components.
Free functions in swift::misc.