#include <AscObjSelectionManager.h>
|
| | AscObjSelectionManager (SoSeparator *eventRoot, IVP13DSystem *, TrackSystemController *) |
| void | aboutTodelete () |
| virtual | ~AscObjSelectionManager () |
| SoSeparator * | getAscObjAttachSep () const |
| MODE | mode () const |
| void | setMode (MODE) |
| void | pretendUserClicked (AssociatedObjectHandleBase *) |
| void | ensureDeselected (const QList< AssociatedObjectHandleBase * > &) |
| void | ensureSelected (const QList< AssociatedObjectHandleBase * > &) |
| void | deselectAll () |
| const QList< AssociatedObjectHandleBase * > & | currentSelection () const |
| SoSeparator * | eventRoot () |
| void | setSystemBasePointer (IVP1System *sys) |
| void | message (const QString &) const |
| void | message (const QStringList &, const QString &addtoend="") const |
| void | message (const QString &addtostart, const QStringList &, const QString &addtoend="") const |
| void | messageDebug (const QString &) const |
| void | messageDebug (const QStringList &, const QString &addtoend="") const |
| void | messageDebug (const QString &addtostart, const QStringList &, const QString &addtoend="") const |
| void | messageVerbose (const QString &) const |
| void | messageVerbose (const QStringList &, const QString &addtoend="") const |
| void | messageVerbose (const QString &addtostart, const QStringList &, const QString &addtoend="") const |
| IVP1System * | systemBase () const |
| const QString & | helperClassName () const |
Definition at line 37 of file AscObjSelectionManager.h.
◆ MODE
◆ AscObjSelectionManager()
Definition at line 89 of file AscObjSelectionManager.cxx.
91{
94}
void ascObjDetailLevelChanged()
VP1HelperClassBase(IVP1System *sys=0, QString helpername="")
◆ ~AscObjSelectionManager()
| AscObjSelectionManager::~AscObjSelectionManager |
( |
| ) |
|
|
virtual |
◆ aboutTodelete()
| void AscObjSelectionManager::aboutTodelete |
( |
| ) |
|
◆ ascObjDetailLevelChanged
| void AscObjSelectionManager::ascObjDetailLevelChanged |
( |
| ) |
|
|
privateslot |
Definition at line 381 of file AscObjSelectionManager.cxx.
382{
383 messageVerbose(
"Signal received in ascObjDetailLevelChanged slot");
384 if (
m_d->selAscObjHandles.isEmpty()) {
385 m_d->sel_assocobjs->deselectAll();
386 return;
387 }
388 const SoPathList * pathlist =
m_d->sel_assocobjs->getList();
389 if (!pathlist||pathlist->getLength()!=
m_d->selAscObjHandles.count())
390 return;
391
395 SoPath *
path = (*pathlist)[
i++];
396 if (!path)
397 continue;
399 (isSimpleMode?
handle->shapeSimple():
handle->shapeDetailed()))) {
400 message(
"Warning: Failed to relocate picked node.");
402 return;
403 }
404 }
405}
friend class AssociatedObjectHandleBase
void messageVerbose(const QString &) const
void message(const QString &) const
static bool changePathTail(SoPath *path, SoNode *commonBranchPoint, SoNode *newtail)
virtual void handle(const Incident &inc)
Handle end of run incidents to save the metadata at that point.
path
python interpreter configuration --------------------------------------—
◆ currentSelection()
◆ currentSelectionChanged
◆ deselectAll()
| void AscObjSelectionManager::deselectAll |
( |
| ) |
|
Definition at line 326 of file AscObjSelectionManager.cxx.
327{
328 if (
m_d->selAscObjHandles.isEmpty())
329 return;
330 m_d->selAscObjHandles.clear();
332 m_d->updateSelectionVisuals();
333}
void currentSelectionChanged(const QList< AssociatedObjectHandleBase * > &)
◆ ensureDeselected()
Definition at line 336 of file AscObjSelectionManager.cxx.
337{
338 if (handles.isEmpty())
339 return;
340 QList<AssociatedObjectHandleBase*> selHandlesBefore =
m_d->selAscObjHandles;
342 m_d->selAscObjHandles.removeAll(handle);
343 if (selHandlesBefore!=
m_d->selAscObjHandles) {
344 m_d->updateSelectionVisuals();
346 }
347}
◆ ensureSelected()
Definition at line 350 of file AscObjSelectionManager.cxx.
351{
352 if (handles.isEmpty())
353 return;
355
356 if (handles.count()>1)
357 message(
"WARNING: ensureSelected called with more than one handle in SINGLE mode. Ignoring all but the first.");
358 if (
m_d->selAscObjHandles.contains(handles.at(0)))
359 return;
360 m_d->selAscObjHandles.clear();
361 m_d->selAscObjHandles << handles.at(0);
363 m_d->updateSelectionVisuals();
364 } else {
365
366 QList<AssociatedObjectHandleBase*> selHandlesBefore =
m_d->selAscObjHandles;
368 if (!
m_d->selAscObjHandles.contains(handle))
370 }
372 if (selHandlesBefore!=
m_d->selAscObjHandles) {
373 m_d->updateSelectionVisuals();
375 }
376 }
377
378}
void sort(typename DataModel_detail::iterator< DVL > beg, typename DataModel_detail::iterator< DVL > end)
Specialization of sort for DataVector/List.
◆ eventRoot()
| SoSeparator * AscObjSelectionManager::eventRoot |
( |
| ) |
|
◆ getAscObjAttachSep()
| SoSeparator * AscObjSelectionManager::getAscObjAttachSep |
( |
| ) |
const |
◆ handleUserSelectedSingleNode()
Definition at line 233 of file AscObjSelectionManager.cxx.
234{
236 pickedHandle = nullptr;
237 if (
sel==
m_d->sel_assocobjs) {
239 return true;
240 }
241 if (
sel!=
m_d->sel_assocobjs_click) {
243 return false;
244 }
245
247 m_d->sel_assocobjs_click->deselectAll();
248 if (!handle) {
249 message(
"ERROR: Unknown associated object.");
250 return true;
251 }
255 return true;
256}
void pretendUserClicked(AssociatedObjectHandleBase *)
static QString toString(MODE)
static QString str(const QString &s)
◆ helperClassName()
| const QString & VP1HelperClassBase::helperClassName |
( |
| ) |
const |
|
inlineinherited |
◆ message() [1/3]
| void VP1HelperClassBase::message |
( |
const QString & | str | ) |
const |
|
inherited |
Definition at line 49 of file VP1HelperClassBase.cxx.
50{
54 else
56 } else {
59 else
61 }
62}
static const char * prefix_msg()
◆ message() [2/3]
| void VP1HelperClassBase::message |
( |
const QString & | addtostart, |
|
|
const QStringList & | l, |
|
|
const QString & | addtoend = "" ) const |
|
inherited |
Definition at line 131 of file VP1HelperClassBase.cxx.
132{
133 if (addtostart.isEmpty()) {
135 return;
136 }
137 if (addtoend.isEmpty()) {
138 for (const QString& s : l)
140 } else {
141 for (const QString& s : l)
142 message(addtostart+s+addtoend);
143 }
144}
◆ message() [3/3]
| void VP1HelperClassBase::message |
( |
const QStringList & | l, |
|
|
const QString & | addtoend = "" ) const |
|
inherited |
Definition at line 91 of file VP1HelperClassBase.cxx.
92{
93 if (addtoend.isEmpty()) {
94 for (const QString& s : l)
96 } else {
97 for (const QString& s : l)
99 }
100}
◆ messageDebug() [1/3]
| void VP1HelperClassBase::messageDebug |
( |
const QString & | str | ) |
const |
|
inherited |
Definition at line 65 of file VP1HelperClassBase.cxx.
66{
68 return;
69 std::string sysstring(
m_system ?
" in "+
m_system->name().toStdString() : std::string(
""));
72 } else {
74 }
75}
static const char * prefix_debug()
◆ messageDebug() [2/3]
| void VP1HelperClassBase::messageDebug |
( |
const QString & | addtostart, |
|
|
const QStringList & | l, |
|
|
const QString & | addtoend = "" ) const |
|
inherited |
Definition at line 147 of file VP1HelperClassBase.cxx.
148{
150 return;
151 if (addtostart.isEmpty()) {
153 return;
154 }
155 if (addtoend.isEmpty()) {
156 for (const QString& s : l)
158 } else {
159 for (const QString& s : l)
161 }
162}
void messageDebug(const QString &) const
◆ messageDebug() [3/3]
| void VP1HelperClassBase::messageDebug |
( |
const QStringList & | l, |
|
|
const QString & | addtoend = "" ) const |
|
inherited |
Definition at line 103 of file VP1HelperClassBase.cxx.
104{
106 return;
107 if (addtoend.isEmpty()) {
108 for (const QString& s : l)
110 } else {
111 for (const QString& s : l)
113 }
114}
◆ messageVerbose() [1/3]
| void VP1HelperClassBase::messageVerbose |
( |
const QString & | str | ) |
const |
|
inherited |
Definition at line 78 of file VP1HelperClassBase.cxx.
79{
81 return;
82 std::string sysstring(
m_system ?
" in "+
m_system->name().toStdString() : std::string(
""));
85 } else {
87 }
88}
static const char * prefix_verbose()
◆ messageVerbose() [2/3]
| void VP1HelperClassBase::messageVerbose |
( |
const QString & | addtostart, |
|
|
const QStringList & | l, |
|
|
const QString & | addtoend = "" ) const |
|
inherited |
Definition at line 165 of file VP1HelperClassBase.cxx.
166{
168 return;
169 if (addtostart.isEmpty()) {
171 return;
172 }
173 if (addtoend.isEmpty()) {
174 for (const QString& s : l)
176 } else {
177 for (const QString& s : l)
179 }
180}
◆ messageVerbose() [3/3]
| void VP1HelperClassBase::messageVerbose |
( |
const QStringList & | l, |
|
|
const QString & | addtoend = "" ) const |
|
inherited |
Definition at line 117 of file VP1HelperClassBase.cxx.
118{
120 return;
121 if (addtoend.isEmpty()) {
122 for (const QString& s : l)
124 } else {
125 for (const QString& s : l)
127 }
128}
◆ mode()
◆ pretendUserClicked()
Definition at line 259 of file AscObjSelectionManager.cxx.
260{
261 assert(handle);
262 if (!handle)
263 return;
264 const bool alreadyselected =
m_d->selAscObjHandles.contains(handle);
266 QList<AssociatedObjectHandleBase*> selHandlesBefore =
m_d->selAscObjHandles;
267
269 if (
m_d->selAscObjHandles.isEmpty()) {
270
272 if (
m_d->controller->printInfoOnSingleSelection())
274 } else {
275
276 m_d->selAscObjHandles.clear();
277
278 if (!alreadyselected) {
280 if (
m_d->controller->printInfoOnSingleSelection())
282 }
283 }
286 if (alreadyselected)
287 m_d->selAscObjHandles.removeAll(handle);
288 else
290 } else {
291 m_d->selAscObjHandles.clear();
292 if (!alreadyselected)
294 }
296 if (alreadyselected) {
297 m_d->selAscObjHandles.removeAll(handle);
298 } else {
300 }
301 } else {
302 message(
"ERROR: Should not happen!");
304 return;
305 }
307
308 if (selHandlesBefore!=
m_d->selAscObjHandles) {
309 m_d->updateSelectionVisuals();
311 }
312}
static bool shiftIsDown()
◆ registerAscObj()
Definition at line 140 of file AscObjSelectionManager.cxx.
141{
143 if (!simple||!detailed||!handle) {
144 message(
"registerAscObj ERROR: Received null pointer!");
145 return;
146 }
147 std::map<SoSeparator*,AssociatedObjectHandleBase*>::iterator
it, itE;
148 itE =
m_d->ascobjs_simpleToHandle.end();
149 for (it=
m_d->ascobjs_simpleToHandle.begin();it!=itE;++it) {
150 if (
it->first==simple||
it->second==handle)
151 message(
"registerAscObj ERROR: Simple separator/handle already registered!");
152 }
153 itE =
m_d->ascobjs_detailedToHandle.end();
154 for (it=
m_d->ascobjs_detailedToHandle.begin();it!=itE;++it) {
155 if (
it->first==detailed||
it->second==handle)
156 message(
"registerAscObj ERROR: Detailed separator/handle already registered!");
157 }
158 }
159 m_d->ascobjs_simpleToHandle[simple]=
handle;
160 m_d->ascobjs_detailedToHandle[detailed]=
handle;
161}
◆ setHelperClassName()
| void VP1HelperClassBase::setHelperClassName |
( |
const QString & | n | ) |
|
|
inlineprotectedinherited |
◆ setMode()
| void AscObjSelectionManager::setMode |
( |
MODE | m | ) |
|
◆ setSystemBasePointer()
| void VP1HelperClassBase::setSystemBasePointer |
( |
IVP1System * | sys | ) |
|
|
inherited |
Definition at line 197 of file VP1HelperClassBase.cxx.
198{
202 }
203}
static std::map< VP1HelperClassBase *, QString > vp1helperclassbase_instanceMap
◆ str() [1/30]
◆ str() [2/30]
| QString VP1String::str |
( |
const bool | b | ) |
|
|
inlinestaticinherited |
Definition at line 53 of file VP1String.h.
53{
return b?
"True":
"False"; }
◆ str() [3/30]
| QString VP1String::str |
( |
const char * | c | ) |
|
|
inlinestaticinherited |
◆ str() [4/30]
| QString VP1String::str |
( |
const double & | d | ) |
|
|
inlinestaticinherited |
Definition at line 81 of file VP1String.h.
81{ return QString::number(d); }
◆ str() [5/30]
| QString VP1String::str |
( |
const float & | f | ) |
|
|
inlinestaticinherited |
Definition at line 82 of file VP1String.h.
82{ return QString::number(f); }
◆ str() [6/30]
◆ str() [7/30]
| QString VP1String::str |
( |
const QColor & | c | ) |
|
|
staticinherited |
Definition at line 30 of file VP1String.cxx.
31{
32 return c.isValid() ?
c.name() :
"Invalid";
33}
◆ str() [8/30]
template<class T>
| QString VP1String::str |
( |
const QFlags< T > & | f | ) |
|
|
inlinestaticinherited |
Definition at line 91 of file VP1String.h.
91{ return "0x"+QString::number(f, 16).toUpper().rightJustified(8,'0'); }
◆ str() [9/30]
template<class T>
| QString VP1String::str |
( |
const QList< T > & | t | ) |
|
|
inlinestaticinherited |
Definition at line 102 of file VP1String.h.
102{
return "QList of size"+QString::number(
t.size()); }
◆ str() [10/30]
| QString VP1String::str |
( |
const QString & | s | ) |
|
|
inlinestaticinherited |
◆ str() [11/30]
| QString VP1String::str |
( |
const SbColor & | c | ) |
|
|
staticinherited |
Definition at line 36 of file VP1String.cxx.
37{
39}
static QColor sbcol2qcol(const SbColor &)
◆ str() [12/30]
| QString VP1String::str |
( |
const SbVec2d & | v | ) |
|
|
staticinherited |
◆ str() [13/30]
| QString VP1String::str |
( |
const SbVec2f & | v | ) |
|
|
staticinherited |
◆ str() [14/30]
| QString VP1String::str |
( |
const SbVec2s & | v | ) |
|
|
staticinherited |
◆ str() [15/30]
| QString VP1String::str |
( |
const SbVec3d & | v | ) |
|
|
staticinherited |
◆ str() [16/30]
| QString VP1String::str |
( |
const SbVec3f & | v | ) |
|
|
staticinherited |
◆ str() [17/30]
| QString VP1String::str |
( |
const SbVec3s & | v | ) |
|
|
staticinherited |
◆ str() [18/30]
| QString VP1String::str |
( |
const SbVec4d & | v | ) |
|
|
staticinherited |
◆ str() [19/30]
| QString VP1String::str |
( |
const SbVec4f & | v | ) |
|
|
staticinherited |
◆ str() [20/30]
template<class T>
| QString VP1String::str |
( |
const T * | t | ) |
|
|
inlinestaticinherited |
Definition at line 87 of file VP1String.h.
87{
return str(
static_cast<const void*
>(t)); }
◆ str() [21/30]
| QString VP1String::str |
( |
const void * | p | ) |
|
|
staticinherited |
Definition at line 48 of file VP1String.cxx.
49{
50 if (p) {
53
54 return QString (
s.str().c_str());
55 } else {
56 return "NULL";
57 }
58}
◆ str() [22/30]
◆ str() [23/30]
| QString VP1String::str |
( |
int | n | ) |
|
|
inlinestaticinherited |
Definition at line 77 of file VP1String.h.
77{ return QString::number(n); }
◆ str() [24/30]
| QString VP1String::str |
( |
long | n | ) |
|
|
inlinestaticinherited |
Definition at line 75 of file VP1String.h.
75{ return QString::number(n); }
◆ str() [25/30]
| QString VP1String::str |
( |
qlonglong | n | ) |
|
|
inlinestaticinherited |
Definition at line 79 of file VP1String.h.
79{ return QString::number(n); }
◆ str() [26/30]
| QString VP1String::str |
( |
qulonglong | n | ) |
|
|
inlinestaticinherited |
Definition at line 80 of file VP1String.h.
80{ return QString::number(n); }
◆ str() [27/30]
| QString VP1String::str |
( |
short int | n | ) |
|
|
inlinestaticinherited |
Definition at line 73 of file VP1String.h.
73{ return QString::number(n); }
◆ str() [28/30]
| QString VP1String::str |
( |
uint | n | ) |
|
|
inlinestaticinherited |
Definition at line 78 of file VP1String.h.
78{ return QString::number(n); }
◆ str() [29/30]
| QString VP1String::str |
( |
ulong | n | ) |
|
|
inlinestaticinherited |
Definition at line 76 of file VP1String.h.
76{ return QString::number(n); }
◆ str() [30/30]
| QString VP1String::str |
( |
unsigned short int | n | ) |
|
|
inlinestaticinherited |
Definition at line 74 of file VP1String.h.
74{ return QString::number(n); }
◆ systemBase()
| IVP1System * VP1HelperClassBase::systemBase |
( |
| ) |
const |
|
inlineinherited |
◆ toString()
| QString AscObjSelectionManager::toString |
( |
MODE | m | ) |
|
|
static |
◆ unregisterAscObj()
| void AscObjSelectionManager::unregisterAscObj |
( |
SoSeparator * | simple, |
|
|
SoSeparator * | detailed ) |
|
private |
Definition at line 164 of file AscObjSelectionManager.cxx.
165{
167 if (!simple||!detailed) {
168 message(
"unregisterAscObj ERROR: Received null pointer!");
169 return;
170 }
171 }
172 std::map<SoSeparator*,AssociatedObjectHandleBase*>::iterator itSimple =
m_d->ascobjs_simpleToHandle.find(simple);
173 if (itSimple==
m_d->ascobjs_simpleToHandle.end()) {
174 message(
"unregisterAscObj ERROR: Not previously registered simple sep!");
175 } else {
176 m_d->ascobjs_simpleToHandle.erase(itSimple);
177 }
178 std::map<SoSeparator*,AssociatedObjectHandleBase*>::iterator itDetailed =
m_d->ascobjs_detailedToHandle.find(detailed);
179 if (itDetailed==
m_d->ascobjs_detailedToHandle.end()) {
180 message(
"unregisterAscObj ERROR: Not previously registered detailed sep!");
181 } else {
182 m_d->ascobjs_detailedToHandle.erase(itDetailed);
183 }
184}
◆ userClickedOnBgd()
| void AscObjSelectionManager::userClickedOnBgd |
( |
| ) |
|
|
private |
◆ verbose()
| bool VP1HelperClassBase::verbose |
( |
| ) |
|
|
inlinestaticinherited |
◆ warnUndeletedInstances()
| void VP1HelperClassBase::warnUndeletedInstances |
( |
| ) |
|
|
staticinherited |
Definition at line 183 of file VP1HelperClassBase.cxx.
184{
186 return;
188
191 std::cout <<
" ==> "<<
it->first<<
": "<<
it->first->m_helpername.toStdString()
192 << (
it->second.isEmpty()?QString(
""):
" (in system "+
it->second+
")").toStdString()<<std::endl;
193 }
194}
◆ AssociatedObjectHandleBase
◆ VP1TrackSystem
◆ m_d
| Imp* AscObjSelectionManager::m_d |
|
private |
◆ m_helpername
| QString VP1HelperClassBase::m_helpername |
|
privateinherited |
◆ m_system
◆ s_vp1verbose
The documentation for this class was generated from the following files: