mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +08:00
refs #335, changed ui to QScopedPointer
This commit is contained in:
committed by
Roland Winklmeier
parent
5eaaf70fcd
commit
bb8b515c87
@@ -38,9 +38,7 @@ namespace BlackGui
|
|||||||
}
|
}
|
||||||
|
|
||||||
CAircraftComponent::~CAircraftComponent()
|
CAircraftComponent::~CAircraftComponent()
|
||||||
{
|
{ }
|
||||||
delete ui;
|
|
||||||
}
|
|
||||||
|
|
||||||
int CAircraftComponent::countAircrafts() const
|
int CAircraftComponent::countAircrafts() const
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,7 +16,9 @@
|
|||||||
#include "blackgui/components/timerbasedcomponent.h"
|
#include "blackgui/components/timerbasedcomponent.h"
|
||||||
#include "blackgui/components/dockwidgetinfoareacomponent.h"
|
#include "blackgui/components/dockwidgetinfoareacomponent.h"
|
||||||
#include "blackmisc/avaircraft.h"
|
#include "blackmisc/avaircraft.h"
|
||||||
|
|
||||||
#include <QTabWidget>
|
#include <QTabWidget>
|
||||||
|
#include <QScopedPointer>
|
||||||
|
|
||||||
namespace Ui { class CAircraftComponent; }
|
namespace Ui { class CAircraftComponent; }
|
||||||
namespace BlackGui
|
namespace BlackGui
|
||||||
@@ -72,7 +74,7 @@ namespace BlackGui
|
|||||||
void ps_countChanged(int count);
|
void ps_countChanged(int count);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::CAircraftComponent *ui;
|
QScopedPointer<Ui::CAircraftComponent> ui;
|
||||||
CTimerBasedComponent *m_timerComponent;
|
CTimerBasedComponent *m_timerComponent;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,9 +67,7 @@ namespace BlackGui
|
|||||||
}
|
}
|
||||||
|
|
||||||
CAtcStationComponent::~CAtcStationComponent()
|
CAtcStationComponent::~CAtcStationComponent()
|
||||||
{
|
{ }
|
||||||
delete ui;
|
|
||||||
}
|
|
||||||
|
|
||||||
int CAtcStationComponent::countBookedStations() const
|
int CAtcStationComponent::countBookedStations() const
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -20,6 +20,7 @@
|
|||||||
|
|
||||||
#include <QTabWidget>
|
#include <QTabWidget>
|
||||||
#include <QModelIndex>
|
#include <QModelIndex>
|
||||||
|
#include <QScopedPointer>
|
||||||
|
|
||||||
namespace Ui { class CAtcStationComponent; }
|
namespace Ui { class CAtcStationComponent; }
|
||||||
|
|
||||||
@@ -111,7 +112,7 @@ namespace BlackGui
|
|||||||
void ps_countChanged(int count);
|
void ps_countChanged(int count);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::CAtcStationComponent *ui;
|
QScopedPointer<Ui::CAtcStationComponent> ui;
|
||||||
CTimerBasedComponent *m_timerComponent;
|
CTimerBasedComponent *m_timerComponent;
|
||||||
QDateTime m_timestampLastReadOnlineStations = CTimerBasedComponent::epoch(); //!< stations read
|
QDateTime m_timestampLastReadOnlineStations = CTimerBasedComponent::epoch(); //!< stations read
|
||||||
QDateTime m_timestampOnlineStationsChanged = CTimerBasedComponent::epoch(); //!< stations marked as changed
|
QDateTime m_timestampOnlineStationsChanged = CTimerBasedComponent::epoch(); //!< stations marked as changed
|
||||||
|
|||||||
@@ -69,9 +69,7 @@ namespace BlackGui
|
|||||||
}
|
}
|
||||||
|
|
||||||
CFlightPlanComponent::~CFlightPlanComponent()
|
CFlightPlanComponent::~CFlightPlanComponent()
|
||||||
{
|
{ }
|
||||||
delete ui;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CFlightPlanComponent::prefillWithAircraftData(const BlackMisc::Aviation::CAircraft &ownAircraft)
|
void CFlightPlanComponent::prefillWithAircraftData(const BlackMisc::Aviation::CAircraft &ownAircraft)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ namespace BlackGui
|
|||||||
BlackMisc::Aviation::CFlightPlan getFlightPlan() const;
|
BlackMisc::Aviation::CFlightPlan getFlightPlan() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::CFlightPlanComponent *ui;
|
QScopedPointer<Ui::CFlightPlanComponent> ui;
|
||||||
|
|
||||||
//! My flight plan
|
//! My flight plan
|
||||||
BlackMisc::Aviation::CFlightPlan m_flightPlan;
|
BlackMisc::Aviation::CFlightPlan m_flightPlan;
|
||||||
|
|||||||
@@ -26,9 +26,7 @@ namespace BlackGui
|
|||||||
}
|
}
|
||||||
|
|
||||||
CLogComponent::~CLogComponent()
|
CLogComponent::~CLogComponent()
|
||||||
{
|
{ }
|
||||||
delete ui;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CLogComponent::appendStatusMessageToConsole(const CStatusMessage &statusMessage)
|
void CLogComponent::appendStatusMessageToConsole(const CStatusMessage &statusMessage)
|
||||||
{
|
{
|
||||||
@@ -47,4 +45,4 @@ namespace BlackGui
|
|||||||
this->ui->tvp_StatusMessages->insert(statusMessage);
|
this->ui->tvp_StatusMessages->insert(statusMessage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} // namespace
|
||||||
|
|||||||
@@ -14,7 +14,9 @@
|
|||||||
|
|
||||||
#include "runtimebasedcomponent.h"
|
#include "runtimebasedcomponent.h"
|
||||||
#include "blackmisc/statusmessagelist.h"
|
#include "blackmisc/statusmessagelist.h"
|
||||||
|
|
||||||
#include <QFrame>
|
#include <QFrame>
|
||||||
|
#include <QScopedPointer>
|
||||||
|
|
||||||
namespace Ui { class CLogComponent; }
|
namespace Ui { class CLogComponent; }
|
||||||
|
|
||||||
@@ -49,7 +51,7 @@ namespace BlackGui
|
|||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::CLogComponent *ui;
|
QScopedPointer<Ui::CLogComponent> ui;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,9 +56,7 @@ namespace BlackGui
|
|||||||
* Destructor
|
* Destructor
|
||||||
*/
|
*/
|
||||||
CSettingsComponent::~CSettingsComponent()
|
CSettingsComponent::~CSettingsComponent()
|
||||||
{
|
{ }
|
||||||
delete ui;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Update own ICAO data from GUI
|
* Update own ICAO data from GUI
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
#include <QTabWidget>
|
#include <QTabWidget>
|
||||||
#include <QModelIndex>
|
#include <QModelIndex>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
#include <QScopedPointer>
|
||||||
|
|
||||||
namespace Ui { class CSettingsComponent; }
|
namespace Ui { class CSettingsComponent; }
|
||||||
|
|
||||||
@@ -156,10 +157,10 @@ namespace BlackGui
|
|||||||
MicrophoneTest
|
MicrophoneTest
|
||||||
};
|
};
|
||||||
|
|
||||||
Ui::CSettingsComponent *ui;
|
QScopedPointer<Ui::CSettingsComponent> ui;
|
||||||
QTimer *m_timerAudioTests; //!< audio tests: progress bar, disable/enable buttons
|
QTimer *m_timerAudioTests; //!< audio tests: progress bar, disable/enable buttons
|
||||||
AudioTest m_audioTestRunning;
|
AudioTest m_audioTestRunning;
|
||||||
QColor m_fontColor;
|
QColor m_fontColor;
|
||||||
|
|
||||||
//! Audio device lists from settings
|
//! Audio device lists from settings
|
||||||
void initAudioDeviceLists();
|
void initAudioDeviceLists();
|
||||||
|
|||||||
@@ -27,9 +27,7 @@ namespace BlackGui
|
|||||||
}
|
}
|
||||||
|
|
||||||
CSimulatorComponent::~CSimulatorComponent()
|
CSimulatorComponent::~CSimulatorComponent()
|
||||||
{
|
{ }
|
||||||
delete ui;
|
|
||||||
}
|
|
||||||
|
|
||||||
void CSimulatorComponent::addOrUpdateByName(const QString &name, const QString &value, const CIcon &icon)
|
void CSimulatorComponent::addOrUpdateByName(const QString &name, const QString &value, const CIcon &icon)
|
||||||
{
|
{
|
||||||
@@ -52,4 +50,4 @@ namespace BlackGui
|
|||||||
this->ui->tvp_LiveData->clear();
|
this->ui->tvp_LiveData->clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} // namespace
|
||||||
|
|||||||
@@ -15,7 +15,9 @@
|
|||||||
#include "runtimebasedcomponent.h"
|
#include "runtimebasedcomponent.h"
|
||||||
#include "blackmisc/icon.h"
|
#include "blackmisc/icon.h"
|
||||||
#include "blackgui/components/dockwidgetinfoareacomponent.h"
|
#include "blackgui/components/dockwidgetinfoareacomponent.h"
|
||||||
|
|
||||||
#include <QTabWidget>
|
#include <QTabWidget>
|
||||||
|
#include <QScopedPointer>
|
||||||
|
|
||||||
namespace Ui { class CSimulatorComponent; }
|
namespace Ui { class CSimulatorComponent; }
|
||||||
namespace BlackGui
|
namespace BlackGui
|
||||||
@@ -25,9 +27,9 @@ namespace BlackGui
|
|||||||
|
|
||||||
//! Simulator component
|
//! Simulator component
|
||||||
class CSimulatorComponent :
|
class CSimulatorComponent :
|
||||||
public QTabWidget,
|
public QTabWidget,
|
||||||
public CDockWidgetInfoAreaComponent,
|
public CDockWidgetInfoAreaComponent,
|
||||||
public CRuntimeBasedComponent
|
public CRuntimeBasedComponent
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@@ -52,7 +54,7 @@ namespace BlackGui
|
|||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::CSimulatorComponent *ui;
|
QScopedPointer<Ui::CSimulatorComponent> ui;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,9 +35,7 @@ namespace BlackGui
|
|||||||
}
|
}
|
||||||
|
|
||||||
CUserComponent::~CUserComponent()
|
CUserComponent::~CUserComponent()
|
||||||
{
|
{ }
|
||||||
delete ui;
|
|
||||||
}
|
|
||||||
|
|
||||||
int CUserComponent::countClients() const
|
int CUserComponent::countClients() const
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#include <QTabWidget>
|
#include <QTabWidget>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
#include <QScopedPointer>
|
||||||
|
|
||||||
namespace Ui { class CUserComponent; }
|
namespace Ui { class CUserComponent; }
|
||||||
|
|
||||||
@@ -67,7 +68,7 @@ namespace BlackGui
|
|||||||
void ps_countChanged(int count);
|
void ps_countChanged(int count);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::CUserComponent *ui;
|
QScopedPointer<Ui::CUserComponent> ui;
|
||||||
CTimerBasedComponent *m_timerComponent;
|
CTimerBasedComponent *m_timerComponent;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user