Learn Environment
|
Represents the sidebar UI component for displaying tasks. More...
#include <sidebar.hpp>
Signals | |
void | taskSelected (int index) |
Signal emitted when a task is selected. More... | |
Public Member Functions | |
Sidebar (QWidget *parent=nullptr) | |
Constructs a Sidebar object. More... | |
void | fillSidebarWithTasks (const QVector< QSharedPointer< Task >> &tasks) |
Populates the sidebar with tasks. More... | |
void | selectTask (int index) |
Selects a task in the sidebar by its index. More... | |
Represents the sidebar UI component for displaying tasks.
The Sidebar class is responsible for displaying a list of tasks in a sidebar. It provides functionalities to populate the sidebar with tasks, handle user interactions, and select tasks programmatically.
|
explicit |
Constructs a Sidebar object.
parent | Pointer to the parent widget. |
void Sidebar::fillSidebarWithTasks | ( | const QVector< QSharedPointer< Task >> & | tasks | ) |
Populates the sidebar with tasks.
tasks | Vector of shared pointers to the tasks to be displayed. |
void Sidebar::selectTask | ( | int | index | ) |
Selects a task in the sidebar by its index.
index | The index of the task to be selected. |
|
signal |
Signal emitted when a task is selected.
index | The index of the selected task. |