swift
Loading...
Searching...
No Matches
cockpitinfoareacomponent.cpp
1// SPDX-FileCopyrightText: Copyright (C) 2013 swift Project Community / Contributors
2// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3
5
6#include <QTabWidget>
7#include <QtGlobal>
8
9#include "ui_cockpitinfoareacomponent.h"
10
11#include "gui/infoarea.h"
12#include "misc/icons.h"
13
14using namespace swift::misc;
15
17{
26
28
30 {
31 // see also CMainInfoAreaComponent::getPreferredSizeWhenFloating
32 Q_UNUSED(areaIndex)
33 return { 600, 400 };
34 }
35
37 {
38 const auto area = static_cast<InfoArea>(areaIndex);
39 switch (area)
40 {
41 case InfoAreaAudio: return CIcons::appAudio16();
42 case InfoAreaNotifications: return CIcons::appVoiceRooms16();
43 case InfoAreaAdvanced: return CIcons::appSettings16();
44 default: return CIcons::empty();
45 }
46 }
47
48} // namespace swift::gui::components
CInfoArea(QWidget *parent=nullptr)
Constructor.
Definition infoarea.cpp:38
void setTabBarPosition(QTabWidget::TabPosition position)
Tab position for docked widgets tab.
void initInfoArea()
Init area after(!) GUI is initialized.
Definition infoarea.cpp:45
void toggleTabBarLocked(bool locked)
Toogle lock tabbar.
const QPixmap & indexToPixmap(int areaIndex) const
Info area (index) to icon.
CCockpitInfoAreaComponent(QWidget *parent=nullptr)
Destructor.
QSize getPreferredSizeWhenFloating(int areaIndex) const
Preferred size when floating (size hint).
static const QPixmap & appSettings16()
Application settings.
static const QPixmap & appVoiceRooms16()
Voice rooms.
static const QPixmap & empty()
Empty icon.
static const QPixmap & appAudio16()
Application audio.
High level reusable GUI components.
Free functions in swift::misc.
QObject * parent() const const
QWidget(QWidget *parent, Qt::WindowFlags f)