MCPcopy Create free account
hub / github.com/KDE/okular / paintEvent

Function paintEvent

part/presentationsearchbar.cpp:24–43  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

22#define SNAP_DELTA 15
23
24class HandleDrag : public QWidget
25{
26 Q_OBJECT
27
28public:
29 explicit HandleDrag(QWidget *parent = Q_NULLPTR)
30 : QWidget(parent)
31 {
32 setCursor(Qt::SizeAllCursor);
33 setFixedWidth(style()->pixelMetric(QStyle::PM_ToolBarHandleExtent));
34 }
35
36 void paintEvent(QPaintEvent *) override
37 {
38 QStyleOption opt;
39 opt.initFrom(this);
40 opt.state |= QStyle::State_Horizontal;
41 QStylePainter p(this);
42 p.drawPrimitive(QStyle::PE_IndicatorToolBarHandle, opt);
43 }
44};
45
46PresentationSearchBar::PresentationSearchBar(Okular::Document *document, QWidget *anchor, QWidget *parent)

Callers 1

paintEventMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected