Hello,
I will continue looking, but I am trying to find a way to start a "checkable" legend to all checked on startup. Basically I want the QtPlotCurves all visible at startup with the check's in the ON state. Then the user can check them off.
I was hoping for something like legend->setChecked(bool tf), that I could call from implementation, but open to any suggestions... I would like to stay away from default showing none and making the user click them all on, but it is one method... 
Here is the connect statement I am using for after the legend is first checked...
connect(this,SIGNAL(legendChecked(QwtPlotItem*,bool)), this, SLOT(handleLegendChecked(QwtPlotItem*, bool)));
To copy to clipboard, switch view to plain text mode
and the slot it calls...
void dataPlot
::handleLegendChecked(QwtPlotItem* item,
bool tf
) {
item->setVisible(tf);
replot();
if(cStart->isVisible()){curvesLoaded.start = true;} else {curvesLoaded.start = false;}
if(cRun->isVisible()){curvesLoaded.run = true;} else {curvesLoaded.run = false;}
if(cCmdwn->isVisible()){curvesLoaded.comedown=true;} else {curvesLoaded.comedown = false;}
qDebug()<<curvesLoaded.start<<curvesLoaded.run<<curvesLoaded.comedown;
}
void dataPlot::handleLegendChecked(QwtPlotItem* item, bool tf)
{
item->setVisible(tf);
replot();
if(cStart->isVisible()){curvesLoaded.start = true;} else {curvesLoaded.start = false;}
if(cRun->isVisible()){curvesLoaded.run = true;} else {curvesLoaded.run = false;}
if(cCmdwn->isVisible()){curvesLoaded.comedown=true;} else {curvesLoaded.comedown = false;}
qDebug()<<curvesLoaded.start<<curvesLoaded.run<<curvesLoaded.comedown;
}
To copy to clipboard, switch view to plain text mode
Thanks to any who can help!
AlphaWolfXV
Bookmarks