Skip to content

Commit

Permalink
refactor: Remove simulator logos
Browse files Browse the repository at this point in the history
  • Loading branch information
ltoenning committed May 1, 2024
1 parent dd9c9e5 commit b561b61
Show file tree
Hide file tree
Showing 14 changed files with 1 addition and 227 deletions.
9 changes: 0 additions & 9 deletions src/blackgui/components/configsimulatorcomponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,6 @@ namespace BlackGui::Components
CGuiUtility::checkBoxReadOnly(ui->cb_XP, !CBuildConfig::isCompiledWithXPlaneSupport());
CGuiUtility::checkBoxReadOnly(ui->cb_FG, !CBuildConfig::isCompiledWithFGSupport());

/** does NOT work
const qreal fadeOut = 0.25;
ui->lbl_P3D->setWindowOpacity(CBuildConfig::isCompiledWithP3DSupport() ? 1.0 : fadeOut);
ui->lbl_FSX->setWindowOpacity(CBuildConfig::isCompiledWithFsxSupport() ? 1.0 : fadeOut);
ui->lbl_FS9->setWindowOpacity(CBuildConfig::isCompiledWithFs9Support() ? 1.0 : fadeOut);
ui->lbl_XP->setWindowOpacity(CBuildConfig::isCompiledWithXPlaneSupport() ? 1.0 : fadeOut);
ui->lbl_FG->setWindowOpacity(CBuildConfig::isCompiledWithFGSupport() ? 1.0 : fadeOut);
**/

if (p3d) { ui->comp_SettingsSimulator->setSimulator(CSimulatorInfo(CSimulatorInfo::P3D)); }
else if (fsx) { ui->comp_SettingsSimulator->setSimulator(CSimulatorInfo(CSimulatorInfo::FSX)); }
else if (fs9) { ui->comp_SettingsSimulator->setSimulator(CSimulatorInfo(CSimulatorInfo::FS9)); }
Expand Down
47 changes: 0 additions & 47 deletions src/blackgui/components/configsimulatorcomponent.ui
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,6 @@
</property>
</widget>
</item>
<item row="0" column="2" alignment="Qt::AlignHCenter">
<widget class="QLabel" name="lbl_FS9">
<property name="styleSheet">
<string notr="true">background: &quot;lightgrey&quot;</string>
</property>
<property name="text">
<string>&lt;img width=&quot;100&quot; src=&quot;:/simulators/icons/simulators/FS9.png&quot;/&gt;</string>
</property>
</widget>
</item>
<item row="1" column="0" alignment="Qt::AlignHCenter">
<widget class="QCheckBox" name="cb_P3D">
<property name="text">
Expand All @@ -75,16 +65,6 @@
</property>
</widget>
</item>
<item row="0" column="1" alignment="Qt::AlignHCenter">
<widget class="QLabel" name="lbl_FSX">
<property name="styleSheet">
<string notr="true">background: &quot;lightgrey&quot;</string>
</property>
<property name="text">
<string>&lt;img width=&quot;100&quot; src=&quot;:/simulators/icons/simulators/FSX.png&quot;/&gt;</string>
</property>
</widget>
</item>
<item row="1" column="2" alignment="Qt::AlignHCenter">
<widget class="QCheckBox" name="cb_FS9">
<property name="text">
Expand All @@ -98,33 +78,6 @@
</property>
</widget>
</item>
<item row="0" column="3" alignment="Qt::AlignHCenter">
<widget class="QLabel" name="lbl_XP">
<property name="styleSheet">
<string notr="true">background: &quot;lightgrey&quot;</string>
</property>
<property name="text">
<string>&lt;img width=&quot;100&quot; src=&quot;:/simulators/icons/simulators/XPlane.png&quot;/&gt;</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="lbl_P3D">
<property name="styleSheet">
<string notr="true">background: &quot;lightgrey&quot;</string>
</property>
<property name="text">
<string>&lt;img width=&quot;130&quot; src=&quot;:/simulators/icons/simulators/Prepar3D.png&quot;/&gt;</string>
</property>
</widget>
</item>
<item row="0" column="4" alignment="Qt::AlignHCenter">
<widget class="QLabel" name="lbl_FG">
<property name="text">
<string>&lt;img width=&quot;50&quot; src=&quot;:/simulators/icons/simulators/FG.png&quot;/&gt;</string>
</property>
</widget>
</item>
<item row="1" column="4" alignment="Qt::AlignHCenter">
<widget class="QCheckBox" name="cb_FG">
<property name="text">
Expand Down
20 changes: 0 additions & 20 deletions src/blackgui/components/installfsxterrainprobecomponent.ui
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,6 @@
<item>
<widget class="QFrame" name="fr_InfoHeader">
<layout class="QHBoxLayout" name="hl_InfoHeader" stretch="1,1,3">
<item>
<widget class="QLabel" name="lbl_FSX">
<property name="styleSheet">
<string notr="true">background: &quot;lightgrey&quot;</string>
</property>
<property name="text">
<string>&lt;img width=&quot;100&quot; src=&quot;:/simulators/icons/simulators/FSX.png&quot;/&gt;</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lbl_P3D">
<property name="styleSheet">
<string notr="true">background: &quot;lightgrey&quot;</string>
</property>
<property name="text">
<string>&lt;img width=&quot;130&quot; src=&quot;:/simulators/icons/simulators/Prepar3D.png&quot;/&gt;</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lbl_Explaination">
<property name="text">
Expand Down
7 changes: 0 additions & 7 deletions src/blackgui/components/installxswiftbuscomponent.ui
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,6 @@
<property name="bottomMargin">
<number>6</number>
</property>
<item>
<widget class="QLabel" name="lbl_XplaneIcon">
<property name="text">
<string>&lt;html&gt;&lt;img src=&quot;:/simulators/icons/simulators/XPlane.png&quot; width=175&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="lbl_Explaination">
<property name="text">
Expand Down
7 changes: 0 additions & 7 deletions src/blackmisc/blackmisc.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -579,13 +579,6 @@
<file>icons/misc/cn.png</file>
<file>icons/misc/ru.png</file>
</qresource>
<qresource prefix="/simulators">
<file>icons/simulators/FS9.png</file>
<file>icons/simulators/FSX.png</file>
<file>icons/simulators/Prepar3D.png</file>
<file>icons/simulators/XPlane.png</file>
<file>icons/simulators/FG.png</file>
</qresource>
<qresource prefix="/famfamfam">
<file>icons/famfamfam/icons/silk/control_eject.png</file>
<file>icons/famfamfam/icons/silk/control_eject_blue.png</file>
Expand Down
10 changes: 0 additions & 10 deletions src/blackmisc/icon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,16 +155,6 @@ namespace BlackMisc
CIcon(CIcons::OSLinux, "Linux"),
CIcon(CIcons::OSMacOs, "Mac OS"),
CIcon(CIcons::OSWindows, "Windows"),
CIcon(CIcons::SimulatorFG, "FG"),
CIcon(CIcons::SimulatorFG16, "FG"),
CIcon(CIcons::SimulatorFS9, "FS9"),
CIcon(CIcons::SimulatorFS916, "FS9"),
CIcon(CIcons::SimulatorFSX, "FSX"),
CIcon(CIcons::SimulatorFSX16, "FSX"),
CIcon(CIcons::SimulatorP3D, "P3D"),
CIcon(CIcons::SimulatorP3D16, "P3D"),
CIcon(CIcons::SimulatorXPlane, "XPlane"),
CIcon(CIcons::SimulatorXPlane16, "XPlane"),
CIcon(CIcons::StandardIconAppAircraft16, "aircraft"),
CIcon(CIcons::StandardIconAppAtc16, "ATC"),
CIcon(CIcons::StandardIconAppFlightPlan16, "flight plan"),
Expand Down
70 changes: 0 additions & 70 deletions src/blackmisc/icons.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -537,66 +537,6 @@ namespace BlackMisc
return pm;
}

const QPixmap &CIcons::simulatorFSX()
{
static const QPixmap pm(":/simulators/icons/simulators/FSX.png");
return pm;
}

const QPixmap &CIcons::simulatorFSX16()
{
static const QPixmap pm(simulatorFSX().scaled(32, 16, Qt::KeepAspectRatio));
return pm;
}

const QPixmap &CIcons::simulatorP3D()
{
static const QPixmap pm(":/simulators/icons/simulators/Prepar3D.png");
return pm;
}

const QPixmap &CIcons::simulatorP3D16()
{
static const QPixmap pm(simulatorP3D().scaled(32, 16, Qt::KeepAspectRatio));
return pm;
}

const QPixmap &CIcons::simulatorFS9()
{
static const QPixmap pm(":/simulators/icons/simulators/FS9.png");
return pm;
}

const QPixmap &CIcons::simulatorFS916()
{
static const QPixmap pm(simulatorFS9().scaled(32, 16, Qt::KeepAspectRatio));
return pm;
}

const QPixmap &CIcons::simulatorFG()
{
static const QPixmap pm(":/simulators/icons/simulators/FG.png");
return pm;
}

const QPixmap &CIcons::simulatorFG16()
{
static const QPixmap pm(simulatorFG().scaled(32, 16, Qt::KeepAspectRatio));
return pm;
}

const QPixmap &CIcons::simulatorXPlane()
{
static const QPixmap pm(":/simulators/icons/simulators/FS9.png");
return pm;
}

const QPixmap &CIcons::simulatorXPlane16()
{
static const QPixmap pm(simulatorXPlane().scaled(32, 16, Qt::KeepAspectRatio));
return pm;
}

const QPixmap &CIcons::swift16()
{
static const QPixmap pm(":/own/icons/own/swift3D/sw3DBlue-16.png");
Expand Down Expand Up @@ -1213,16 +1153,6 @@ namespace BlackMisc
case OSLinux: return osLinux();
case OSMacOs: return osMac();
case OSWindows: return osWindows();
case SimulatorFG: return simulatorFG();
case SimulatorFG16: return simulatorFG16();
case SimulatorFS9: return simulatorFS9();
case SimulatorFS916: return simulatorFS916();
case SimulatorFSX: return simulatorFSX();
case SimulatorFSX16: return simulatorFSX16();
case SimulatorP3D: return simulatorP3D();
case SimulatorP3D16: return simulatorP3D16();
case SimulatorXPlane: return simulatorXPlane();
case SimulatorXPlane16: return simulatorXPlane16();
case StandardIconAppAircraft16: return appAircraft16();
case StandardIconAppAtc16: return appAtc16();
case StandardIconAppFlightPlan16: return appFlightPlan16();
Expand Down
44 changes: 0 additions & 44 deletions src/blackmisc/icons.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,16 +91,6 @@ namespace BlackMisc
OSLinux,
OSMacOs,
OSWindows,
SimulatorFG,
SimulatorFG16,
SimulatorFS9,
SimulatorFS916,
SimulatorFSX,
SimulatorFSX16,
SimulatorP3D,
SimulatorP3D16,
SimulatorXPlane,
SimulatorXPlane16,
StandardIconAppAircraft16,
StandardIconAppAtc16,
StandardIconAppFlightPlan16,
Expand Down Expand Up @@ -499,40 +489,6 @@ namespace BlackMisc
//! Preloader
static const QPixmap &preloader16();

// --------------------------------------------------
// -- Simulators
// --------------------------------------------------

//! @{
//! Simulator FSX
static const QPixmap &simulatorFSX();
static const QPixmap &simulatorFSX16();
//! @}

//! @{
//! Simulator P3D
static const QPixmap &simulatorP3D();
static const QPixmap &simulatorP3D16();
//! @}

//! @{
//! Simulator FS9
static const QPixmap &simulatorFS9();
static const QPixmap &simulatorFS916();
//! @}

//! @{
//! Simulator FG
static const QPixmap &simulatorFG();
static const QPixmap &simulatorFG16();
//! @}

//! @{
//! Simulator XPlane
static const QPixmap &simulatorXPlane();
static const QPixmap &simulatorXPlane16();
//! @}

// --------------------------------------------------
// -- swift
// --------------------------------------------------
Expand Down
Binary file removed src/blackmisc/icons/simulators/FG.png
Binary file not shown.
Binary file removed src/blackmisc/icons/simulators/FS9.png
Binary file not shown.
Binary file removed src/blackmisc/icons/simulators/FSX.png
Binary file not shown.
Binary file removed src/blackmisc/icons/simulators/Prepar3D.png
Binary file not shown.
Binary file removed src/blackmisc/icons/simulators/XPlane.png
Binary file not shown.
14 changes: 1 addition & 13 deletions src/blackmisc/simulation/simulatorinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -168,19 +168,7 @@ namespace BlackMisc::Simulation

CIcons::IconIndex CSimulatorInfo::toIcon() const
{
if (this->isSingleSimulator())
{
switch (this->getSimulator())
{
case FSX: return CIcons::SimulatorFSX16;
case FS9: return CIcons::SimulatorFS916;
case P3D: return CIcons::SimulatorP3D16;
case XPLANE: return CIcons::SimulatorXPlane16;
case FG: return CIcons::SimulatorXPlane16;
default: break;
}
}
return CValueObject::toIcon();
return CIcons::StandardIconEmpty;
}

CSimulatorInfo CSimulatorInfo::add(const CSimulatorInfo &other)
Expand Down

0 comments on commit b561b61

Please sign in to comment.