Developer documentation | Axl-2.5.1

axlInspectorObjectSceneWidgetVolumeDiscrete.cpp
Go to the documentation of this file.
1 /* axlInspectorObjectSceneWidgetVolumeDiscrete.cpp ---
2  *
3  * Author: Anais Ducoffe
4  * Copyright (C) 2013 - Anais Ducoffe, Inria.
5  */
6 
7 /* Commentary:
8  *
9  */
10 
11 /* Change log:
12  *
13  */
14 
17 
20 
21 #include <dtkCoreSupport/dtkAbstractData.h>
22 
23 class axlInspectorObjectSceneWidgetVolumeDiscretePrivate
24 {
25 public:
27 };
28 
29 axlInspectorObjectSceneWidgetVolumeDiscrete::axlInspectorObjectSceneWidgetVolumeDiscrete(QWidget *parent) : QFrame(parent), d(new axlInspectorObjectSceneWidgetVolumeDiscretePrivate)
30 {
31  //d->editor = new axlVolumeEditor(this);//factory
32  d->editor = dynamic_cast<axlAbstractVolumeDiscreteEditor *>(axlInspectorObjectFactory::instance()->create("axlVolumeDiscreteEditor"));
33 
34  QVBoxLayout *layout = new QVBoxLayout(this);
35  layout->setContentsMargins(0, 0, 0, 0);
36  if(d->editor){
37  layout->addWidget(d->editor);
38  }
39 }
40 
42 {
43  delete d;
44 }
45 
47 {
48  if(axlAbstractVolumeDiscrete *volume = dynamic_cast<axlAbstractVolumeDiscrete *>(data)){
49  if(d->editor)
50  d->editor->setVolume(volume);
51  }
52 }
53 
55 {
56  if(d->editor)
57  d->editor->setView(view);
58 }
axlInspectorObjectInterface * create(const QString &interface_name)
static axlInspectorObjectFactory * instance(void)