mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 23:45:35 +08:00
Misc. wizard UI adjustments
- toolbox layout for terrain probe/XSwiftBus - load overview URLs in table - size adjustments
This commit is contained in:
@@ -28,7 +28,7 @@ namespace BlackGui
|
||||
ui->setupUi(this);
|
||||
ui->wp_CopyModels->setConfigComponent(ui->comp_CopyModels);
|
||||
ui->wp_Simulator->setConfigComponent(ui->comp_Simulator);
|
||||
ui->wp_SimulatorSpecific->setConfigComponent(ui->comp_XSwiftBus, ui->comp_FsxTerrainProbe);
|
||||
ui->wp_SimulatorSpecific->setConfigComponent(ui->comp_InstallXSwiftBus, ui->comp_InstallFsxTerrainProbe);
|
||||
ui->wp_DataLoad->setConfigComponent(ui->comp_DataLoad);
|
||||
ui->wp_Hotkeys->setConfigComponent(ui->comp_Hotkeys);
|
||||
ui->wp_Legal->setConfigComponent(ui->comp_LegalInformation);
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<width>700</width>
|
||||
<height>600</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>500</width>
|
||||
<height>500</height>
|
||||
<width>700</width>
|
||||
<height>600</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -198,37 +198,43 @@
|
||||
<property name="subTitle">
|
||||
<string>Install XSwiftBus (X-Plane only) or swift terrain probe (FSX/P3D only)</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="leftMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>4</number>
|
||||
</property>
|
||||
<item row="1" column="0">
|
||||
<widget class="BlackGui::Components::CInstallXSwiftBusComponent" name="comp_XSwiftBus">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>150</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="BlackGui::Components::CInstallFsxTerrainProbeComponent" name="comp_FsxTerrainProbe" native="true">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>75</height>
|
||||
</size>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="vl_SimulatorSpecific">
|
||||
<item>
|
||||
<widget class="QToolBox" name="tb_SimulatorSpecific">
|
||||
<widget class="QWidget" name="pg_InstallFsxTerrainProbe" native="true">
|
||||
<attribute name="label">
|
||||
<string extracomment="FSX/P3D: Needed with the x86 legacy 32bit SimConnect">Install FSX terrain probe</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="vl_P3DFsx">
|
||||
<item alignment="Qt::AlignTop">
|
||||
<widget class="BlackGui::Components::CInstallFsxTerrainProbeComponent" name="comp_InstallFsxTerrainProbe">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="pg_InstallXSwiftBus" native="true">
|
||||
<attribute name="label">
|
||||
<string extracomment="Install the XSwiftBus component">XPlane: Install XSwiftBus</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="vl_XPlane">
|
||||
<item alignment="Qt::AlignTop">
|
||||
<widget class="BlackGui::Components::CInstallXSwiftBusComponent" name="comp_InstallXSwiftBus">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>50</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
@@ -373,7 +379,7 @@
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>BlackGui::Components::CInstallFsxTerrainProbeComponent</class>
|
||||
<extends>QWidget</extends>
|
||||
<extends>QFrame</extends>
|
||||
<header>blackgui/components/installfsxterrainprobecomponent.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "blackcore/webdataservices.h"
|
||||
#include "blackcore/db/infodatareader.h"
|
||||
#include "blackmisc/network/networkutils.h"
|
||||
#include "blackmisc/htmlutils.h"
|
||||
|
||||
#include <QPointer>
|
||||
#include <QMessageBox>
|
||||
@@ -216,11 +217,10 @@ namespace BlackGui
|
||||
|
||||
// Shared URLs
|
||||
const CUrlList sharedUrls(sGui->getGlobalSetup().getSwiftSharedUrls());
|
||||
const QString tableHtml("<table>%1</table>");
|
||||
const QString rowHtml("<tr><td><img src=\"%1\"> </td><td>%2</td></tr>");
|
||||
const QString valueHtml("<img src=\"%1\"> %2");
|
||||
const QString urlLinkHtml("<a href=\"%1\">%2</a>");
|
||||
|
||||
QString allRowsHtml;
|
||||
QStringList values;
|
||||
for (const CUrl &sharedUrl : sharedUrls)
|
||||
{
|
||||
if (!sGui || sGui->isShuttingDown())
|
||||
@@ -230,9 +230,13 @@ namespace BlackGui
|
||||
return;
|
||||
}
|
||||
canConnect = CNetworkUtils::canConnect(sharedUrl);
|
||||
allRowsHtml += rowHtml.arg(canConnect ? imgOk : imgFailed, urlLinkHtml.arg(sharedUrl.getFullUrl(), sharedUrl.getHost()));
|
||||
values.push_back(
|
||||
valueHtml.arg(canConnect ? imgOk : imgFailed, urlLinkHtml.arg(sharedUrl.getFullUrl(), sharedUrl.getHost()))
|
||||
);
|
||||
}
|
||||
ui->lbl_SharedUrls->setText(tableHtml.arg(allRowsHtml.trimmed()));
|
||||
|
||||
const QString sharedUrlTable = toHtmTable(values, 2);
|
||||
ui->lbl_SharedUrls->setText(sharedUrlTable);
|
||||
ui->lbl_SharedUrls->setMinimumHeight(10 + (18 * sharedUrls.size()));
|
||||
const QString currentlyUsedSharedUrl = sGui->getWorkingSharedUrl().toQString();
|
||||
ui->lbl_SharedUrls->setToolTip(
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>644</width>
|
||||
<height>367</height>
|
||||
<height>253</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -140,7 +140,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="10" column="0">
|
||||
<item row="10" column="0" alignment="Qt::AlignVCenter">
|
||||
<widget class="QLabel" name="lbl_DbUrl">
|
||||
<property name="text">
|
||||
<string>DB URL:</string>
|
||||
@@ -258,16 +258,10 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="2" colspan="9" alignment="Qt::AlignTop">
|
||||
<item row="11" column="2" colspan="9">
|
||||
<widget class="QLabel" name="lbl_SharedUrls">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>125</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Checking shared servers' URLs</string>
|
||||
<string>Shared URL will go here</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -532,7 +526,7 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="11" column="0" alignment="Qt::AlignTop">
|
||||
<item row="11" column="0" alignment="Qt::AlignVCenter">
|
||||
<widget class="QLabel" name="lbl_SharedUrl">
|
||||
<property name="text">
|
||||
<string>Shared:</string>
|
||||
|
||||
@@ -7,13 +7,16 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>427</width>
|
||||
<height>194</height>
|
||||
<height>189</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Copy swift probe</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<layout class="QVBoxLayout" name="vl_InstallFsxTerrainProbe">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QFrame" name="fr_InfoHeader">
|
||||
<layout class="QHBoxLayout" name="hl_InfoHeader" stretch="1,1,3">
|
||||
|
||||
@@ -6,16 +6,10 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>600</width>
|
||||
<height>400</height>
|
||||
<width>396</width>
|
||||
<height>317</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>600</width>
|
||||
<height>400</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Install XSwiftBus</string>
|
||||
</property>
|
||||
@@ -41,7 +35,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="lbl_XplaneIcon">
|
||||
<property name="text">
|
||||
<string><html><img src=":/simulators/icons/simulators/XPlane.png" width=200></html></string>
|
||||
<string><html><img src=":/simulators/icons/simulators/XPlane.png" width=175></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -68,16 +62,16 @@
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gl_DownloadAndInstall">
|
||||
<property name="leftMargin">
|
||||
<number>4</number>
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>4</number>
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>4</number>
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>4</number>
|
||||
<number>5</number>
|
||||
</property>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="lbl_XSwiftBusPluginDir">
|
||||
@@ -185,16 +179,16 @@
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="vl_XSwiftBusSettings">
|
||||
<property name="leftMargin">
|
||||
<number>4</number>
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>4</number>
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>4</number>
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>4</number>
|
||||
<number>5</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="BlackGui::Components::CSettingsXSwiftBusComponent" name="comp_SettingsXSwiftBus">
|
||||
@@ -209,19 +203,6 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="vs_XSwiftBusComponent">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
|
||||
Reference in New Issue
Block a user