tormapwidget.cpp File Reference

Displays Tor servers and circuits on a map of the world. More...

#include <QStringList>
#include <cmath>
#include "tormapwidget.h"

Go to the source code of this file.

Defines

#define IMG_WORLD_MAP   ":/images/map/world-map.png"
#define PEN_ROUTER   QPen(QColor("#ff030d"), 1.0)
#define PEN_CIRCUIT   QPen(Qt::yellow, 0.5)
#define PEN_SELECTED   QPen(Qt::green, 2.0)
#define IMG_WIDTH   1000
#define IMG_HEIGHT   507
#define MAP_TOP   2
#define MAP_BOTTOM   2
#define MAP_RIGHT   5
#define MAP_LEFT   5
#define MAP_WIDTH   (IMG_WIDTH-MAP_LEFT-MAP_RIGHT)
#define MAP_HEIGHT   (IMG_HEIGHT-MAP_TOP-MAP_BOTTOM)
#define MAP_ORIGIN   -10
#define MIN_SIZE   QSize(512,256)

Variables

float plen []
float pdfe []


Detailed Description

Displays Tor servers and circuits on a map of the world.

Version:
Id

Definition in file tormapwidget.cpp.


Define Documentation

#define IMG_HEIGHT   507

Definition at line 41 of file tormapwidget.cpp.

#define IMG_WIDTH   1000

Size of the map image

Definition at line 40 of file tormapwidget.cpp.

#define IMG_WORLD_MAP   ":/images/map/world-map.png"

Definition at line 32 of file tormapwidget.cpp.

Referenced by TorMapWidget::TorMapWidget().

#define MAP_BOTTOM   2

Definition at line 45 of file tormapwidget.cpp.

#define MAP_HEIGHT   (IMG_HEIGHT-MAP_TOP-MAP_BOTTOM)

Definition at line 49 of file tormapwidget.cpp.

Referenced by TorMapWidget::toMapSpace(), TorMapWidget::zoomToCircuit(), and TorMapWidget::zoomToFit().

#define MAP_LEFT   5

Definition at line 47 of file tormapwidget.cpp.

Referenced by TorMapWidget::toMapSpace().

#define MAP_ORIGIN   -10

Map offset from zero longitude

Definition at line 52 of file tormapwidget.cpp.

Referenced by TorMapWidget::toMapSpace().

#define MAP_RIGHT   5

Definition at line 46 of file tormapwidget.cpp.

#define MAP_TOP   2

Border between the edge of the image and the actual map

Definition at line 44 of file tormapwidget.cpp.

Referenced by TorMapWidget::toMapSpace().

#define MAP_WIDTH   (IMG_WIDTH-MAP_LEFT-MAP_RIGHT)

Definition at line 48 of file tormapwidget.cpp.

Referenced by TorMapWidget::toMapSpace(), TorMapWidget::zoomToCircuit(), and TorMapWidget::zoomToFit().

#define MIN_SIZE   QSize(512,256)

Minimum allowable size for this widget

Definition at line 55 of file tormapwidget.cpp.

Referenced by TorMapWidget::minimumSizeHint().

#define PEN_CIRCUIT   QPen(Qt::yellow, 0.5)

Definition at line 36 of file tormapwidget.cpp.

Referenced by TorMapWidget::paintImage().

#define PEN_ROUTER   QPen(QColor("#ff030d"), 1.0)

QPens to use for drawing different map elements

Definition at line 35 of file tormapwidget.cpp.

Referenced by TorMapWidget::paintImage().

#define PEN_SELECTED   QPen(Qt::green, 2.0)

Definition at line 37 of file tormapwidget.cpp.

Referenced by TorMapWidget::paintImage().


Variable Documentation

float pdfe[]

Initial value:

 {
    0.0000, 0.0620, 0.1240, 0.1860,
    0.2480, 0.3100, 0.3720, 0.4340,
    0.4958, 0.5571, 0.6176, 0.6769,
    0.7346, 0.7903, 0.8435, 0.8936,
    0.9394, 0.9761, 1.0000
  }
Distance of corresponding parallel from equator

Definition at line 68 of file tormapwidget.cpp.

Referenced by TorMapWidget::toMapSpace().

float plen[]

Initial value:

 {
    1.0000, 0.9986, 0.9954, 0.9900,
    0.9822, 0.9730, 0.9600, 0.9427,
    0.9216, 0.8962, 0.8679, 0.8350,
    0.7986, 0.7597, 0.7186, 0.6732,
    0.6213, 0.5722, 0.5322
  }
Robinson projection table Length of the parallel of latitude

Definition at line 59 of file tormapwidget.cpp.

Referenced by TorMapWidget::toMapSpace().


Generated on Wed Sep 5 15:49:28 2007 for Vidalia by  doxygen 1.5.3