mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-04 00:16:51 +08:00
refs #432 Doxygen, formatting, added new file types in *.pro
Minor tweaks: * GUI infobar minimum size * toogle lock protected * removed unused function * ASSERT_X * object name
This commit is contained in:
@@ -46,7 +46,7 @@ RESOURCES +=
|
||||
DESTDIR = $$BuildRoot/lib
|
||||
DLLDESTDIR = $$BuildRoot/bin
|
||||
|
||||
OTHER_FILES += ./qss/*.qss ./qss/*.css ./qss/*.ini
|
||||
OTHER_FILES += ./qss/*.qss ./qss/*.css ./qss/*.ini *.ico *.rc
|
||||
|
||||
win32:isEmpty(MINGW_IN_SHELL): COPY = xcopy /yi
|
||||
else: COPY = cp -r
|
||||
|
||||
@@ -28,7 +28,6 @@ namespace BlackGui
|
||||
{
|
||||
CAudioSetupComponent::CAudioSetupComponent(QWidget *parent) :
|
||||
QFrame(parent),
|
||||
CEnableForRuntime(nullptr, false),
|
||||
ui(new Ui::CAudioSetupComponent)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
@@ -45,11 +44,11 @@ namespace BlackGui
|
||||
|
||||
void CAudioSetupComponent::runtimeHasBeenSet()
|
||||
{
|
||||
if (!this->getIContextSettings()) qFatal("Settings missing");
|
||||
Q_ASSERT_X(this->getIContextSettings(), Q_FUNC_INFO, "missing settings");
|
||||
this->connect(this->getIContextSettings(), &IContextSettings::changedSettings, this, &CAudioSetupComponent::ps_changedSettings);
|
||||
|
||||
// based on audio context
|
||||
Q_ASSERT(this->getIContextAudio());
|
||||
Q_ASSERT_X(this->getIContextAudio(), Q_FUNC_INFO, "missing audio");
|
||||
if (this->getIContextAudio())
|
||||
{
|
||||
this->initAudioDeviceLists();
|
||||
|
||||
@@ -53,7 +53,6 @@ namespace BlackGui
|
||||
void ps_onToggleFloating(bool floating);
|
||||
|
||||
private:
|
||||
|
||||
// toggle area on show/hide details
|
||||
void toggleShowHideDetails(bool show, bool considerCurrentSize);
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ namespace BlackGui
|
||||
ui->setupUi(this);
|
||||
this->initInfoArea();
|
||||
this->ps_setTabBarPosition(QTabWidget::North);
|
||||
this->ps_toggleTabBarLocked(true);
|
||||
}
|
||||
|
||||
CCockpitInfoAreaComponent::~CCockpitInfoAreaComponent()
|
||||
|
||||
@@ -66,7 +66,6 @@ namespace BlackGui
|
||||
|
||||
private:
|
||||
BlackGui::CDockWidgetInfoArea *m_parentDockableInfoArea = nullptr; //!< my parent dockable widget
|
||||
|
||||
};
|
||||
}
|
||||
} // namespace
|
||||
|
||||
@@ -34,12 +34,10 @@ namespace BlackGui
|
||||
namespace Components
|
||||
{
|
||||
|
||||
/*!
|
||||
* \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
|
||||
*/
|
||||
//! 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
|
||||
class BLACKGUI_EXPORT CEnableForRuntime
|
||||
{
|
||||
public:
|
||||
@@ -119,9 +117,6 @@ namespace BlackGui
|
||||
//! \copydoc CRuntime::hasRemoteApplicationContext
|
||||
bool hasRemoteApplicationContext() const { return this->m_runtime->hasRemoteApplicationContext(); }
|
||||
|
||||
//! \copydoc CRuntime::canPingApplicationContext
|
||||
bool canPingApplicationContext() const { return this->m_runtime->canPingApplicationContext(); }
|
||||
|
||||
//! Play a given notification sound
|
||||
void playNotifcationSound(BlackSound::CNotificationSounds::Notification notification) const;
|
||||
|
||||
|
||||
@@ -6,10 +6,16 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>415</width>
|
||||
<width>184</width>
|
||||
<height>20</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Info status bar</string>
|
||||
</property>
|
||||
|
||||
@@ -7,9 +7,9 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "dockwidgetinfoarea.h"
|
||||
#include "infoarea.h"
|
||||
#include "components/maininfoareacomponent.h"
|
||||
#include "blackgui/dockwidgetinfoarea.h"
|
||||
#include "blackgui/infoarea.h"
|
||||
#include "components/enablefordockwidgetinfoarea.h"
|
||||
#include "blackmisc/icons.h"
|
||||
|
||||
using namespace BlackGui::Components;
|
||||
@@ -96,7 +96,7 @@ namespace BlackGui
|
||||
QList<CEnableForDockWidgetInfoArea *> infoAreaDockWidgets = this->findEmbeddedDockWidgetInfoAreaComponents();
|
||||
foreach(CEnableForDockWidgetInfoArea * dwia, infoAreaDockWidgets)
|
||||
{
|
||||
Q_ASSERT(dwia);
|
||||
Q_ASSERT_X(dwia, Q_FUNC_INFO, "Missing info area");
|
||||
|
||||
// KWB: potentially a risk when this object is deleted
|
||||
// but under normal situations the child object will be deleted as well, and we have
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/* Copyright (C) 2014
|
||||
* Swift Project Community / Contributors
|
||||
*
|
||||
* This file is part of swift Project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
||||
* including this file, may be copied, modified, propagated, or distributed except according to the terms
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
* Swift Project Community / Contributors
|
||||
*
|
||||
* This file is part of swift Project. It is subject to the license terms in the LICENSE file found in the top-level
|
||||
* directory of this distribution and at http://www.swift-project.org/license.html. No part of swift project,
|
||||
* including this file, may be copied, modified, propagated, or distributed except according to the terms
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
//! \file
|
||||
|
||||
|
||||
@@ -144,6 +144,9 @@ namespace BlackGui
|
||||
//! \remarks North or South working, East / West not
|
||||
void ps_setTabBarPosition(QTabWidget::TabPosition position);
|
||||
|
||||
//! Toogle lock tabbar
|
||||
void ps_toggleTabBarLocked(bool locked);
|
||||
|
||||
private:
|
||||
QList<CDockWidgetInfoArea *> m_dockWidgetInfoAreas ;
|
||||
QTabBar *m_tabBar = nullptr;
|
||||
@@ -226,9 +229,6 @@ namespace BlackGui
|
||||
//! Show tab bar
|
||||
void ps_showTabBar(bool show);
|
||||
|
||||
//! Toogle lock tabbar
|
||||
void ps_toggleTabBarLocked(bool locked);
|
||||
|
||||
//! Toggle tab position North - South
|
||||
void ps_toggleTabBarPosition();
|
||||
|
||||
|
||||
@@ -20,9 +20,6 @@ namespace BlackGui
|
||||
{
|
||||
namespace Models
|
||||
{
|
||||
/*
|
||||
* Constructor
|
||||
*/
|
||||
CAirportListModel::CAirportListModel(QObject *parent) :
|
||||
CListModelBase<BlackMisc::Aviation::CAirport, BlackMisc::Aviation::CAirportList>("ViewAirportList", parent)
|
||||
{
|
||||
@@ -45,5 +42,5 @@ namespace BlackGui
|
||||
(void)QT_TRANSLATE_NOOP("ViewAirportList", "elevation");
|
||||
(void)QT_TRANSLATE_NOOP("ViewAirportList", "bearing");
|
||||
}
|
||||
}
|
||||
}
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
@@ -22,9 +22,7 @@ namespace BlackGui
|
||||
namespace Models
|
||||
{
|
||||
|
||||
/*!
|
||||
* Airport list model
|
||||
*/
|
||||
//! Airport list model
|
||||
class BLACKGUI_EXPORT CAirportListModel : public CListModelBase<BlackMisc::Aviation::CAirport, BlackMisc::Aviation::CAirportList>
|
||||
{
|
||||
|
||||
|
||||
@@ -62,10 +62,8 @@ namespace BlackGui
|
||||
//! Set sort column
|
||||
virtual void setSortColumn(int column) { this->m_sortedColumn = column; }
|
||||
|
||||
/*!
|
||||
* Set column for sorting
|
||||
* \param propertyIndex index of column to be sorted
|
||||
*/
|
||||
//! Set column for sorting
|
||||
//! \param propertyIndex index of column to be sorted
|
||||
virtual void setSortColumnByPropertyIndex(const BlackMisc::CPropertyIndex &propertyIndex);
|
||||
|
||||
//! Get sort column property index
|
||||
@@ -100,11 +98,9 @@ namespace BlackGui
|
||||
int ps_updateContainer(const BlackMisc::CVariant &variant, bool sort);
|
||||
|
||||
protected:
|
||||
/*!
|
||||
* Constructor
|
||||
* \param translationContext I18N context
|
||||
* \param parent
|
||||
*/
|
||||
//! Constructor
|
||||
//! \param translationContext I18N context
|
||||
//! \param parent
|
||||
CListModelBaseNonTemplate(const QString &translationContext, QObject *parent = nullptr)
|
||||
: QAbstractItemModel(parent), m_columns(translationContext), m_sortedColumn(-1), m_sortOrder(Qt::AscendingOrder)
|
||||
{
|
||||
@@ -217,11 +213,9 @@ namespace BlackGui
|
||||
protected:
|
||||
std::unique_ptr<IModelFilter<ContainerType> > m_filter; //!< Used filter
|
||||
|
||||
/*!
|
||||
* Constructor
|
||||
* \param translationContext I18N context
|
||||
* \param parent
|
||||
*/
|
||||
//! Constructor
|
||||
//! \param translationContext I18N context
|
||||
//! \param parent
|
||||
CListModelBase(const QString &translationContext, QObject *parent = nullptr)
|
||||
: CListModelBaseNonTemplate(translationContext, parent)
|
||||
{ }
|
||||
|
||||
@@ -14,12 +14,8 @@ namespace BlackGui
|
||||
{
|
||||
namespace Models
|
||||
{
|
||||
|
||||
/*
|
||||
* Constructor
|
||||
*/
|
||||
CServerListModel::CServerListModel(QObject *parent) :
|
||||
CListModelBase("ViewServerList", parent)
|
||||
CListModelBase("ModelServerList", parent)
|
||||
{
|
||||
this->m_columns.addColumn(CColumn::standardString("name", CServer::IndexName));
|
||||
this->m_columns.addColumn(CColumn::standardString("description", CServer::IndexDescription));
|
||||
@@ -29,12 +25,12 @@ namespace BlackGui
|
||||
this->m_columns.addColumn(CColumn::standardString("userid", { CServer::IndexUser, CUser::IndexId}));
|
||||
|
||||
// force strings for translation in resource files
|
||||
(void)QT_TRANSLATE_NOOP("ViewServerList", "name");
|
||||
(void)QT_TRANSLATE_NOOP("ViewServerList", "description");
|
||||
(void)QT_TRANSLATE_NOOP("ViewServerList", "address");
|
||||
(void)QT_TRANSLATE_NOOP("ViewServerList", "port");
|
||||
(void)QT_TRANSLATE_NOOP("ViewServerList", "realname");
|
||||
(void)QT_TRANSLATE_NOOP("ViewServerList", "userid");
|
||||
(void)QT_TRANSLATE_NOOP("ModelServerList", "name");
|
||||
(void)QT_TRANSLATE_NOOP("ModelServerList", "description");
|
||||
(void)QT_TRANSLATE_NOOP("ModelServerList", "address");
|
||||
(void)QT_TRANSLATE_NOOP("ModelServerList", "port");
|
||||
(void)QT_TRANSLATE_NOOP("ModelServerList", "realname");
|
||||
(void)QT_TRANSLATE_NOOP("ModelServerList", "userid");
|
||||
}
|
||||
|
||||
} // class
|
||||
|
||||
@@ -24,7 +24,6 @@ namespace BlackGui
|
||||
//! Server list model
|
||||
class BLACKGUI_EXPORT CServerListModel : public CListModelBase<BlackMisc::Network::CServer, BlackMisc::Network::CServerList>
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
//! Constructor
|
||||
@@ -33,6 +32,6 @@ namespace BlackGui
|
||||
//! Destructor
|
||||
virtual ~CServerListModel() {}
|
||||
};
|
||||
}
|
||||
}
|
||||
} // ns
|
||||
} // ns
|
||||
#endif // guard
|
||||
|
||||
@@ -21,9 +21,6 @@ namespace BlackGui
|
||||
{
|
||||
namespace Models
|
||||
{
|
||||
/*
|
||||
* Constructor
|
||||
*/
|
||||
CSimulatedAircraftListModel::CSimulatedAircraftListModel(QObject *parent) : CListModelBase("ModelSimulatedAircraftList", parent)
|
||||
{
|
||||
this->setAircraftMode(InfoMode);
|
||||
|
||||
@@ -18,9 +18,6 @@ namespace BlackGui
|
||||
{
|
||||
namespace Models
|
||||
{
|
||||
/*
|
||||
* Constructor
|
||||
*/
|
||||
CTextMessageListModel::CTextMessageListModel(TextMessageMode mode, QObject *parent) :
|
||||
CListModelBase("ModelTextMessageList", parent), m_textMessageMode(NotSet)
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace BlackGui
|
||||
{
|
||||
namespace Models
|
||||
{
|
||||
//! ATC list model
|
||||
//! Text message list model
|
||||
class BLACKGUI_EXPORT CTextMessageListModel : public CListModelBase<BlackMisc::Network::CTextMessage, BlackMisc::Network::CTextMessageList>
|
||||
{
|
||||
|
||||
@@ -51,6 +51,6 @@ namespace BlackGui
|
||||
private:
|
||||
TextMessageMode m_textMessageMode = NotSet;
|
||||
};
|
||||
}
|
||||
}
|
||||
} // ns
|
||||
} // ns
|
||||
#endif // guard
|
||||
|
||||
Reference in New Issue
Block a user