Mailinglist Archive: yast-commit (819 mails)

< Previous Next >
[yast-commit] r54976 - in /trunk/qt-graph/src: QGraph.cc QGraph.h
  • From: aschnell@xxxxxxxxxxxxxxxx
  • Date: Sun, 25 Jan 2009 20:10:57 -0000
  • Message-id: <E1LRBJp-00063O-1t@xxxxxxxxxxxxxxxx>
Author: aschnell
Date: Sun Jan 25 21:10:56 2009
New Revision: 54976

URL: http://svn.opensuse.org/viewcvs/yast?rev=54976&view=rev
Log:
- added clearGraph function

Modified:
trunk/qt-graph/src/QGraph.cc
trunk/qt-graph/src/QGraph.h

Modified: trunk/qt-graph/src/QGraph.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/qt-graph/src/QGraph.cc?rev=54976&r1=54975&r2=54976&view=diff
==============================================================================
--- trunk/qt-graph/src/QGraph.cc (original)
+++ trunk/qt-graph/src/QGraph.cc Sun Jan 25 21:10:56 2009
@@ -286,8 +286,19 @@


void
+QGraph::clearGraph()
+{
+ QList<QGraphicsItem*> items(scene->items());
+ while (!items.isEmpty())
+ delete items.takeFirst();
+}
+
+
+void
QGraph::renderGraph(graph_t* graph)
{
+ clearGraph();
+
if (GD_charset(graph) != 0)
{
qWarning("unsupported charset");

Modified: trunk/qt-graph/src/QGraph.h
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/qt-graph/src/QGraph.h?rev=54976&r1=54975&r2=54976&view=diff
==============================================================================
--- trunk/qt-graph/src/QGraph.h (original)
+++ trunk/qt-graph/src/QGraph.h Sun Jan 25 21:10:56 2009
@@ -45,6 +45,8 @@
virtual void renderGraph(const std::string& filename, const std::string&
layoutAlgorithm);
virtual void renderGraph(graph_t* graph);

+ void clearGraph();
+
signals:

void nodeDoubleClickEvent(const QString& name);

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages