KSane
10#include <QGraphicsView>
19class KSaneViewer :
public QGraphicsView
24 ~KSaneViewer()
override;
26 void setQImage(QImage *img);
30 void findSelections(
float area = 10000.0);
32 QSize sizeHint()
const override;
34 int currentImageHeight()
const;
35 int currentImageWidth()
const;
39 void setTLX(
float ratio);
40 void setTLY(
float ratio);
41 void setBRX(
float ratio);
42 void setBRY(
float ratio);
50 void setSelection(
float tl_x,
float tl_y,
float br_x,
float br_y);
51 void clearActiveSelection();
52 void clearSavedSelections();
53 void clearSelections();
61 void setHighlightArea(
float tl_x,
float tl_y,
float br_x,
float br_y);
66 void setHighlightShown(
int percentage, QColor hideColor =
Qt::white);
69 void clearHighlight();
78 bool selectionAt(
int index,
float &tl_x,
float &tl_y,
float &br_x,
float &br_y);
80 void setMultiselectionEnabled(
bool enabled);
83 void newSelection(
float tl_x,
float tl_y,
float br_x,
float br_y);
86 void wheelEvent(QWheelEvent *e)
override;
87 void mousePressEvent(QMouseEvent *e)
override;
88 void mouseReleaseEvent(QMouseEvent *e)
override;
89 void mouseMoveEvent(QMouseEvent *e)
override;
90 void drawBackground(QPainter *painter,
const QRectF &
rect)
override;
93 void updateSelVisibility();
94 void updateHighlight();
95 bool activeSelection(
float &tl_x,
float &tl_y,
float &br_x,
float &br_y);
96 void refineSelections(
int pixelMargin);
102 int refineRow(
int fromRow,
int toRow,
int rowStart,
int rowEnd);
103 int refineColumn(
int fromCol,
int toCol,
int colStart,
int colEnd);
105 QPointF scenePos(QMouseEvent *e)
const;
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:56:54 by
doxygen 1.13.2 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.