KWidgetsAddons

kanimatedbutton.h
1 /*
2  This file is part of the KDE libraries
3  SPDX-FileCopyrightText: 2000 Kurt Granroth <[email protected]>
4  SPDX-FileCopyrightText: 2006 Hamish Rodda <[email protected]>
5 
6  SPDX-License-Identifier: LGPL-2.0-only
7 */
8 #ifndef KANIMATEDBUTTON_H
9 #define KANIMATEDBUTTON_H
10 
11 #include <kwidgetsaddons_export.h>
12 #include <QToolButton>
13 
27 class KWIDGETSADDONS_EXPORT KAnimatedButton : public QToolButton
28 {
29  Q_OBJECT
30  Q_PROPERTY(QString animationPath READ animationPath WRITE setAnimationPath)
31 
32 public:
38  explicit KAnimatedButton(QWidget *parent = nullptr);
39 
43  virtual ~KAnimatedButton();
44 
48  QString animationPath() const;
49 
55  void setAnimationPath(const QString &path);
56 
57 public Q_SLOTS:
61  void start();
62 
66  void stop();
67 
68 private:
69  class KAnimatedButtonPrivate *const d;
70 
71  Q_PRIVATE_SLOT(d, void _k_movieFrameChanged(int))
72  Q_PRIVATE_SLOT(d, void _k_movieFinished())
73 
75 };
76 
77 #endif // KANIMATEDBUTTON_H
An extended version of QToolButton which can display an animation.
Q_PROPERTY(...)
Q_DISABLE_COPY(Class)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Sep 23 2020 22:44:30 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.