6 #ifndef CNOID_BASE_TASK_VIEW_H
7 #define CNOID_BASE_TASK_VIEW_H
10 #include <cnoid/AbstractTaskSequencer>
12 #include "exportdecl.h"
27 virtual void activate(
bool on =
true);
28 virtual bool isActive();
29 virtual void addTask(
Task* task);
30 virtual bool updateTask(
Task* task);
31 virtual bool removeTask(
Task* task);
34 virtual void clearTasks();
35 virtual int numTasks()
const;
36 virtual Task* task(
int index);
37 virtual int currentTaskIndex()
const;
38 virtual bool setCurrentTask(
int taskIndex);
39 virtual SignalProxy<void()> sigCurrentTaskChanged();
40 virtual int currentPhaseIndex()
const;
41 virtual void setCurrentPhase(
int phaseIndex);
42 virtual SignalProxy<void()> sigCurrentPhaseChanged();
43 virtual int currentCommandIndex()
const;
44 virtual void executeCommand(
int commandIndex);
45 virtual SignalProxy<void()> sigCurrentCommandChanged();
46 virtual bool isBusy()
const;
48 virtual void cancelCurrentCommand();
49 virtual SignalProxy<void()> sigCurrentCommandCanceled();
50 virtual bool isAutoMode()
const;
51 virtual void setAutoMode(
bool on);
52 virtual SignalProxy<void(
bool isAutoMode)> sigAutoModeToggled();
53 virtual void serializeTasks(
const std::vector<std::string>& tasks);
55 void setNoExecutionMode(
bool on);
56 bool isNoExecutionMode()
const;
57 void setCurrentCommand(
int commandIndex,
bool doExecution);
58 void setBusyState(
bool on);
60 void executeMenuItem(
int index);
61 void checkMenuItem(
int index,
bool on);
62 std::vector<bool> menuItemCheckStates()
const;
66 void showMenu(std::vector<bool> checkStates);
67 SignalProxy<void(
int index)> sigMenuItemTriggered();
68 SignalProxy<void(
int index,
bool on)> sigMenuItemToggled();
71 virtual bool storeState(
Archive& archive);
72 virtual bool restoreState(
const Archive& archive);