| 912 | } |
| 913 | |
| 914 | void splitViewWidget::drawLoadingMessage(QPainter *painter, const QPoint &pos) |
| 915 | { |
| 916 | DEBUG_LOAD_DRAW("splitViewWidget::drawLoadingMessage"); |
| 917 | |
| 918 | // Set the font for drawing the values |
| 919 | QFont valueFont = QFont(SPLITVIEWWIDGET_LOADING_FONT, SPLITVIEWWIDGET_LOADING_FONTSIZE); |
| 920 | painter->setFont(valueFont); |
| 921 | |
| 922 | // Create the QRect to draw to |
| 923 | QFontMetrics metrics(painter->font()); |
| 924 | QSize textSize = metrics.size(0, SPLITVIEWWIDGET_LOADING_TEXT); |
| 925 | QRect textRect; |
| 926 | textRect.setSize(textSize); |
| 927 | textRect.moveCenter(pos); |
| 928 | |
| 929 | // Draw a rectangle around the text in white with a black border |
| 930 | QRect boxRect = textRect + QMargins(5, 5, 5, 5); |
| 931 | painter->setPen(QPen(Qt::black, 1)); |
| 932 | painter->fillRect(boxRect, Qt::white); |
| 933 | painter->drawRect(boxRect); |
| 934 | |
| 935 | // Draw the text |
| 936 | painter->drawText(textRect, Qt::AlignCenter, SPLITVIEWWIDGET_LOADING_TEXT); |
| 937 | } |
| 938 | |
| 939 | void splitViewWidget::mouseMoveEvent(QMouseEvent *mouse_event) |
| 940 | { |