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

Method FindNodeDialog

Gui/NodeGraph45.cpp:296–344  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

294};
295
296FindNodeDialog::FindNodeDialog(NodeGraph* graph,
297 QWidget* parent)
298 : QDialog(parent)
299 , _imp( new FindNodeDialogPrivate(graph) )
300{
301 setWindowFlags(Qt::Popup);
302
303 _imp->mainLayout = new QVBoxLayout(this);
304 _imp->mainLayout->setContentsMargins(0, 0, 0, 0);
305
306 _imp->label = new Label(tr("Select all nodes matching:"), this);
307 //_imp->label->setFont(QFont(appFont,appFontSize));
308 _imp->mainLayout->addWidget(_imp->label);
309
310 _imp->filter = new LineEdit(this);
311 _imp->filter->setToolTip( tr("Search pattern. May contain wildcards:\n"
312 "? Matches any single character.\n"
313 "* Matches zero or more of any characters.\n"
314 "[...] Matches any character within the set in square brackets.") );
315 QObject::connect( _imp->filter, SIGNAL(editingFinished()), this, SLOT(updateFindResultsWithCurrentFilter()) );
316 QObject::connect( _imp->filter, SIGNAL(textEdited(QString)), this, SLOT(updateFindResults(QString)) );
317
318 _imp->mainLayout->addWidget(_imp->filter);
319
320 _imp->matchWhole = new QCheckBox(tr("Match whole pattern"), this);
321 _imp->filter->setToolTip( tr("When checked, the given pattern must match the whole node name.") );
322 _imp->matchWhole->setChecked(false);
323 QObject::connect( _imp->matchWhole, SIGNAL(toggled(bool)), this, SLOT(forceUpdateFindResults()) );
324 _imp->mainLayout->addWidget(_imp->matchWhole);
325
326 _imp->caseSensitivity = new QCheckBox(tr("Case sensitive"), this);
327 _imp->caseSensitivity->setChecked(false);
328 QObject::connect( _imp->caseSensitivity, SIGNAL(toggled(bool)), this, SLOT(forceUpdateFindResults()) );
329 _imp->mainLayout->addWidget(_imp->caseSensitivity);
330
331
332 _imp->resultLabel = new Label(this);
333 _imp->mainLayout->addWidget(_imp->resultLabel);
334 //_imp->resultLabel->setFont(QFont(appFont,appFontSize));
335
336 _imp->buttons = new DialogButtonBox(QDialogButtonBox::NoButton, Qt::Horizontal, this);
337 _imp->nextButton = _imp->buttons->addButton(tr("&Next"), QDialogButtonBox::ActionRole);
338 QObject::connect( _imp->buttons, SIGNAL(clicked(QAbstractButton*)), this, SLOT(onButtonClicked(QAbstractButton*)) );
339
340 _imp->mainLayout->addWidget(_imp->buttons);
341 _imp->filter->setFocus();
342
343 selectNextResult();
344}
345
346FindNodeDialog::~FindNodeDialog()
347{

Callers

nothing calls this directly

Calls 4

addWidgetMethod · 0.80
addButtonMethod · 0.80
setToolTipMethod · 0.45
setCheckedMethod · 0.45

Tested by

no test coverage detected