MCPcopy Create free account
hub / github.com/MrKepzie/Natron / onSettingsButtonClicked

Method onSettingsButtonClicked

Gui/NodeSettingsPanel.cpp:162–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162void
163NodeSettingsPanel::onSettingsButtonClicked()
164{
165 Menu menu(this);
166 //menu.setFont(QFont(appFont,appFontSize));
167 NodeGuiPtr node = getNode();
168 NodePtr master = node->getNode()->getMasterNode();
169 QAction* importPresets = new QAction(tr("Import presets"), &menu);
170 QObject::connect( importPresets, SIGNAL(triggered()), this, SLOT(onImportPresetsActionTriggered()) );
171 QAction* exportAsPresets = new QAction(tr("Export as presets"), &menu);
172 QObject::connect( exportAsPresets, SIGNAL(triggered()), this, SLOT(onExportPresetsActionTriggered()) );
173
174 menu.addAction(importPresets);
175 menu.addAction(exportAsPresets);
176 menu.addSeparator();
177
178 QAction* manageUserParams = new QAction(tr("Manage user parameters..."), &menu);
179 QObject::connect( manageUserParams, SIGNAL(triggered()), this, SLOT(onManageUserParametersActionTriggered()) );
180 menu.addAction(manageUserParams);
181
182 menu.addSeparator();
183
184
185 QAction* setKeyOnAll = new QAction(tr("Set key on all parameters"), &menu);
186 QObject::connect( setKeyOnAll, SIGNAL(triggered()), this, SLOT(setKeyOnAllParameters()) );
187 QAction* removeAnimationOnAll = new QAction(tr("Remove animation on all parameters"), &menu);
188 QObject::connect( removeAnimationOnAll, SIGNAL(triggered()), this, SLOT(removeAnimationOnAllParameters()) );
189 menu.addAction(setKeyOnAll);
190 menu.addAction(removeAnimationOnAll);
191
192 if ( master || !node->getDagGui() || !node->getDagGui()->getGui() || node->getDagGui()->getGui()->isGUIFrozen() ) {
193 importPresets->setEnabled(false);
194 exportAsPresets->setEnabled(false);
195 setKeyOnAll->setEnabled(false);
196 removeAnimationOnAll->setEnabled(false);
197 }
198
199 menu.exec( _settingsButton->mapToGlobal( _settingsButton->pos() ) );
200}
201
202void
203NodeSettingsPanel::onImportPresetsActionTriggered()

Callers

nothing calls this directly

Calls 10

getMasterNodeMethod · 0.80
addActionMethod · 0.80
addSeparatorMethod · 0.80
getDagGuiMethod · 0.80
isGUIFrozenMethod · 0.80
execMethod · 0.80
getNodeFunction · 0.70
getNodeMethod · 0.45
getGuiMethod · 0.45
setEnabledMethod · 0.45

Tested by

no test coverage detected