• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

kstars

  • sources
  • kde-4.12
  • kdeedu
  • kstars
  • kstars
  • ekos
QProgressIndicator.h
Go to the documentation of this file.
1 /*
2 *
3 * This file is part of QProgressIndicator,
4 * an open-source recent files menu widget
5 *
6 * Copyright (C) 2009 - 2010 Morgan Leborgne
7 *
8 * This program is free software: you can redistribute it and/or modify
9 * it under the terms of the GNU Lesser General Public License as published by
10 * the Free Software Foundation, either version 3 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Lesser General Public License for more details.
17 *
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with QRecentFilesMenu. If not, see <http://www.gnu.org/licenses/>.
20 *
21 */
22 #ifndef QPROGRESSINDICATOR_H
23 #define QPROGRESSINDICATOR_H
24 
25 #include <QWidget>
26 #include <QColor>
27 
35 class QProgressIndicator : public QWidget
36 {
37  Q_OBJECT
38  Q_PROPERTY(int delay READ animationDelay WRITE setAnimationDelay)
39  Q_PROPERTY(bool displayedWhenStopped READ isDisplayedWhenStopped WRITE setDisplayedWhenStopped)
40  Q_PROPERTY(QColor color READ color WRITE setColor)
41 public:
42  explicit QProgressIndicator(QWidget* parent = 0);
43 
48  int animationDelay() const { return m_delay; }
49 
54  bool isAnimated () const;
55 
60  bool isDisplayedWhenStopped() const;
61 
65  const QColor & color() const { return m_color; }
66 
67  virtual QSize sizeHint() const;
68  int heightForWidth(int w) const;
69 public slots:
73  void startAnimation();
74 
78  void stopAnimation();
79 
85  void setAnimationDelay(int delay);
86 
91  void setDisplayedWhenStopped(bool state);
92 
96  void setColor(const QColor & color);
97 protected:
98  virtual void timerEvent(QTimerEvent * event);
99  virtual void paintEvent(QPaintEvent * event);
100 private:
101  int m_angle;
102  int m_timerId;
103  int m_delay;
104  bool m_displayedWhenStopped;
105  QColor m_color;
106 };
107 
108 #endif // QPROGRESSINDICATOR_H
QProgressIndicator::setAnimationDelay
void setAnimationDelay(int delay)
Definition: QProgressIndicator.cpp:73
QProgressIndicator::isDisplayedWhenStopped
bool isDisplayedWhenStopped() const
Definition: QProgressIndicator.cpp:50
QWidget
QProgressIndicator::sizeHint
virtual QSize sizeHint() const
Definition: QProgressIndicator.cpp:91
QProgressIndicator::setDisplayedWhenStopped
void setDisplayedWhenStopped(bool state)
Definition: QProgressIndicator.cpp:43
QProgressIndicator::startAnimation
void startAnimation()
Definition: QProgressIndicator.cpp:55
QProgressIndicator::color
const QColor & color() const
Definition: QProgressIndicator.h:65
QProgressIndicator
The QProgressIndicator class lets an application display a progress indicator to show that a lengthy ...
Definition: QProgressIndicator.h:35
QProgressIndicator::isAnimated
bool isAnimated() const
Definition: QProgressIndicator.cpp:38
QProgressIndicator::paintEvent
virtual void paintEvent(QPaintEvent *event)
Definition: QProgressIndicator.cpp:108
QProgressIndicator::delay
int delay
Definition: QProgressIndicator.h:38
QProgressIndicator::stopAnimation
void stopAnimation()
Definition: QProgressIndicator.cpp:63
QProgressIndicator::setColor
void setColor(const QColor &color)
Definition: QProgressIndicator.cpp:84
QProgressIndicator::displayedWhenStopped
bool displayedWhenStopped
Definition: QProgressIndicator.h:39
QProgressIndicator::heightForWidth
int heightForWidth(int w) const
Definition: QProgressIndicator.cpp:96
QProgressIndicator::animationDelay
int animationDelay() const
Definition: QProgressIndicator.h:48
QProgressIndicator::timerEvent
virtual void timerEvent(QTimerEvent *event)
Definition: QProgressIndicator.cpp:101
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:20 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kstars

Skip menu "kstars"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal