[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[vidalia-svn] r1229: More whitespace and comment cleanups. (trunk/src/gui/bwgraph)
Author: edmanm
Date: 2006-09-22 22:32:06 -0400 (Fri, 22 Sep 2006)
New Revision: 1229
Modified:
trunk/src/gui/bwgraph/graphframe.cpp
trunk/src/gui/bwgraph/graphframe.h
Log:
More whitespace and comment cleanups.
Modified: trunk/src/gui/bwgraph/graphframe.cpp
===================================================================
--- trunk/src/gui/bwgraph/graphframe.cpp 2006-09-23 02:26:47 UTC (rev 1228)
+++ trunk/src/gui/bwgraph/graphframe.cpp 2006-09-23 02:32:06 UTC (rev 1229)
@@ -28,6 +28,7 @@
#include "graphframe.h"
+
/** Default contructor */
GraphFrame::GraphFrame(QWidget *parent)
: QFrame(parent)
@@ -55,10 +56,8 @@
delete _sendData;
}
-/**
- Gets the width of the desktop, which is the maximum
- number of points we can plot in the graph
-*/
+/** Gets the width of the desktop, which is the maximum number of points
+ * we can plot in the graph. */
int
GraphFrame::getNumPoints()
{
@@ -67,9 +66,7 @@
return width;
}
-/**
- Adds new data points to the graph
-*/
+/** Adds new data points to the graph. */
void
GraphFrame::addPoints(qreal recv, qreal send)
{
@@ -94,9 +91,7 @@
this->update();
}
-/**
- Clears the graph
-*/
+/** Clears the graph. */
void
GraphFrame::resetGraph()
{
@@ -110,9 +105,7 @@
this->update();
}
-/**
- Toggles display of respective graph lines and counters
-*/
+/** Toggles display of respective graph lines and counters. */
void
GraphFrame::setShowCounters(bool showRecv, bool showSend)
{
@@ -121,10 +114,8 @@
this->update();
}
-/**
- Overloads default QWidget::paintEvent
- Draws the actual bandwidth graph
-*/
+/** Overloads default QWidget::paintEvent. Draws the actual
+ * bandwidth graph. */
void
GraphFrame::paintEvent(QPaintEvent *event)
{
@@ -216,9 +207,8 @@
_painter->setBrush(oldBrush);
}
-/** Iterates the input list and draws a line on the graph
- in the appropriate color
-*/
+/** Iterates the input list and draws a line on the graph in the appropriate
+ * color. */
void
GraphFrame::paintLine(QList<qreal>* list, QColor color, Qt::PenStyle lineStyle)
{
@@ -252,9 +242,7 @@
_painter->setPen(oldPen);
}
-/**
- Paints selected total indicators on the graph
-*/
+/** Paints selected total indicators on the graph. */
void
GraphFrame::paintTotals()
{
@@ -277,10 +265,7 @@
}
}
-/**
- Returns a formatted string
- with the correct size suffix
-*/
+/** Returns a formatted string with the correct size suffix. */
QString
GraphFrame::totalToStr(qreal total)
{
@@ -297,9 +282,7 @@
}
}
-/**
- Paints the scale on the graph
-*/
+/** Paints the scale on the graph. */
void
GraphFrame::paintScale()
{
Modified: trunk/src/gui/bwgraph/graphframe.h
===================================================================
--- trunk/src/gui/bwgraph/graphframe.h 2006-09-23 02:26:47 UTC (rev 1228)
+++ trunk/src/gui/bwgraph/graphframe.h 2006-09-23 02:32:06 UTC (rev 1229)
@@ -52,56 +52,56 @@
Q_OBJECT
public:
- /** Default Constructor **/
+ /** Default Constructor */
GraphFrame(QWidget *parent = 0);
- /** Default Destructor **/
+ /** Default Destructor */
~GraphFrame();
- /** Add data points **/
+ /** Add data points. */
void addPoints(qreal recv, qreal send);
- /** Clears the graph **/
+ /** Clears the graph. */
void resetGraph();
- /** Toggles display of data counters **/
+ /** Toggles display of data counters. */
void setShowCounters(bool showRecv, bool showSend);
protected:
- /** Overloaded QWidget::paintEvent() **/
+ /** Overloaded QWidget::paintEvent() */
void paintEvent(QPaintEvent *event);
private:
- /** Gets the width of the desktop, the max # of points **/
+ /** Gets the width of the desktop, the max # of points. */
int getNumPoints();
/** Paints an integral and an outline of that integral for each data set
* (send and/or receive) that is to be displayed. */
void paintData();
- /** Paints the send/receive totals **/
+ /** Paints the send/receive totals. */
void paintTotals();
- /** Paints the scale in the graph **/
+ /** Paints the scale in the graph. */
void paintScale();
- /** Returns a formatted string representation of total **/
+ /** Returns a formatted string representation of total. */
QString totalToStr(qreal total);
- /** Paints a line with the data in list **/
+ /** Paints a line with the data in list. */
void paintLine(QList<qreal>* list, QColor color,
Qt::PenStyle lineStyle = Qt::SolidLine);
/** Paints an integral using the supplied data. */
void paintIntegral(QList<qreal>* list, QColor color, qreal alpha = 1.0);
- /** A QPainter object that handles drawing the various graph elements */
+ /** A QPainter object that handles drawing the various graph elements. */
QPainter* _painter;
- /** Holds the received data points **/
+ /** Holds the received data points. */
QList<qreal> *_recvData;
- /** Holds the sent data points **/
+ /** Holds the sent data points. */
QList<qreal> *_sendData;
- /** The current dimensions of the graph */
+ /** The current dimensions of the graph. */
QRect _rec;
- /** The maximum data value plotted **/
+ /** The maximum data value plotted. */
qreal _maxValue;
- /** The maximum number of points to store **/
+ /** The maximum number of points to store. */
int _maxPoints;
- /** The total data sent/recv **/
+ /** The total data sent/recv. */
qreal _totalSend;
qreal _totalRecv;
- /** Show the respective lines and counters **/
+ /** Show the respective lines and counters. */
bool _showRecv;
bool _showSend;
};