• 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/meter.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  * *
6  * This program is free software; you can redistribute it and/or modify *
7  * it under the terms of the GNU General Public License as published by *
8  * the Free Software Foundation; either version 2 of the License, or *
9  * (at your option) any later version. *
10  ***************************************************************************/
11 #ifndef METER_H
12 #define METER_H
13 
14 #include <QObject>
15 #include <QMouseEvent>
16 #include <QGraphicsItem>
17 
18 #include "../superkaramba_export.h"
19 
20 class QPainter;
21 class Karamba;
22 
23 class SUPERKARAMBA_EXPORT Meter : public QObject, public QGraphicsItem
24 {
25  Q_OBJECT
26 #if QT_VERSION >= 0x040600
27  Q_INTERFACES(QGraphicsItem)
28 #endif
29 public:
30  Meter(Karamba* k, int ix, int iy, int iw, int ih);
31  Meter(Karamba* k);
32  virtual ~Meter();
33 
34  virtual int getX() const;
35  virtual void setX(int);
36 
37  virtual int getY() const;
38  virtual void setY(int);
39 
40  virtual int getWidth() const;
41  virtual void setWidth(int);
42 
43  virtual int getHeight() const;
44  virtual void setHeight(int);
45 
46  virtual int getMin() const;
47  virtual void setMin(int min);
48 
49  virtual int getMax() const;
50  virtual void setMax(int max);
51 
52  virtual int getValue() const;
53  virtual void setValue(int);
54 
55  virtual QString getStringValue() const;
56  virtual void setValue(const QString&);
57 
58  virtual QColor getColor() const;
59  virtual void setColor(QColor color);
60 
61  bool isEnabled() const;
62  void setEnabled(bool enable);
63 
64  virtual void setSize(int x, int y, int width, int height);
65 
66  virtual void show();
67  virtual void hide();
68 
69  virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
70  QWidget *widget) = 0;
71 
72  virtual QRectF boundingRect() const;
73 
74 protected:
75  QRectF m_boundingBox;
76 
77  bool m_clickable;
78  bool m_hidden;
79  int m_minValue;
80  int m_maxValue;
81 
82  QColor m_color;
83 
84  Karamba* m_karamba;
85 };
86 
87 #endif // METER_H
hide
int hide(long widget)
Definition: misc.cpp:618
Meter::m_boundingBox
QRectF m_boundingBox
Definition: meters/meter.h:75
QGraphicsItem
QWidget
QObject
Karamba
Definition: karamba.h:52
Meter::m_hidden
bool m_hidden
Definition: meters/meter.h:78
Meter::m_maxValue
int m_maxValue
Definition: meters/meter.h:80
Meter::m_clickable
bool m_clickable
Definition: meters/meter.h:77
Meter::m_karamba
Karamba * m_karamba
Definition: meters/meter.h:84
Meter
Definition: meters/meter.h:23
SUPERKARAMBA_EXPORT
#define SUPERKARAMBA_EXPORT
Definition: superkaramba_export.h:32
Meter::m_minValue
int m_minValue
Definition: meters/meter.h:79
Meter::m_color
QColor m_color
Definition: meters/meter.h:82
show
int show(long widget)
Definition: misc.cpp:600
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:07:20 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