UPNPTestDialog Class Reference

#include <upnptestdialog.h>

List of all members.

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


Detailed Description

Definition at line 28 of file upnptestdialog.h.


Constructor & Destructor Documentation

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.

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 23 of file upnptestdialog.cpp.

References _discoverTimer, _oldDirPort, _oldOrPort, _upnp, clicked(), discoverTimeout(), UPNPControl::discoverTimeout(), UPNPControl::getDesiredState(), UPNPControl::instance(), and ui.


Member Function Documentation

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.

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 148 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 99 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 48 of file upnptestdialog.cpp.

References _oldDirPort, _oldOrPort, _upnp, UPNPControl::setDesiredState(), and startTest().

void UPNPTestDialog::startTest (  )  [protected]

Initiates a UPnP test.

Definition at line 60 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 86 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 74 of file upnptestdialog.cpp.

References UPNPControl::instance(), and ui.

Referenced by upnpStateChanged().

void UPNPTestDialog::upnpStateChanged ( UPNPControl::UPNPState  state  )  [protected, slot]


Member Data Documentation

quint16 UPNPTestDialog::_dirPort [private]

DirPort used during the test.

Definition at line 83 of file upnptestdialog.h.

Referenced by startTest().

Timer used to update the progress bar while during the device discovery portion of the test.

Definition at line 78 of file upnptestdialog.h.

Referenced by upnpStateChanged(), and UPNPTestDialog().

quint16 UPNPTestDialog::_oldDirPort [private]

Original (pre-test) forwarded DirPort.

Definition at line 81 of file upnptestdialog.h.

Referenced by setVisible(), and UPNPTestDialog().

quint16 UPNPTestDialog::_oldOrPort [private]

Original (pre-test) forwarded ORPort.

Definition at line 80 of file upnptestdialog.h.

Referenced by setVisible(), and UPNPTestDialog().

quint16 UPNPTestDialog::_orPort [private]

ORPort used during the test.

Definition at line 82 of file upnptestdialog.h.

Referenced by startTest().

Pointer to the UPNPControl singleton instance.

Definition at line 74 of file upnptestdialog.h.

Referenced by setVisible(), and UPNPTestDialog().

Ui::UPNPTestDialog UPNPTestDialog::ui [private]


The documentation for this class was generated from the following files:

Generated on Wed Nov 26 21:02:43 2008 for Vidalia by  doxygen 1.5.7.1