mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-25 02:05:43 +08:00
Formatting, new icons
This commit is contained in:
@@ -16,7 +16,10 @@ namespace BlackGui
|
|||||||
{
|
{
|
||||||
|
|
||||||
CAircraftComponent::CAircraftComponent(QWidget *parent) :
|
CAircraftComponent::CAircraftComponent(QWidget *parent) :
|
||||||
QTabWidget(parent), CRuntimeBasedComponent(nullptr, false), ui(new Ui::CAircraftComponent), m_timerComponent(nullptr)
|
QTabWidget(parent),
|
||||||
|
CDockWidgetInfoAreaComponent(this),
|
||||||
|
CRuntimeBasedComponent(nullptr, false),
|
||||||
|
ui(new Ui::CAircraftComponent), m_timerComponent(nullptr)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
m_timerComponent = new CTimerBasedComponent(SLOT(update()), this);
|
m_timerComponent = new CTimerBasedComponent(SLOT(update()), this);
|
||||||
|
|||||||
@@ -7,14 +7,14 @@
|
|||||||
* contained in the LICENSE file.
|
* contained in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
//! \file
|
||||||
|
|
||||||
#include "atcstationcomponent.h"
|
#include "atcstationcomponent.h"
|
||||||
#include "../views/atcstationview.h"
|
#include "../views/atcstationview.h"
|
||||||
#include "ui_atcstationcomponent.h"
|
#include "ui_atcstationcomponent.h"
|
||||||
#include "blackmisc/avinformationmessage.h"
|
#include "blackmisc/avinformationmessage.h"
|
||||||
#include "blackmisc/logmessage.h"
|
#include "blackmisc/logmessage.h"
|
||||||
|
|
||||||
//! \file
|
|
||||||
|
|
||||||
using namespace BlackGui::Models;
|
using namespace BlackGui::Models;
|
||||||
using namespace BlackGui::Views;
|
using namespace BlackGui::Views;
|
||||||
using namespace BlackMisc::Aviation;
|
using namespace BlackMisc::Aviation;
|
||||||
@@ -94,6 +94,7 @@ namespace BlackGui
|
|||||||
bool hasData = this->countBookedStations() > 0 || this->countOnlineStations() > 0;
|
bool hasData = this->countBookedStations() > 0 || this->countOnlineStations() > 0;
|
||||||
if (hasData && !this->isVisibleWidget())
|
if (hasData && !this->isVisibleWidget())
|
||||||
{
|
{
|
||||||
|
// KWB remove: qDebug() will be removed soo
|
||||||
qDebug() << this->objectName() << "Skipping update, not visible";
|
qDebug() << this->objectName() << "Skipping update, not visible";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -239,5 +240,5 @@ namespace BlackGui
|
|||||||
if (!this->getIContextNetwork()->isConnected()) return;
|
if (!this->getIContextNetwork()->isConnected()) return;
|
||||||
this->getIContextNetwork()->requestAtisUpdates();
|
this->getIContextNetwork()->requestAtisUpdates();
|
||||||
}
|
}
|
||||||
}
|
} // namespace
|
||||||
}
|
} // namespace
|
||||||
|
|||||||
@@ -101,13 +101,19 @@ namespace BlackGui
|
|||||||
//! Request dummy ATC online stations
|
//! Request dummy ATC online stations
|
||||||
void ps_testCreateDummyOnlineAtcStations(int number);
|
void ps_testCreateDummyOnlineAtcStations(int number);
|
||||||
|
|
||||||
|
//! Request udpate
|
||||||
|
void ps_requestOnlineStationsUpdate();
|
||||||
|
|
||||||
|
//! Info area tab bar has changed
|
||||||
|
void ps_infoAreaTabBarChanged(int index);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::CAtcStationComponent *ui;
|
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
|
||||||
QDateTime m_timestampLastReadBookedStations = CTimerBasedComponent::epoch(); //!< stations read
|
QDateTime m_timestampLastReadBookedStations = CTimerBasedComponent::epoch(); //!< stations read
|
||||||
QDateTime m_timestampBookedStationsChanged = CTimerBasedComponent::epoch(); //!< stations marked as changed
|
QDateTime m_timestampBookedStationsChanged = CTimerBasedComponent::epoch(); //!< stations marked as changed
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ namespace BlackGui
|
|||||||
CTextMessageComponent *getTextMessageComponent();
|
CTextMessageComponent *getTextMessageComponent();
|
||||||
|
|
||||||
//! Selected area of non floating areas
|
//! Selected area of non floating areas
|
||||||
InfoArea getSelectedInfoArea() const { return static_cast<InfoArea>(getSelectedInfoAreaIndex()); }
|
InfoArea getSelectedInfoArea() const { return static_cast<InfoArea>(getSelectedTabBarIndex()); }
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
//! Toggle floating of given area
|
//! Toggle floating of given area
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ namespace BlackGui
|
|||||||
//! \sa CDockWidgetInfoBar
|
//! \sa CDockWidgetInfoBar
|
||||||
class CDockWidget : public QDockWidget
|
class CDockWidget : public QDockWidget
|
||||||
{
|
{
|
||||||
// KB TODO: Make this an interface, IDockWidget
|
// KB TODO: Make this an interface, IDockWidget?
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ namespace BlackGui
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int CInfoArea::getSelectedInfoAreaIndex() const
|
int CInfoArea::getSelectedTabBarIndex() const
|
||||||
{
|
{
|
||||||
Q_ASSERT(this->m_tabBar);
|
Q_ASSERT(this->m_tabBar);
|
||||||
if (!this->m_tabBar || this->m_tabBar->count() < 1) return -1;
|
if (!this->m_tabBar || this->m_tabBar->count() < 1) return -1;
|
||||||
@@ -347,7 +347,7 @@ namespace BlackGui
|
|||||||
return this->m_tabBar->count();
|
return this->m_tabBar->count();
|
||||||
}
|
}
|
||||||
|
|
||||||
CDockWidgetInfoArea *CInfoArea::getDockableWidgetByTabIndex(int tabBarIndex) const
|
CDockWidgetInfoArea *CInfoArea::getDockableWidgetByTabBarIndex(int tabBarIndex) const
|
||||||
{
|
{
|
||||||
if (tabBarIndex >= this->m_dockableWidgets.count() || tabBarIndex < 0) return nullptr;
|
if (tabBarIndex >= this->m_dockableWidgets.count() || tabBarIndex < 0) return nullptr;
|
||||||
for (CDockWidgetInfoArea *dw : this->m_dockableWidgets)
|
for (CDockWidgetInfoArea *dw : this->m_dockableWidgets)
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ namespace BlackGui
|
|||||||
|
|
||||||
//! Selected area of non floating areas
|
//! Selected area of non floating areas
|
||||||
//! \remarks -1 for no area
|
//! \remarks -1 for no area
|
||||||
int getSelectedInfoAreaIndex() const;
|
int getSelectedTabBarIndex() const;
|
||||||
|
|
||||||
//! Is given widget selected. Means it is not floating, and the one selected
|
//! Is given widget selected. Means it is not floating, and the one selected
|
||||||
bool isSelectedInfoArea(const CDockWidgetInfoArea *infoArea) const;
|
bool isSelectedInfoArea(const CDockWidgetInfoArea *infoArea) const;
|
||||||
@@ -102,7 +102,7 @@ namespace BlackGui
|
|||||||
QList<CDockWidgetInfoArea *> dockableWidgets() const;
|
QList<CDockWidgetInfoArea *> dockableWidgets() const;
|
||||||
|
|
||||||
//! Corresponding dockable widget for given tab index
|
//! Corresponding dockable widget for given tab index
|
||||||
CDockWidgetInfoArea *getDockableWidgetByTabIndex(int tabBarIndex) const;
|
CDockWidgetInfoArea *getDockableWidgetByTabBarIndex(int tabBarIndex) const;
|
||||||
|
|
||||||
//! Features of the dockable widgets
|
//! Features of the dockable widgets
|
||||||
void setFeaturesForDockableWidgets(QDockWidget::DockWidgetFeatures features);
|
void setFeaturesForDockableWidgets(QDockWidget::DockWidgetFeatures features);
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ namespace BlackGui
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Sort
|
* Sort requested by abstract model
|
||||||
*/
|
*/
|
||||||
template <typename ObjectType, typename ContainerType> void CListModelBase<ObjectType, ContainerType>::sort(int column, Qt::SortOrder order)
|
template <typename ObjectType, typename ContainerType> void CListModelBase<ObjectType, ContainerType>::sort(int column, Qt::SortOrder order)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,11 +7,11 @@
|
|||||||
* contained in the LICENSE file.
|
* contained in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
//! \file
|
||||||
|
|
||||||
#ifndef BLACKGUI_AIRPORTVIEW_H
|
#ifndef BLACKGUI_AIRPORTVIEW_H
|
||||||
#define BLACKGUI_AIRPORTVIEW_H
|
#define BLACKGUI_AIRPORTVIEW_H
|
||||||
|
|
||||||
//! \file
|
|
||||||
|
|
||||||
#include "viewbase.h"
|
#include "viewbase.h"
|
||||||
#include "../models/airportlistmodel.h"
|
#include "../models/airportlistmodel.h"
|
||||||
|
|
||||||
|
|||||||
@@ -7,11 +7,11 @@
|
|||||||
* contained in the LICENSE file.
|
* contained in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
//! \file
|
||||||
|
|
||||||
#ifndef BLACKGUI_SERVERVIEW_H
|
#ifndef BLACKGUI_SERVERVIEW_H
|
||||||
#define BLACKGUI_SERVERVIEW_H
|
#define BLACKGUI_SERVERVIEW_H
|
||||||
|
|
||||||
//! \file
|
|
||||||
|
|
||||||
#include "viewbase.h"
|
#include "viewbase.h"
|
||||||
#include "../models/serverlistmodel.h"
|
#include "../models/serverlistmodel.h"
|
||||||
|
|
||||||
|
|||||||
@@ -7,11 +7,11 @@
|
|||||||
* contained in the LICENSE file.
|
* contained in the LICENSE file.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
//! \file
|
||||||
|
|
||||||
#ifndef BLACKGUI_VIEWBASE_H
|
#ifndef BLACKGUI_VIEWBASE_H
|
||||||
#define BLACKGUI_VIEWBASE_H
|
#define BLACKGUI_VIEWBASE_H
|
||||||
|
|
||||||
//! \file
|
|
||||||
|
|
||||||
#include "blackmisc/icons.h"
|
#include "blackmisc/icons.h"
|
||||||
#include <QTableView>
|
#include <QTableView>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
@@ -22,7 +22,7 @@ namespace BlackGui
|
|||||||
namespace Views
|
namespace Views
|
||||||
{
|
{
|
||||||
|
|
||||||
//! Non templated base class, allows Q_OBJECT and signals
|
//! Non templated base class, allows Q_OBJECT and signals to be used
|
||||||
class CViewBaseNonTemplate : public QTableView
|
class CViewBaseNonTemplate : public QTableView
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|||||||
@@ -64,6 +64,13 @@
|
|||||||
<file>icons/pastel/16/font-delete.png</file>
|
<file>icons/pastel/16/font-delete.png</file>
|
||||||
<file>icons/pastel/16/table-delete.png</file>
|
<file>icons/pastel/16/table-delete.png</file>
|
||||||
<file>icons/pastel/16/table-row-delete.png</file>
|
<file>icons/pastel/16/table-row-delete.png</file>
|
||||||
|
<file>icons/pastel/16/lock.png</file>
|
||||||
|
<file>icons/pastel/16/lock-add.png</file>
|
||||||
|
<file>icons/pastel/16/lock-broken.png</file>
|
||||||
|
<file>icons/pastel/16/lock-delete.png</file>
|
||||||
|
<file>icons/pastel/16/lock-edit.png</file>
|
||||||
|
<file>icons/pastel/16/lock-go.png</file>
|
||||||
|
<file>icons/pastel/16/lock-open.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
<qresource prefix="/vatsim">
|
<qresource prefix="/vatsim">
|
||||||
<file>icons/vatsim/C1.png</file>
|
<file>icons/vatsim/C1.png</file>
|
||||||
|
|||||||
@@ -94,6 +94,8 @@ namespace BlackMisc
|
|||||||
CIcon(CIcons::StandardIconHeadingOne16, "heading"),
|
CIcon(CIcons::StandardIconHeadingOne16, "heading"),
|
||||||
CIcon(CIcons::StandardIconInfo16, "info"),
|
CIcon(CIcons::StandardIconInfo16, "info"),
|
||||||
CIcon(CIcons::StandardIconJoystick16, "joystick"),
|
CIcon(CIcons::StandardIconJoystick16, "joystick"),
|
||||||
|
CIcon(CIcons::StandardIconLockClosed16, "lock"),
|
||||||
|
CIcon(CIcons::StandardIconLockOpen16, "lock open"),
|
||||||
CIcon(CIcons::StandardIconMonitorError16, "monitor error"),
|
CIcon(CIcons::StandardIconMonitorError16, "monitor error"),
|
||||||
CIcon(CIcons::StandardIconPaperPlane16, "plane"),
|
CIcon(CIcons::StandardIconPaperPlane16, "plane"),
|
||||||
CIcon(CIcons::StandardIconPlugin16, "plugin"),
|
CIcon(CIcons::StandardIconPlugin16, "plugin"),
|
||||||
|
|||||||
@@ -87,6 +87,8 @@ namespace BlackMisc
|
|||||||
StandardIconHeadingOne16,
|
StandardIconHeadingOne16,
|
||||||
StandardIconInfo16,
|
StandardIconInfo16,
|
||||||
StandardIconJoystick16,
|
StandardIconJoystick16,
|
||||||
|
StandardIconLockClosed16,
|
||||||
|
StandardIconLockOpen16,
|
||||||
StandardIconMonitorError16,
|
StandardIconMonitorError16,
|
||||||
StandardIconPaperPlane16,
|
StandardIconPaperPlane16,
|
||||||
StandardIconPlugin16,
|
StandardIconPlugin16,
|
||||||
@@ -267,6 +269,20 @@ namespace BlackMisc
|
|||||||
return pm;
|
return pm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//! Lock
|
||||||
|
static const QPixmap &lockOpen16()
|
||||||
|
{
|
||||||
|
static const QPixmap pm(":/pastel/icons/pastel/16/lock-open.png");
|
||||||
|
return pm;
|
||||||
|
}
|
||||||
|
|
||||||
|
//! Lock
|
||||||
|
static const QPixmap &lockClosed16()
|
||||||
|
{
|
||||||
|
static const QPixmap pm(":/pastel/icons/pastel/16/lock.png");
|
||||||
|
return pm;
|
||||||
|
}
|
||||||
|
|
||||||
//! Plugin
|
//! Plugin
|
||||||
static const QPixmap &plugin16()
|
static const QPixmap &plugin16()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
/* Copyright (C) 2013 VATSIM Community / authors
|
/* Copyright (C) 2013
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* swift Project Community / Contributors
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
*
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
#include "setkeyboardhotkeylist.h"
|
#include "setkeyboardhotkeylist.h"
|
||||||
#include "predicates.h"
|
#include "predicates.h"
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
/* Copyright (C) 2013 VATSIM Community / authors
|
/* Copyright (C) 2013
|
||||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
* swift Project Community / Contributors
|
||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
*
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* 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
|
//! \file
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user