refs #335, formatting, member initialization, new icons, remove redundant methods

This commit is contained in:
Klaus Basan
2014-10-07 00:24:04 +02:00
committed by Roland Winklmeier
parent c965fbb785
commit b0f01a3ec6
20 changed files with 83 additions and 57 deletions

View File

@@ -26,8 +26,10 @@ namespace BlackGui
namespace Components
{
//! User componenet (users, clients)
class CCockpitV1Component : public QWidget, public CRuntimeBasedComponent
//! Cockpit component
class CCockpitV1Component :
public QWidget,
public CRuntimeBasedComponent
{
Q_OBJECT

View File

@@ -21,8 +21,8 @@ namespace BlackGui
namespace Components
{
//! Component is residing in an dockable widget. This helper class provides access to
//! to its info area and dockable widget.
//! Helper class: Component is residing in an dockable widget.
//! This class provides access to its info area and dockable widget.
class CDockWidgetInfoAreaComponent
{
public:
@@ -53,6 +53,7 @@ namespace BlackGui
private:
BlackGui::CDockWidgetInfoArea *m_parentDockableInfoArea = nullptr; //!< my parent dockable widget
};
}
} // namespace

View File

@@ -24,13 +24,16 @@ namespace BlackGui
namespace Components
{
CFlightPlanComponent::CFlightPlanComponent(QWidget *parent) :
QTabWidget(parent), CRuntimeBasedComponent(nullptr, false), ui(new Ui::CFlightPlanComponent)
QTabWidget(parent),
CRuntimeBasedComponent(nullptr, false),
ui(new Ui::CFlightPlanComponent)
{
ui->setupUi(this);
// fix style
this->tabBar()->setExpanding(false);
// connect
connect(this->ui->pb_Send, &QPushButton::pressed, this, &CFlightPlanComponent::sendFlightPlan);
connect(this->ui->pb_Load, &QPushButton::pressed, this, &CFlightPlanComponent::loadFlightPlanFromNetwork);
connect(this->ui->pb_Reset, &QPushButton::pressed, this, &CFlightPlanComponent::resetFlightPlan);

View File

@@ -25,7 +25,9 @@ namespace BlackGui
{
//! Flight plan widget
class CFlightPlanComponent : public QTabWidget, public CRuntimeBasedComponent
class CFlightPlanComponent :
public QTabWidget,
public CRuntimeBasedComponent
{
Q_OBJECT

View File

@@ -22,7 +22,9 @@ namespace BlackGui
namespace Components
{
//! Info bar displaying status (Network, Simulator, DBus)
class CInfoBarStatusComponent : public QFrame, public CRuntimeBasedComponent
class CInfoBarStatusComponent :
public QFrame,
public CRuntimeBasedComponent
{
Q_OBJECT

View File

@@ -27,7 +27,7 @@ namespace BlackGui
{
/*!
* Multi purpose info window (pop up window)
* Multi purpose info window (like pop up window)
*/
class CInfoWindowComponent : public QWizardPage
{
@@ -73,6 +73,6 @@ namespace BlackGui
//! Style sheet changed
void onStyleSheetsChanged();
};
}
}
} // namespace
} // namespace
#endif // guard

View File

@@ -24,7 +24,9 @@ namespace BlackGui
{
//! GUI displaying log and status messages
class CLogComponent : public QFrame, public CRuntimeBasedComponent
class CLogComponent :
public QFrame,
public CRuntimeBasedComponent
{
Q_OBJECT

View File

@@ -25,7 +25,8 @@ namespace BlackGui
namespace Components
{
CMainInfoAreaComponent::CMainInfoAreaComponent(QWidget *parent) :
CInfoArea(parent), ui(new Ui::CMainInfoAreaComponent)
CInfoArea(parent),
ui(new Ui::CMainInfoAreaComponent)
{
ui->setupUi(this);
initInfoArea();

View File

@@ -34,7 +34,7 @@ namespace BlackGui
{
/*!
* \brief Component, which provides reference to runtime object
* \brief Component, which provides references to runtime objects
* \details Access to runtime allows to encapsualate many aspects of data access and makes
* the component widely independent from a central data provideer
* \sa BlackCore::CRuntime

View File

@@ -27,7 +27,9 @@ namespace BlackGui
{
//! Settings component
class CSettingsComponent : public QTabWidget, public CRuntimeBasedComponent
class CSettingsComponent :
public QTabWidget,
public CRuntimeBasedComponent
{
Q_OBJECT

View File

@@ -13,7 +13,6 @@
#define BLACKGUI_TEXTMESSAGECOMPONENT_H
#include "blackgui/components/runtimebasedcomponent.h"
#include "blackgui/components/timerbasedcomponent.h"
#include "blackmisc/nwtextmessage.h"
#include "blackmisc/avaircraft.h"
#include "blackmisc/nwtextmessagelist.h"
@@ -29,7 +28,9 @@ namespace BlackGui
namespace Components
{
//! Text message widget
class CTextMessageComponent : public QTabWidget, public CRuntimeBasedComponent
class CTextMessageComponent :
public QTabWidget,
public CRuntimeBasedComponent
{
Q_OBJECT

View File

@@ -14,7 +14,7 @@ namespace BlackGui
namespace Components
{
CTimerBasedComponent::CTimerBasedComponent(const char *slot, QObject *parent) :
QObject(parent), m_timer(nullptr)
QObject(parent)
{
Q_ASSERT(parent);
this->m_timer = new QTimer(this);

View File

@@ -19,7 +19,7 @@ namespace BlackGui
{
namespace Components
{
//! Timer based componenet
//! Helper class: Timer based componenet
class CTimerBasedComponent: public QObject
{
Q_OBJECT
@@ -52,8 +52,8 @@ namespace BlackGui
void fireTimer();
private:
QTimer *m_timer;
QTimer *m_timerSingleShot;
QTimer *m_timer = nullptr;
QTimer *m_timerSingleShot = nullptr;
};
}
}