MCPcopy Index your code
hub / github.com/DreamSourceLab/DSView / changeColor

Method changeColor

DSView/pv/view/header.cpp:399–411  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

397}
398
399void Header::changeColor(QMouseEvent *event)
400{
401 if (_view.session().is_working() && _view.session().get_device()->get_work_mode() == ANALOG){
402 //Disable to select color when working on analog mode.
403 return;
404 }
405
406 if ((event->button() == Qt::LeftButton)) {
407 const QColor new_color = QColorDialog::getColor(_context_trace->get_colour(), this, L_S(STR_PAGE_DLG, S_ID(IDS_DLG_SET_CHANNEL_COLOUR), "Set Channel Colour"));
408 if (new_color.isValid())
409 _context_trace->set_colour(new_color);
410 }
411}
412
413void Header::mouseMoveEvent(QMouseEvent *event)
414{

Callers

nothing calls this directly

Calls 6

is_workingMethod · 0.80
sessionMethod · 0.80
get_work_modeMethod · 0.80
get_deviceMethod · 0.80
get_colourMethod · 0.80
set_colourMethod · 0.45

Tested by

no test coverage detected