Formatting, new icons

This commit is contained in:
Klaus Basan
2014-09-16 13:40:08 +02:00
parent b989dec74d
commit 5d6713032f
16 changed files with 72 additions and 29 deletions

View File

@@ -16,7 +16,10 @@ namespace BlackGui
{
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);
m_timerComponent = new CTimerBasedComponent(SLOT(update()), this);

View File

@@ -7,14 +7,14 @@
* contained in the LICENSE file.
*/
//! \file
#include "atcstationcomponent.h"
#include "../views/atcstationview.h"
#include "ui_atcstationcomponent.h"
#include "blackmisc/avinformationmessage.h"
#include "blackmisc/logmessage.h"
//! \file
using namespace BlackGui::Models;
using namespace BlackGui::Views;
using namespace BlackMisc::Aviation;
@@ -94,6 +94,7 @@ namespace BlackGui
bool hasData = this->countBookedStations() > 0 || this->countOnlineStations() > 0;
if (hasData && !this->isVisibleWidget())
{
// KWB remove: qDebug() will be removed soo
qDebug() << this->objectName() << "Skipping update, not visible";
return;
}
@@ -239,5 +240,5 @@ namespace BlackGui
if (!this->getIContextNetwork()->isConnected()) return;
this->getIContextNetwork()->requestAtisUpdates();
}
}
}
} // namespace
} // namespace

View File

@@ -101,13 +101,19 @@ namespace BlackGui
//! Request dummy ATC online stations
void ps_testCreateDummyOnlineAtcStations(int number);
//! Request udpate
void ps_requestOnlineStationsUpdate();
//! Info area tab bar has changed
void ps_infoAreaTabBarChanged(int index);
private:
Ui::CAtcStationComponent *ui;
CTimerBasedComponent *m_timerComponent;
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_timestampBookedStationsChanged = CTimerBasedComponent::epoch(); //!< stations marked as changed
QDateTime m_timestampBookedStationsChanged = CTimerBasedComponent::epoch(); //!< stations marked as changed
};
}
}

View File

@@ -85,7 +85,7 @@ namespace BlackGui
CTextMessageComponent *getTextMessageComponent();
//! Selected area of non floating areas
InfoArea getSelectedInfoArea() const { return static_cast<InfoArea>(getSelectedInfoAreaIndex()); }
InfoArea getSelectedInfoArea() const { return static_cast<InfoArea>(getSelectedTabBarIndex()); }
public slots:
//! Toggle floating of given area

View File

@@ -31,7 +31,7 @@ namespace BlackGui
//! \sa CDockWidgetInfoBar
class CDockWidget : public QDockWidget
{
// KB TODO: Make this an interface, IDockWidget
// KB TODO: Make this an interface, IDockWidget?
Q_OBJECT
public:

View File

@@ -132,7 +132,7 @@ namespace BlackGui
}
}
int CInfoArea::getSelectedInfoAreaIndex() const
int CInfoArea::getSelectedTabBarIndex() const
{
Q_ASSERT(this->m_tabBar);
if (!this->m_tabBar || this->m_tabBar->count() < 1) return -1;
@@ -347,7 +347,7 @@ namespace BlackGui
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;
for (CDockWidgetInfoArea *dw : this->m_dockableWidgets)

View File

@@ -41,7 +41,7 @@ namespace BlackGui
//! Selected area of non floating areas
//! \remarks -1 for no area
int getSelectedInfoAreaIndex() const;
int getSelectedTabBarIndex() const;
//! Is given widget selected. Means it is not floating, and the one selected
bool isSelectedInfoArea(const CDockWidgetInfoArea *infoArea) const;
@@ -102,7 +102,7 @@ namespace BlackGui
QList<CDockWidgetInfoArea *> dockableWidgets() const;
//! Corresponding dockable widget for given tab index
CDockWidgetInfoArea *getDockableWidgetByTabIndex(int tabBarIndex) const;
CDockWidgetInfoArea *getDockableWidgetByTabBarIndex(int tabBarIndex) const;
//! Features of the dockable widgets
void setFeaturesForDockableWidgets(QDockWidget::DockWidgetFeatures features);

View File

@@ -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)
{

View File

@@ -7,11 +7,11 @@
* contained in the LICENSE file.
*/
//! \file
#ifndef BLACKGUI_AIRPORTVIEW_H
#define BLACKGUI_AIRPORTVIEW_H
//! \file
#include "viewbase.h"
#include "../models/airportlistmodel.h"

View File

@@ -7,11 +7,11 @@
* contained in the LICENSE file.
*/
//! \file
#ifndef BLACKGUI_SERVERVIEW_H
#define BLACKGUI_SERVERVIEW_H
//! \file
#include "viewbase.h"
#include "../models/serverlistmodel.h"

View File

@@ -7,11 +7,11 @@
* contained in the LICENSE file.
*/
//! \file
#ifndef BLACKGUI_VIEWBASE_H
#define BLACKGUI_VIEWBASE_H
//! \file
#include "blackmisc/icons.h"
#include <QTableView>
#include <QMenu>
@@ -22,7 +22,7 @@ namespace BlackGui
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
{
Q_OBJECT

View File

@@ -64,6 +64,13 @@
<file>icons/pastel/16/font-delete.png</file>
<file>icons/pastel/16/table-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 prefix="/vatsim">
<file>icons/vatsim/C1.png</file>

View File

@@ -94,6 +94,8 @@ namespace BlackMisc
CIcon(CIcons::StandardIconHeadingOne16, "heading"),
CIcon(CIcons::StandardIconInfo16, "info"),
CIcon(CIcons::StandardIconJoystick16, "joystick"),
CIcon(CIcons::StandardIconLockClosed16, "lock"),
CIcon(CIcons::StandardIconLockOpen16, "lock open"),
CIcon(CIcons::StandardIconMonitorError16, "monitor error"),
CIcon(CIcons::StandardIconPaperPlane16, "plane"),
CIcon(CIcons::StandardIconPlugin16, "plugin"),

View File

@@ -87,6 +87,8 @@ namespace BlackMisc
StandardIconHeadingOne16,
StandardIconInfo16,
StandardIconJoystick16,
StandardIconLockClosed16,
StandardIconLockOpen16,
StandardIconMonitorError16,
StandardIconPaperPlane16,
StandardIconPlugin16,
@@ -267,6 +269,20 @@ namespace BlackMisc
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
static const QPixmap &plugin16()
{

View File

@@ -1,7 +1,11 @@
/* Copyright (C) 2013 VATSIM Community / authors
* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
/* Copyright (C) 2013
* 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.
*/
#include "setkeyboardhotkeylist.h"
#include "predicates.h"

View File

@@ -1,7 +1,11 @@
/* Copyright (C) 2013 VATSIM Community / authors
* This Source Code Form is subject to the terms of the Mozilla Public
* 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/. */
/* Copyright (C) 2013
* 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