| 615 | } |
| 616 | |
| 617 | static int tickLength(int sourcePos, int labelDistance) |
| 618 | { |
| 619 | int l = 8; |
| 620 | if (sourcePos % labelDistance == 0) { |
| 621 | return 2 * l; |
| 622 | } |
| 623 | if (sourcePos % 10 == 0) { |
| 624 | return l + 2; |
| 625 | } else if (sourcePos % 5 == 0) { |
| 626 | return l + 1; |
| 627 | } |
| 628 | return l; |
| 629 | } |
| 630 | |
| 631 | void RemoteViewWidget::drawRuler(QPainter *p) |
| 632 | { |