mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 12:55:33 +08:00
* Include only what is used * Use forward declaration when possible * Sorted includes refs #598
60 lines
1.8 KiB
C++
60 lines
1.8 KiB
C++
/* 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 "blackgui/components/cockpitinfoareacomponent.h"
|
|
#include "blackgui/infoarea.h"
|
|
#include "blackmisc/icons.h"
|
|
#include "ui_cockpitinfoareacomponent.h"
|
|
|
|
#include <QTabWidget>
|
|
#include <QtGlobal>
|
|
|
|
using namespace BlackMisc;
|
|
|
|
namespace BlackGui
|
|
{
|
|
namespace Components
|
|
{
|
|
|
|
CCockpitInfoAreaComponent::CCockpitInfoAreaComponent(QWidget *parent) :
|
|
CInfoArea(parent),
|
|
ui(new Ui::CCockpitInfoAreaComponent)
|
|
{
|
|
ui->setupUi(this);
|
|
this->initInfoArea();
|
|
this->ps_setTabBarPosition(QTabWidget::North);
|
|
this->ps_toggleTabBarLocked(true);
|
|
}
|
|
|
|
CCockpitInfoAreaComponent::~CCockpitInfoAreaComponent()
|
|
{ }
|
|
|
|
QSize CCockpitInfoAreaComponent::getPreferredSizeWhenFloating(int areaIndex) const
|
|
{
|
|
Q_UNUSED(areaIndex);
|
|
return QSize(600, 400);
|
|
}
|
|
|
|
const QPixmap &CCockpitInfoAreaComponent::indexToPixmap(int areaIndex) const
|
|
{
|
|
InfoArea area = static_cast<InfoArea>(areaIndex);
|
|
switch (area)
|
|
{
|
|
case InfoAreaAudio:
|
|
return CIcons::appAudio16();
|
|
case InfoAreaVoiceRooms:
|
|
return CIcons::appVoiceRooms16();
|
|
default:
|
|
return CIcons::empty();
|
|
}
|
|
}
|
|
|
|
} // namespace
|
|
} // namespace
|