void WorkoutPlot::setDisplayMessage(QString text, bool workoutPausedMsg) {
/// DISPLAY MSG
QFont fontBig;
fontBig.setPointSize(16);
int lengthText = text.length();
QString emptySpace = " ";
QString emptyLine;
for (int i=0; i<lengthText + 8; i++) {
emptyLine+= emptySpace;
}
QString msg = emptyLine + "\n";
msg += " " + text + " " + "\n";
msg += emptyLine;
displayMsgTxt = QwtText( msg );
displayMsgTxt.setFont(fontBig);
displayMsgTxt.setRenderFlags( Qt::AlignHCenter | Qt::AlignHCenter );
displayMsgTxt.setColor(Qt::white);
if (workoutPausedMsg)
displayMsgTxt.setBackgroundBrush(QBrush(QColor(1, 1, 1, 128), Qt::SolidPattern));
displayMessageLabel = new QwtPlotTextLabel();
displayMessageLabel->setText( displayMsgTxt );
displayMessageLabel->attach( this );
Bookmarks