| 688 | } |
| 689 | |
| 690 | void DeviceView::resizeEvent(QResizeEvent* /*event*/) |
| 691 | { |
| 692 | size = width(); |
| 693 | offset_x = 0; |
| 694 | |
| 695 | if(height() < size * matrix_h) |
| 696 | { |
| 697 | size = height() / matrix_h; |
| 698 | offset_x = (width() - size) / 2; |
| 699 | } |
| 700 | update(); |
| 701 | } |
| 702 | |
| 703 | void DeviceView::paintEvent(QPaintEvent* /* event */) |
| 704 | { |