MCPcopy Create free account
hub / github.com/MITK/MITK / ctxMenu

Method ctxMenu

Modules/QtWidgetsExt/src/QmitkPointListView.cpp:254–279  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

252}
253
254void QmitkPointListView::ctxMenu(const QPoint &pos)
255{
256 QMenu *menu = new QMenu;
257
258 // add Fading check
259 QAction *showFading = new QAction(this);
260 showFading->setCheckable(false); // TODO: reset when fading is working
261 showFading->setEnabled(false); // TODO: reset when fading is working
262 showFading->setText("Fade TimeStep");
263 connect(showFading, SIGNAL(triggered(bool)), this, SLOT(SetFading(bool)));
264 menu->addAction(showFading);
265
266 // add Clear action
267 QAction *clearList = new QAction(this);
268 clearList->setText("Clear List");
269 connect(clearList, SIGNAL(triggered()), this, SLOT(ClearPointList()));
270 menu->addAction(clearList);
271
272 // add Clear TimeStep action
273 QAction *clearTS = new QAction(this);
274 clearTS->setText("Clear current time step");
275 connect(clearTS, SIGNAL(triggered()), this, SLOT(ClearPointListTS()));
276 menu->addAction(clearTS);
277
278 menu->exec(this->mapToGlobal(pos));
279}
280
281void QmitkPointListView::SetFading(bool onOff)
282{

Callers

nothing calls this directly

Calls 2

setEnabledMethod · 0.45
setTextMethod · 0.45

Tested by

no test coverage detected