MCPcopy Create free account
hub / github.com/MiniZinc/MiniZincIDE / LanternMenu

Method LanternMenu

cp-profiler/src/cpprofiler/execution_window.cpp:38–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36{
37
38LanternMenu::LanternMenu() : QWidget()
39{
40 auto layout = new QHBoxLayout(this);
41
42 slider_ = new QSlider(Qt::Horizontal);
43 slider_->setRange(0, 100);
44 layout->addWidget(slider_);
45
46 auto label_desc = new QLabel("limit:");
47 layout->addWidget(label_desc);
48
49 auto label = new QLabel("0");
50 layout->addWidget(label);
51 label->setAlignment(Qt::AlignVCenter | Qt::AlignRight);
52 label->setMinimumWidth(55);
53
54 connect(slider_, &QSlider::valueChanged, [this, label](int val) {
55 label->setText(QString::number(val));
56 emit limit_changed(val);
57 });
58}
59
60ExecutionWindow::ExecutionWindow(Execution &ex, QWidget* parent)
61 : QMainWindow(parent), execution_(ex)

Callers

nothing calls this directly

Calls 1

setRangeMethod · 0.80

Tested by

no test coverage detected