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

Method FindNodeDialog

Gui/NodeGraph45.cpp:295–343  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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