MCPcopy Create free account
hub / github.com/KDAB/KDChart / insertItem

Method insertItem

examples/demo/gradientdialog.cpp:75–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75void GradientDialog::Private::insertItem()
76{
77 QGradientStop newStop;
78 newStop.first = 0.5;
79 newStop.second = Qt::white;
80 const int index = ui->stopSelector->currentIndex() + 1;
81 ui->stopSelector->setCurrentIndex(-1);
82 m_gradient.insert(index, newStop);
83
84 QStringList newItems;
85 newItems << tr("stop %1").arg(m_currStopNr);
86 ui->stopSelector->insertItems(index, newItems);
87
88 ui->stopSelector->setCurrentIndex(index);
89
90 updateGradientDisplay();
91}
92
93void GradientDialog::Private::deleteItem()
94{

Callers

nothing calls this directly

Calls 1

currentIndexMethod · 0.45

Tested by

no test coverage detected