Vidalia 0.2.12
|
#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(), discoverTimeout(), UPNPControl::discoverTimeout(), UPNPControl::getDesiredState(), UPNPControl::instance(), and ui.
void UPNPTestDialog::clicked | ( | QAbstractButton * | button | ) | [protected, slot] |
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().
void UPNPTestDialog::discoverTimeout | ( | ) | [protected, slot] |
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().
void UPNPTestDialog::help | ( | ) | [signal] |
Emitted when the user clicks the 'Help' button requesting the help topic on port forwarding.
Referenced by clicked().
void UPNPTestDialog::setVisible | ( | bool | visible | ) | [protected, slot] |
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().
void UPNPTestDialog::startTest | ( | ) | [protected] |
Initiates a UPnP test.
Definition at line 59 of file UPNPTestDialog.cpp.
References _dirPort, _orPort, UPNPControl::instance(), UPNPControl::setDesiredState(), ui, and upnpStateChanged().
Referenced by clicked(), and setVisible().
void UPNPTestDialog::testFailed | ( | ) | [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 UPNPControl::instance(), and ui.
Referenced by upnpStateChanged().
void UPNPTestDialog::testSuccessful | ( | ) | [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 UPNPControl::instance(), and ui.
Referenced by upnpStateChanged().
void UPNPTestDialog::upnpStateChanged | ( | UPNPControl::UPNPState | state | ) | [protected, slot] |
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().
quint16 UPNPTestDialog::_dirPort [private] |
DirPort used during the test.
Definition at line 82 of file UPNPTestDialog.h.
Referenced by startTest().
QTimer UPNPTestDialog::_discoverTimer [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().
quint16 UPNPTestDialog::_oldDirPort [private] |
Original (pre-test) forwarded DirPort.
Definition at line 80 of file UPNPTestDialog.h.
Referenced by setVisible(), and UPNPTestDialog().
quint16 UPNPTestDialog::_oldOrPort [private] |
Original (pre-test) forwarded ORPort.
Definition at line 79 of file UPNPTestDialog.h.
Referenced by setVisible(), and UPNPTestDialog().
quint16 UPNPTestDialog::_orPort [private] |
ORPort used during the test.
Definition at line 81 of file UPNPTestDialog.h.
Referenced by startTest().
UPNPControl* UPNPTestDialog::_upnp [private] |
Pointer to the UPNPControl singleton instance.
Definition at line 73 of file UPNPTestDialog.h.
Referenced by setVisible(), and UPNPTestDialog().
Ui::UPNPTestDialog UPNPTestDialog::ui [private] |
Definition at line 84 of file UPNPTestDialog.h.
Referenced by clicked(), discoverTimeout(), startTest(), testFailed(), testSuccessful(), upnpStateChanged(), and UPNPTestDialog().