MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / initialize

Method initialize

Gui/KnobGui.cpp:61–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

59}
60
61void
62KnobGui::initialize()
63{
64 KnobIPtr knob = getKnob();
65 KnobGuiPtr thisShared = shared_from_this();
66
67 assert(thisShared);
68 if (!_imp->isInViewerUIKnob) {
69 knob->setKnobGuiPointer(thisShared);
70 }
71 KnobHelper* helper = dynamic_cast<KnobHelper*>( knob.get() );
72 assert(helper);
73 if (helper) {
74 KnobSignalSlotHandler* handler = helper->getSignalSlotHandler().get();
75 QObject::connect( handler, SIGNAL(redrawGuiCurve(int,ViewSpec,int)), this, SLOT(onRedrawGuiCurve(int,ViewSpec,int)) );
76 QObject::connect( handler, SIGNAL(valueChanged(ViewSpec,int,int)), this, SLOT(onInternalValueChanged(ViewSpec,int,int)) );
77 QObject::connect( handler, SIGNAL(keyFrameSet(double,ViewSpec,int,int,bool)), this, SLOT(onInternalKeySet(double,ViewSpec,int,int,bool)) );
78 QObject::connect( handler, SIGNAL(keyFrameRemoved(double,ViewSpec,int,int)), this, SLOT(onInternalKeyRemoved(double,ViewSpec,int,int)) );
79 QObject::connect( handler, SIGNAL(keyFrameMoved(ViewSpec,int,double,double)), this, SLOT(onKeyFrameMoved(ViewSpec,int,double,double)) );
80 QObject::connect( handler, SIGNAL(multipleKeyFramesSet(std::list<double>,ViewSpec,int,int)), this,
81 SLOT(onMultipleKeySet(std::list<double>,ViewSpec,int,int)) );
82 QObject::connect( handler, SIGNAL(multipleKeyFramesRemoved(std::list<double>,ViewSpec,int,int)), this,
83 SLOT(onMultipleKeyRemoved(std::list<double>,ViewSpec,int,int)) );
84 QObject::connect( handler, SIGNAL(secretChanged()), this, SLOT(setSecret()) );
85 QObject::connect( handler, SIGNAL(enabledChanged()), this, SLOT(setEnabledSlot()) );
86 QObject::connect( handler, SIGNAL(knobSlaved(int,bool)), this, SLOT(onKnobSlavedChanged(int,bool)) );
87 QObject::connect( handler, SIGNAL(animationAboutToBeRemoved(ViewSpec,int)), this, SLOT(onInternalAnimationAboutToBeRemoved(ViewSpec,int)) );
88 QObject::connect( handler, SIGNAL(animationRemoved(ViewSpec,int)), this, SLOT(onInternalAnimationRemoved()) );
89 QObject::connect( handler, SIGNAL(setValueWithUndoStack(Variant,ViewSpec,int)), this, SLOT(onSetValueUsingUndoStack(Variant,ViewSpec,int)) );
90 QObject::connect( handler, SIGNAL(dirty(bool)), this, SLOT(onSetDirty(bool)) );
91 QObject::connect( handler, SIGNAL(animationLevelChanged(ViewSpec,int)), this, SLOT(onAnimationLevelChanged(ViewSpec,int)) );
92 QObject::connect( handler, SIGNAL(appendParamEditChange(int,Variant,ViewSpec,int,double,bool,bool)), this,
93 SLOT(onAppendParamEditChanged(int,Variant,ViewSpec,int,double,bool,bool)) );
94 QObject::connect( handler, SIGNAL(frozenChanged(bool)), this, SLOT(onFrozenChanged(bool)) );
95 QObject::connect( handler, SIGNAL(helpChanged()), this, SLOT(onHelpChanged()) );
96 QObject::connect( handler, SIGNAL(expressionChanged(int)), this, SLOT(onExprChanged(int)) );
97 QObject::connect( handler, SIGNAL(hasModificationsChanged()), this, SLOT(onHasModificationsChanged()) );
98 QObject::connect( handler, SIGNAL(labelChanged()), this, SLOT(onLabelChanged()) );
99 QObject::connect( handler, SIGNAL(dimensionNameChanged(int)), this, SLOT(onDimensionNameChanged(int)) );
100 QObject::connect( handler, SIGNAL(viewerContextSecretChanged()), this, SLOT(onViewerContextSecretChanged()) );
101 }
102 if (!_imp->isInViewerUIKnob) {
103 _imp->guiCurves.resize( knob->getDimension() );
104 if ( knob->canAnimate() ) {
105 for (int i = 0; i < knob->getDimension(); ++i) {
106 _imp->guiCurves[i].reset( new Curve( *( knob->getCurve(ViewIdx(0), i) ) ) );
107 }
108 }
109 }
110}
111
112KnobGuiContainerI*
113KnobGui::getContainer()

Callers 7

SequenceFileDialogMethod · 0.45
xml_oarchive>Method · 0.45
exportLayoutMethod · 0.45
createKnobGuiMethod · 0.45
createNodeGUIMethod · 0.45
createKnobsMethod · 0.45
PasteUndoCommandMethod · 0.45

Calls 9

getKnobFunction · 0.70
ViewIdxClass · 0.50
setKnobGuiPointerMethod · 0.45
getMethod · 0.45
resizeMethod · 0.45
getDimensionMethod · 0.45
canAnimateMethod · 0.45
resetMethod · 0.45
getCurveMethod · 0.45

Tested by

no test coverage detected