swift
coreinfoareacomponent.cpp
1 // SPDX-FileCopyrightText: Copyright (C) 2015 swift Project Community / Contributors
2 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3 
5 
6 #include "ui_coreinfoareacomponent.h"
7 
8 #include "gui/infoarea.h"
9 #include "misc/icons.h"
10 
11 using namespace swift::misc;
12 using namespace swift::gui;
13 
14 namespace swift::gui::components
15 {
16  CCoreInfoAreaComponent::CCoreInfoAreaComponent(QWidget *parent)
17  : CInfoArea(parent), ui(new Ui::CCoreInfoAreaComponent)
18  {
19  ui->setupUi(this);
20  initInfoArea();
21  toggleTabBarLocked(true);
22  }
23 
25 
27 
29 
31  {
32  InfoArea area = static_cast<InfoArea>(areaIndex);
33  switch (area)
34  {
35  case InfoAreaLog: return QSize(400, 300);
36  default: return QSize(400, 300);
37  }
38  }
39 
40  const QPixmap &CCoreInfoAreaComponent::indexToPixmap(int areaIndex) const
41  {
42  InfoArea area = static_cast<InfoArea>(areaIndex);
43  switch (area)
44  {
45  case InfoAreaLog: return CIcons::appLog16();
46  default: return CIcons::statusBar16();
47  }
48  }
49 } // namespace swift::gui::components
Info area, hosting dockable widgets.
Definition: infoarea.h:41
void initInfoArea()
Init area after(!) GUI is initialized.
Definition: infoarea.cpp:47
void toggleTabBarLocked(bool locked)
Toogle lock tabbar.
Definition: infoarea.cpp:872
virtual const QPixmap & indexToPixmap(int areaIndex) const
Info area (index) to icon.
CCoreStatusComponent * getStatusComponent()
Simulator.
virtual QSize getPreferredSizeWhenFloating(int areaIndex) const
Preferred size when floating (size hint)
Display status information about the core.
GUI displaying log and status messages.
Definition: logcomponent.h:45
High level reusable GUI components.
Definition: aboutdialog.cpp:13
GUI related classes.
Free functions in swift::misc.