mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-18 19:35:33 +08:00
Ref T411, set SimObject directory from file browser + UI adjustments
This commit is contained in:
@@ -44,8 +44,8 @@ namespace BlackGui
|
|||||||
connect(ui->pb_DirectoryBrowser, &QPushButton::released, this, &CInstallFsxTerrainProbeComponent::selectSimObjectsDir);
|
connect(ui->pb_DirectoryBrowser, &QPushButton::released, this, &CInstallFsxTerrainProbeComponent::selectSimObjectsDir);
|
||||||
connect(ui->comp_SimulatorSelector, &CSimulatorSelector::changed, this, &CInstallFsxTerrainProbeComponent::onSimulatorChanged);
|
connect(ui->comp_SimulatorSelector, &CSimulatorSelector::changed, this, &CInstallFsxTerrainProbeComponent::onSimulatorChanged);
|
||||||
|
|
||||||
QPointer<CInstallFsxTerrainProbeComponent> myself;
|
QPointer<CInstallFsxTerrainProbeComponent> myself(this);
|
||||||
QTimer::singleShot(250, this, [ = ]
|
QTimer::singleShot(500, this, [ = ]
|
||||||
{
|
{
|
||||||
if (!myself) { return; }
|
if (!myself) { return; }
|
||||||
this->onSimulatorChanged(ui->comp_SimulatorSelector->getValue());
|
this->onSimulatorChanged(ui->comp_SimulatorSelector->getValue());
|
||||||
@@ -86,8 +86,12 @@ namespace BlackGui
|
|||||||
void CInstallFsxTerrainProbeComponent::selectSimObjectsDir()
|
void CInstallFsxTerrainProbeComponent::selectSimObjectsDir()
|
||||||
{
|
{
|
||||||
const QString startDirectory = CFileUtils::fixWindowsUncPath(ui->le_Target->text());
|
const QString startDirectory = CFileUtils::fixWindowsUncPath(ui->le_Target->text());
|
||||||
const QString dir = QFileDialog::getExistingDirectory(this, "SimObjects directory", startDirectory,
|
const QString dir =
|
||||||
QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
|
CFileUtils::fixWindowsUncPath(
|
||||||
|
QFileDialog::getExistingDirectory(
|
||||||
|
this, "SimObjects directory", startDirectory,
|
||||||
|
QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks));
|
||||||
|
ui->le_Target->setText(dir);
|
||||||
}
|
}
|
||||||
} // ns
|
} // ns
|
||||||
} // ns
|
} // ns
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>427</width>
|
<width>427</width>
|
||||||
<height>189</height>
|
<height>205</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@@ -62,41 +62,6 @@
|
|||||||
<string>Copy swift probe</string>
|
<string>Copy swift probe</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="lbl_Target">
|
|
||||||
<property name="text">
|
|
||||||
<string>Target:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="1">
|
|
||||||
<widget class="QLineEdit" name="le_Target">
|
|
||||||
<property name="placeholderText">
|
|
||||||
<string>specify the SimObjects directory</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="lbl_Simulator">
|
|
||||||
<property name="text">
|
|
||||||
<string>Simulator:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="2">
|
|
||||||
<widget class="QPushButton" name="pb_DirectoryBrowser">
|
|
||||||
<property name="text">
|
|
||||||
<string>...</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="2">
|
|
||||||
<widget class="QPushButton" name="pb_Copy">
|
|
||||||
<property name="text">
|
|
||||||
<string>copy</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QWidget" name="wi_Simulator" native="true">
|
<widget class="QWidget" name="wi_Simulator" native="true">
|
||||||
<layout class="QHBoxLayout" name="hl_Simulator">
|
<layout class="QHBoxLayout" name="hl_Simulator">
|
||||||
@@ -112,7 +77,7 @@
|
|||||||
<property name="bottomMargin">
|
<property name="bottomMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item alignment="Qt::AlignLeft">
|
||||||
<widget class="BlackGui::Components::CSimulatorSelector" name="comp_SimulatorSelector">
|
<widget class="BlackGui::Components::CSimulatorSelector" name="comp_SimulatorSelector">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
@@ -122,19 +87,61 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="le_Source">
|
|
||||||
<property name="readOnly">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="placeholderText">
|
|
||||||
<string>source directory of probe</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
|
<widget class="QLabel" name="lbl_Target">
|
||||||
|
<property name="text">
|
||||||
|
<string>Target:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QLineEdit" name="le_Target">
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string>specify the SimObjects directory</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="lbl_Simulator">
|
||||||
|
<property name="text">
|
||||||
|
<string>Simulator:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="2">
|
||||||
|
<widget class="QPushButton" name="pb_DirectoryBrowser">
|
||||||
|
<property name="text">
|
||||||
|
<string>...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
|
<widget class="QLineEdit" name="le_Source">
|
||||||
|
<property name="readOnly">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="placeholderText">
|
||||||
|
<string>source directory of probe</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="2">
|
||||||
|
<widget class="QPushButton" name="pb_Copy">
|
||||||
|
<property name="text">
|
||||||
|
<string>copy</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="0">
|
||||||
|
<widget class="QLabel" name="lbl_Source">
|
||||||
|
<property name="text">
|
||||||
|
<string>Source:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@@ -149,7 +156,9 @@
|
|||||||
</customwidget>
|
</customwidget>
|
||||||
</customwidgets>
|
</customwidgets>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
|
<tabstop>le_Source</tabstop>
|
||||||
<tabstop>le_Target</tabstop>
|
<tabstop>le_Target</tabstop>
|
||||||
|
<tabstop>pb_Copy</tabstop>
|
||||||
<tabstop>pb_DirectoryBrowser</tabstop>
|
<tabstop>pb_DirectoryBrowser</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources/>
|
<resources/>
|
||||||
|
|||||||
Reference in New Issue
Block a user