refactoring qad widgets part 2

c++ cast, nullptr, forward declaration, agregate ui, connect to member functions, order and clear includes
This commit is contained in:
2022-12-12 10:18:34 +03:00
parent 728c132f2b
commit 4497123421
23 changed files with 837 additions and 500 deletions

View File

@@ -85,7 +85,7 @@ void ImageView::clear() {
}
void ImageView::mouseDoubleClickEvent(QMouseEvent * e) {
void ImageView::mouseDoubleClickEvent(QMouseEvent *) {
autofit();
}
@@ -121,7 +121,7 @@ bool ImageView::eventFilter(QObject * o, QEvent * e) {
break;
case QEvent::MouseMove:
if (me->buttons().testFlag(Qt::RightButton) && !autofit_ && viewInteractive()) {
QPointF dp = QPointF(me->pos() - prev_pos);
QPoint dp = QPoint(me->pos() - prev_pos);
horizontalScrollBar()->setValue(horizontalScrollBar()->value() - dp.x());
verticalScrollBar()->setValue(verticalScrollBar()->value() - dp.y());
prev_pos = me->pos();