• 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/graph.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2003 by Hans Karlsson *
3  * karlsson.h@home.se *
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 
11 #ifndef GRAPH_H
12 #define GRAPH_H
13 
14 #include <QPainter>
15 #include <QColor>
16 
17 #include "meter.h"
18 
19 class Graph : public Meter
20 {
21  Q_OBJECT
22 
23 public:
24  Graph(Karamba* k, int ix, int iy, int iw, int ih, int nbrPoints);
25  Graph();
26  ~Graph();
27 
28  void setValue(int);
29  int getValue() const;
30  void setValue(const QString&);
31  QColor getFillColor() const;
32  void setFillColor(QColor);
33  void setScrollDirection(const QString&);
34  QString getScrollDirection() const;
35  void setPlotDirection(const QString&);
36  QString getPlotDirection() const;
37  bool shouldFill() const;
38  void shouldFill(bool b);
39  void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
40  QWidget *widget);
41 private:
42 
43  enum SCROLL_DIR {
44  SCROLL_LEFT = -1,
45  SCROLL_RIGHT = 1
46  };
47 
48  enum PLOT_DIR {
49  PLOT_DOWN = -1,
50  PLOT_UP = 1
51  };
52 
53  int nbrPoints;
54  int lastValue;
55 
56  bool fill;
57  SCROLL_DIR scrollDir;
58  PLOT_DIR plotDir;
59  QColor fillColor;
60  QVector<int> m_values;
61 };
62 
63 #endif // GRAPH_H
Graph::getScrollDirection
QString getScrollDirection() const
Definition: meters/graph.cpp:98
meter.h
Graph
Definition: meters/graph.h:19
QWidget
Karamba
Definition: karamba.h:52
Graph::setPlotDirection
void setPlotDirection(const QString &)
Definition: meters/graph.cpp:105
Graph::setScrollDirection
void setScrollDirection(const QString &)
Definition: meters/graph.cpp:90
Graph::Graph
Graph()
Graph::setFillColor
void setFillColor(QColor)
Definition: meters/graph.cpp:37
Graph::getPlotDirection
QString getPlotDirection() const
Definition: meters/graph.cpp:112
Graph::paint
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
Notes on graphing rewrite - jwm.
Definition: meters/graph.cpp:172
Meter
Definition: meters/meter.h:23
Graph::setValue
void setValue(int)
Definition: meters/graph.cpp:62
Graph::shouldFill
bool shouldFill() const
Definition: meters/graph.cpp:52
Graph::getValue
int getValue() const
Definition: meters/graph.cpp:57
Graph::getFillColor
QColor getFillColor() const
Definition: meters/graph.cpp:33
Graph::~Graph
~Graph()
Definition: meters/graph.cpp:30
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