Pages
API Documentation
On this page

KPixmapSequenceOverlayPainter Class

Paints a KPixmapSequence on top of any widget at any position. More...

  • Header: #include <KPixmapSequenceOverlayPainter>
  • CMake: find_package(KF6 REQUIRED COMPONENTS WidgetsAddons)
    target_link_libraries(mytarget PRIVATE KF6::WidgetsAddons)
  • Inherits: QObject

List of all members, including inherited members

Public Functions

Public Slots

Detailed Description

The KPixmapSequenceOverlayPainter paints an overlay on top of an arbitrary QWidget using a KPixmapSequence. This is typically used for spinners indicating that a process is not finished yet.

Member Function Documentation

[explicit] KPixmapSequenceOverlayPainter::KPixmapSequenceOverlayPainter(QObject *parent = nullptr)

Constructor

KPixmapSequenceOverlayPainter::KPixmapSequenceOverlayPainter(const KPixmapSequence &seq, QObject *parent = nullptr)

Qt::Alignment KPixmapSequenceOverlayPainter::alignment() const

The alignment of the pixmaps in the rect.

See also setAlignment

int KPixmapSequenceOverlayPainter::interval() const

The interval between frames.

See also setInterval

QPoint KPixmapSequenceOverlayPainter::offset() const

The optional offset within the rect.

See also setOffset

QRect KPixmapSequenceOverlayPainter::rect() const

The optional rect to draw the pixmaps in.

See also setRect

KPixmapSequence KPixmapSequenceOverlayPainter::sequence() const

The sequence used to draw the overlay.

See also setSequence

[slot] void KPixmapSequenceOverlayPainter::setAlignment(Qt::Alignment align)

Set the alignment of the sequence in rect.

align alignment of the overlay. Qt::AlignJustify does not make sense here.

Defaults to Qt::Center.

See also alignment()

[slot] void KPixmapSequenceOverlayPainter::setInterval(int msecs)

Set the interval between frames. The default is 200.

See also interval()

[slot] void KPixmapSequenceOverlayPainter::setOffset(const QPoint &offset)

Set the offset relative to the placement determined by alignment and rect.

offset An optional offset which allows an absolute placement.

Defaults to an empty point.

See also offset()

[slot] void KPixmapSequenceOverlayPainter::setRect(const QRect &rect)

Set the rect in which to place the sequence. Be aware that this optional property does not scale the pixmaps (except if it is smaller) but allows to change the placement.

rect The rect in which to draw the pixmap using alignment and offset. Be aware that setting a rect bigger than the widget can lead to weird painting errors.

Defaults to the widget's rect.

See also rect()

[slot] void KPixmapSequenceOverlayPainter::setSequence(const KPixmapSequence &seq)

Set the sequence to be used. By default the KDE busy sequence is used.

See also sequence()

[slot] void KPixmapSequenceOverlayPainter::setWidget(QWidget *w)

Set the widget to draw the overlay on.

[slot] void KPixmapSequenceOverlayPainter::start()

Start drawing the sequence.

The overlay will be drawn until a call to stop()

[slot] void KPixmapSequenceOverlayPainter::stop()

Stop drawing the overlay.

We use cookies to personalize content and to analyze our traffic. Please decide if you are willing to accept cookies from our website.