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

superkaramba

graph.cpp

Go to the documentation of this file.
00001 /****************************************************************************
00002 *  graph_python.h  -  Functions for graph python api
00003 *
00004 *  Copyright (c) 2004 Petri Damst� <damu@iki.fi>
00005 *
00006 *  This file is part of SuperKaramba.
00007 *
00008 *  SuperKaramba is free software; you can redistribute it and/or modify
00009 *  it under the terms of the GNU General Public License as published by
00010 *  the Free Software Foundation; either version 2 of the License, or
00011 *  (at your option) any later version.
00012 *
00013 *  SuperKaramba is distributed in the hope that it will be useful,
00014 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016 *  GNU General Public License for more details.
00017 *
00018 *  You should have received a copy of the GNU General Public License
00019 *  along with SuperKaramba; if not, write to the Free Software
00020 *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00021 ****************************************************************************/
00022 
00023 #ifdef _XOPEN_SOURCE
00024 #undef _XOPEN_SOURCE
00025 #endif
00026 
00027 #include <Python.h>
00028 #include <qobject.h>
00029 #include "../karamba.h"
00030 #include "meters/meter.h"
00031 #include "python/meter.h"
00032 #include "meters/graph.h"
00033 #include "python/graph.h"
00034 
00035 PyObject* py_createGraph(PyObject *, PyObject *args)
00036 {
00037     long widget, x, y, w, h, points;
00038 
00039     if (!PyArg_ParseTuple(args, (char*)"llllll", &widget, &x, &y, &w, &h, &points))
00040         return NULL;
00041     if (!checkKaramba(widget))
00042         return NULL;
00043 
00044     Graph *tmp =
00045         new Graph((Karamba*)widget, (int)x, (int)y, (int)w, (int)h, (int)points);
00046     ((Karamba*)widget)->addToGroup(tmp);
00047     return (Py_BuildValue((char*)"l", (long)tmp));
00048 }
00049 
00050 PyObject* py_deleteGraph(PyObject *, PyObject *args)
00051 {
00052     long widget, meter;
00053     if (!PyArg_ParseTuple(args, (char*)"ll", &widget, &meter))
00054         return NULL;
00055     if (!checkKarambaAndMeter(widget, meter, "Graph"))
00056         return NULL;
00057 
00058     ((Karamba*)widget)->deleteMeterFromSensors((Meter*)meter);
00059     return Py_BuildValue((char*)"l",
00060                          ((Karamba*)widget)->removeMeter((Meter*)meter));
00061 }
00062 
00063 PyObject* py_getThemeGraph(PyObject *self, PyObject *args)
00064 {
00065     return py_getThemeMeter(self, args, "Graph");
00066 }
00067 
00068 PyObject* py_getGraphSize(PyObject *self, PyObject *args)
00069 {
00070     return py_getSize(self, args, "Graph");
00071 }
00072 
00073 PyObject* py_resizeGraph(PyObject *self, PyObject *args)
00074 {
00075     return py_resize(self, args, "Graph");
00076 }
00077 
00078 PyObject* py_getGraphPos(PyObject *self, PyObject *args)
00079 {
00080     return py_getPos(self, args, "Graph");
00081 }
00082 
00083 PyObject* py_moveGraph(PyObject *self, PyObject *args)
00084 {
00085     return py_move(self, args, "Graph");
00086 }
00087 
00088 PyObject* py_hideGraph(PyObject *self, PyObject *args)
00089 {
00090     return py_hide(self, args, "Graph");
00091 }
00092 
00093 PyObject* py_showGraph(PyObject *self, PyObject *args)
00094 {
00095     return py_show(self, args, "Graph");
00096 }
00097 
00098 PyObject* py_getGraphMinMax(PyObject *self, PyObject *args)
00099 {
00100     return py_getMinMax(self, args, "Graph");
00101 }
00102 
00103 PyObject* py_setGraphMinMax(PyObject *self, PyObject *args)
00104 {
00105     return py_setMinMax(self, args, "Graph");
00106 }
00107 
00108 PyObject* py_getGraphValue(PyObject *self, PyObject *args)
00109 {
00110     return py_getValue(self, args, "Graph");
00111 }
00112 
00113 PyObject* py_setGraphValue(PyObject *self, PyObject *args)
00114 {
00115     return py_setValue(self, args, "Graph");
00116 }
00117 
00118 PyObject* py_getGraphSensor(PyObject *self, PyObject *args)
00119 {
00120     return py_getSensor(self, args, "Graph");
00121 }
00122 
00123 PyObject* py_setGraphSensor(PyObject *self, PyObject *args)
00124 {
00125     return py_setSensor(self, args, "Graph");
00126 }
00127 
00128 PyObject* py_getGraphColor(PyObject *self, PyObject *args)
00129 {
00130     return py_getColor(self, args, "Graph");
00131 }
00132 
00133 PyObject* py_setGraphColor(PyObject *self, PyObject *args)
00134 {
00135     return py_setColor(self, args, "Graph");
00136 }
00137 
00138 

superkaramba

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

kdeutils

Skip menu "kdeutils"
  • ark
  • kcalc
  • kcharselect
  • kdelirc
  • kdessh
  • kdf
  • kfloppy
  • kgpg
  • kjots
  • klaptopdaemon
  • kmilo
  • ksim
  • ktimer
  • kwallet
  • superkaramba
Generated for kdeutils by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal