Vidalia 0.3.1
|
#include <UPNPTestDialog.h>
Signals | |
void | help () |
Public Member Functions | |
UPNPTestDialog (quint16 orPort, quint16 dirPort, QWidget *parent=0) | |
Protected Slots | |
void | setVisible (bool visible) |
void | clicked (QAbstractButton *button) |
void | upnpStateChanged (UPNPControl::UPNPState state) |
void | discoverTimeout () |
Protected Member Functions | |
void | startTest () |
void | testSuccessful () |
void | testFailed () |
Private Attributes | |
UPNPControl * | _upnp |
QTimer | _discoverTimer |
quint16 | _oldOrPort |
quint16 | _oldDirPort |
quint16 | _orPort |
quint16 | _dirPort |
Ui::UPNPTestDialog | ui |
Definition at line 27 of file UPNPTestDialog.h.
UPNPTestDialog::UPNPTestDialog | ( | quint16 | orPort, |
quint16 | dirPort, | ||
QWidget * | parent = 0 |
||
) |
Default constructor. orPort and dirPort specify the ports used to test UPnP port forwarding. The original UPnP state will be restored when the test dialog is closed.
Definition at line 22 of file UPNPTestDialog.cpp.
References _discoverTimer, _oldDirPort, _oldOrPort, _upnp, clicked(), connect(), discoverTimeout(), UPNPControl::discoverTimeout(), UPNPControl::getDesiredState(), UPNPControl::instance(), and ui.
|
protectedslot |
Called when a user clicks on a button in the dialog's button box. If Retry is clicked, another UPnP test will be conducted. If Close is clicked, then the dialog is closed and the original UPnP state restored.
Definition at line 147 of file UPNPTestDialog.cpp.
References help(), startTest(), and ui.
Referenced by UPNPTestDialog().
|
protectedslot |
Updates the progress bar to indicate the device discovery portion of the test is still in progress.
Definition at line 98 of file UPNPTestDialog.cpp.
References ui.
Referenced by UPNPTestDialog().
|
signal |
Emitted when the user clicks the 'Help' button requesting the help topic on port forwarding.
Referenced by clicked().
Shows or hides the dialog based on visible. The UPnP test will be started when the dialog is first shown.
Definition at line 47 of file UPNPTestDialog.cpp.
References _oldDirPort, _oldOrPort, _upnp, UPNPControl::setDesiredState(), and startTest().
|
protected |
Initiates a UPnP test.
Definition at line 59 of file UPNPTestDialog.cpp.
References _dirPort, _orPort, connect(), UPNPControl::instance(), UPNPControl::setDesiredState(), ui, and upnpStateChanged().
Referenced by clicked(), and setVisible().
|
protected |
Called when the UPnP test fails due to an error. Enables the Close and Retry buttons, allowing the user to either rerun the test or give up.
Definition at line 85 of file UPNPTestDialog.cpp.
References disconnect(), UPNPControl::instance(), and ui.
Referenced by upnpStateChanged().
|
protected |
Called when the UPnP test successfully enables port forwarding. Enables the Close button, allowing the user to exit the test dialog.
Definition at line 73 of file UPNPTestDialog.cpp.
References disconnect(), UPNPControl::instance(), and ui.
Referenced by upnpStateChanged().
|
protectedslot |
Updates the test UI based on the UPnP state.
Definition at line 105 of file UPNPTestDialog.cpp.
References _discoverTimer, UPNPControl::DiscoverState, UPNPControl::ErrorState, UPNPControl::ForwardingCompleteState, UPNPControl::instance(), testFailed(), testSuccessful(), ui, UPNPControl::UpdatingDirPortState, and UPNPControl::UpdatingORPortState.
Referenced by startTest().
|
private |
DirPort used during the test.
Definition at line 82 of file UPNPTestDialog.h.
Referenced by startTest().
|
private |
Timer used to update the progress bar while during the device discovery portion of the test.
Definition at line 77 of file UPNPTestDialog.h.
Referenced by upnpStateChanged(), and UPNPTestDialog().
|
private |
Original (pre-test) forwarded DirPort.
Definition at line 80 of file UPNPTestDialog.h.
Referenced by setVisible(), and UPNPTestDialog().
|
private |
Original (pre-test) forwarded ORPort.
Definition at line 79 of file UPNPTestDialog.h.
Referenced by setVisible(), and UPNPTestDialog().
|
private |
ORPort used during the test.
Definition at line 81 of file UPNPTestDialog.h.
Referenced by startTest().
|
private |
Pointer to the UPNPControl singleton instance.
Definition at line 73 of file UPNPTestDialog.h.
Referenced by setVisible(), and UPNPTestDialog().
|
private |
Definition at line 84 of file UPNPTestDialog.h.
Referenced by clicked(), discoverTimeout(), startTest(), testFailed(), testSuccessful(), upnpStateChanged(), and UPNPTestDialog().