mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-13 15:45:42 +08:00
Ref T658, renamed to MsReverseLookupFile et.al.
This commit is contained in:
@@ -30,7 +30,7 @@ namespace BlackGui
|
||||
|
||||
connect(ui->pb_ResetAlgorithm, &QPushButton::released, this, &CMatchingForm::resetByAlgorithm, Qt::QueuedConnection);
|
||||
connect(ui->pb_ResetAll, &QPushButton::released, this, &CMatchingForm::resetAll, Qt::QueuedConnection);
|
||||
connect(ui->pb_MsNetwork, &QPushButton::released, this, &CMatchingForm::fileDialog, Qt::QueuedConnection);
|
||||
connect(ui->pb_MsReverseLookup, &QPushButton::released, this, &CMatchingForm::fileDialog, Qt::QueuedConnection);
|
||||
connect(ui->pb_MsMatching, &QPushButton::released, this, &CMatchingForm::fileDialog, Qt::QueuedConnection);
|
||||
|
||||
connect(ui->rb_ScoreAndReduction, &QRadioButton::released, this, &CMatchingForm::onAlgorithmChanged, Qt::QueuedConnection);
|
||||
@@ -75,9 +75,9 @@ namespace BlackGui
|
||||
ui->rb_PickByOrder->setEnabled(enabled);
|
||||
ui->rb_PickRandom->setEnabled(enabled);
|
||||
|
||||
ui->le_MsNetwork->setEnabled(enabled);
|
||||
ui->le_MsReverseLookup->setEnabled(enabled);
|
||||
ui->le_MsMatching->setEnabled(enabled);
|
||||
CGuiUtility::checkBoxReadOnly(ui->cb_MsNetwork, readonly);
|
||||
CGuiUtility::checkBoxReadOnly(ui->cb_MsReverseLookup, readonly);
|
||||
CGuiUtility::checkBoxReadOnly(ui->cb_MsMatching, readonly);
|
||||
}
|
||||
|
||||
@@ -126,9 +126,9 @@ namespace BlackGui
|
||||
this->setMatchingAlgorithm(setup);
|
||||
this->setPickStrategy(setup);
|
||||
|
||||
ui->cb_MsNetwork->setChecked(setup.isMsNetworkEntryEnabled());
|
||||
ui->cb_MsReverseLookup->setChecked(setup.isMsReverseLookupEnabled());
|
||||
ui->cb_MsMatching->setChecked(setup.isMsMatchingStageEnabled());
|
||||
ui->le_MsNetwork->setText(setup.getMsNetworkEntryFile());
|
||||
ui->le_MsReverseLookup->setText(setup.getMsReverseLookupFile());
|
||||
ui->le_MsMatching->setText(setup.getMsMatchingStageFile());
|
||||
}
|
||||
|
||||
@@ -136,9 +136,9 @@ namespace BlackGui
|
||||
{
|
||||
CAircraftMatcherSetup setup(algorithm(), matchingMode(), pickStrategy());
|
||||
setup.setAirlineGroupBehaviour(ui->rb_AirlineGroupIfNoAirline->isChecked(), ui->rb_AirlineGroupAsAirline->isChecked());
|
||||
setup.setMsNetworkEntryFile(ui->le_MsNetwork->text());
|
||||
setup.setMsReverseLookupFile(ui->le_MsReverseLookup->text());
|
||||
setup.setMsMatchingStageFile(ui->le_MsMatching->text());
|
||||
setup.setMsNetworkEntryEnabled(ui->cb_MsNetwork->isChecked());
|
||||
setup.setMsReverseLookupEnabled(ui->cb_MsReverseLookup->isChecked());
|
||||
setup.setMsMatchingStageEnabled(ui->cb_MsMatching->isChecked());
|
||||
return setup;
|
||||
}
|
||||
@@ -162,14 +162,14 @@ namespace BlackGui
|
||||
|
||||
void CMatchingForm::fileDialog()
|
||||
{
|
||||
const bool nw = (QObject::sender() == ui->pb_MsNetwork);
|
||||
QString fn = nw ? ui->le_MsNetwork->text() : ui->le_MsMatching->text();
|
||||
const bool nw = (QObject::sender() == ui->pb_MsReverseLookup);
|
||||
QString fn = nw ? ui->le_MsReverseLookup->text() : ui->le_MsMatching->text();
|
||||
fn = QFileDialog::getOpenFileName(nullptr, tr("Matching script"), fn, "Matching script (*.js)");
|
||||
const QFileInfo fi(fn);
|
||||
if (!fi.exists()) { return; }
|
||||
if (nw)
|
||||
{
|
||||
ui->le_MsNetwork->setText(fi.absoluteFilePath());
|
||||
ui->le_MsReverseLookup->setText(fi.absoluteFilePath());
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -103,9 +103,9 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="le_MsNetwork">
|
||||
<widget class="QLineEdit" name="le_MsReverseLookup">
|
||||
<property name="placeholderText">
|
||||
<string>network entry matching script file</string>
|
||||
<string>reverse lookup matching script file</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -117,21 +117,21 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QPushButton" name="pb_MsNetwork">
|
||||
<widget class="QPushButton" name="pb_MsReverseLookup">
|
||||
<property name="text">
|
||||
<string>[...]</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="lbl_MsNetwork">
|
||||
<widget class="QLabel" name="lbl_MsReverseLookup">
|
||||
<property name="text">
|
||||
<string>Network:</string>
|
||||
<string>Lookup:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QCheckBox" name="cb_MsNetwork">
|
||||
<widget class="QCheckBox" name="cb_MsReverseLookup">
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
@@ -436,9 +436,9 @@
|
||||
<tabstop>rb_ScoreOnly</tabstop>
|
||||
<tabstop>rb_ScoreAndReduction</tabstop>
|
||||
<tabstop>pb_ResetAlgorithm</tabstop>
|
||||
<tabstop>le_MsNetwork</tabstop>
|
||||
<tabstop>cb_MsNetwork</tabstop>
|
||||
<tabstop>pb_MsNetwork</tabstop>
|
||||
<tabstop>le_MsReverseLookup</tabstop>
|
||||
<tabstop>cb_MsReverseLookup</tabstop>
|
||||
<tabstop>pb_MsReverseLookup</tabstop>
|
||||
<tabstop>le_MsMatching</tabstop>
|
||||
<tabstop>cb_MsMatching</tabstop>
|
||||
<tabstop>pb_MsMatching</tabstop>
|
||||
|
||||
Reference in New Issue
Block a user