9 #ifndef TABLESIDESELECTOR_H
10 #define TABLESIDESELECTOR_H
47 Q_DECLARE_FLAGS(Sides,
Side)
81 QSize
sizeHint()
const {
return QSize(80, 80); }
102 Side closestSide(
const QPointF& point)
const;
127 Q_DECLARE_OPERATORS_FOR_FLAGS(TableSideSelector::Sides)
129 #endif // TABLESIDESELECTOR_H
void mouseMoveEvent(QMouseEvent *event)
Highlights the edge closest to mouse pointer.
Definition: tablesideselector.cpp:108
Definition: tablesideselector.h:44
int heightForWidth(int width) const
Returns width, as the selector is supposed to be square shaped.
Definition: tablesideselector.h:84
void mousePressEvent(QMouseEvent *event)
Toggles selection of the edge closest to mouse pointer.
Definition: tablesideselector.cpp:101
Side
Definition: tablesideselector.h:38
Style style() const
Returns the current style of the selector.
Definition: tablesideselector.h:75
void leaveEvent(QEvent *event)
Removes any highlighted edge.
Definition: tablesideselector.cpp:114
Sides selection() const
Returns the current selection as an ORed combination of enum flags.
Definition: tablesideselector.h:63
Definition: tablesideselector.h:26
Definition: tablesideselector.h:43
void selectionChanged()
Emitted when the selections has changed.
void setStyle(Style style)
Sets the style of the selector to style.
Definition: tablesideselector.h:78
void paintEvent(QPaintEvent *event)
Paints the table side selector.
Definition: tablesideselector.cpp:50
void setSelection(Sides selection)
Sets the current selection to selection.
Definition: tablesideselector.h:69
QList< TableSideSelector::Side > selectionList() const
Returns the current selection as a list of enum values.
Definition: tablesideselector.cpp:36
void clearSelection()
Clears the current selection.
Definition: tablesideselector.h:72
Definition: tablesideselector.h:42
Definition: tablesideselector.h:41
Definition: tablesideselector.h:40
QSize sizeHint() const
Returns the size hint of the table side selector.
Definition: tablesideselector.h:81
Definition: tablesideselector.h:56
TableSideSelector(QWidget *parent)
Creates a new side selector with all sides selected.
Definition: tablesideselector.cpp:26
Definition: tablesideselector.h:55