Mailinglist Archive: yast-commit (819 mails)

< Previous Next >
[yast-commit] r55074 - in /trunk/qt-graph/src: CMakeLists.txt QGraph.cc QGraph.h QY2Graph.cc QY2Graph.h YQGraph.cc YQGraph.h
  • From: aschnell@xxxxxxxxxxxxxxxx
  • Date: Tue, 27 Jan 2009 12:37:14 -0000
  • Message-id: <E1LRnBq-0008Ji-RY@xxxxxxxxxxxxxxxx>
Author: aschnell
Date: Tue Jan 27 13:37:14 2009
New Revision: 55074

URL: http://svn.opensuse.org/viewcvs/yast?rev=55074&view=rev
Log:
- follow nameing convention from yast2-qt

Added:
trunk/qt-graph/src/QY2Graph.cc (contents, props changed)
- copied, changed from r55061, trunk/qt-graph/src/QGraph.cc
trunk/qt-graph/src/QY2Graph.h (contents, props changed)
- copied, changed from r55061, trunk/qt-graph/src/QGraph.h
Removed:
trunk/qt-graph/src/QGraph.cc
trunk/qt-graph/src/QGraph.h
Modified:
trunk/qt-graph/src/CMakeLists.txt
trunk/qt-graph/src/YQGraph.cc
trunk/qt-graph/src/YQGraph.h

Modified: trunk/qt-graph/src/CMakeLists.txt
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/qt-graph/src/CMakeLists.txt?rev=55074&r1=55073&r2=55074&view=diff
==============================================================================
--- trunk/qt-graph/src/CMakeLists.txt (original)
+++ trunk/qt-graph/src/CMakeLists.txt Tue Jan 27 13:37:14 2009
@@ -11,7 +11,7 @@
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-format-nonliteral
-fmessage-length=0" )

SET(qt_yast_graph_plugin_SRCS
- QGraph.cc
+ QY2Graph.cc
YQGraph.cc
YQGraphPlugin.cc
YQGraphPluginImpl.cc

Copied: trunk/qt-graph/src/QY2Graph.cc (from r55061,
trunk/qt-graph/src/QGraph.cc)
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/qt-graph/src/QY2Graph.cc?p2=trunk/qt-graph/src/QY2Graph.cc&p1=trunk/qt-graph/src/QGraph.cc&r1=55061&r2=55074&rev=55074&view=diff
==============================================================================
--- trunk/qt-graph/src/QGraph.cc (original)
+++ trunk/qt-graph/src/QY2Graph.cc Tue Jan 27 13:37:14 2009
@@ -10,7 +10,7 @@
| (c) SuSE Linux GmbH |
\----------------------------------------------------------------------/

- File: QGraph.cc
+ File: QY2Graph.cc

Author: Arvin Schnell <aschnell@xxxxxxx>

@@ -25,10 +25,10 @@
#include <QWheelEvent>
#include <QGraphicsSceneMouseEvent>

-#include "QGraph.h"
+#include "QY2Graph.h"


-QGraph::QGraph(QWidget* parent, const std::string& filename, const
std::string& layoutAlgorithm)
+QY2Graph::QY2Graph(QWidget* parent, const std::string& filename, const
std::string& layoutAlgorithm)
: QGraphicsView(parent)
{
init();
@@ -37,7 +37,7 @@
}


-QGraph::QGraph(QWidget* parent, graph_t* graph)
+QY2Graph::QY2Graph(QWidget* parent, graph_t* graph)
: QGraphicsView(parent)
{
init();
@@ -46,13 +46,13 @@
}


-QGraph::~QGraph()
+QY2Graph::~QY2Graph()
{
}


void
-QGraph::init()
+QY2Graph::init()
{
setRenderHint(QPainter::Antialiasing);
setRenderHint(QPainter::TextAntialiasing);
@@ -70,7 +70,7 @@


void
-QGraph::keyPressEvent(QKeyEvent* event)
+QY2Graph::keyPressEvent(QKeyEvent* event)
{
switch (event->key())
{
@@ -87,14 +87,14 @@


void
-QGraph::wheelEvent(QWheelEvent* event)
+QY2Graph::wheelEvent(QWheelEvent* event)
{
scaleView(pow(2.0, -event->delta() / 240.0));
}


void
-QGraph::scaleView(qreal scaleFactor)
+QY2Graph::scaleView(qreal scaleFactor)
{
qreal factor = matrix().scale(scaleFactor, scaleFactor).mapRect(QRectF(0,
0, 1, 1)).width();
if (factor < 0.05 || factor > 10)
@@ -105,7 +105,7 @@


QPointF
-QGraph::gToQ(const point& p, bool trans) const
+QY2Graph::gToQ(const point& p, bool trans) const
{
QPointF tmp(p.x, p.y);
return trans ? QPointF(tmp.x(), size.height() - tmp.y()) :
QPointF(tmp.x(), -tmp.y());
@@ -113,7 +113,7 @@


QPointF
-QGraph::gToQ(const pointf& p, bool trans) const
+QY2Graph::gToQ(const pointf& p, bool trans) const
{
QPointF tmp(p.x, p.y);
return trans ? QPointF(tmp.x(), size.height() - tmp.y()) :
QPointF(tmp.x(), -tmp.y());
@@ -121,7 +121,7 @@


QString
-QGraph::aggetToQString(void* obj, const char* name, const QString& fallback)
const
+QY2Graph::aggetToQString(void* obj, const char* name, const QString& fallback)
const
{
const char* tmp = agget(obj, const_cast<char*>(name));
if (tmp == NULL || strlen(tmp) == 0)
@@ -131,7 +131,7 @@


QColor
-QGraph::aggetToQColor(void* obj, const char* name, const QColor& fallback)
const
+QY2Graph::aggetToQColor(void* obj, const char* name, const QColor& fallback)
const
{
const char* tmp = agget(obj, const_cast<char*>(name));
if (tmp == NULL || strlen(tmp) == 0)
@@ -141,7 +141,7 @@


Qt::PenStyle
-QGraph::aggetToQPenStyle(void* obj, const char* name, const Qt::PenStyle
fallback) const
+QY2Graph::aggetToQPenStyle(void* obj, const char* name, const Qt::PenStyle
fallback) const
{
const char* tmp = agget(obj, const_cast<char*>(name));
if (tmp == NULL || strlen(tmp) == 0)
@@ -155,7 +155,7 @@


QPainterPath
-QGraph::haha3(const bezier& bezier) const
+QY2Graph::haha3(const bezier& bezier) const
{
QPainterPath path;
path.moveTo(gToQ(bezier.list[0]));
@@ -166,7 +166,7 @@


void
-QGraph::drawArrow(const QLineF& line, const QColor& color, QPainter* painter)
const
+QY2Graph::drawArrow(const QLineF& line, const QColor& color, QPainter*
painter) const
{
QLineF n(line.normalVector());
QPointF o(n.dx() / 3.0, n.dy() / 3.0);
@@ -188,7 +188,7 @@


void
-QGraph::renderGraph(const std::string& filename, const std::string&
layoutAlgorithm)
+QY2Graph::renderGraph(const std::string& filename, const std::string&
layoutAlgorithm)
{
FILE* fp = fopen(filename.c_str(), "r");
if (fp)
@@ -218,7 +218,7 @@


QPolygonF
-QGraph::haha1(node_t* node) const
+QY2Graph::haha1(node_t* node) const
{
const polygon_t* poly = (polygon_t*) ND_shape_info(node);

@@ -238,7 +238,7 @@


QPainterPath
-QGraph::haha2(node_t* node) const
+QY2Graph::haha2(node_t* node) const
{
QPainterPath path;

@@ -267,7 +267,7 @@


void
-QGraph::drawLabel(const textlabel_t* textlabel, QPainter* painter) const
+QY2Graph::drawLabel(const textlabel_t* textlabel, QPainter* painter) const
{
painter->setPen(textlabel->fontcolor);

@@ -286,7 +286,7 @@


void
-QGraph::clearGraph()
+QY2Graph::clearGraph()
{
QList<QGraphicsItem*> items(scene->items());
while (!items.isEmpty())
@@ -295,7 +295,7 @@


void
-QGraph::renderGraph(graph_t* graph)
+QY2Graph::renderGraph(graph_t* graph)
{
clearGraph();

@@ -319,7 +319,7 @@
drawLabel(ND_label(node), &painter);
painter.end();

- QNode* item = new QNode(haha2(node), picture);
+ QY2Node* item = new QY2Node(haha2(node), picture);

item->setPos(gToQ(ND_coord_i(node)));

@@ -358,7 +358,7 @@
drawArrow(QLineF(gToQ(bz.list[bz.size-1]), gToQ(bz.ep)), color,
&painter);
painter.end();

- QEdge* item = new QEdge(path, picture);
+ QY2Edge* item = new QY2Edge(path, picture);

QPen pen(color);
pen.setStyle(aggetToQPenStyle(edge, "style", Qt::SolidLine));
@@ -373,7 +373,7 @@
}


-QNode::QNode(const QPainterPath& path, const QPicture& picture)
+QY2Node::QY2Node(const QPainterPath& path, const QPicture& picture)
: QGraphicsPathItem(path),
picture(picture)
{
@@ -381,7 +381,7 @@


void
-QNode::paint(QPainter* painter, const QStyleOptionGraphicsItem* option,
QWidget* widget)
+QY2Node::paint(QPainter* painter, const QStyleOptionGraphicsItem* option,
QWidget* widget)
{
painter->save();
QGraphicsPathItem::paint(painter, option, widget);
@@ -392,7 +392,7 @@


void
-QNode::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event)
+QY2Node::mouseDoubleClickEvent(QGraphicsSceneMouseEvent* event)
{
if (event->button() == Qt::LeftButton)
emit doubleClickEvent();
@@ -400,12 +400,12 @@


void
-QNode::mousePressEvent(QGraphicsSceneMouseEvent*)
+QY2Node::mousePressEvent(QGraphicsSceneMouseEvent*)
{
}


-QEdge::QEdge(const QPainterPath& path, const QPicture& picture)
+QY2Edge::QY2Edge(const QPainterPath& path, const QPicture& picture)
: QGraphicsPathItem(path),
picture(picture)
{
@@ -413,14 +413,14 @@


QRectF
-QEdge::boundingRect() const
+QY2Edge::boundingRect() const
{
return QGraphicsPathItem::boundingRect().united(picture.boundingRect());
}


void
-QEdge::paint(QPainter* painter, const QStyleOptionGraphicsItem* option,
QWidget* widget)
+QY2Edge::paint(QPainter* painter, const QStyleOptionGraphicsItem* option,
QWidget* widget)
{
painter->save();
QGraphicsPathItem::paint(painter, option, widget);
@@ -430,4 +430,4 @@
}


-#include "QGraph.moc"
+#include "QY2Graph.moc"

Copied: trunk/qt-graph/src/QY2Graph.h (from r55061, trunk/qt-graph/src/QGraph.h)
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/qt-graph/src/QY2Graph.h?p2=trunk/qt-graph/src/QY2Graph.h&p1=trunk/qt-graph/src/QGraph.h&r1=55061&r2=55074&rev=55074&view=diff
==============================================================================
--- trunk/qt-graph/src/QGraph.h (original)
+++ trunk/qt-graph/src/QY2Graph.h Tue Jan 27 13:37:14 2009
@@ -10,15 +10,15 @@
| (c) SuSE Linux GmbH |
\----------------------------------------------------------------------/

- File: QGraph.h
+ File: QY2Graph.h

Author: Arvin Schnell <aschnell@xxxxxxx>

/-*/


-#ifndef QGraph_h
-#define QGraph_h
+#ifndef QY2Graph_h
+#define QY2Graph_h

#include <gvc.h>
#include <string>
@@ -30,17 +30,17 @@
#include <QPicture>


-class QGraph : public QGraphicsView
+class QY2Graph : public QGraphicsView
{
Q_OBJECT

public:

- QGraph(QWidget* parent, const std::string& filename, const std::string&
layoutAlgorithm);
+ QY2Graph(QWidget* parent, const std::string& filename, const std::string&
layoutAlgorithm);

- QGraph(QWidget* parent, graph_t* graph);
+ QY2Graph(QWidget* parent, graph_t* graph);

- virtual ~QGraph();
+ virtual ~QY2Graph();

virtual void renderGraph(const std::string& filename, const std::string&
layoutAlgorithm);
virtual void renderGraph(graph_t* graph);
@@ -95,13 +95,13 @@
};


-class QNode : public QObject, public QGraphicsPathItem
+class QY2Node : public QObject, public QGraphicsPathItem
{
Q_OBJECT

public:

- QNode(const QPainterPath& path, const QPicture& picture);
+ QY2Node(const QPainterPath& path, const QPicture& picture);

void paint(QPainter* painter, const QStyleOptionGraphicsItem* option,
QWidget* widget);

@@ -121,12 +121,12 @@
};


-class QEdge : public QGraphicsPathItem
+class QY2Edge : public QGraphicsPathItem
{

public:

- QEdge(const QPainterPath& path, const QPicture& picture);
+ QY2Edge(const QPainterPath& path, const QPicture& picture);

QRectF boundingRect() const;

@@ -139,4 +139,4 @@
};


-#endif // QGraph_h
+#endif // QY2Graph_h

Modified: trunk/qt-graph/src/YQGraph.cc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/qt-graph/src/YQGraph.cc?rev=55074&r1=55073&r2=55074&view=diff
==============================================================================
--- trunk/qt-graph/src/YQGraph.cc (original)
+++ trunk/qt-graph/src/YQGraph.cc Tue Jan 27 13:37:14 2009
@@ -33,7 +33,7 @@


YQGraph::YQGraph(YWidget* parent, const string& filename, const string&
layoutAlgorithm)
- : QGraph((QWidget*) parent->widgetRep(), filename, layoutAlgorithm),
+ : QY2Graph((QWidget*) parent->widgetRep(), filename, layoutAlgorithm),
YGraph(parent, filename, layoutAlgorithm)
{
setWidgetRep(this);
@@ -41,7 +41,7 @@


YQGraph::YQGraph(YWidget* parent, graph_t* graph)
- : QGraph((QWidget*) parent->widgetRep(), graph),
+ : QY2Graph((QWidget*) parent->widgetRep(), graph),
YGraph(parent, graph)
{
setWidgetRep(this);
@@ -56,14 +56,14 @@
void
YQGraph::renderGraph(const string& filename, const string& layoutAlgorithm)
{
- QGraph::renderGraph(filename, layoutAlgorithm);
+ QY2Graph::renderGraph(filename, layoutAlgorithm);
}


void
YQGraph::renderGraph(graph_t* graph)
{
- QGraph::renderGraph(graph);
+ QY2Graph::renderGraph(graph);
}



Modified: trunk/qt-graph/src/YQGraph.h
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/qt-graph/src/YQGraph.h?rev=55074&r1=55073&r2=55074&view=diff
==============================================================================
--- trunk/qt-graph/src/YQGraph.h (original)
+++ trunk/qt-graph/src/YQGraph.h Tue Jan 27 13:37:14 2009
@@ -22,10 +22,10 @@

#include <YGraph.h>

-#include "QGraph.h"
+#include "QY2Graph.h"


-class YQGraph : public QGraph, public YGraph
+class YQGraph : public QY2Graph, public YGraph
{
Q_OBJECT


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

< Previous Next >
This Thread
  • No further messages