SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ChannelWindow Class Reference

#include <channelwindow.h>

Inherits QScrollArea.

Public Member Functions

 ChannelWindow (QWidget *parent=NULL)
 
void addRollupWidget (QWidget *rollupWidget)
 

Protected Member Functions

void resizeEvent (QResizeEvent *event)
 

Protected Attributes

QWidget * m_container
 
QBoxLayout * m_layout
 

Detailed Description

Definition at line 12 of file channelwindow.h.

Constructor & Destructor Documentation

◆ ChannelWindow()

ChannelWindow::ChannelWindow ( QWidget *  parent = NULL)

Definition at line 8 of file channelwindow.cpp.

References m_container, and m_layout.

8  :
9  QScrollArea(parent)
10 {
11  m_container = new QWidget(this);
12  m_layout = new QBoxLayout(QBoxLayout::TopToBottom, m_container);
13  setWidget(m_container);
14  setWidgetResizable(true);
15  setBackgroundRole(QPalette::Base);
16  m_layout->setMargin(3);
17  m_layout->setSpacing(3);
18 }
QWidget * m_container
Definition: channelwindow.h:21
QBoxLayout * m_layout
Definition: channelwindow.h:22

Member Function Documentation

◆ addRollupWidget()

void ChannelWindow::addRollupWidget ( QWidget *  rollupWidget)

Definition at line 20 of file channelwindow.cpp.

References m_container.

Referenced by MainWindow::addChannelRollup(), and DeviceUISet::addRollupWidget().

21 {
22  rollupWidget->setParent(m_container);
23  m_container->layout()->addWidget(rollupWidget);
24 }
QWidget * m_container
Definition: channelwindow.h:21
+ Here is the caller graph for this function:

◆ resizeEvent()

void ChannelWindow::resizeEvent ( QResizeEvent *  event)
protected

Definition at line 26 of file channelwindow.cpp.

References m_layout.

27 {
28  if(event->size().height() > event->size().width()) {
29  m_layout->setDirection(QBoxLayout::TopToBottom);
30  m_layout->setAlignment(Qt::AlignTop);
31  } else {
32  m_layout->setDirection(QBoxLayout::LeftToRight);
33  m_layout->setAlignment(Qt::AlignLeft);
34  }
35  QScrollArea::resizeEvent(event);
36 }
QBoxLayout * m_layout
Definition: channelwindow.h:22

Member Data Documentation

◆ m_container

QWidget* ChannelWindow::m_container
protected

Definition at line 21 of file channelwindow.h.

Referenced by addRollupWidget(), and ChannelWindow().

◆ m_layout

QBoxLayout* ChannelWindow::m_layout
protected

Definition at line 22 of file channelwindow.h.

Referenced by ChannelWindow(), and resizeEvent().


The documentation for this class was generated from the following files: