Vidalia
0.2.21
|
#include <BandwidthGraph.h>
Public Slots | |
void | showWindow () |
![]() | |
virtual void | setVisible (bool visible) |
virtual void | showWindow () |
Public Member Functions | |
BandwidthGraph (QWidget *parent=0, Qt::WFlags flags=0) | |
![]() | |
VidaliaWindow (const QString &name, QWidget *parent=0, Qt::WFlags flags=0) | |
~VidaliaWindow () | |
void | setShortcut (const QString &shortcut, const char *slot) |
void | saveWindowState () |
void | restoreWindowState () |
QVariant | getSetting (QString name, QVariant defaultValue) |
void | saveSetting (QString name, QVariant value) |
Protected Member Functions | |
virtual void | retranslateUi () |
![]() | |
virtual void | changeEvent (QEvent *e) |
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 |
Additional Inherited Members | |
![]() | |
void | helpRequested (const QString &topic) |
Definition at line 31 of file BandwidthGraph.h.
BandwidthGraph::BandwidthGraph | ( | QWidget * | parent = 0 , |
Qt::WFlags | flags = 0 |
||
) |
Default constructor
Definition at line 41 of file BandwidthGraph.cpp.
References TorEvents::Bandwidth, createActions(), loadSettings(), reset(), TorControl::setEvent(), VidaliaWindow::setShortcut(), showSettingsFrame(), Vidalia::torControl(), ui, and updateGraph().
|
privateslot |
Called when the user cancels changes settings
Simply restores the previously saved settings.
Definition at line 200 of file BandwidthGraph.cpp.
References loadSettings(), and showSettingsFrame().
Referenced by createActions().
|
private |
Create and bind actions to events
Binds events to actions.
Definition at line 88 of file BandwidthGraph.cpp.
References cancelChanges(), reset(), saveChanges(), setOpacity(), showSettingsFrame(), and ui.
Referenced by BandwidthGraph().
|
private |
Loads the saved Bandwidth Graph settings
Loads the saved Bandwidth Graph settings.
Definition at line 116 of file BandwidthGraph.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().
|
privateslot |
Called when the reset button is pressed
Resets the log start time.
Definition at line 151 of file BandwidthGraph.cpp.
References DATETIME_FMT, and ui.
Referenced by BandwidthGraph(), and createActions().
|
protectedvirtual |
Called when the user changes the UI translation.
Reimplemented from VidaliaWindow.
Definition at line 81 of file BandwidthGraph.cpp.
References ui.
|
privateslot |
Called when the user saves settings
Saves the Bandwidth Graph settings and adjusts the graph if necessary.
Definition at line 163 of file BandwidthGraph.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().
|
privateslot |
Called when the settings button is toggled
Sets the opacity of the Bandwidth Graph window.
Definition at line 239 of file BandwidthGraph.cpp.
References ui.
Referenced by createActions(), loadSettings(), and saveChanges().
|
privateslot |
Called when settings button is toggled
Toggles the Settings pane on and off, changes toggle button text.
Definition at line 211 of file BandwidthGraph.cpp.
References ui.
Referenced by BandwidthGraph(), cancelChanges(), createActions(), and saveChanges().
|
slot |
Overloaded QWidget.show
Overloads the default show() slot so we can set opacity.
Definition at line 260 of file BandwidthGraph.cpp.
References loadSettings(), and VidaliaWindow::showWindow().
|
privateslot |
Adds new data to the graph
Adds new data to the graph.
Definition at line 108 of file BandwidthGraph.cpp.
References ui.
Referenced by BandwidthGraph().
|
private |
A VidaliaSettings object that handles getting/saving settings
Definition at line 70 of file BandwidthGraph.h.
|
private |
A TorControl object used to talk to Tor.
Definition at line 68 of file BandwidthGraph.h.
|
private |
Qt Designer generated object
Definition at line 73 of file BandwidthGraph.h.
Referenced by BandwidthGraph(), createActions(), loadSettings(), reset(), retranslateUi(), saveChanges(), setOpacity(), showSettingsFrame(), and updateGraph().