[kgraphviewer-devel] [KGraphViewer/libkgraphviz] 4714871: Minor: header cleanup

Kevin Funk krf at electrostorm.net
Fri Jan 7 18:32:06 CET 2011


commit 47148716efd3fe35bd00dc2487e73718d082984e
branch libkgraphviz
Author: Kevin Funk <krf at electrostorm.net>
Date:   Fri Jan 7 16:00:45 2011 +0100

    Minor: header cleanup

diff --git a/src/kgraphviz/canvasedge.h b/src/kgraphviz/canvasedge.h
index f44f74e..0fb1679 100644
--- a/src/kgraphviz/canvasedge.h
+++ b/src/kgraphviz/canvasedge.h
@@ -24,14 +24,6 @@
    License as published by the Free Software Foundation, version 2.
 */
 
-
-#ifndef CANVAS_EDGE_H
-#define CANVAS_EDGE_H
-
-#include "canvaselement.h"
-
-#include "graphexporter.h"
-
 /*
  * Canvas Items:
  * - CanvasNode       (Rectangular Area)
@@ -39,6 +31,12 @@
  * - CanvasEdgeLabel  (Label for edges)
  * - CanvasEdgeArrow  (Arrows at the end of the edge spline)
  */
+
+#ifndef CANVAS_EDGE_H
+#define CANVAS_EDGE_H
+
+#include "canvaselement.h"
+
 namespace KGraphViz
 {
 
diff --git a/src/kgraphviz/canvaselement.h b/src/kgraphviz/canvaselement.h
index c44ac60..76b6388 100644
--- a/src/kgraphviz/canvaselement.h
+++ b/src/kgraphviz/canvaselement.h
@@ -91,6 +91,3 @@ private:
 }
 
 #endif // CANVAS_ELEMENT_H
-
-
-
diff --git a/src/kgraphviz/canvasnode.h b/src/kgraphviz/canvasnode.h
index cf92e72..4a9bf39 100644
--- a/src/kgraphviz/canvasnode.h
+++ b/src/kgraphviz/canvasnode.h
@@ -79,7 +79,5 @@ public:
 // };
 
 }
-#endif
-
-
 
+#endif
diff --git a/src/kgraphviz/canvassubgraph.h b/src/kgraphviz/canvassubgraph.h
index 95486fb..6bc93ea 100644
--- a/src/kgraphviz/canvassubgraph.h
+++ b/src/kgraphviz/canvassubgraph.h
@@ -47,6 +47,3 @@ public:
 }
 
 #endif
-
-
-
diff --git a/src/kgraphviz/dotgraph_p.h b/src/kgraphviz/dotgraph_p.h
index 2258e7e..41f76b8 100644
--- a/src/kgraphviz/dotgraph_p.h
+++ b/src/kgraphviz/dotgraph_p.h
@@ -22,6 +22,8 @@
 
 #include "graphio.h"
 
+#include <QVector>
+
 namespace KGraphViz
 {
 
diff --git a/src/kgraphviz/dotgraphview.h b/src/kgraphviz/dotgraphview.h
index a945ad4..b85dc04 100644
--- a/src/kgraphviz/dotgraphview.h
+++ b/src/kgraphviz/dotgraphview.h
@@ -119,29 +119,6 @@ public:
 
   void setBackgroundColor(const QColor& color);
   
-Q_SIGNALS:
-  void zoomed(double factor);
-  void sigViewBevEnabledToggled(bool value);
-  void sigViewBevActivated(int newPos);
-  void graphLoaded();
-  void newNodeAdded(const QString&);
-  void newEdgeAdded(const QString&, const QString&);
-  /** signals that the user has activated a remove edge command */
-  void removeEdge(const QString&);
-  /** signals that the user has activated a remove edge command */
-  void removeNodeNamed(const QString&);
-  /** signals that the user has activated a remove element command */
-  void removeElement(const QString&);
-  /** signals the content of the new selection */
-  void selectionIs(const QList<QString>, const QPoint&);
-  /** let the application tweak the created edge if necessary */
-  void newEdgeFinished(
-      const QString&, const QString&,
-      const QMap<QString, QString>&);
-  void contextMenuEvent(const QString&, const QPoint&);
-  void hoverEnter(const QString&);
-  void hoverLeave(const QString&);
-  
 public Q_SLOTS:
   void zoomIn();
   void zoomOut();  
@@ -193,6 +170,29 @@ protected:
 
   DotGraphViewPrivate * const d_ptr;
 
+Q_SIGNALS:
+  void zoomed(double factor);
+  void sigViewBevEnabledToggled(bool value);
+  void sigViewBevActivated(int newPos);
+  void graphLoaded();
+  void newNodeAdded(const QString&);
+  void newEdgeAdded(const QString&, const QString&);
+  /** signals that the user has activated a remove edge command */
+  void removeEdge(const QString&);
+  /** signals that the user has activated a remove edge command */
+  void removeNodeNamed(const QString&);
+  /** signals that the user has activated a remove element command */
+  void removeElement(const QString&);
+  /** signals the content of the new selection */
+  void selectionIs(const QList<QString>, const QPoint&);
+  /** let the application tweak the created edge if necessary */
+  void newEdgeFinished(
+      const QString&, const QString&,
+      const QMap<QString, QString>&);
+  void contextMenuEvent(const QString&, const QPoint&);
+  void hoverEnter(const QString&);
+  void hoverLeave(const QString&);
+
 private Q_SLOTS:
   void slotAGraphReadFinished();
   void slotAGraphLayoutFinished();
diff --git a/src/kgraphviz/graphedge.h b/src/kgraphviz/graphedge.h
index c3b4dd3..68b3716 100644
--- a/src/kgraphviz/graphedge.h
+++ b/src/kgraphviz/graphedge.h
@@ -33,12 +33,9 @@
 #define GRAPH_EDGE_H
 
 #include "graphelement.h"
-#include "kgraphviz_export.h"
-#include "support/dotrenderop.h"
 
 #include <QStringList>
 #include <QMap>
-#include <QTextStream>
 
 class Agedge_t;
 
diff --git a/src/kgraphviz/graphelement.h b/src/kgraphviz/graphelement.h
index 4121297..4ed3f58 100644
--- a/src/kgraphviz/graphelement.h
+++ b/src/kgraphviz/graphelement.h
@@ -19,12 +19,14 @@
 #ifndef GRAPH_ELEMENT_H
 #define GRAPH_ELEMENT_H
 
+#include <QObject>
+
 #include "kgraphviz_export.h"
 #include "support/dotrenderop.h"
 
 #include <QList>
 #include <QMap>
-#include <QtCore/QTextStream>
+#include <QTextStream>
 
 namespace KGraphViz
 {
@@ -110,17 +112,14 @@ protected:
   QMap<QString,QString> m_attributes;
   QList<QString> m_originalAttributes;
 
+  GraphElementPrivate* const d_ptr;
+
 private:
   Q_DECLARE_PRIVATE(GraphElement);
-  GraphElementPrivate* const d_ptr;
 };
 
-
 QTextStream& operator<<(QTextStream& s, const GraphElement& n);
 
 }
 
 #endif
-
-
-
diff --git a/src/kgraphviz/graphio.h b/src/kgraphviz/graphio.h
index 51d5a20..b800aab 100644
--- a/src/kgraphviz/graphio.h
+++ b/src/kgraphviz/graphio.h
@@ -21,7 +21,6 @@
 #define GRAPHIO_H
 
 #include <QObject>
-#include <QProcess>
 
 #include "kgraphviz_export.h"
 
@@ -48,13 +47,15 @@ public:
 
   static QString internalLayoutCommandForFile(const QString& fileName);
 
+protected:
+  GraphIOPrivate* const d_ptr;
+
 Q_SIGNALS:
   void finished();
   void error(QString);
 
 private:
   Q_DECLARE_PRIVATE(GraphIO)
-  GraphIOPrivate* const d_ptr;
 };
 
 }
diff --git a/src/kgraphviz/graphnode.h b/src/kgraphviz/graphnode.h
index a5aaa93..9f8c740 100644
--- a/src/kgraphviz/graphnode.h
+++ b/src/kgraphviz/graphnode.h
@@ -33,13 +33,8 @@
 #define GRAPH_NODE_H
 
 #include "graphelement.h"
-#include "kgraphviz_export.h"
-#include "support/dotrenderop.h"
 
-#include <QVector>
-#include <QList>
 #include <QMap>
-#include <QtCore/QTextStream>
 
 class Agnode_t;
 
@@ -75,6 +70,3 @@ QTextStream& operator<<(QTextStream& s, const GraphNode& n);
 }
 
 #endif
-
-
-
diff --git a/src/kgraphviz/graphsubgraph.h b/src/kgraphviz/graphsubgraph.h
index a33c820..d263904 100644
--- a/src/kgraphviz/graphsubgraph.h
+++ b/src/kgraphviz/graphsubgraph.h
@@ -24,10 +24,8 @@
 #define GRAPH_SUBGRAPH_H
 
 #include "graphelement.h"
-#include "kgraphviz_export.h"
 
 #include <QMap>
-#include <QTextStream>
 
 class Agraph_t;
 
@@ -83,7 +81,7 @@ public:
 
   void retrieveSelectedElementsIds(QList<QString> selection);
   
- private:
+private:
   QList<GraphElement*> m_content;
   GraphSubgraphMap m_subgraphsMap;
 };
@@ -93,6 +91,3 @@ QTextStream& operator<<(QTextStream& stream, const GraphSubgraph& s);
 }
 
 #endif
-
-
-
diff --git a/src/kgraphviz/pannerview.cpp b/src/kgraphviz/pannerview.cpp
index 4a540a5..53208cb 100644
--- a/src/kgraphviz/pannerview.cpp
+++ b/src/kgraphviz/pannerview.cpp
@@ -102,7 +102,7 @@ PannerView::~PannerView()
   delete d_ptr;
 }
 
-void PannerView::setZoomRect(QRectF rectangle)
+void PannerView::setZoomRect(const QRectF& rectangle)
 {
   Q_D(PannerView);
 //   kDebug() << "PannerView::setZoomRect " << r;
diff --git a/src/kgraphviz/pannerview.h b/src/kgraphviz/pannerview.h
index e04f509..3dd28c8 100644
--- a/src/kgraphviz/pannerview.h
+++ b/src/kgraphviz/pannerview.h
@@ -49,7 +49,7 @@ public:
   void setDrawingEnabled(bool enabled);
 
 public Q_SLOTS:
-  void setZoomRect(QRectF rectangle);
+  void setZoomRect(const QRectF& rectangle);
   void moveZoomRectTo(const QPointF& newPos, const bool notify = true);
 
 Q_SIGNALS:
@@ -72,6 +72,3 @@ private:
 }
 
 #endif
-
-
-


More information about the kgraphviewer-devel mailing list