• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • superkaramba
 

superkaramba

  • superkaramba
  • src
graph_python.cpp
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#ifdef _XOPEN_SOURCE
24#undef _XOPEN_SOURCE
25#endif
26
27#include <Python.h>
28#include <tqobject.h>
29#include "karamba.h"
30#include "meter.h"
31#include "meter_python.h"
32#include "graph_python.h"
33
34PyObject* py_createGraph(PyObject *, PyObject *args)
35{
36 long widget, x, y, w, h, points;
37
38 if (!PyArg_ParseTuple(args, (char*)"llllll", &widget, &x, &y, &w, &h, &points))
39 return NULL;
40 if (!checkKaramba(widget))
41 return NULL;
42
43 Graph *tmp =
44 new Graph((karamba*)widget, (int)x, (int)y, (int)w, (int)h, (int)points);
45 ((karamba*)widget)->meterList->append(tmp);
46 return (Py_BuildValue((char*)"l", (long)tmp));
47}
48
49PyObject* py_deleteGraph(PyObject *, PyObject *args)
50{
51 long widget, meter;
52 if (!PyArg_ParseTuple(args, (char*)"ll", &widget, &meter))
53 return NULL;
54 if (!checkKarambaAndMeter(widget, meter, "Graph"))
55 return NULL;
56
57 ((karamba*)widget)->deleteMeterFromSensors((Meter*)meter);
58 return Py_BuildValue((char*)"l",
59 ((karamba*)widget)->meterList->removeRef((Meter*)meter));
60}
61
62PyObject* py_getThemeGraph(PyObject *self, PyObject *args)
63{
64 return py_getThemeMeter(self, args, "Graph");
65}
66
67PyObject* py_getGraphSize(PyObject *self, PyObject *args)
68{
69 return py_getSize(self, args, "Graph");
70}
71
72PyObject* py_resizeGraph(PyObject *self, PyObject *args)
73{
74 return py_resize(self, args, "Graph");
75}
76
77PyObject* py_getGraphPos(PyObject *self, PyObject *args)
78{
79 return py_getPos(self, args, "Graph");
80}
81
82PyObject* py_moveGraph(PyObject *self, PyObject *args)
83{
84 return py_move(self, args, "Graph");
85}
86
87PyObject* py_hideGraph(PyObject *self, PyObject *args)
88{
89 return py_hide(self, args, "Graph");
90}
91
92PyObject* py_showGraph(PyObject *self, PyObject *args)
93{
94 return py_show(self, args, "Graph");
95}
96
97PyObject* py_getGraphMinMax(PyObject *self, PyObject *args)
98{
99 return py_getMinMax(self, args, "Graph");
100}
101
102PyObject* py_setGraphMinMax(PyObject *self, PyObject *args)
103{
104 return py_setMinMax(self, args, "Graph");
105}
106
107PyObject* py_getGraphValue(PyObject *self, PyObject *args)
108{
109 return py_getValue(self, args, "Graph");
110}
111
112PyObject* py_setGraphValue(PyObject *self, PyObject *args)
113{
114 return py_setValue(self, args, "Graph");
115}
116
117PyObject* py_getGraphSensor(PyObject *self, PyObject *args)
118{
119 return py_getSensor(self, args, "Graph");
120}
121
122PyObject* py_setGraphSensor(PyObject *self, PyObject *args)
123{
124 return py_setSensor(self, args, "Graph");
125}
126
127PyObject* py_getGraphColor(PyObject *self, PyObject *args)
128{
129 return py_getColor(self, args, "Graph");
130}
131
132PyObject* py_setGraphColor(PyObject *self, PyObject *args)
133{
134 return py_setColor(self, args, "Graph");
135}
136
137
py_show
PyObject * py_show(PyObject *self, PyObject *args)
Misc/show.
Definition: misc_python.cpp:623
py_hide
PyObject * py_hide(PyObject *self, PyObject *args)
Misc/hide.
Definition: misc_python.cpp:641

superkaramba

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

superkaramba

Skip menu "superkaramba"
  • kcalc
  •   knumber
  • superkaramba
Generated for superkaramba by doxygen 1.9.4
This website is maintained by Timothy Pearson.