8#include "ksaneviewer.h"
10#include "selectionitem.h"
11#include "hiderectitem.h"
13#include <QGraphicsPixmapItem>
14#include <QGraphicsScene>
15#include <QGraphicsRectItem>
22#include <KLocalizedString>
29struct KSaneViewer::Private {
31 SelectionItem *selection;
35 SelectionItem::Intersects change;
47 HideRectItem *hideLeft;
48 HideRectItem *hideRight;
49 HideRectItem *hideTop;
50 HideRectItem *hideBottom;
51 HideRectItem *hideArea;
53 bool multiSelectionEnabled =
true;
57 int currentImageWidth;
58 int currentImageHeight;
67 setMouseTracking(
true);
73 d->currentImageWidth = img->
width();
74 d->currentImageHeight = img->
height();
76 d->scene->setSceneRect(0, 0, d->currentImageWidth / dpr, d->currentImageHeight / dpr);
79 d->selection =
new SelectionItem(
QRectF());
80 d->selection->setZValue(10);
81 d->selection->setSaved(
false);
82 d->selection->setMaxRight(d->currentImageWidth);
83 d->selection->setMaxBottom(d->currentImageHeight);
84 d->selection->setRect(d->scene->sceneRect());
85 d->selection->setVisible(
false);
87 d->hideTop =
new HideRectItem;
88 d->hideBottom =
new HideRectItem;
89 d->hideRight =
new HideRectItem;
90 d->hideLeft =
new HideRectItem;
91 d->hideArea =
new HideRectItem;
92 d->hideArea->setOpacity(0.6);
94 d->scene->addItem(d->selection);
95 d->scene->addItem(d->hideLeft);
96 d->scene->addItem(d->hideRight);
97 d->scene->addItem(d->hideTop);
98 d->scene->addItem(d->hideBottom);
99 d->scene->addItem(d->hideArea);
103 d->border = d->scene->addPolygon(polygon, pen);
105 d->change = SelectionItem::None;
106 d->selectionList.clear();
124 addAction(d->zoomInAction);
125 addAction(d->zoomOutAction);
126 addAction(d->zoomSelAction);
127 addAction(d->zoom2FitAction);
128 addAction(d->clrSelAction);
135void KSaneViewer::drawBackground(
QPainter *painter,
const QRectF &rect)
138 QRectF r = rect & sceneRect();
139 const qreal dpr = d->img->devicePixelRatio();
146KSaneViewer::~KSaneViewer()
149 clearSavedSelections();
155int KSaneViewer::currentImageHeight()
const
157 return d->currentImageHeight;
161int KSaneViewer::currentImageWidth()
const
163 return d->currentImageWidth;
167void KSaneViewer::setQImage(
QImage *img)
169 if (img ==
nullptr) {
181 d->currentImageWidth = img->
width();
182 d->currentImageHeight = img->
height();
184 d->scene->setSceneRect(0, 0, d->currentImageWidth / dpr, d->currentImageHeight / dpr);
185 d->selection->setMaxRight(d->currentImageWidth);
186 d->selection->setMaxBottom(d->currentImageHeight);
188 d->selection->setDevicePixelRatio(dpr);
189 d->hideTop->setDevicePixelRatio(dpr);
190 d->hideBottom->setDevicePixelRatio(dpr);
191 d->hideRight->setDevicePixelRatio(dpr);
192 d->hideLeft->setDevicePixelRatio(dpr);
193 d->hideArea->setDevicePixelRatio(dpr);
199void KSaneViewer::updateImage()
207void KSaneViewer::zoomIn()
210 d->selection->saveZoom(
transform().m11());
211 for (
int i = 0; i < d->selectionList.size(); ++i) {
212 d->selectionList[i]->saveZoom(
transform().m11());
217void KSaneViewer::zoomOut()
219 scale(1.0 / 1.3, 1.0 / 1.3);
220 d->selection->saveZoom(
transform().m11());
221 for (
int i = 0; i < d->selectionList.size(); ++i) {
222 d->selectionList[i]->saveZoom(
transform().m11());
227void KSaneViewer::zoomSel()
229 if (d->selection->isVisible()) {
231 d->selection->saveZoom(
transform().m11());
232 for (
int i = 0; i < d->selectionList.size(); ++i) {
233 d->selectionList[i]->saveZoom(
transform().m11());
241void KSaneViewer::zoom2Fit()
244 d->selection->saveZoom(
transform().m11());
245 for (
int i = 0; i < d->selectionList.size(); ++i) {
246 d->selectionList[i]->saveZoom(
transform().m11());
251void KSaneViewer::setTLX(
float ratio)
253 if (!d->selection->isVisible()) {
256 QRectF rect = d->selection->rect();
257 rect.
setLeft(ratio * d->img->width());
258 d->selection->setRect(rect);
259 updateSelVisibility();
263void KSaneViewer::setTLY(
float ratio)
265 if (!d->selection->isVisible()) {
268 QRectF rect = d->selection->rect();
269 rect.
setTop(ratio * d->img->height());
270 d->selection->setRect(rect);
271 updateSelVisibility();
275void KSaneViewer::setBRX(
float ratio)
277 if (!d->selection->isVisible()) {
280 QRectF rect = d->selection->rect();
281 rect.
setRight(ratio * d->img->width());
282 d->selection->setRect(rect);
283 updateSelVisibility();
287void KSaneViewer::setBRY(
float ratio)
289 if (!d->selection->isVisible()) {
292 QRectF rect = d->selection->rect();
293 rect.
setBottom(ratio * d->img->height());
294 d->selection->setRect(rect);
295 updateSelVisibility();
299void KSaneViewer::setSelection(
float tl_x,
float tl_y,
float br_x,
float br_y)
303 tl_y * d->img->height(),
304 br_x * d->img->width(),
305 br_y * d->img->height());
307 d->selection->setRect(rect);
308 updateSelVisibility();
312void KSaneViewer::setHighlightArea(
float tl_x,
float tl_y,
float br_x,
float br_y)
317 rect.
setCoords(0, 0, tl_x * d->img->width(), d->img->height());
318 d->hideLeft->setRect(rect);
325 d->hideRight->setRect(rect);
330 br_x * d->img->width(),
331 tl_y * d->img->height());
332 d->hideTop->setRect(rect);
336 br_y * d->img->height(),
337 br_x * d->img->width(),
339 d->hideBottom->setRect(rect);
342 rect.
setCoords(tl_x * d->img->width(), tl_y * d->img->height(),
343 br_x * d->img->width(), br_y * d->img->height());
345 d->hideArea->setRect(rect);
348 d->hideRight->show();
350 d->hideBottom->show();
356void KSaneViewer::setHighlightShown(
int percentage,
QColor hideColor)
358 if (percentage >= 100) {
363 d->hideArea->setBrush(hideColor);
365 qreal diff = d->hideBottom->rect().top() - d->hideTop->rect().bottom();
366 diff -= (diff * percentage) / 100;
368 QRectF rect = d->hideArea->rect();
369 rect.
setTop(d->hideBottom->rect().top() - diff);
371 d->hideArea->setRect(rect);
377void KSaneViewer::updateHighlight()
379 if (d->selection->isVisible()) {
382 rect.
setCoords(0, 0, d->selection->rect().left(), d->img->height());
383 d->hideLeft->setRect(rect);
386 rect.
setCoords(d->selection->rect().right(),
390 d->hideRight->setRect(rect);
393 rect.
setCoords(d->selection->rect().left(),
395 d->selection->rect().right(),
396 d->selection->rect().top());
397 d->hideTop->setRect(rect);
400 rect.
setCoords(d->selection->rect().left(),
401 d->selection->rect().bottom(),
402 d->selection->rect().right(),
404 d->hideBottom->setRect(rect);
407 d->hideRight->show();
409 d->hideBottom->show();
413 d->hideRight->hide();
415 d->hideBottom->hide();
421void KSaneViewer::clearHighlight()
424 d->hideRight->hide();
426 d->hideBottom->hide();
431void KSaneViewer::updateSelVisibility()
433 if ((d->selection->rect().width() > 0.001) &&
434 (d->selection->rect().height() > 0.001) &&
435 ((d->img->width() - d->selection->rect().width() > 0.1) ||
436 (d->img->height() - d->selection->rect().height() > 0.1))) {
437 d->selection->setVisible(
true);
439 d->selection->setVisible(
false);
445int KSaneViewer::selListSize()
447 if (d->selection->isVisible()) {
448 return (d->selectionList.size() + 1);
450 return d->selectionList.size();
455bool KSaneViewer::selectionAt(
int index,
float &tl_x,
float &tl_y,
float &br_x,
float &br_y)
457 if ((index < 0) || (index > d->selectionList.size())) {
458 activeSelection(tl_x, tl_y, br_x, br_y);
461 if (index == d->selectionList.size()) {
462 return activeSelection(tl_x, tl_y, br_x, br_y);
465 tl_x = d->selectionList[index]->rect().left() / d->img->width();
466 tl_y = d->selectionList[index]->rect().top() / d->img->height();
467 br_x = d->selectionList[index]->rect().right() / d->img->width();
468 br_y = d->selectionList[index]->rect().bottom() / d->img->height();
473bool KSaneViewer::activeSelection(
float &tl_x,
float &tl_y,
float &br_x,
float &br_y)
475 if (!d->selection->isVisible()) {
483 tl_x = d->selection->rect().left() / d->img->width();
484 tl_y = d->selection->rect().top() / d->img->height();
485 br_x = d->selection->rect().right() / d->img->width();
486 br_y = d->selection->rect().bottom() / d->img->height();
488 if ((tl_x == br_x) || (tl_y == br_y)) {
499void KSaneViewer::clearActiveSelection()
501 d->selection->setRect(
QRectF(0, 0, 0, 0));
502 d->selection->intersects(
QPointF(100, 100));
503 d->selection->setVisible(
false);
507void KSaneViewer::clearSavedSelections()
511 while (!d->selectionList.isEmpty()) {
512 tmp = d->selectionList.takeFirst();
513 d->scene->removeItem(tmp);
519void KSaneViewer::clearSelections()
521 clearActiveSelection();
522 clearSavedSelections();
523 updateSelVisibility();
527void KSaneViewer::setMultiselectionEnabled(
bool enabled)
529 d->multiSelectionEnabled = enabled;
531 d->selection->setAddButtonEnabled(enabled);
541 while (d->wheelDelta >= QWheelEvent::DefaultDeltasPerStep) {
543 d->wheelDelta -= QWheelEvent::DefaultDeltasPerStep;
546 while (d->wheelDelta <= -QWheelEvent::DefaultDeltasPerStep) {
548 d->wheelDelta += QWheelEvent::DefaultDeltasPerStep;
559 d->m_left_last_x = e->
x();
560 d->m_left_last_y = e->
y();
561 QPointF scenePoint = scenePos(e) * d->selection->devicePixelRatio();
562 d->lastSPoint = scenePoint;
564 if (!d->selection->isVisible()) {
565 d->selection->setVisible(
true);
566 d->selection->setRect(
QRectF(scenePoint,
QSizeF(0, 0)));
567 d->selection->intersects(scenePoint);
568 d->change = SelectionItem::BottomRight;
569 }
else if (d->selection->intersects(scenePoint) == SelectionItem::None) {
570 d->selection->setRect(
QRectF(scenePoint,
QSizeF(0, 0)));
571 d->change = SelectionItem::BottomRight;
582 bool removed =
false;
584 if ((d->selection->rect().width() < 0.001) ||
585 (d->selection->rect().height() < 0.001)) {
586 Q_EMIT newSelection(0.0, 0.0, 1.0, 1.0);
587 clearActiveSelection();
590 QPointF scenePoint = scenePos(e) * d->selection->devicePixelRatio();
591 for (
int i = 0; i < d->selectionList.size(); i++) {
592 if (d->selectionList[i]->intersects(scenePoint) == SelectionItem::AddRemove) {
593 d->scene->removeItem(d->selectionList[i]);
594 SelectionItem *tmp = d->selectionList[i];
595 d->selectionList.removeAt(i);
596 d->selection->setVisible(
true);
597 d->selection->setRect(tmp->rect());
598 d->selection->intersects(scenePoint);
604 if (!removed && (d->selection->intersects(scenePoint) == SelectionItem::AddRemove)) {
606 SelectionItem *tmp =
new SelectionItem(d->selection->rect());
607 tmp->setDevicePixelRatio(d->img->devicePixelRatio());
608 d->selectionList.push_back(tmp);
609 d->selectionList.back()->setSaved(
true);
610 d->selectionList.back()->saveZoom(
transform().m11());
611 d->scene->addItem(d->selectionList.back());
612 d->selectionList.back()->setZValue(9);
613 d->selectionList.back()->intersects(scenePoint);
616 Q_EMIT newSelection(0.0, 0.0, 1.0, 1.0);
617 clearActiveSelection();
622 (d->selection->isVisible()) &&
623 (d->img->width() > 0.001) &&
624 (d->img->height() > 0.001)) {
625 float tlx = d->selection->rect().left() / d->img->width();
626 float tly = d->selection->rect().top() / d->img->height();
627 float brx = d->selection->rect().right() / d->img->width();
628 float bry = d->selection->rect().bottom() / d->img->height();
630 Q_EMIT newSelection(tlx, tly, brx, bry);
639 QPointF scenePoint = scenePos(e) * d->selection->devicePixelRatio();
643 int dx = e->
x() - d->m_left_last_x;
644 int dy = e->
y() - d->m_left_last_y;
645 verticalScrollBar()->setValue(verticalScrollBar()->value() - dy);
646 horizontalScrollBar()->setValue(horizontalScrollBar()->value() - dx);
647 d->m_left_last_x = e->
x();
648 d->m_left_last_y = e->
y();
651 QRectF rect = d->selection->rect();
653 case SelectionItem::None:
656 case SelectionItem::Top:
657 if (scenePoint.
y() < rect.
bottom()) {
660 d->change = SelectionItem::Bottom;
664 case SelectionItem::TopRight:
665 if (scenePoint.
x() > rect.
left()) {
669 d->change = SelectionItem::TopLeft;
671 if (scenePoint.
y() < rect.
bottom()) {
675 d->change = SelectionItem::BottomLeft;
678 case SelectionItem::Right:
679 if (scenePoint.
x() > rect.
left()) {
683 d->change = SelectionItem::Left;
686 case SelectionItem::BottomRight:
687 if (scenePoint.
x() > rect.
left()) {
691 d->change = SelectionItem::BottomLeft;
693 if (scenePoint.
y() > rect.
top()) {
697 d->change = SelectionItem::TopRight;
700 case SelectionItem::Bottom:
701 if (scenePoint.
y() > rect.
top()) {
704 d->change = SelectionItem::Top;
708 case SelectionItem::BottomLeft:
709 if (scenePoint.
x() < rect.
right()) {
713 d->change = SelectionItem::BottomRight;
715 if (scenePoint.
y() > rect.
top()) {
719 d->change = SelectionItem::TopLeft;
722 case SelectionItem::Left:
723 if (scenePoint.
x() < rect.
right()) {
727 d->change = SelectionItem::Right;
730 case SelectionItem::TopLeft:
731 if (scenePoint.
x() < rect.
right()) {
735 d->change = SelectionItem::TopRight;
737 if (scenePoint.
y() < rect.
bottom()) {
741 d->change = SelectionItem::BottomLeft;
744 case SelectionItem::Move:
745 rect.
translate(d->selection->fixTranslation(scenePoint - d->lastSPoint));
747 case SelectionItem::AddRemove:
753 }
else if (d->selection->isVisible()) {
754 d->change = d->selection->intersects(scenePoint);
757 case SelectionItem::None:
760 case SelectionItem::Top:
763 case SelectionItem::TopRight:
766 case SelectionItem::Right:
769 case SelectionItem::BottomRight:
772 case SelectionItem::Bottom:
775 case SelectionItem::BottomLeft:
778 case SelectionItem::Left:
781 case SelectionItem::TopLeft:
784 case SelectionItem::Move:
787 case SelectionItem::AddRemove:
796 for (
int i = 0; i < d->selectionList.size(); i++) {
797 if (d->selectionList[i]->intersects(scenePoint) == SelectionItem::AddRemove) {
802 d->lastSPoint = scenePoint;
808static const int DIFF_TRIGGER = 8;
811static const int SUM_TRIGGER = 4;
814static const int AVERAGE_TRIGGER = 7;
817static const int SEL_MARGIN = 3;
820static const int MAX_NUM_SELECTIONS = 8;
823static const int AVERAGE_COUNT = 50;
824static const int AVERAGE_MULT = 49;
827static const float MIN_AREA_SIZE = 0.01;
829void KSaneViewer::findSelections(
float area)
832 float multiplier = sqrt(area / (d->img->height() * d->img->width()));
834 int width = (int)(d->img->width() * multiplier);
835 int height = (int)(d->img->height() * multiplier);
853 for (
int h = 1; h < height; h++) {
855 if (h < height - 1) {
857 pix = qGray(img.
pixel(0, h));
858 diff = qAbs(pix - qGray(img.
pixel(1, h)));
859 diff += qAbs(pix - qGray(img.
pixel(0, h - 1)));
860 diff += qAbs(pix - qGray(img.
pixel(0, h + 1)));
861 if (diff > DIFF_TRIGGER) {
867 pix = qGray(img.
pixel(width - 1, h));
868 diff = qAbs(pix - qGray(img.
pixel(width - 2, h)));
869 diff += qAbs(pix - qGray(img.
pixel(width - 1, h - 1)));
870 diff += qAbs(pix - qGray(img.
pixel(width - 1, h + 1)));
871 if (diff > DIFF_TRIGGER) {
872 colSums[width - 1] += diff;
876 for (
int w = 1; w < (width - 1); w++) {
877 pix = qGray(img.
pixel(w, h));
880 diff += qAbs(pix - qGray(img.
pixel(w - 1, h)));
881 diff += qAbs(pix - qGray(img.
pixel(w + 1, h)));
882 diff += qAbs(pix - qGray(img.
pixel(w, h - 1)));
883 diff += qAbs(pix - qGray(img.
pixel(w, h + 1)));
884 if (diff > DIFF_TRIGGER) {
891 if ((rowSum / width) > SUM_TRIGGER) {
893 if (hSelMargin < SEL_MARGIN) {
896 if (hSelMargin == SEL_MARGIN) {
897 hSelStart = h - SEL_MARGIN + 1;
901 if (hSelStart >= 0) {
902 if (hSelMargin > 0) {
906 if ((hSelStart > -1) && ((hSelMargin == 0) || (h == height - 1))) {
907 if (h == height - 1) {
908 hSelEnd = h - hSelMargin;
910 hSelEnd = h - SEL_MARGIN;
914 for (
int w = 0; w <= width; w++) {
915 if ((colSums[w] / (h - hSelStart)) > SUM_TRIGGER) {
917 if (wSelMargin < SEL_MARGIN) {
920 if (wSelMargin == SEL_MARGIN) {
921 wSelStart = w - SEL_MARGIN + 1;
925 if (wSelStart >= 0) {
926 if (wSelMargin > 0) {
930 if ((wSelStart >= 0) && ((wSelMargin == 0) || (w == width))) {
934 wSelEnd = w - SEL_MARGIN + 1;
938 if ((wSelEnd - wSelStart) < width) {
941 int x1 = wSelStart / multiplier;
942 int y1 = hSelStart / multiplier;
943 int x2 = wSelEnd / multiplier;
944 int y2 = hSelEnd / multiplier;
945 float selArea = (float)(wSelEnd - wSelStart) * (float)(hSelEnd - hSelStart);
946 if (selArea > (area * MIN_AREA_SIZE)) {
948 tmp->setDevicePixelRatio(d->img->devicePixelRatio());
949 d->selectionList.push_back(tmp);
950 d->selectionList.back()->setSaved(
true);
951 d->selectionList.back()->saveZoom(
transform().m11());
952 d->scene->addItem(d->selectionList.back());
953 d->selectionList.back()->setZValue(9);
971 if (d->selectionList.size() > MAX_NUM_SELECTIONS) {
973 clearSavedSelections();
979 refineSelections(qRound(1 / multiplier));
981 float minArea = d->img->height() * d->img->width() * MIN_AREA_SIZE;
984 while (i < d->selectionList.size()) {
985 if ((d->selectionList[i]->rect().width() * d->selectionList[i]->rect().height()) < minArea) {
986 d->scene->removeItem(d->selectionList[i]);
987 d->selectionList.removeAt(i);
995QSize KSaneViewer::sizeHint()
const
997 return QSize(250, 300);
1000void KSaneViewer::refineSelections(
int pixelMargin)
1008 for (
int i = 0; i < d->selectionList.size(); i++) {
1009 QRectF selRect = d->selectionList.at(i)->rect();
1012 hSelStart = (int)selRect.
top();
1013 hSelEnd = (int)selRect.
bottom();
1014 wSelStart = (int)selRect.
left();
1015 wSelEnd = (int)selRect.
right();
1019 hSelStart = refineRow(hSelStart - pixelMargin, hSelEnd, wSelStart, wSelEnd);
1022 hSelEnd = refineRow(hSelEnd + pixelMargin, hSelStart, wSelStart, wSelEnd);
1025 wSelStart = refineColumn(wSelStart - pixelMargin, wSelEnd, hSelStart, hSelEnd);
1028 wSelEnd = refineColumn(wSelEnd + pixelMargin, wSelStart, hSelStart, hSelEnd);
1031 d->selectionList.at(i)->setRect(
QRectF(
QPointF(wSelStart, hSelStart),
QPointF(wSelEnd, hSelEnd)));
1035int KSaneViewer::refineRow(
int fromRow,
int toRow,
int colStart,
int colEnd)
1041 int addSub = (fromRow < toRow) ? 1 : -1;
1049 if (colEnd >= d->img->width() - 1) {
1050 colEnd = d->img->width() - 2;
1056 if (fromRow >= d->img->height() - 1) {
1057 fromRow = d->img->height() - 2;
1063 if (toRow >= d->img->height() - 1) {
1064 toRow = d->img->height() - 2;
1068 while (row != toRow) {
1070 for (
int w = colStart; w < colEnd; w++) {
1072 pix = qGray(d->img->pixel(w, row));
1074 diff += qAbs(pix - qGray(d->img->pixel(w - 1, row)));
1075 diff += qAbs(pix - qGray(d->img->pixel(w + 1, row)));
1076 diff += qAbs(pix - qGray(d->img->pixel(w, row - 1)));
1077 diff += qAbs(pix - qGray(d->img->pixel(w, row + 1)));
1078 if (diff <= DIFF_TRIGGER) {
1082 rowTrigger = ((rowTrigger * AVERAGE_MULT) + diff) / AVERAGE_COUNT;
1084 if (rowTrigger > AVERAGE_TRIGGER) {
1089 if (rowTrigger > AVERAGE_TRIGGER) {
1095 if (row == (d->img->width() - 2)) {
1096 row = d->img->width();
1105int KSaneViewer::refineColumn(
int fromCol,
int toCol,
int rowStart,
int rowEnd)
1112 int addSub = (fromCol < toCol) ? 1 : -1;
1120 if (rowEnd >= d->img->height() - 1) {
1121 rowEnd = d->img->height() - 2;
1127 if (fromCol >= d->img->width() - 1) {
1128 fromCol = d->img->width() - 2;
1134 if (toCol >= d->img->width() - 1) {
1135 toCol = d->img->width() - 2;
1139 while (col != toCol) {
1142 for (
int row = rowStart; row < rowEnd; row++) {
1145 pix = qGray(d->img->pixel(col, row));
1147 diff += qAbs(pix - qGray(d->img->pixel(col - 1, row)));
1148 diff += qAbs(pix - qGray(d->img->pixel(col + 1, row)));
1149 diff += qAbs(pix - qGray(d->img->pixel(col, row - 1)));
1150 diff += qAbs(pix - qGray(d->img->pixel(col, row + 1)));
1151 if (diff <= DIFF_TRIGGER) {
1155 colTrigger = ((colTrigger * AVERAGE_MULT) + diff) / AVERAGE_COUNT;
1157 if (colTrigger > AVERAGE_TRIGGER) {
1162 if (colTrigger > AVERAGE_TRIGGER) {
1168 if (col == (d->img->width() - 2)) {
1169 col = d->img->width();
1192#include "moc_ksaneviewer.cpp"
QString i18n(const char *text, const TYPE &arg...)
QAction * zoomIn(const QObject *recvr, const char *slot, QObject *parent)
QAction * zoomOut(const QObject *recvr, const char *slot, QObject *parent)
void triggered(bool checked)
virtual void mouseMoveEvent(QMouseEvent *event) override
virtual void mousePressEvent(QMouseEvent *event) override
virtual void mouseReleaseEvent(QMouseEvent *event) override
virtual void wheelEvent(QWheelEvent *event) override
QIcon fromTheme(const QString &name)
qreal devicePixelRatio() const const
QRgb pixel(const QPoint &position) const const
QImage scaled(const QSize &size, Qt::AspectRatioMode aspectRatioMode, Qt::TransformationMode transformMode) const const
QPointF screenPos() const const
void drawImage(const QPoint &point, const QImage &image)
void fillRect(const QRect &rectangle, QGradient::Preset preset)
QPoint toPoint() const const
qreal bottom() const const
qreal right() const const
void setCoords(qreal x1, qreal y1, qreal x2, qreal y2)
void setRect(qreal x, qreal y, qreal width, qreal height)
QSizeF size() const const
QPointF topLeft() const const
void translate(const QPointF &offset)
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
QPoint angleDelta() const const