Developer documentation | Axl-2.5.1

axlInspectorObjectSceneWidgetFieldVectorGlyph.cpp
Go to the documentation of this file.
1 /* axlInspectorObjectSceneWidgetFieldVectorGlyph.cpp ---
2  *
3  * Author: Julien Wintz
4  * Copyright (C) 2008-2011 - Julien Wintz, Inria.
5  * Created: Fri Sep 9 15:35:08 2011 (+0200)
6  * Version: $Id$
7  * Last-Updated: Fri Sep 9 15:44:50 2011 (+0200)
8  * By: Julien Wintz
9  * Update #: 12
10  */
11 
12 /* Commentary:
13  *
14  */
15 
16 /* Change log:
17  *
18  */
19 
21 
22 #include <dtkCoreSupport/dtkGlobal.h>
23 
24 #include <QtGui>
25 
26 class axlInspectorObjectSceneWidgetFieldVectorGlyphPrivate
27 {
28 public:
29  QDoubleSpinBox *glyph_scale_spin;
30 };
31 
32 axlInspectorObjectSceneWidgetFieldVectorGlyph::axlInspectorObjectSceneWidgetFieldVectorGlyph(QWidget *parent) : QWidget(parent), d(new axlInspectorObjectSceneWidgetFieldVectorGlyphPrivate)
33 {
34  QWidget *glyph_form = new QWidget(this);
35  glyph_form->setObjectName("axlInspectorObjectSceneWidgetFieldVectorGlyphForm");
36 
37  d->glyph_scale_spin = new QDoubleSpinBox(this);
38  d->glyph_scale_spin->setValue(0.1);
39  d->glyph_scale_spin->setMinimum(0);
40  d->glyph_scale_spin->setMaximum(100000);
41  d->glyph_scale_spin->setSingleStep(0.01);
42  d->glyph_scale_spin->setDecimals(5);
43 
44  QFormLayout *glyph_form_layout = new QFormLayout(glyph_form);
45  glyph_form_layout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow);
46  glyph_form_layout->addRow("Scale", d->glyph_scale_spin);
47 
48  QVBoxLayout *layout = new QVBoxLayout(this);
49  layout->setContentsMargins(0, 0, 0, 0);
50  layout->addWidget(new QLabel("Glyph", this));
51  layout->addWidget(glyph_form);
52 
53 
54  connect(d->glyph_scale_spin, SIGNAL(valueChanged(double)), this, SIGNAL(glyphScaleValueChanged(double)));
55 }
56 
58 {
59  delete d;
60 
61  d = NULL;
62 }