Learn Environment
Signals | Public Member Functions | List of all members
Sidebar Class Reference

Represents the sidebar UI component for displaying tasks. More...

#include <sidebar.hpp>

Inheritance diagram for Sidebar:
Inheritance graph
Collaboration diagram for Sidebar:
Collaboration graph

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Sidebar()

Sidebar::Sidebar ( QWidget parent = nullptr)
explicit

Constructs a Sidebar object.

Parameters
parentPointer to the parent widget.

Member Function Documentation

◆ fillSidebarWithTasks()

void Sidebar::fillSidebarWithTasks ( const QVector< QSharedPointer< Task >> &  tasks)

Populates the sidebar with tasks.

Parameters
tasksVector of shared pointers to the tasks to be displayed.

◆ selectTask()

void Sidebar::selectTask ( int  index)

Selects a task in the sidebar by its index.

Parameters
indexThe index of the task to be selected.

◆ taskSelected

void Sidebar::taskSelected ( int  index)
signal

Signal emitted when a task is selected.

Parameters
indexThe index of the selected task.

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