1#include "widgets/board.hpp"
5#include "widgets/grid_view.hpp"
6#include "widgets/stream_cell.hpp"
8board::board(QWidget* parent)
10 , grid(
new grid_view(
this))
11 , active_container(
new QWidget(
this))
12 , active_layout(
new QVBoxLayout(active_container))
16 active_container->setLayout(active_layout);
18 auto* outer =
new QVBoxLayout(
this);
19 outer->setContentsMargins(0, 0, 0, 0);
22 outer->addWidget(active_container, 3);
24 outer->addWidget(
grid, 1);
27 active_container->hide();
35 if (!
grid || name.isEmpty()) {
53 active_container->show();
55 cell->setParent(active_container);
58 cell->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
63 active_container->updateGeometry();
76 active_container->hide();
77 active_container->updateGeometry();
88 active_container->hide();
89 active_container->updateGeometry();
void clear_active()
Clear active mode and return the active cell to the grid.
board(QWidget *parent=nullptr)
Construct the board widget.
void set_active_stream(const QString &name)
Make a stream active by name.
stream_cell * active_cell() const
Get the currently active (focused) stream cell, if any.
QVBoxLayout * active_layout
Layout inside active_container.
grid_view * grid_mode() const
Access the grid view (thumbnail mode).
stream_cell * take_active_cell()
Detach and return the active cell without putting it back to grid.
stream_cell * active_tile
Currently active stream cell (reparented into active container).
grid_view * grid
Grid view holding all non-active stream cells.
grid_view(QWidget *parent=nullptr)
Construct an empty grid view.
stream_cell * take_stream_cell(const QString &name)
Detach a stream cell from the grid without deleting it.
void put_stream_cell(stream_cell *cell)
Return a previously taken cell back into the grid.
void set_active(bool val)
Set active (focused) state.
const QString & get_name() const
Get logical name of this stream cell.
Instance of a persistent (saved) line to be rendered on the stream.