• 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
  • python
python/graph.cpp
Go to the documentation of this file.
1 /****************************************************************************
2 * graph_python.h - Functions for graph python api
3 *
4 * Copyright (c) 2004 Petri Damstén <damu@iki.fi>
5 *
6 * This file is part of SuperKaramba.
7 *
8 * SuperKaramba is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * SuperKaramba 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 General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with SuperKaramba; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 ****************************************************************************/
22 
23 #if defined(_XOPEN_SOURCE) && !defined(__SUNPRO_CC)
24 #undef _XOPEN_SOURCE
25 #endif
26 
27 #include "python/graph.h"
28 
29 #include <Python.h>
30 #include <qobject.h>
31 #include "../karamba.h"
32 #include "meters/meter.h"
33 #include "python/meter.h"
34 #include "meters/graph.h"
35 
36 PyObject* py_createGraph(PyObject *, PyObject *args)
37 {
38  long widget, x, y, w, h, points;
39 
40  if (!PyArg_ParseTuple(args, (char*)"llllll", &widget, &x, &y, &w, &h, &points))
41  return NULL;
42  if (!checkKaramba(widget))
43  return NULL;
44 
45  Graph *tmp =
46  new Graph((Karamba*)widget, (int)x, (int)y, (int)w, (int)h, (int)points);
47  ((Karamba*)widget)->addToGroup(tmp);
48  return (Py_BuildValue((char*)"l", (long)tmp));
49 }
50 
51 PyObject* py_deleteGraph(PyObject *, PyObject *args)
52 {
53  long widget, meter;
54  if (!PyArg_ParseTuple(args, (char*)"ll", &widget, &meter))
55  return NULL;
56  if (!checkKarambaAndMeter(widget, meter, "Graph"))
57  return NULL;
58 
59  ((Karamba*)widget)->deleteMeterFromSensors((Meter*)meter);
60  return Py_BuildValue((char*)"l",
61  ((Karamba*)widget)->removeMeter((Meter*)meter));
62 }
63 
64 PyObject* py_getThemeGraph(PyObject *self, PyObject *args)
65 {
66  return py_getThemeMeter(self, args, "Graph");
67 }
68 
69 PyObject* py_getGraphSize(PyObject *self, PyObject *args)
70 {
71  return py_getSize(self, args, "Graph");
72 }
73 
74 PyObject* py_resizeGraph(PyObject *self, PyObject *args)
75 {
76  return py_resize(self, args, "Graph");
77 }
78 
79 PyObject* py_getGraphPos(PyObject *self, PyObject *args)
80 {
81  return py_getPos(self, args, "Graph");
82 }
83 
84 PyObject* py_moveGraph(PyObject *self, PyObject *args)
85 {
86  return py_move(self, args, "Graph");
87 }
88 
89 PyObject* py_hideGraph(PyObject *self, PyObject *args)
90 {
91  return py_hide(self, args, "Graph");
92 }
93 
94 PyObject* py_showGraph(PyObject *self, PyObject *args)
95 {
96  return py_show(self, args, "Graph");
97 }
98 
99 PyObject* py_getGraphMinMax(PyObject *self, PyObject *args)
100 {
101  return py_getMinMax(self, args, "Graph");
102 }
103 
104 PyObject* py_setGraphMinMax(PyObject *self, PyObject *args)
105 {
106  return py_setMinMax(self, args, "Graph");
107 }
108 
109 PyObject* py_getGraphValue(PyObject *self, PyObject *args)
110 {
111  return py_getValue(self, args, "Graph");
112 }
113 
114 PyObject* py_setGraphValue(PyObject *self, PyObject *args)
115 {
116  return py_setValue(self, args, "Graph");
117 }
118 
119 PyObject* py_getGraphSensor(PyObject *self, PyObject *args)
120 {
121  return py_getSensor(self, args, "Graph");
122 }
123 
124 PyObject* py_setGraphSensor(PyObject *self, PyObject *args)
125 {
126  return py_setSensor(self, args, "Graph");
127 }
128 
129 PyObject* py_getGraphColor(PyObject *self, PyObject *args)
130 {
131  return py_getColor(self, args, "Graph");
132 }
133 
134 PyObject* py_setGraphColor(PyObject *self, PyObject *args)
135 {
136  return py_setColor(self, args, "Graph");
137 }
138 
139 
py_getThemeMeter
PyObject * py_getThemeMeter(PyObject *, PyObject *args, QString type)
Definition: python/meter.cpp:161
py_getMinMax
PyObject * py_getMinMax(PyObject *, PyObject *args, QString type)
Definition: python/meter.cpp:293
py_showGraph
PyObject * py_showGraph(PyObject *self, PyObject *args)
Graph/showGraph.
Definition: python/graph.cpp:94
py_getGraphPos
PyObject * py_getGraphPos(PyObject *self, PyObject *args)
Graph/getGraphPos.
Definition: python/graph.cpp:79
py_getGraphSize
PyObject * py_getGraphSize(PyObject *self, PyObject *args)
Graph/getGraphSize.
Definition: python/graph.cpp:69
py_move
PyObject * py_move(PyObject *, PyObject *args, QString type)
Definition: python/meter.cpp:212
PyObject
struct _object PyObject
Definition: python/karamba.h:35
graph.h
py_resizeGraph
PyObject * py_resizeGraph(PyObject *self, PyObject *args)
Graph/resizeGraph.
Definition: python/graph.cpp:74
py_getGraphValue
PyObject * py_getGraphValue(PyObject *self, PyObject *args)
Graph/getGraphValue.
Definition: python/graph.cpp:109
meter.h
graph.h
meter.h
Graph
Definition: meters/graph.h:19
py_hide
PyObject * py_hide(PyObject *, PyObject *args, QString type)
Definition: python/meter.cpp:225
py_moveGraph
PyObject * py_moveGraph(PyObject *self, PyObject *args)
Graph/moveGraph.
Definition: python/graph.cpp:84
py_getGraphSensor
PyObject * py_getGraphSensor(PyObject *self, PyObject *args)
Graph/getGraphSensor.
Definition: python/graph.cpp:119
py_getSensor
PyObject * py_getSensor(PyObject *, PyObject *args, QString type)
Definition: python/meter.cpp:316
py_setGraphValue
PyObject * py_setGraphValue(PyObject *self, PyObject *args)
Graph/setGraphValue.
Definition: python/graph.cpp:114
py_getSize
PyObject * py_getSize(PyObject *, PyObject *args, QString type)
Definition: python/meter.cpp:177
py_getGraphColor
PyObject * py_getGraphColor(PyObject *self, PyObject *args)
Graph/getGraphColor.
Definition: python/graph.cpp:129
py_getValue
PyObject * py_getValue(PyObject *, PyObject *args, QString type)
Definition: python/meter.cpp:247
Karamba
Definition: karamba.h:52
py_setGraphColor
PyObject * py_setGraphColor(PyObject *self, PyObject *args)
Graph/setGraphColor.
Definition: python/graph.cpp:134
py_resize
PyObject * py_resize(PyObject *, PyObject *args, QString type)
Definition: python/meter.cpp:189
py_getThemeGraph
PyObject * py_getThemeGraph(PyObject *self, PyObject *args)
Graph/getThemeGraph.
Definition: python/graph.cpp:64
py_setValue
PyObject * py_setValue(PyObject *, PyObject *args, QString type)
Definition: python/meter.cpp:257
py_getColor
PyObject * py_getColor(PyObject *, PyObject *args, QString type)
Definition: python/meter.cpp:353
checkKaramba
bool checkKaramba(long widget)
Definition: python/meter.cpp:26
py_setMinMax
PyObject * py_setMinMax(PyObject *, PyObject *args, QString type)
Definition: python/meter.cpp:304
checkKarambaAndMeter
bool checkKarambaAndMeter(long widget, long meter, const char *type)
Definition: python/meter.cpp:74
py_show
PyObject * py_show(PyObject *, PyObject *args, QString type)
Definition: python/meter.cpp:236
py_hideGraph
PyObject * py_hideGraph(PyObject *self, PyObject *args)
Graph/hideGraph.
Definition: python/graph.cpp:89
py_getPos
PyObject * py_getPos(PyObject *, PyObject *args, QString type)
Definition: python/meter.cpp:201
py_deleteGraph
PyObject * py_deleteGraph(PyObject *, PyObject *args)
Graph/deleteGraph.
Definition: python/graph.cpp:51
py_setSensor
PyObject * py_setSensor(PyObject *, PyObject *args, QString type)
Definition: python/meter.cpp:328
Meter
Definition: meters/meter.h:23
py_getGraphMinMax
PyObject * py_getGraphMinMax(PyObject *self, PyObject *args)
Graph/getGraphMinMax.
Definition: python/graph.cpp:99
py_setGraphSensor
PyObject * py_setGraphSensor(PyObject *self, PyObject *args)
Graph/setGraphSensor.
Definition: python/graph.cpp:124
py_createGraph
PyObject * py_createGraph(PyObject *, PyObject *args)
Graph/createGraph.
Definition: python/graph.cpp:36
py_setColor
PyObject * py_setColor(PyObject *, PyObject *args, QString type)
Definition: python/meter.cpp:341
py_setGraphMinMax
PyObject * py_setGraphMinMax(PyObject *self, PyObject *args)
Graph/setGraphMinMax.
Definition: python/graph.cpp:104
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