Vidalia 0.2.12
|
#include <TorMapWidget.h>
Public Slots | |
void | removeCircuit (const CircuitId &circid) |
void | deselectAll () |
void | clear () |
void | zoomToFit () |
void | zoomToRouter (const QString &id) |
void | zoomToCircuit (const CircuitId &circid) |
Signals | |
void | displayRouterInfo (const QString &id) |
Public Member Functions | |
TorMapWidget (QWidget *parent=0) | |
~TorMapWidget () | |
void | addRouter (const RouterDescriptor &desc, const GeoIpRecord &geoip) |
void | addCircuit (const CircuitId &circid, const QStringList &path) |
void | selectRouter (const QString &id) |
void | selectCircuit (const CircuitId &circid) |
Protected Member Functions | |
virtual void | customPaint (Marble::GeoPainter *painter) |
Private Attributes | |
QHash< QString, Marble::GeoDataCoordinates > | _routers |
QHash< CircuitId, CircuitGeoPath * > | _circuits |
Definition at line 37 of file TorMapWidget.h.
TorMapWidget::TorMapWidget | ( | QWidget * | parent = 0 | ) |
Default constructor.
Default constructor
Definition at line 34 of file TorMapWidget.cpp.
References displayRouterInfo(), and vApp.
TorMapWidget::~TorMapWidget | ( | ) |
void TorMapWidget::addCircuit | ( | const CircuitId & | circid, |
const QStringList & | path | ||
) |
Plots the given circuit on the map.
Adds a circuit to the map using the given ordered list of router IDs.
Definition at line 111 of file TorMapWidget.cpp.
void TorMapWidget::addRouter | ( | const RouterDescriptor & | desc, |
const GeoIpRecord & | geoip | ||
) |
Plots the given router on the map using the given coordinates.
Adds a router to the map.
Definition at line 71 of file TorMapWidget.cpp.
References _routers, RouterDescriptor::averageBandwidth(), RouterDescriptor::burstBandwidth(), GeoIpRecord::country(), RouterDescriptor::id(), GeoIpRecord::latitude(), GeoIpRecord::longitude(), RouterDescriptor::name(), RouterDescriptor::observedBandwidth(), and GeoIpRecord::toString().
void TorMapWidget::clear | ( | ) | [slot] |
Clears the known routers and removes all the data from the map
Clears the list of routers and removes all the data on the map
Definition at line 204 of file TorMapWidget.cpp.
References _circuits, and _routers.
Referenced by ~TorMapWidget().
void TorMapWidget::customPaint | ( | Marble::GeoPainter * | painter | ) | [protected, virtual] |
Paints the current circuits and streams on the image.
Definition at line 267 of file TorMapWidget.cpp.
References _circuits, CIRCUIT_NORMAL_PEN, and CIRCUIT_SELECTED_PEN.
void TorMapWidget::deselectAll | ( | ) | [slot] |
Deselects all the highlighted circuits and routers
Deselects any highlighted routers or circuits
Definition at line 185 of file TorMapWidget.cpp.
void TorMapWidget::displayRouterInfo | ( | const QString & | id | ) | [signal] |
Emitted when the user selects a router placemark on the map. id contain's the selected router's fingerprint.
Referenced by TorMapWidget().
void TorMapWidget::removeCircuit | ( | const CircuitId & | circid | ) | [slot] |
Removes a circuit from the map.
Definition at line 148 of file TorMapWidget.cpp.
References _circuits.
void TorMapWidget::selectCircuit | ( | const CircuitId & | circid | ) |
Selects and highlights a circuit on the map.
Selects and highlights the circuit with the id circid on the map.
Definition at line 173 of file TorMapWidget.cpp.
References _circuits.
void TorMapWidget::selectRouter | ( | const QString & | id | ) |
Selects and hightlights a router on the map.
Selects and highlights the router on the map.
Definition at line 159 of file TorMapWidget.cpp.
References _routers.
void TorMapWidget::zoomToCircuit | ( | const CircuitId & | circid | ) | [slot] |
Zoom to the circuit on the map with the given circid.
Definition at line 235 of file TorMapWidget.cpp.
References _circuits, MAP_HEIGHT, and MAP_WIDTH.
void TorMapWidget::zoomToFit | ( | ) | [slot] |
Zooms the map to fit entirely within the constraints of the current viewport size.
Definition at line 221 of file TorMapWidget.cpp.
void TorMapWidget::zoomToRouter | ( | const QString & | id | ) | [slot] |
Zoom to a particular router on the map.
Zooms in on the router with the given id.
Definition at line 253 of file TorMapWidget.cpp.
References _routers.
QHash<CircuitId, CircuitGeoPath*> TorMapWidget::_circuits [private] |
Stores circuit information
Definition at line 84 of file TorMapWidget.h.
Referenced by addCircuit(), clear(), customPaint(), deselectAll(), removeCircuit(), selectCircuit(), and zoomToCircuit().
QHash<QString, Marble::GeoDataCoordinates> TorMapWidget::_routers [private] |
Stores placemark IDs for Tor routers.
Definition at line 82 of file TorMapWidget.h.
Referenced by addCircuit(), addRouter(), clear(), deselectAll(), selectRouter(), and zoomToRouter().