mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-06 01:45:38 +08:00
Refactor X-Plane Plugin Config Window to use DBus server address selector
ref T291
This commit is contained in:
committed by
Klaus Basan
parent
488ff96ce6
commit
6a7a9ff710
@@ -27,11 +27,24 @@ namespace BlackSimPlugin
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
connect(ui->bb_OkCancel, &QDialogButtonBox::accepted, this, &CSimulatorXPlaneConfigWindow::close);
|
||||
ui->comp_SettingsXSwiftBus->set(m_xswiftbusServerSetting.getThreadLocal());
|
||||
|
||||
connect(ui->bb_OkCancel, &QDialogButtonBox::accepted, this, &CSimulatorXPlaneConfigWindow::settingsAccepted);
|
||||
connect(ui->bb_OkCancel, &QDialogButtonBox::rejected, this, &CSimulatorXPlaneConfigWindow::close);
|
||||
}
|
||||
|
||||
CSimulatorXPlaneConfigWindow::~CSimulatorXPlaneConfigWindow()
|
||||
{ }
|
||||
|
||||
void CSimulatorXPlaneConfigWindow::settingsAccepted()
|
||||
{
|
||||
QString currentAddress = m_xswiftbusServerSetting.getThreadLocal();
|
||||
if (currentAddress != ui->comp_SettingsXSwiftBus->getDBusAddress())
|
||||
{
|
||||
m_xswiftbusServerSetting.set(ui->comp_SettingsXSwiftBus->getDBusAddress());
|
||||
}
|
||||
close();
|
||||
}
|
||||
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
Reference in New Issue
Block a user