<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>Vidalia: UPNPTestDialog.cpp Source File</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.6.3 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li><a href="dirs.html"><span>Directories</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="dir_b47abd1aad201a152869566145babb61.html">src</a> » <a class="el" href="dir_695ba8f8357372e02d38c40b3c6dbe81.html">vidalia</a> » <a class="el" href="dir_738aec08306f4b898e01f7a551299457.html">config</a> </div> </div> <div class="contents"> <h1>UPNPTestDialog.cpp</h1><a href="_u_p_n_p_test_dialog_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span> <a name="l00002"></a>00002 <span class="comment">** This file is part of Vidalia, and is subject to the license terms in the</span> <a name="l00003"></a>00003 <span class="comment">** LICENSE file, found in the top level directory of this distribution. If </span> <a name="l00004"></a>00004 <span class="comment">** you did not receive the LICENSE file with this file, you may obtain it</span> <a name="l00005"></a>00005 <span class="comment">** from the Vidalia source package distributed by the Vidalia Project at</span> <a name="l00006"></a>00006 <span class="comment">** http://www.vidalia-project.net/. No part of Vidalia, including this file,</span> <a name="l00007"></a>00007 <span class="comment">** may be copied, modified, propagated, or distributed except according to</span> <a name="l00008"></a>00008 <span class="comment">** the terms described in the LICENSE file.</span> <a name="l00009"></a>00009 <span class="comment">*/</span> <a name="l00010"></a>00010 <a name="l00011"></a>00011 <span class="comment">/* </span> <a name="l00012"></a>00012 <span class="comment">** \file UPNPTestDialog.cpp</span> <a name="l00013"></a>00013 <span class="comment">** \version $Id: UPNPTestDialog.cpp 3735 2009-04-28 20:28:01Z edmanm $</span> <a name="l00014"></a>00014 <span class="comment">** \brief Dialog that displays the progress of a UPnP configuration test</span> <a name="l00015"></a>00015 <span class="comment">*/</span> <a name="l00016"></a>00016 <a name="l00017"></a>00017 <span class="preprocessor">#include "<a class="code" href="_u_p_n_p_test_dialog_8h.html">UPNPTestDialog.h</a>"</span> <a name="l00018"></a>00018 <a name="l00019"></a>00019 <span class="comment"></span> <a name="l00020"></a>00020 <span class="comment">/** Default constructor. <b>orPort</b> and <b>dirPort</b> specify the ports</span> <a name="l00021"></a>00021 <span class="comment"> * used to test UPnP port forwarding. The original UPnP state will be restored</span> <a name="l00022"></a>00022 <span class="comment"> * when the test dialog is closed. */</span> <a name="l00023"></a><a class="code" href="class_u_p_n_p_test_dialog.html#ad5ccc3534f0a8d88c7386a484c8ce28e">00023</a> <a class="code" href="class_u_p_n_p_test_dialog.html#ad5ccc3534f0a8d88c7386a484c8ce28e">UPNPTestDialog::UPNPTestDialog</a>(quint16 orPort, quint16 dirPort, QWidget *parent) <a name="l00024"></a>00024 : QDialog(parent), _orPort(orPort), _dirPort(dirPort) <a name="l00025"></a>00025 { <a name="l00026"></a>00026 <a class="code" href="class_u_p_n_p_test_dialog.html#a5509e2766a5ca35b14f3e963ca53c1b4">ui</a>.setupUi(<span class="keyword">this</span>); <a name="l00027"></a>00027 <a class="code" href="class_u_p_n_p_test_dialog.html#aad4af5d056cd9adab0b5ba2544def2fb">_upnp</a> = <a class="code" href="class_u_p_n_p_control.html#a5046fdfc0449019c8d1e21ac0918dbb1">UPNPControl::instance</a>(); <a name="l00028"></a>00028 <a name="l00029"></a>00029 <a class="code" href="class_u_p_n_p_test_dialog.html#a5509e2766a5ca35b14f3e963ca53c1b4">ui</a>.buttonBox->setStandardButtons(QDialogButtonBox::Close <a name="l00030"></a>00030 | QDialogButtonBox::Help); <a name="l00031"></a>00031 <a name="l00032"></a>00032 <a class="code" href="class_u_p_n_p_test_dialog.html#a5509e2766a5ca35b14f3e963ca53c1b4">ui</a>.progressBar->setValue(0); <a name="l00033"></a>00033 <a class="code" href="class_u_p_n_p_test_dialog.html#a5509e2766a5ca35b14f3e963ca53c1b4">ui</a>.progressBar->setFormat(<span class="stringliteral">""</span>); <a name="l00034"></a>00034 <a class="code" href="class_u_p_n_p_test_dialog.html#a5509e2766a5ca35b14f3e963ca53c1b4">ui</a>.progressBar->setMinimum(0); <a name="l00035"></a>00035 <a class="code" href="class_u_p_n_p_test_dialog.html#a5509e2766a5ca35b14f3e963ca53c1b4">ui</a>.progressBar->setMaximum(<a class="code" href="class_u_p_n_p_test_dialog.html#aad4af5d056cd9adab0b5ba2544def2fb">_upnp</a>-><a class="code" href="class_u_p_n_p_control.html#a07279abb8640c54c0febd7c9bea2212a">discoverTimeout</a>()/500 + 4); <a name="l00036"></a>00036 <a name="l00037"></a>00037 <a class="code" href="class_u_p_n_p_test_dialog.html#acd90737cc2308b6ba5104b22ad20f89d">_discoverTimer</a>.setInterval(500); <a name="l00038"></a>00038 connect(&<a class="code" href="class_u_p_n_p_test_dialog.html#acd90737cc2308b6ba5104b22ad20f89d">_discoverTimer</a>, SIGNAL(timeout()), <span class="keyword">this</span>, SLOT(<a class="code" href="class_u_p_n_p_test_dialog.html#a2a5a5a5179c2e99237680568ea610691">discoverTimeout</a>())); <a name="l00039"></a>00039 connect(<a class="code" href="class_u_p_n_p_test_dialog.html#a5509e2766a5ca35b14f3e963ca53c1b4">ui</a>.buttonBox, SIGNAL(<a class="code" href="class_u_p_n_p_test_dialog.html#acadefc1a90f6cd4161837fd96d97848b">clicked</a>(QAbstractButton*)), <a name="l00040"></a>00040 <span class="keyword">this</span>, SLOT(<a class="code" href="class_u_p_n_p_test_dialog.html#acadefc1a90f6cd4161837fd96d97848b">clicked</a>(QAbstractButton*))); <a name="l00041"></a>00041 <a name="l00042"></a>00042 <a class="code" href="class_u_p_n_p_test_dialog.html#aad4af5d056cd9adab0b5ba2544def2fb">_upnp</a>-><a class="code" href="class_u_p_n_p_control.html#a59027db8f6d2b6ffa35b15c8546b75e2">getDesiredState</a>(&<a class="code" href="class_u_p_n_p_test_dialog.html#a0af4f4c7796d92fe460f8de8c2b8f7d5">_oldDirPort</a>, &<a class="code" href="class_u_p_n_p_test_dialog.html#aedafdf61bedfe7d12a00334857fe7fb8">_oldOrPort</a>); <a name="l00043"></a>00043 } <a name="l00044"></a>00044 <span class="comment"></span> <a name="l00045"></a>00045 <span class="comment">/** Shows or hides the dialog based on <b>visible</b>. The UPnP test will be</span> <a name="l00046"></a>00046 <span class="comment"> * started when the dialog is first shown. */</span> <a name="l00047"></a>00047 <span class="keywordtype">void</span> <a name="l00048"></a><a class="code" href="class_u_p_n_p_test_dialog.html#a8c33fc8a09311e6257761632546f1619">00048</a> <a class="code" href="class_u_p_n_p_test_dialog.html#a8c33fc8a09311e6257761632546f1619">UPNPTestDialog::setVisible</a>(<span class="keywordtype">bool</span> visible) <a name="l00049"></a>00049 { <a name="l00050"></a>00050 <a class="code" href="class_u_p_n_p_test_dialog.html#a8c33fc8a09311e6257761632546f1619">QWidget::setVisible</a>(visible); <a name="l00051"></a>00051 <a name="l00052"></a>00052 <span class="keywordflow">if</span> (visible) <a name="l00053"></a>00053 <a class="code" href="class_u_p_n_p_test_dialog.html#a42242a0d4435e96f309498f132f175a8">startTest</a>(); <a name="l00054"></a>00054 <span class="keywordflow">else</span> <a name="l00055"></a>00055 <a class="code" href="class_u_p_n_p_test_dialog.html#aad4af5d056cd9adab0b5ba2544def2fb">_upnp</a>-><a class="code" href="class_u_p_n_p_control.html#a32326c4e812a710434a747e89bdce54f">setDesiredState</a>(<a class="code" href="class_u_p_n_p_test_dialog.html#a0af4f4c7796d92fe460f8de8c2b8f7d5">_oldDirPort</a>, <a class="code" href="class_u_p_n_p_test_dialog.html#aedafdf61bedfe7d12a00334857fe7fb8">_oldOrPort</a>); <a name="l00056"></a>00056 } <a name="l00057"></a>00057 <span class="comment"></span> <a name="l00058"></a>00058 <span class="comment">/** Initiates a UPnP test. */</span> <a name="l00059"></a>00059 <span class="keywordtype">void</span> <a name="l00060"></a><a class="code" href="class_u_p_n_p_test_dialog.html#a42242a0d4435e96f309498f132f175a8">00060</a> <a class="code" href="class_u_p_n_p_test_dialog.html#a42242a0d4435e96f309498f132f175a8">UPNPTestDialog::startTest</a>() <a name="l00061"></a>00061 { <a name="l00062"></a>00062 <a class="code" href="class_u_p_n_p_test_dialog.html#a5509e2766a5ca35b14f3e963ca53c1b4">ui</a>.buttonBox->setEnabled(<span class="keyword">false</span>); <a name="l00063"></a>00063 <a class="code" href="class_u_p_n_p_test_dialog.html#a5509e2766a5ca35b14f3e963ca53c1b4">ui</a>.progressBar->setValue(0); <a name="l00064"></a>00064 <a name="l00065"></a>00065 connect(<a class="code" href="class_u_p_n_p_control.html#a5046fdfc0449019c8d1e21ac0918dbb1">UPNPControl::instance</a>(), SIGNAL(stateChanged(<a class="code" href="class_u_p_n_p_control.html#acd04a19f042494f03791de43c9db7396">UPNPControl::UPNPState</a>)), <a name="l00066"></a>00066 <span class="keyword">this</span>, SLOT(<a class="code" href="class_u_p_n_p_test_dialog.html#a2b3cb2d5201d4be1419131b80d85d472">upnpStateChanged</a>(<a class="code" href="class_u_p_n_p_control.html#acd04a19f042494f03791de43c9db7396">UPNPControl::UPNPState</a>))); <a name="l00067"></a>00067 <a name="l00068"></a>00068 <a class="code" href="class_u_p_n_p_control.html#a5046fdfc0449019c8d1e21ac0918dbb1">UPNPControl::instance</a>()-><a class="code" href="class_u_p_n_p_control.html#a32326c4e812a710434a747e89bdce54f">setDesiredState</a>(<a class="code" href="class_u_p_n_p_test_dialog.html#a5f87002799a18016e67621891ab62522">_dirPort</a>, <a class="code" href="class_u_p_n_p_test_dialog.html#a59bc5c0b8bd9c55504665d06b237e596">_orPort</a>); <a name="l00069"></a>00069 } <a name="l00070"></a>00070 <span class="comment"></span> <a name="l00071"></a>00071 <span class="comment">/** Called when the UPnP test successfully enables port forwarding. Enables</span> <a name="l00072"></a>00072 <span class="comment"> * the Close button, allowing the user to exit the test dialog. */</span> <a name="l00073"></a>00073 <span class="keywordtype">void</span> <a name="l00074"></a><a class="code" href="class_u_p_n_p_test_dialog.html#ac67b917db4db23cf28beba1e0c59d3f7">00074</a> <a class="code" href="class_u_p_n_p_test_dialog.html#ac67b917db4db23cf28beba1e0c59d3f7">UPNPTestDialog::testSuccessful</a>() <a name="l00075"></a>00075 { <a name="l00076"></a>00076 <a class="code" href="class_u_p_n_p_test_dialog.html#a5509e2766a5ca35b14f3e963ca53c1b4">ui</a>.buttonBox->setEnabled(<span class="keyword">true</span>); <a name="l00077"></a>00077 <a class="code" href="class_u_p_n_p_test_dialog.html#a5509e2766a5ca35b14f3e963ca53c1b4">ui</a>.buttonBox->setStandardButtons(QDialogButtonBox::Close <a name="l00078"></a>00078 | QDialogButtonBox::Help); <a name="l00079"></a>00079 <a name="l00080"></a>00080 disconnect(<a class="code" href="class_u_p_n_p_control.html#a5046fdfc0449019c8d1e21ac0918dbb1">UPNPControl::instance</a>(), 0, <span class="keyword">this</span>, 0); <a name="l00081"></a>00081 } <a name="l00082"></a>00082 <span class="comment"></span> <a name="l00083"></a>00083 <span class="comment">/** Called when the UPnP test fails due to an error. Enables the Close and</span> <a name="l00084"></a>00084 <span class="comment"> * Retry buttons, allowing the user to either rerun the test or give up. */</span> <a name="l00085"></a>00085 <span class="keywordtype">void</span> <a name="l00086"></a><a class="code" href="class_u_p_n_p_test_dialog.html#a13d7f4e8fd6fea36fea351fc6fca36ee">00086</a> <a class="code" href="class_u_p_n_p_test_dialog.html#a13d7f4e8fd6fea36fea351fc6fca36ee">UPNPTestDialog::testFailed</a>() <a name="l00087"></a>00087 { <a name="l00088"></a>00088 <a class="code" href="class_u_p_n_p_test_dialog.html#a5509e2766a5ca35b14f3e963ca53c1b4">ui</a>.buttonBox->setEnabled(<span class="keyword">true</span>); <a name="l00089"></a>00089 <a class="code" href="class_u_p_n_p_test_dialog.html#a5509e2766a5ca35b14f3e963ca53c1b4">ui</a>.buttonBox->setStandardButtons(QDialogButtonBox::Retry <a name="l00090"></a>00090 | QDialogButtonBox::Close <a name="l00091"></a>00091 | QDialogButtonBox::Help); <a name="l00092"></a>00092 <a name="l00093"></a>00093 disconnect(<a class="code" href="class_u_p_n_p_control.html#a5046fdfc0449019c8d1e21ac0918dbb1">UPNPControl::instance</a>(), 0, <span class="keyword">this</span>, 0); <a name="l00094"></a>00094 } <a name="l00095"></a>00095 <span class="comment"></span> <a name="l00096"></a>00096 <span class="comment">/** Updates the progress bar to indicate the device discovery portion of the</span> <a name="l00097"></a>00097 <span class="comment"> * test is still in progress. */</span> <a name="l00098"></a>00098 <span class="keywordtype">void</span> <a name="l00099"></a><a class="code" href="class_u_p_n_p_test_dialog.html#a2a5a5a5179c2e99237680568ea610691">00099</a> <a class="code" href="class_u_p_n_p_test_dialog.html#a2a5a5a5179c2e99237680568ea610691">UPNPTestDialog::discoverTimeout</a>() <a name="l00100"></a>00100 { <a name="l00101"></a>00101 <a class="code" href="class_u_p_n_p_test_dialog.html#a5509e2766a5ca35b14f3e963ca53c1b4">ui</a>.progressBar->setValue(<a class="code" href="class_u_p_n_p_test_dialog.html#a5509e2766a5ca35b14f3e963ca53c1b4">ui</a>.progressBar->value()+1); <a name="l00102"></a>00102 } <a name="l00103"></a>00103 <span class="comment"></span> <a name="l00104"></a>00104 <span class="comment">/** Updates the test UI based on the UPnP <b>state</b>. */</span> <a name="l00105"></a>00105 <span class="keywordtype">void</span> <a name="l00106"></a><a class="code" href="class_u_p_n_p_test_dialog.html#a2b3cb2d5201d4be1419131b80d85d472">00106</a> <a class="code" href="class_u_p_n_p_test_dialog.html#a2b3cb2d5201d4be1419131b80d85d472">UPNPTestDialog::upnpStateChanged</a>(<a class="code" href="class_u_p_n_p_control.html#acd04a19f042494f03791de43c9db7396">UPNPControl::UPNPState</a> state) <a name="l00107"></a>00107 { <a name="l00108"></a>00108 <span class="keywordflow">switch</span> (state) { <a name="l00109"></a>00109 <span class="keywordflow">case</span> <a class="code" href="class_u_p_n_p_control.html#acd04a19f042494f03791de43c9db7396acd5b2e70299d630102a9fee289e68e25">UPNPControl::DiscoverState</a>: <a name="l00110"></a>00110 <a class="code" href="class_u_p_n_p_test_dialog.html#acd90737cc2308b6ba5104b22ad20f89d">_discoverTimer</a>.start(); <a name="l00111"></a>00111 <a class="code" href="class_u_p_n_p_test_dialog.html#a5509e2766a5ca35b14f3e963ca53c1b4">ui</a>.progressBar->setValue(<a class="code" href="class_u_p_n_p_test_dialog.html#a5509e2766a5ca35b14f3e963ca53c1b4">ui</a>.progressBar->value()+1); <a name="l00112"></a>00112 <a class="code" href="class_u_p_n_p_test_dialog.html#a5509e2766a5ca35b14f3e963ca53c1b4">ui</a>.lblCurrentState->setText(tr(<span class="stringliteral">"Discovering UPnP-enabled devices"</span>)); <a name="l00113"></a>00113 <span class="keywordflow">break</span>; <a name="l00114"></a>00114 <a name="l00115"></a>00115 <span class="keywordflow">case</span> <a class="code" href="class_u_p_n_p_control.html#acd04a19f042494f03791de43c9db7396a1fc94b798dd5a915ad3f83d9eda180d1">UPNPControl::UpdatingDirPortState</a>: <a name="l00116"></a>00116 <a class="code" href="class_u_p_n_p_test_dialog.html#a5509e2766a5ca35b14f3e963ca53c1b4">ui</a>.progressBar->setValue(<a class="code" href="class_u_p_n_p_test_dialog.html#a5509e2766a5ca35b14f3e963ca53c1b4">ui</a>.progressBar->value()+1); <a name="l00117"></a>00117 <a class="code" href="class_u_p_n_p_test_dialog.html#a5509e2766a5ca35b14f3e963ca53c1b4">ui</a>.lblCurrentState->setText(tr(<span class="stringliteral">"Updating directory port mapping"</span>)); <a name="l00118"></a>00118 <span class="keywordflow">break</span>; <a name="l00119"></a>00119 <a name="l00120"></a>00120 <span class="keywordflow">case</span> <a class="code" href="class_u_p_n_p_control.html#acd04a19f042494f03791de43c9db7396a29adb10162b1056f8ecc750e192db3aa">UPNPControl::UpdatingORPortState</a>: <a name="l00121"></a>00121 <a class="code" href="class_u_p_n_p_test_dialog.html#a5509e2766a5ca35b14f3e963ca53c1b4">ui</a>.progressBar->setValue(<a class="code" href="class_u_p_n_p_test_dialog.html#a5509e2766a5ca35b14f3e963ca53c1b4">ui</a>.progressBar->value()+1); <a name="l00122"></a>00122 <a class="code" href="class_u_p_n_p_test_dialog.html#a5509e2766a5ca35b14f3e963ca53c1b4">ui</a>.lblCurrentState->setText(tr(<span class="stringliteral">"Updating relay port mapping"</span>)); <a name="l00123"></a>00123 <span class="keywordflow">break</span>; <a name="l00124"></a>00124 <a name="l00125"></a>00125 <span class="keywordflow">case</span> <a class="code" href="class_u_p_n_p_control.html#acd04a19f042494f03791de43c9db7396ad50a7106ed41c55e20a63cf882c913fc">UPNPControl::ForwardingCompleteState</a>: <a name="l00126"></a>00126 <a class="code" href="class_u_p_n_p_test_dialog.html#a5509e2766a5ca35b14f3e963ca53c1b4">ui</a>.progressBar->setValue(<a class="code" href="class_u_p_n_p_test_dialog.html#a5509e2766a5ca35b14f3e963ca53c1b4">ui</a>.progressBar->maximum()); <a name="l00127"></a>00127 <a class="code" href="class_u_p_n_p_test_dialog.html#a5509e2766a5ca35b14f3e963ca53c1b4">ui</a>.lblCurrentState->setText(tr(<span class="stringliteral">"Test completed successfully!"</span>)); <a name="l00128"></a>00128 <a class="code" href="class_u_p_n_p_test_dialog.html#ac67b917db4db23cf28beba1e0c59d3f7">testSuccessful</a>(); <a name="l00129"></a>00129 <span class="keywordflow">break</span>; <a name="l00130"></a>00130 <a name="l00131"></a>00131 <span class="keywordflow">case</span> <a class="code" href="class_u_p_n_p_control.html#acd04a19f042494f03791de43c9db7396a278239b98c407b22b2506257665c8637">UPNPControl::ErrorState</a>: <a name="l00132"></a>00132 <a class="code" href="class_u_p_n_p_test_dialog.html#a5509e2766a5ca35b14f3e963ca53c1b4">ui</a>.progressBar->setValue(<a class="code" href="class_u_p_n_p_test_dialog.html#a5509e2766a5ca35b14f3e963ca53c1b4">ui</a>.progressBar->maximum()); <a name="l00133"></a>00133 <a class="code" href="class_u_p_n_p_test_dialog.html#a5509e2766a5ca35b14f3e963ca53c1b4">ui</a>.lblCurrentState->setText(<a class="code" href="class_u_p_n_p_control.html#a5046fdfc0449019c8d1e21ac0918dbb1">UPNPControl::instance</a>()->errorString()); <a name="l00134"></a>00134 <a class="code" href="class_u_p_n_p_test_dialog.html#a13d7f4e8fd6fea36fea351fc6fca36ee">testFailed</a>(); <a name="l00135"></a>00135 <span class="keywordflow">break</span>; <a name="l00136"></a>00136 <a name="l00137"></a>00137 <span class="keywordflow">default</span>: <a name="l00138"></a>00138 <span class="keywordflow">break</span>; <a name="l00139"></a>00139 } <a name="l00140"></a>00140 <span class="keywordflow">if</span> (state != <a class="code" href="class_u_p_n_p_control.html#acd04a19f042494f03791de43c9db7396acd5b2e70299d630102a9fee289e68e25">UPNPControl::DiscoverState</a>) <a name="l00141"></a>00141 <a class="code" href="class_u_p_n_p_test_dialog.html#acd90737cc2308b6ba5104b22ad20f89d">_discoverTimer</a>.stop(); <a name="l00142"></a>00142 } <a name="l00143"></a>00143 <span class="comment"></span> <a name="l00144"></a>00144 <span class="comment">/** Called when a user clicks on a button in the dialog's button box. If Retry</span> <a name="l00145"></a>00145 <span class="comment"> * is clicked, another UPnP test will be conducted. If Close is clicked, then</span> <a name="l00146"></a>00146 <span class="comment"> * the dialog is closed and the original UPnP state restored. */</span> <a name="l00147"></a>00147 <span class="keywordtype">void</span> <a name="l00148"></a><a class="code" href="class_u_p_n_p_test_dialog.html#acadefc1a90f6cd4161837fd96d97848b">00148</a> <a class="code" href="class_u_p_n_p_test_dialog.html#acadefc1a90f6cd4161837fd96d97848b">UPNPTestDialog::clicked</a>(QAbstractButton *button) <a name="l00149"></a>00149 { <a name="l00150"></a>00150 <span class="keywordflow">switch</span> (<a class="code" href="class_u_p_n_p_test_dialog.html#a5509e2766a5ca35b14f3e963ca53c1b4">ui</a>.buttonBox->standardButton(button)) { <a name="l00151"></a>00151 <span class="keywordflow">case</span> QDialogButtonBox::Retry: <a name="l00152"></a>00152 <a class="code" href="class_u_p_n_p_test_dialog.html#a42242a0d4435e96f309498f132f175a8">startTest</a>(); <a name="l00153"></a>00153 <span class="keywordflow">break</span>; <a name="l00154"></a>00154 <a name="l00155"></a>00155 <span class="keywordflow">case</span> QDialogButtonBox::Close: <a name="l00156"></a>00156 done(0); <a name="l00157"></a>00157 <span class="keywordflow">break</span>; <a name="l00158"></a>00158 <a name="l00159"></a>00159 <span class="keywordflow">case</span> QDialogButtonBox::Help: <a name="l00160"></a>00160 emit <a class="code" href="class_u_p_n_p_test_dialog.html#a7da7ba5c63f46d80b9622270bd43b9d2">help</a>(); <a name="l00161"></a>00161 done(0); <a name="l00162"></a>00162 <span class="keywordflow">break</span>; <a name="l00163"></a>00163 <a name="l00164"></a>00164 <span class="keywordflow">default</span>: <a name="l00165"></a>00165 <span class="keywordflow">break</span>; <a name="l00166"></a>00166 } <a name="l00167"></a>00167 } <a name="l00168"></a>00168 </pre></div></div> <hr class="footer"/><address style="text-align: right;"><small>Generated on Mon Aug 30 22:58:55 2010 for Vidalia by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address> </body> </html>