Developer documentation | Axl-2.5.1

axlInspectorObjectManager.cpp
Go to the documentation of this file.
1 /* axlInspectorObjectManager.cpp ---
2  *
3  * Author: Julien Wintz
4  * Copyright (C) 2008 - Julien Wintz, Inria.
5  * Created: Mon Mar 14 18:23:13 2011 (+0100)
6  * Version: $Id$
7  * Last-Updated: Tue Apr 3 14:20:50 2012 (+0200)
8  * By: Julien Wintz
9  * Update #: 52
10  */
11 
12 /* Commentary:
13  *
14  */
15 
16 /* Change log:
17  *
18  */
19 
20 #include "axlInspectorObject.h"
27 #include "axlInspectorSeparator.h"
29 
31 #include <axlCore/axlDouble.h>
35 
36 #include <axlCore/axlDataDynamic.h>
37 
40 
41 #include <QtGui>
42 
43 class axlInspectorObjectManagerPrivate
44 {
45 public:
46  axlInspectorObjectController *controller;
47  axlInspectorObject *inspector_object;
49  QString lastScalarFieldName;
50  QString lastVectorFieldName;
51  axlInspectorSeparator *fieldSeparator;
52  // QList<axlInspectorObjectSceneWidgetDouble*>value;
53 
54 
55 public:
58  axlInspectorSeparator *listSeparator;
59 
60 public :
61  //displayed for discrete volume only
63 
64 
65  axlAbstractView *view;
66 
67  QVBoxLayout *layout;
68 
69 };
70 
71 axlInspectorObjectManager::axlInspectorObjectManager(QWidget *parent) : QWidget(parent), d(new axlInspectorObjectManagerPrivate)
72 {
73  d->controller = NULL;
74  d->view = NULL;
75 
76  d->inspector_object = new axlInspectorObject(this);
77  //d->inspector_object->showMaximized();
78  d->inspector_object->setController(d->controller);
79 
80  //d->editor = new axlInspectorObjectSceneWidgetVolumeDiscrete(this);
81  d->editor = NULL;
82 
83 
84  d->field = new axlInspectorObjectSceneWidgetField(this);
85  d->fieldSeparator = new axlInspectorSeparator(this);
86  d->lastScalarFieldName = "";
87  d->lastVectorFieldName = "";
88 
89  //d->value = new axlInspectorObjectSceneWidgetDouble(this);
90 
91  d->list = new axlInspectorObjectManagerList(this);
92  d->listSeparator = new axlInspectorSeparator(this);
93 
94  //QVBoxLayout *field_layout = new QVBoxLayout;
95  //append_layout->addWidget(new QLabel("Apppend:", this));
96  //field_layout->addWidget(d->list);
97  // field_layout->addWidget(new axlInspectorSeparator(this));
98  //field_layout->addWidget(d->field);
99  //field_layout->setContentsMargins(3, 3, 3, 3);
100 
101 
102  d->tree = new axlInspectorObjectManagerTree(this);
103 
104 
105  d->layout = new QVBoxLayout(this);
106  d->layout->setAlignment(Qt::AlignTop);
107  d->layout->setContentsMargins(0, 0, 0, 0);
108  d->layout->setSpacing(0);
109  d->layout->addWidget(d->tree);
110  d->layout->addWidget(new axlInspectorSeparator(this));
111  d->layout->addWidget(d->inspector_object);
112  d->layout->addWidget(d->listSeparator);
113  d->layout->addWidget(d->list);
114  d->layout->addWidget(d->fieldSeparator);
115  d->layout->addWidget(d->field);
116  //d->layout->addWidget(d->editor);
117  // layout->addWidget(d->value);
118  d->inspector_object->hide();
119  d->listSeparator->hide();
120  d->list->hide();
121  d->field->hide();
122  d->fieldSeparator->hide();
123  //d->editor->hide();
124  // d->value->hide();
125 
126 
127  connect(d->list, SIGNAL(currentItemChanged(QListWidgetItem *,QListWidgetItem *)), this, SLOT(onTransmitDataSelected(QListWidgetItem *,QListWidgetItem *)));
128  connect(d->list, SIGNAL(itemSelectionChanged()), this, SLOT(onFieldListSelectionChanged()));
129 
130  connect(d->tree, SIGNAL(itemSelectionChanged()), this, SLOT(onListSelectionChanged()));
131 
132  connect(d->tree, SIGNAL(inserted()), this, SIGNAL(inserted()));
133  connect(d->tree, SIGNAL(stateChanged(dtkAbstractData *, int)), this, SIGNAL(stateChanged(dtkAbstractData *, int)));
134  connect(d->tree, SIGNAL(actorVisibilityChanged(dtkAbstractData *, bool)), this, SIGNAL(actorVisibilityChanged(dtkAbstractData *, bool)));
135  connect(d->tree, SIGNAL(dataSetRemoved(QList<dtkAbstractData *>)), this, SIGNAL(dataSetRemoved(QList<dtkAbstractData*>)));
136 
137 
138  connect(d->tree, SIGNAL(dataSetRemoved(QList<dtkAbstractData *>)), d->inspector_object, SLOT(onDataSetRemoved(QList<dtkAbstractData*>)));
139 
140  connect(d->tree, SIGNAL(selected(dtkAbstractData *)), d->inspector_object, SLOT(onDataSelected(dtkAbstractData *)));
141  connect(d->tree, SIGNAL(dataSetSelected(QList<dtkAbstractData *>)), d->inspector_object, SLOT(onDataSetSelected(QList<dtkAbstractData *>)));
142  connect(d->inspector_object, SIGNAL(update()), this, SIGNAL(update()));
143  connect(d->inspector_object, SIGNAL(showCurrentPoint(double, double, dtkAbstractData *)), this, SIGNAL(showCurrentPoint(double, double, dtkAbstractData *)));
144  connect(d->inspector_object, SIGNAL(hideCurrentPoint(double, double, dtkAbstractData *)), this, SIGNAL(hideCurrentPoint(double, double, dtkAbstractData *)));
145  connect(d->inspector_object, SIGNAL(moveCurrentPoint(double, double, dtkAbstractData *)), this, SIGNAL(moveCurrentPoint(double, double, dtkAbstractData *)));
146  connect(d->inspector_object, SIGNAL(dataChangedByGeometry(dtkAbstractData *)), this, SIGNAL(dataChangedByGeometry(dtkAbstractData *)));
147  // connect(d->inspector_object, SIGNAL(dataChangedByShader(dtkAbstractData*,QString)), this, SIGNAL(dataChangedByShader(dtkAbstractData * ,QString)));
148  // connect(d->inspector_object, SIGNAL(dataChangedByOpacity(dtkAbstractData*, double)), this, SIGNAL(dataChangedByOpacity(dtkAbstractData *, double)));
149  // connect(d->inspector_object, SIGNAL(dataChangedBySize(dtkAbstractData*, double)), this, SIGNAL(dataChangedBySize(dtkAbstractData *, double)));
150  // connect(d->inspector_object, SIGNAL(dataChangedByColor(dtkAbstractData *, double, double, double)), this, SIGNAL(dataChangedByColor(dtkAbstractData *, double, double, double)));
151  connect(d->inspector_object, SIGNAL(modifiedProperty(dtkAbstractData*,int)), this,SIGNAL(modifiedProperty(dtkAbstractData*,int)));
152  connect(d->inspector_object, SIGNAL(interpolationChanded(dtkAbstractData*,int)), this, SIGNAL(interpolationChanded(dtkAbstractData*,int)));
153 
154 
155 }
156 
158 {
159 
160  delete d;
161 
162  d = NULL;
163 }
164 
166 {
167  return d->tree->insert(data);
168 }
169 
170 void axlInspectorObjectManager::removeData(dtkAbstractData *data){
171  d->tree->remove(data);
172 }
173 
174 QList<dtkAbstractData *> axlInspectorObjectManager::dataSet(void)
175 {
176  return d->tree->dataSet();
177 }
178 
180 {
181  for(int i = 0; i < d->tree->columnCount(); i++)
182  {
183  d->tree->resizeColumnToContents(i);
184  }
185 }
186 
187 void axlInspectorObjectManager::onStateChanged(dtkAbstractData *data, int mode)
188 {
189  d->tree->onStateChanged(data, mode);
190 }
191 
192 void axlInspectorObjectManager::onDataRemoved(QList<dtkAbstractData *> dataToRemoved)
193 {
194 
195  foreach(dtkAbstractData *data, dataToRemoved){
196  if(dynamic_cast<axlAbstractVolumeDiscrete *>(data)){
197  if(d->editor){
198  d->editor->hide();
199  d->layout->removeWidget(d->editor);
200  delete d->editor;
201  d->editor = NULL;
202  }
203  }
204  }
205  d->tree->onDataRemoved(dataToRemoved);
206 
207 }
208 
210 {
211  d->tree->removeAllItems();
212 }
213 
215 {
216  d->controller = controller;
217  d->inspector_object->setController(controller);
218  d->tree->setController(controller);
219 }
220 
221 
222 void axlInspectorObjectManager::onListSelectionChanged(void)
223 {
224  if(d->tree->selectedItems().size() == 0 && d->controller)
225  {
226  d->inspector_object->hide();
227  d->list->hide();
228  d->listSeparator->hide();
229  d->field->hide();
230  d->fieldSeparator->hide();
231  if(d->editor){
232  d->editor->hide();
233  d->layout->removeWidget(d->editor);
234  delete d->editor;
235  d->editor = NULL;
236  }
237 
238  // for(int i = 0; i < d->value.size(); i++){
239  // dynamic_cast<axlInspectorObjectSceneWidgetDouble *>(d->value.at(i))->hide();
240  // }
241 
242  }
243  if(d->tree->selectedItems().size() == 1 && d->controller)
244  {
245  d->inspector_object->show();
246  axlInspectorObjectManagerTreeItem *axlCurrentItem = dynamic_cast<axlInspectorObjectManagerTreeItem *>(d->tree->selectedItems().first());
247 
248  if(axlAbstractData *axlData = dynamic_cast<axlAbstractData *>(d->controller->data(axlCurrentItem)))
249  {
250  if(axlData->fields().count() != 0)
251  {
252  d->list->show();
253  d->listSeparator->show();
254 
255  }
256 
257  if(dynamic_cast<axlAbstractVolumeDiscrete *>(axlData)){
258  d->editor = new axlInspectorObjectSceneWidgetVolumeDiscrete(this);
259  d->layout->addWidget(d->editor);
260  d->editor->setView(d->view);
261  d->editor->setData(axlData);
262  d->editor->show();
263  }else{
264  if(d->editor){
265  d->editor->hide();
266  d->layout->removeWidget(d->editor);
267  delete d->editor;
268  d->editor = NULL;
269 
270  }
271  }
272 
273 
274  d->list->setData(axlData);
275 
276  // if(axlDataDynamic *dataDynamic = dynamic_cast<axlDataDynamic *>(axlData)){
277 
278  // //check that the dynamic object has double input.
279  // bool hasDoubleInputs = false;
280  // foreach(axlAbstractData *input, dataDynamic->inputs()){
281  // if(dynamic_cast<axlDouble *>(input)){
282  // hasDoubleInputs = true;
283  // }
284  // }
285  // if(hasDoubleInputs){
286  // for(int i = 0; i < d->value.size(); i++){
287  // // display dialog only of it referenced an input of the dynamic object selected
288  // if(dynamic_cast<axlInspectorObjectSceneWidgetDouble *>(d->value.at(i))->name() == dataDynamic->name() )
289  // dynamic_cast<axlInspectorObjectSceneWidgetDouble *>(d->value.at(i))->show();
290  // }
291  // }
292  // }
293  }
294 
295  }
296 }
297 
298 
299 axlAbstractField *axlInspectorObjectManager::onTransmitDataSelected(QListWidgetItem *fromItem,QListWidgetItem *toItem)
300 {
301  if (axlInspectorObjectManagerListItem *axlCurrentItem = dynamic_cast<axlInspectorObjectManagerListItem *>(fromItem)) {
302 
303  if(axlAbstractField *field = axlCurrentItem->field() )
304  {
305  //we do nothing if we try to select a field that it's the same last field we selected in function of the kind
306  // if(field->name() != d->lastScalarFieldName && field->name() != d->lastVectorFieldName)
307  // {
308  // for ( int i = 0 ; i < d->list->count() ; i++)
309  // {
310  // QListWidgetItem *listItem = d->list->item(i);
311  // if(field->kind() == axlAbstractField::Scalar && dynamic_cast<axlInspectorObjectManagerListItem *>(listItem)->field()->kind() == axlAbstractField::Scalar )
312  // {
313  // if(axlAbstractActorField * currentActorField = dynamic_cast<axlAbstractActorField *>(d->view->actor(dynamic_cast<axlInspectorObjectManagerListItem *>(listItem)->field())))
314  // {
315  // currentActorField->displayAsNoneScalar();
316  // d->lastScalarFieldName = field->name();
317  // }
318  // }
319 
320  // if(field->kind() == axlAbstractField::Vector && dynamic_cast<axlInspectorObjectManagerListItem *>(listItem)->field()->kind() == axlAbstractField::Vector)
321  // {
322  // if(axlAbstractActorField *currentField = dynamic_cast<axlAbstractActorField *>(d->view->actor(dynamic_cast<axlInspectorObjectManagerListItem *>(listItem)->field())))
323  // {
324  // currentField->displayAsNoneVector();
325  // d->lastVectorFieldName = field->name();
326  // }
327  // }
328  // }
329 
330  // }
331 
332 
334  //hide all actor Fields;
335  for ( int i = 0 ; i < d->controller->items().size() ; i++)
336  {
337  axlInspectorObjectManagerTreeItem *item = d->controller->items().at(i);
338  axlAbstractData *axldata = dynamic_cast<axlAbstractData *>(d->controller->data(item));
339  if(axldata->fields().size() > 0){
340  d->list->setData(axldata);
341 
342 
343 
344  //hide all actor Fields;
345  for ( int i = 0 ; i < d->list->count() ; i++)
346  {
347  QListWidgetItem *listItem = d->list->item(i);
348  if(dynamic_cast<axlInspectorObjectManagerListItem *>(listItem)->field()->kind() == axlAbstractField::Scalar && dynamic_cast<axlInspectorObjectManagerListItem *>(listItem)->field()->kind() == dynamic_cast<axlInspectorObjectManagerListItem *>(d->list->item(d->list->count() - 1))->field()->kind())
349  dynamic_cast<axlAbstractActorField *>(d->view->actor(dynamic_cast<axlInspectorObjectManagerListItem *>(listItem)->field()))->displayAsNoneScalar();
350 
351  if( dynamic_cast<axlInspectorObjectManagerListItem *>(listItem)->field()->kind() == axlAbstractField::Vector && dynamic_cast<axlInspectorObjectManagerListItem *>(listItem)->field()->kind() == dynamic_cast<axlInspectorObjectManagerListItem *>(d->list->item(d->list->count() - 1))->field()->kind())
352  {
353  axlAbstractActorField *currentField = dynamic_cast<axlAbstractActorField *>(d->view->actor(dynamic_cast<axlInspectorObjectManagerListItem *>(listItem)->field()));
354  currentField->displayAsNoneVector();
355  }
356  }
357 
358 
359  }
360  }
361  this->onListSelectionChanged();
363 
364  d->view->update();
365 
366 
367  d->field->setField(field);
368 
370  // run defaut view
371  if(field->kind() == axlAbstractField::Scalar)
372  {
373  dynamic_cast<axlAbstractActorField *>(d->view->actor(field))->displayAsColor();
374  d->lastScalarFieldName = field->name();
375 
376  }
377 
378  if(field->kind() == axlAbstractField::Vector)
379  {
380  axlAbstractActorField *currentField = dynamic_cast<axlAbstractActorField *>(d->view->actor(field));
381  currentField->displayAsGlyph();
382  d->lastVectorFieldName = field->name();
383 
384  }
386 
387  // if ( axlAbstractActorField *currentActorField = dynamic_cast<axlAbstractActorField *>(d->view->actor(field)) )
388  if ( dynamic_cast<axlAbstractActorField *>(d->view->actor(field)) )
389  {
390  // TO DO
391  //currentActorField->setActiveFieldKind();
392  }
393  return field;
394  }
395  } else {
396  qDebug() << "axlInspectorObjectManager::onTransmitDataSelected" << "error";
397  }
398 
399  return NULL;
400 }
401 
403 {
404  if(d->list->selectedItems().isEmpty())
405  {
406  d->field->hide();
407  d->fieldSeparator->hide();
408 
409  }
410  else
411  {
412  d->field->show();
413  d->fieldSeparator->show();
414  }
415 
416 }
417 
418 
419 //void axlInspectorObjectManager::onDoubleInputListSelectionChanged(void)
420 //{
421 
422 // qDebug() << "axlInspectorObjectManager::onDoubleInputListSelectionChanged";
423 // if(d->list->selectedItems().isEmpty())
424 // {
425 // d->value->hide();
426 
427 // }
428 // else
429 // {
430 // d->value->show();
431 // }
432 
433 //}
434 
435 void axlInspectorObjectManager::onFieldOpened(QList<axlAbstractData *> dataList, QString fieldName)
436 {
437 
438  //hide all actor Fields;
439  for ( int i = 0 ; i < d->controller->items().size() ; i++)
440  {
441  axlInspectorObjectManagerTreeItem *item = d->controller->items().at(i);
442  axlAbstractData *axldata = dynamic_cast<axlAbstractData *>(d->controller->data(item));
443  if(axldata->fields().size() > 0){
444  d->list->setData(axldata);
445 
446 
447 
448  //hide all actor Fields;
449  for ( int i = 0 ; i < d->list->count() ; i++)
450  {
451  QListWidgetItem *listItem = d->list->item(i);
452  if(dynamic_cast<axlInspectorObjectManagerListItem *>(listItem)->field()->kind() == axlAbstractField::Scalar && dynamic_cast<axlInspectorObjectManagerListItem *>(listItem)->field()->kind() == dynamic_cast<axlInspectorObjectManagerListItem *>(d->list->item(d->list->count() - 1))->field()->kind())
453  dynamic_cast<axlAbstractActorField *>(d->view->actor(dynamic_cast<axlInspectorObjectManagerListItem *>(listItem)->field()))->displayAsNoneScalar();
454 
455  if( dynamic_cast<axlInspectorObjectManagerListItem *>(listItem)->field()->kind() == axlAbstractField::Vector && dynamic_cast<axlInspectorObjectManagerListItem *>(listItem)->field()->kind() == dynamic_cast<axlInspectorObjectManagerListItem *>(d->list->item(d->list->count() - 1))->field()->kind())
456  {
457  axlAbstractActorField *currentField = dynamic_cast<axlAbstractActorField *>(d->view->actor(dynamic_cast<axlInspectorObjectManagerListItem *>(listItem)->field()));
458  currentField->displayAsNoneVector();
459  }
460  }
461 
462 
463  }
464  }
465 
466 
467  foreach (axlAbstractData *axlData, dataList)
468  {
469  axlAbstractField *field = NULL;
470  //focus the good field
471  foreach(axlAbstractField *currentField, axlData->fields())
472  if(currentField->name() == fieldName)
473  field = currentField;
474 
475  if(field)
476  {
477  // field is finded, we remove all field with the same kind before
478  foreach(axlAbstractField *currentField, axlData->fields())
479  {
480  // qDebug()<< "axlInspectorObjectManager::onFieldsCreatedOnData "<<currentField->name();
481  if(field->kind() == axlAbstractField::Scalar && currentField->kind() == axlAbstractField::Scalar)
482  dynamic_cast<axlAbstractActorField *>(d->view->actor(currentField))->displayAsNoneScalar();
483  else if(field->kind() == axlAbstractField::Vector && currentField->kind() == axlAbstractField::Vector)
484  dynamic_cast<axlAbstractActorField *>(d->view->actor(currentField))->displayAsNoneVector();
485 
486  }
487 
488  // then we draw it by default
489  if(field->kind() == axlAbstractField::Scalar)
490  dynamic_cast<axlAbstractActorField *>(d->view->actor(field))->displayAsColor();
491  else if(field->kind() == axlAbstractField::Vector)
492  dynamic_cast<axlAbstractActorField *>(d->view->actor(field))->displayAsGlyph();
493  }
494  }
495 
496 
497  d->view->update();
498 }
499 
500 void axlInspectorObjectManager::onFieldsCreatedOnData(QList<axlAbstractData *> dataList, QString fieldName)
501 {
502  if(d->tree->selectedItems().size() > 1 ) // we draw by default the field for all d->tree items selected
503  {
504  foreach (axlAbstractData *axlData, dataList)
505  {
506  axlAbstractField *field = NULL;
507  //focus the good field
508  foreach(axlAbstractField *currentField, axlData->fields())
509  if(currentField->name() == fieldName)
510  field = currentField;
511 
512  if(field)
513  {
514  // field is finded, we remove all field with the same kind before
515  foreach(axlAbstractField *currentField, axlData->fields())
516  {
517  if(field->kind() == axlAbstractField::Scalar && currentField->kind() == axlAbstractField::Scalar)
518  dynamic_cast<axlAbstractActorField *>(d->view->actor(currentField))->displayAsNoneScalar();
519  else if(field->kind() == axlAbstractField::Vector && currentField->kind() == axlAbstractField::Vector)
520  dynamic_cast<axlAbstractActorField *>(d->view->actor(currentField))->displayAsNoneVector();
521 
522  }
523 
524  // then we draw it by default
525  if(field->kind() == axlAbstractField::Scalar)
526  dynamic_cast<axlAbstractActorField *>(d->view->actor(field))->displayAsColor();
527  else if(field->kind() == axlAbstractField::Vector)
528  dynamic_cast<axlAbstractActorField *>(d->view->actor(field))->displayAsGlyph();
529  }
530  }
531 
532  }
533  else
534  {
535  // int fieldCountBefore = d->list->count();
536  // add the field into Inspector list fields
537  //this->onListSelectionChanged();
538 
539  //hide all actor Fields;
540  for ( int i = 0 ; i < d->controller->items().size() ; i++)
541  {
542  axlInspectorObjectManagerTreeItem *item = d->controller->items().at(i);
543  axlAbstractData *axldata = dynamic_cast<axlAbstractData *>(d->controller->data(item));
544  if(axldata->fields().size() > 0){
545  d->list->setData(axldata);
546 
547 
548  //hide all actor Fields
549  for ( int i = 0 ; i < d->list->count() ; i++)
550  {
551  QListWidgetItem *listItem = d->list->item(i);
552  if(dynamic_cast<axlInspectorObjectManagerListItem *>(listItem)->field()->kind() == axlAbstractField::Scalar && dynamic_cast<axlInspectorObjectManagerListItem *>(listItem)->field()->kind() == dynamic_cast<axlInspectorObjectManagerListItem *>(d->list->item(d->list->count() - 1))->field()->kind())
553  dynamic_cast<axlAbstractActorField *>(d->view->actor(dynamic_cast<axlInspectorObjectManagerListItem *>(listItem)->field()))->displayAsNoneScalar();
554 
555  if( dynamic_cast<axlInspectorObjectManagerListItem *>(listItem)->field()->kind() == axlAbstractField::Vector && dynamic_cast<axlInspectorObjectManagerListItem *>(listItem)->field()->kind() == dynamic_cast<axlInspectorObjectManagerListItem *>(d->list->item(d->list->count() - 1))->field()->kind())
556  {
557  axlAbstractActorField *currentField = dynamic_cast<axlAbstractActorField *>(d->view->actor(dynamic_cast<axlInspectorObjectManagerListItem *>(listItem)->field()));
558  currentField->displayAsNoneVector();
559  }
560  }
561 
562 
563  }
564  }
565 
566  //show the last field
567  //this->onListSelectionChanged();
568  d->list->setData(dataList.last());
569 
570  //simulate defaut display on last field created if new one was just created
571  if(axlInspectorObjectManagerListItem *axlCurrentItem = dynamic_cast<axlInspectorObjectManagerListItem *>(d->list->item(d->list->count() - 1)))
572  {
573 
574  if(axlAbstractField *field = axlCurrentItem->field())
575  {
576  // update field widget
577  d->field->setField(field);
578 
579  dynamic_cast<axlAbstractActorField *>(d->view->actor(field))->setActiveFieldKind();
580 
581  //make sure widget is shown
582  d->field->show();
583  d->fieldSeparator->show();
584 
585  // run defaut view
586  if(axlCurrentItem->field()->kind() == axlAbstractField::Scalar)
587  {
588  dynamic_cast<axlAbstractActorField *>(d->view->actor(axlCurrentItem->field()))->displayAsColor();
589  d->lastScalarFieldName = field->name();
590 
591  }
592 
593  if( axlCurrentItem->field()->kind() == axlAbstractField::Vector)
594  {
595  axlAbstractActorField *currentField = dynamic_cast<axlAbstractActorField *>(d->view->actor(axlCurrentItem->field()));
596  currentField->displayAsGlyph();
597  d->lastVectorFieldName = field->name();
598 
599  }
600  }
601  }
602 
603  }
604 
605 
606  d->view->update();
607 
608 }
609 
610 //void axlInspectorObjectManager::onDoubleInputInserted(QList<axlDouble *> dataList)
611 //{
612 
613 
614 // foreach(axlInspectorObjectSceneWidgetDouble *insp, d->value){
615 // if(dataList.first()->name() == insp->name()){
616 // d->value.removeOne(insp);
617 // }
618 // }
619 
620 
621 // foreach(axlDouble *axlData, dataList){
622 // axlInspectorObjectSceneWidgetDouble *newWidget = new axlInspectorObjectSceneWidgetDouble(this);
623 // newWidget->setDouble(axlData);
624 // d->layout->addWidget(newWidget);
625 // newWidget->hide();
626 // d->value.append(newWidget);
627 // newWidget->setView(d->view);
628 // }
629 
630 
631 // d->view->update();
632 
633 //}
634 
635 
636 
638 {
639  d->view = view;
640  d->field->setView(view);
641  //d->editor->setView(view);
642  // for(int i = 0; i < d->value.size(); i++){
643  // dynamic_cast<axlInspectorObjectSceneWidgetDouble *>(d->value.at(i))->setView(view);
644  // }
645 
646 
647  connect(d->inspector_object, SIGNAL(tubeFilterRadiusChanged(dtkAbstractData *, double)), d->view, SLOT(onTubeFilterRadiusChanged(dtkAbstractData *, double)));
648 
649 }
axlInspectorObjectManagerTreeItem * insert(axlAbstractData *data)
void modifiedProperty(dtkAbstractData *, int)
void actorVisibilityChanged(dtkAbstractData *data, bool actorVisibility)
QList< dtkAbstractData * > dataSet(void)
axlAbstractField * onTransmitDataSelected(QListWidgetItem *fromItem, QListWidgetItem *toItem)
void removeData(dtkAbstractData *data)
void onDataRemoved(QList< dtkAbstractData * > dataToRemoved)
void setController(axlInspectorObjectController *controller)
virtual Kind kind(void)
void interpolationChanded(dtkAbstractData *data, int interpolation)
void onStateChanged(dtkAbstractData *data, int mode)
void dataChangedByGeometry(dtkAbstractData *data)
virtual void displayAsNoneVector(void)
void onFieldsCreatedOnData(QList< axlAbstractData * > dataList, QString fieldName)
void onFieldOpened(QList< axlAbstractData * > dataList, QString fieldName)
void dataSetRemoved(QList< dtkAbstractData * > dataSetRemoved)
void showCurrentPoint(double u, double v, dtkAbstractData *data)
void setView(axlAbstractView *view)
axlInspectorObjectManager(QWidget *parent=0)
Class axlAbstractField defines an API for arrays of numeric data.
void stateChanged(dtkAbstractData *data, int mode)
virtual void displayAsColor(void)
QList< axlAbstractField * > fields(void)
void hideCurrentPoint(double u, double v, dtkAbstractData *data)
void moveCurrentPoint(double u, double v, dtkAbstractData *data)
Class axlAbstractData defines an API for all type of axel data.
virtual void displayAsGlyph(void)