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

superkaramba

  • sources
  • kde-4.12
  • kdeutils
  • superkaramba
  • src
  • meters
meters/bar.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2003 by Hans Karlsson <karlsson.h@home.se> *
3  * Copyright (C) 2003 Matt Broadstone <mbroadst@gmail.com> *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  ***************************************************************************/
10 #ifndef BAR_H
11 #define BAR_H
12 
13 #include "meter.h"
14 
15 class QPainter;
16 class QTimer;
17 
18 class Bar : public Meter
19 {
20  Q_OBJECT
21 public:
22  Bar(Karamba* k, int x, int y, int width, int height);
23  ~Bar();
24 
25  void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
26  QWidget *widget);
27 
28  virtual void setMax(int m);
29  virtual void setMin(int m);
30 
31 public slots:
32  bool setImage(const QString &imagePath);
33  QString getImage() const;
34 
35  void setValue(const QString&);
36  void setValue(int);
37  int getValue() const;
38 
39  void setVertical(bool);
40  int getVertical() const;
41 
42  void recalculateValue();
43 
44  void valueChanged();
45 
46 private:
47  int m_barValue;
48  int m_oldBarValue;
49  int m_value;
50 
51  QTimer *m_timer;
52 
53  int m_pixmapWidth;
54  int m_pixmapHeight;
55 
56  bool m_verticalBar;
57 
58  QString m_imagePath;
59  QPixmap m_pixmap;
60 
61 };
62 
63 #endif // BAR_H
Bar::recalculateValue
void recalculateValue()
Definition: meters/bar.cpp:149
meter.h
QWidget
Bar::Bar
Bar(Karamba *k, int x, int y, int width, int height)
Definition: meters/bar.cpp:19
Bar::getValue
int getValue() const
Definition: meters/bar.cpp:87
Bar::setVertical
void setVertical(bool)
Definition: meters/bar.cpp:139
Bar::paint
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
Definition: meters/bar.cpp:154
Karamba
Definition: karamba.h:52
Bar
Definition: meters/bar.h:18
Bar::setImage
bool setImage(const QString &imagePath)
Definition: meters/bar.cpp:38
Bar::getVertical
int getVertical() const
Definition: meters/bar.cpp:144
Bar::~Bar
~Bar()
Definition: meters/bar.cpp:33
Bar::setMin
virtual void setMin(int m)
Definition: meters/bar.cpp:133
Bar::valueChanged
void valueChanged()
Definition: meters/bar.cpp:92
Meter
Definition: meters/meter.h:23
Bar::getImage
QString getImage() const
Definition: meters/bar.cpp:63
Bar::setValue
void setValue(const QString &)
Definition: meters/bar.cpp:82
Bar::setMax
virtual void setMax(int m)
Definition: meters/bar.cpp:127
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:07:19 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

superkaramba

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

kdeutils API Reference

Skip menu "kdeutils API Reference"
  • ark
  • filelight
  • kcalc
  • kcharselect
  • kdf
  • kfloppy
  • kgpg
  • kremotecontrol
  • ktimer
  • kwallet
  • superkaramba
  • sweeper

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