BandwidthGraph Class Reference

#include <bwgraph.h>

Inheritance diagram for BandwidthGraph:

VidaliaWindow List of all members.

Public Slots

void showWindow ()

Public Member Functions

 BandwidthGraph (QWidget *parent=0, Qt::WFlags flags=0)

Protected Member Functions

void customEvent (QEvent *event)

Private Slots

void updateGraph (quint64 bytesRead, quint64 bytesWritten)
void showSettingsFrame (bool show)
void setOpacity (int value)
void saveChanges ()
void cancelChanges ()
void reset ()

Private Member Functions

void createActions ()
void loadSettings ()

Private Attributes

TorControl_torControl
VidaliaSettings_settings
Ui::BandwidthGraph ui

Detailed Description

Definition at line 33 of file bwgraph.h.


Constructor & Destructor Documentation

BandwidthGraph::BandwidthGraph ( QWidget *  parent = 0,
Qt::WFlags  flags = 0 
)

Default constructor

Definition at line 43 of file bwgraph.cpp.

References _torControl, TorEvents::Bandwidth, createActions(), loadSettings(), reset(), TorControl::setEvent(), VidaliaWindow::setShortcut(), showSettingsFrame(), Vidalia::torControl(), and ui.


Member Function Documentation

void BandwidthGraph::cancelChanges (  )  [private, slot]

Called when the user cancels changes settings

Definition at line 205 of file bwgraph.cpp.

References loadSettings(), and showSettingsFrame().

Referenced by createActions().

void BandwidthGraph::createActions (  )  [private]

Create and bind actions to events

Definition at line 93 of file bwgraph.cpp.

References cancelChanges(), reset(), saveChanges(), setOpacity(), showSettingsFrame(), and ui.

Referenced by BandwidthGraph().

void BandwidthGraph::customEvent ( QEvent *  event  )  [protected]

Called to deliver a bandwidth update event from Tor.

Definition at line 83 of file bwgraph.cpp.

References CustomEventType::BandwidthEvent, and updateGraph().

void BandwidthGraph::loadSettings (  )  [private]

Loads the saved Bandwidth Graph settings

Definition at line 121 of file bwgraph.cpp.

References BWGRAPH_LINE_RECV, BWGRAPH_LINE_SEND, DEFAULT_ALWAYS_ON_TOP, DEFAULT_FILTER, DEFAULT_OPACITY, DEFAULT_STYLE, VidaliaWindow::getSetting(), setOpacity(), SETTING_ALWAYS_ON_TOP, SETTING_FILTER, SETTING_OPACITY, SETTING_STYLE, and ui.

Referenced by BandwidthGraph(), cancelChanges(), and showWindow().

void BandwidthGraph::reset (  )  [private, slot]

Called when the reset button is pressed

Definition at line 156 of file bwgraph.cpp.

References DATETIME_FMT, and ui.

Referenced by BandwidthGraph(), and createActions().

void BandwidthGraph::saveChanges (  )  [private, slot]

Called when the user saves settings

Definition at line 168 of file bwgraph.cpp.

References ADD_TO_FILTER, BWGRAPH_LINE_RECV, BWGRAPH_LINE_SEND, VidaliaWindow::saveSetting(), setOpacity(), SETTING_ALWAYS_ON_TOP, SETTING_FILTER, SETTING_OPACITY, SETTING_STYLE, showSettingsFrame(), and ui.

Referenced by createActions().

void BandwidthGraph::setOpacity ( int  value  )  [private, slot]

Called when the settings button is toggled

Definition at line 244 of file bwgraph.cpp.

References ui.

Referenced by createActions(), loadSettings(), and saveChanges().

void BandwidthGraph::showSettingsFrame ( bool  show  )  [private, slot]

Called when settings button is toggled

Definition at line 216 of file bwgraph.cpp.

References ui.

Referenced by BandwidthGraph(), cancelChanges(), createActions(), and saveChanges().

void BandwidthGraph::showWindow (  )  [virtual, slot]

Overloaded QWidget.show

Reimplemented from VidaliaWindow.

Definition at line 265 of file bwgraph.cpp.

References loadSettings(), and VidaliaWindow::showWindow().

void BandwidthGraph::updateGraph ( quint64  bytesRead,
quint64  bytesWritten 
) [private, slot]

Adds new data to the graph

Definition at line 113 of file bwgraph.cpp.

References ui.

Referenced by customEvent().


Member Data Documentation

VidaliaSettings* BandwidthGraph::_settings [private]

A VidaliaSettings object that handles getting/saving settings

Reimplemented from VidaliaWindow.

Definition at line 72 of file bwgraph.h.

TorControl* BandwidthGraph::_torControl [private]

A TorControl object used to talk to Tor.

Definition at line 70 of file bwgraph.h.

Referenced by BandwidthGraph().

Ui::BandwidthGraph BandwidthGraph::ui [private]

Qt Designer generated object

Definition at line 75 of file bwgraph.h.

Referenced by BandwidthGraph(), createActions(), loadSettings(), reset(), saveChanges(), setOpacity(), showSettingsFrame(), and updateGraph().


The documentation for this class was generated from the following files:
Generated on Tue Jul 7 16:58:27 2009 for Vidalia by  doxygen 1.4.7