Go to the documentation of this file.
10 #include <QVBoxLayout>
12 #include <QToolButton>
13 #include <QPushButton>
42 TaskUI(QVBoxLayout *subtaskListLayout, QLabel *mainTitleLabel,
43 QLabel *difficultyLabel, QLabel *folderLabel, QLabel *topicLabel,
44 QPushButton *nextButton, QPushButton *previousButton, QToolButton *menuButton,
45 QToolButton *resetRobotStartButton,
QFrame *resetRobotFrame,
QWidget *centralwidget,
QWidget *parent =
nullptr);
51 void initializeUI(
const QVector<QSharedPointer<Task>> &tasks);
58 void setTaskUI(
int currentTaskIndex,
const QVector<QSharedPointer<Task>> &tasks);
99 void toggleSidebarVisibility();
103 QVBoxLayout *subtaskListLayout;
104 QLabel *mainTitleLabel;
105 QLabel *difficultyLabel;
108 QPushButton *nextButton;
109 QPushButton *previousButton;
110 QToolButton *menuButton;
111 QToolButton *resetRobotStartButton;
122 void setSubtaskItems(
int currentTaskIndex,
const QVector<QSharedPointer<Task>> &tasks);
127 void addLineBetweenWidgets();
132 void setupSplitterAndLayout();
Manages tasks and their execution within the application.
Definition: task_manager.hpp:20
void setTaskUI(int currentTaskIndex, const QVector< QSharedPointer< Task >> &tasks)
Sets the UI elements for the current task.
TaskUI(QVBoxLayout *subtaskListLayout, QLabel *mainTitleLabel, QLabel *difficultyLabel, QLabel *folderLabel, QLabel *topicLabel, QPushButton *nextButton, QPushButton *previousButton, QToolButton *menuButton, QToolButton *resetRobotStartButton, QFrame *resetRobotFrame, QWidget *centralwidget, QWidget *parent=nullptr)
Constructs a TaskUI object.
void selectTask(int index)
Selects a task by its index.
Definition: task_manager.cpp:88
void updateSubtaskItemsUI()
Updates the UI elements for the subtasks.
Manages the user interface for tasks and subtasks.
Definition: task_ui.hpp:24
void forceResetRobot()
Forces the reset of the robot to its initial state.
Definition: task_manager.cpp:170
void finishedRobotResetUI()
Update the UI to show that the robot reset has finished.
void nextTask()
Slot for changing to the next task.
Definition: task_manager.cpp:113
void setImage(const QString &path)
Sets the image to be displayed.
Definition: execute_frame.cpp:52
void setTaskManager(TaskManager *manager)
Sets the TaskManager object.
Represents a UI item for a subtask.
Definition: subtask_item.hpp:25
QString getText()
Gets the current text being displayed.
Definition: execute_frame.cpp:93
void setText(const QString &text)
Sets the text to be displayed.
Definition: execute_frame.cpp:84
void startedRobotResetUI(bool noSubtasksLeft)
Update the UI to show that the robot reset has been started.
void previousTask()
Slot for changing to the previous task.
Definition: task_manager.cpp:120
void initializeUI(const QVector< QSharedPointer< Task >> &tasks)
Initializes the UI with the loaded tasks.
void taskSelected(int index)
Signal emitted when a task is selected.
void updateUI(bool constructorCall=false)
Updates the UI elements based on the subtask's status.
Definition: subtask_item.cpp:88
Represents a subtask within a task.
Definition: task.hpp:31
A custom QFrame that displays an image and text. For logging and task execution.
Definition: execute_frame.hpp:13
void setTaskManager(TaskManager *manager)
Sets the TaskManager object.
Definition: subtask_item.cpp:151
void failedRobotResetUI(const QString &error)
Update the UI to show that the robot reset has failed.