Open Inventor Release 2024.1.3
 
Loading...
Searching...
No Matches
SoProgressIndicator.h
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2019 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : VSG (MMM YYYY)
22**=======================================================================*/
23#pragma once
24
25#include <Inventor/SbEventArg.h>
26#include <Inventor/SbEventHandler.h>
27
53{
54
55public:
60
62
67 struct TaskEventArg : public SbEventArg
68 {
69 TaskEventArg(SoNode* src, const SbString& eventName, unsigned int numTasks, unsigned int numTasksDone, unsigned int numSubTasks );
71
73 SoNode* getSource() const;
74
76 const SbString& getEventName() const;
77
78 /* @return number of tasks that will be done by the SoNode. */
79 unsigned int getNumTasks() const;
80
81 /* @return total number of tasks done since the beginning. */
82 unsigned int getNumTasksDone() const;
83
84 /* @return number of subtasks that will be executed during this task. */
85 unsigned int getNumSubTasks() const;
86
87 private:
88 unsigned int m_numTasksDone;
89
90 private:
91 SoNode* m_src;
92 SbString* m_eventName; // unique
93 unsigned int m_numTasks;
94 unsigned int m_numSubTasks;
95 };
96
102 {
103 SubTaskEventArg(SoNode* src, const SbString& eventName, unsigned int numSubTasks, unsigned int numSubTasksDone, unsigned int numSteps);
104
106
109
111 const SbString& getEventName() const;
112
113 /* @return number of subtask that will be done by the parent task. */
114 unsigned int getNumSubTasks() const;
115
116 /* @return total number of subtasks done since task beginning. */
117 unsigned int getNumSubTasksDone() const;
118
119 /* @return number of steps(iterations) that will be executed during this subtask. */
120 unsigned int getNumSteps() const;
121
122 private:
123 unsigned int m_numSubTasksDone;
124
125 private:
126 SoNode* m_src;
127 SbString* m_eventName; // unique
128 unsigned int m_numSubTasks;
129 unsigned int m_numSteps;
130 };
131
136 struct StepEventArg : public SbEventArg
137 {
138 StepEventArg(SoNode* src, const SbString& eventName, unsigned int numSteps, unsigned int numStepsDone);
139
141
144
146 const SbString& getEventName() const;
147
148 /* @return number of steps that will be done by the parent subtask. */
149 unsigned int getNumSteps() const;
150
151 /* @return total number of steps(iterations) done since subtask beginning. */
152 unsigned int getNumStepsDone() const;
153
154 private:
155 unsigned int m_numStepsDone;
156
157 private:
158 SoNode* m_src;
159 SbString* m_eventName; // unique
160 unsigned int m_numSteps;
161 };
162
167
172
177
182
188};
189
Base class for all event arguments.
Definition SbEventArg.h:41
Class representing an event.
Class for smart character strings.
Definition SbString.h:202
Abstract base class for all database nodes.
Definition SoNode.h:145
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Class for report...
SbEventHandler< StepEventArg & > onEndStep
Event raised when a steps ends.
SbEventHandler< TaskEventArg & > onBeginTask
Event raised when a task begins.
SoProgressIndicator()
Constructor.
SbEventHandler< SubTaskEventArg & > onEndSubTask
Event raised when a sub-task ends.
SbEventHandler< SubTaskEventArg & > onBeginSubTask
Event raised when a sub-task begins.
SbEventHandler< TaskEventArg & > onEndTask
Event raised when a task ends.
Class given to callback when an onEndStep is raised.
StepEventArg(SoNode *src, const SbString &eventName, unsigned int numSteps, unsigned int numStepsDone)
unsigned int getNumSteps() const
const SbString & getEventName() const
unsigned int getNumStepsDone() const
Class given to callback when onBeginSubTask/onEndSubTask are raised.
const SbString & getEventName() const
SubTaskEventArg(SoNode *src, const SbString &eventName, unsigned int numSubTasks, unsigned int numSubTasksDone, unsigned int numSteps)
unsigned int getNumSubTasksDone() const
unsigned int getNumSubTasks() const
Class given to callback when onBeginTask/onEndTask are raised.
TaskEventArg(SoNode *src, const SbString &eventName, unsigned int numTasks, unsigned int numTasksDone, unsigned int numSubTasks)
const SbString & getEventName() const
unsigned int getNumTasks() const
unsigned int getNumTasksDone() const
unsigned int getNumSubTasks() const