Sophie

Sophie

distrib > Mandriva > 2010.2 > i586 > media > contrib-backports > by-pkgid > 9601c7beb4ff23e834bfa171795ed560 > files > 67

vidalia-0.2.9-1mdv2010.1.i586.rpm

<!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: ConfigDialog.h 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&nbsp;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&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="dir_b47abd1aad201a152869566145babb61.html">src</a>&nbsp;&raquo;&nbsp;<a class="el" href="dir_695ba8f8357372e02d38c40b3c6dbe81.html">vidalia</a>&nbsp;&raquo;&nbsp;<a class="el" href="dir_738aec08306f4b898e01f7a551299457.html">config</a>
  </div>
</div>
<div class="contents">
<h1>ConfigDialog.h</h1><a href="_config_dialog_8h.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 you</span>
<a name="l00004"></a>00004 <span class="comment">**  did not receive the LICENSE file with this file, you may obtain it from the</span>
<a name="l00005"></a>00005 <span class="comment">**  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 the</span>
<a name="l00008"></a>00008 <span class="comment">**  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 ConfigDialog.h</span>
<a name="l00013"></a>00013 <span class="comment">** \version $Id: ConfigDialog.h 3735 2009-04-28 20:28:01Z edmanm $</span>
<a name="l00014"></a>00014 <span class="comment">** \brief Contains a series of Vidalia and Tor configuration pages</span>
<a name="l00015"></a>00015 <span class="comment">*/</span>
<a name="l00016"></a>00016 
<a name="l00017"></a>00017 <span class="preprocessor">#ifndef _CONFIGDIALOG_H</span>
<a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define _CONFIGDIALOG_H</span>
<a name="l00019"></a>00019 <span class="preprocessor"></span>
<a name="l00020"></a>00020 <span class="preprocessor">#include &quot;ui_ConfigDialog.h&quot;</span>
<a name="l00021"></a>00021 <span class="preprocessor">#include &quot;<a class="code" href="_vidalia_window_8h.html">VidaliaWindow.h</a>&quot;</span>
<a name="l00022"></a>00022 
<a name="l00023"></a>00023 <span class="preprocessor">#include &lt;QMainWindow&gt;</span>
<a name="l00024"></a>00024 <span class="preprocessor">#include &lt;QFileDialog&gt;</span>
<a name="l00025"></a>00025 
<a name="l00026"></a>00026 
<a name="l00027"></a><a class="code" href="class_config_dialog.html">00027</a> <span class="keyword">class </span><a class="code" href="class_config_dialog.html">ConfigDialog</a> : <span class="keyword">public</span> <a class="code" href="class_vidalia_window.html">VidaliaWindow</a>
<a name="l00028"></a>00028 {
<a name="l00029"></a>00029   Q_OBJECT
<a name="l00030"></a>00030 
<a name="l00031"></a>00031 <span class="keyword">public</span>:<span class="comment"></span>
<a name="l00032"></a>00032 <span class="comment">  /** Config dialog pages. */</span>
<a name="l00033"></a><a class="code" href="class_config_dialog.html#a76a284ede76eb7d829a5a50c3d2bbc53">00033</a>   <span class="keyword">enum</span> <a class="code" href="class_config_dialog.html#a76a284ede76eb7d829a5a50c3d2bbc53">Page</a> {
<a name="l00034"></a><a class="code" href="class_config_dialog.html#a76a284ede76eb7d829a5a50c3d2bbc53a0cacbe776c6b17d0bf81978804ac4cab">00034</a>     <a class="code" href="class_config_dialog.html#a76a284ede76eb7d829a5a50c3d2bbc53a0cacbe776c6b17d0bf81978804ac4cab">General</a> = 0,  <span class="comment">/** General configuration page. */</span>
<a name="l00035"></a><a class="code" href="class_config_dialog.html#a76a284ede76eb7d829a5a50c3d2bbc53a1a1bfdea98d286b2c0c57a3277ab1564">00035</a>     <a class="code" href="class_config_dialog.html#a76a284ede76eb7d829a5a50c3d2bbc53a1a1bfdea98d286b2c0c57a3277ab1564">Network</a>,      <span class="comment">/** Network configuration page. */</span>
<a name="l00036"></a><a class="code" href="class_config_dialog.html#a76a284ede76eb7d829a5a50c3d2bbc53a4330dcd7578ffc4dee2db10ef8e87613">00036</a>     <a class="code" href="class_config_dialog.html#a76a284ede76eb7d829a5a50c3d2bbc53a4330dcd7578ffc4dee2db10ef8e87613">Server</a>,       <span class="comment">/** Server configuration page. */</span>
<a name="l00037"></a><a class="code" href="class_config_dialog.html#a76a284ede76eb7d829a5a50c3d2bbc53a03be78e0d7fbe1fe0646d6efb97c7589">00037</a>     <a class="code" href="class_config_dialog.html#a76a284ede76eb7d829a5a50c3d2bbc53a03be78e0d7fbe1fe0646d6efb97c7589">Appearance</a>,   <span class="comment">/** Appearance configuration page. */</span>
<a name="l00038"></a><a class="code" href="class_config_dialog.html#a76a284ede76eb7d829a5a50c3d2bbc53a01203a45dba0c35f1eeaabe79d890203">00038</a>     <a class="code" href="class_config_dialog.html#a76a284ede76eb7d829a5a50c3d2bbc53a01203a45dba0c35f1eeaabe79d890203">Advanced</a>,     <span class="comment">/** Advanced configuration page. */</span>
<a name="l00039"></a><a class="code" href="class_config_dialog.html#a76a284ede76eb7d829a5a50c3d2bbc53a11484ee026596f609d4031cb2d91301d">00039</a>     <a class="code" href="class_service.html">Service</a>       <span class="comment">/** Service Configuration page */</span>
<a name="l00040"></a>00040   };
<a name="l00041"></a>00041 <span class="comment"></span>
<a name="l00042"></a>00042 <span class="comment">  /** Default Constructor */</span>
<a name="l00043"></a>00043   <a class="code" href="class_config_dialog.html#ad16df8ed2e55bd5cc55e3ef9040b8b93">ConfigDialog</a>(QWidget *parent = 0);
<a name="l00044"></a>00044 
<a name="l00045"></a>00045 <span class="keyword">public</span> slots:<span class="comment"></span>
<a name="l00046"></a>00046 <span class="comment">  /** Shows the config dialog with focus set to the given page. */</span>
<a name="l00047"></a>00047   <span class="keywordtype">void</span> <a class="code" href="class_vidalia_window.html#a58aa3cff3f3cd54497431cef227df8b6">showWindow</a>(<a class="code" href="class_config_dialog.html#a76a284ede76eb7d829a5a50c3d2bbc53">Page</a> page = <a class="code" href="class_config_dialog.html#a76a284ede76eb7d829a5a50c3d2bbc53a0cacbe776c6b17d0bf81978804ac4cab">General</a>);
<a name="l00048"></a>00048 
<a name="l00049"></a>00049 signals:<span class="comment"></span>
<a name="l00050"></a>00050 <span class="comment">  /** Emitted when the user clicks &quot;Check Now&quot; to initiate a check</span>
<a name="l00051"></a>00051 <span class="comment">   * for software updates. */</span>
<a name="l00052"></a>00052   <span class="keywordtype">void</span> <a class="code" href="class_config_dialog.html#a05ea802a2d8bed5de7dc5d93d5b7295a">checkForUpdates</a>();
<a name="l00053"></a>00053 
<a name="l00054"></a>00054 <span class="keyword">protected</span>:<span class="comment"></span>
<a name="l00055"></a>00055 <span class="comment">  /** Called when the user changes the UI translation. */</span>
<a name="l00056"></a>00056   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_config_dialog.html#ade37ee9f437542ecd74fdf85a604b39d">retranslateUi</a>();
<a name="l00057"></a>00057 
<a name="l00058"></a>00058 <span class="keyword">private</span> slots:<span class="comment"></span>
<a name="l00059"></a>00059 <span class="comment">  /** Called when user clicks &quot;Save Settings&quot;. Saves their settings to</span>
<a name="l00060"></a>00060 <span class="comment">   * Vidalia&#39;s configuration file. */</span>
<a name="l00061"></a>00061   <span class="keywordtype">void</span> <a class="code" href="class_config_dialog.html#a8f43753baeacc6de80e9ae8ae8e8ea6d">saveChanges</a>();<span class="comment"></span>
<a name="l00062"></a>00062 <span class="comment">  /** Called after Vidalia has authenticated to Tor and applies any changes</span>
<a name="l00063"></a>00063 <span class="comment">   * made since the last time they were applied. */</span>
<a name="l00064"></a>00064   <span class="keywordtype">void</span> <a class="code" href="class_config_dialog.html#a11242470bdf96e17f152cf8c98905f99">applyChanges</a>();<span class="comment"></span>
<a name="l00065"></a>00065 <span class="comment">  /** Sends Tor a SAVECONF to write its configuration to disk. If the</span>
<a name="l00066"></a>00066 <span class="comment">   * SAVECONF is successful, then all settings are considered to be</span>
<a name="l00067"></a>00067 <span class="comment">   * applied. */</span>
<a name="l00068"></a>00068   <span class="keywordtype">void</span> <a class="code" href="class_config_dialog.html#aa1ecc93ca70f42da4952b618c22e6818">saveConf</a>();<span class="comment"></span>
<a name="l00069"></a>00069 <span class="comment">  /** Called when a ConfigPage in the dialog requests help on a specific</span>
<a name="l00070"></a>00070 <span class="comment">   * &lt;b&gt;topic&lt;/b&gt;. */</span>
<a name="l00071"></a>00071   <span class="keywordtype">void</span> <a class="code" href="class_config_dialog.html#a088f2eb2fe5a30e119bf2c14719cc756">help</a>(<span class="keyword">const</span> QString &amp;topic);<span class="comment"></span>
<a name="l00072"></a>00072 <span class="comment">  /** Shows general help information for whichever settings page the user is</span>
<a name="l00073"></a>00073 <span class="comment">   * currently viewing. */</span>
<a name="l00074"></a>00074   <span class="keywordtype">void</span> <a class="code" href="class_config_dialog.html#a088f2eb2fe5a30e119bf2c14719cc756">help</a>();<span class="comment"></span>
<a name="l00075"></a>00075 <span class="comment">  /** Stub method that relays the checkForUpdates() signal from the General</span>
<a name="l00076"></a>00076 <span class="comment">   * settings page to the owner of the config dialog (MainWindow). */</span>
<a name="l00077"></a>00077   <span class="keywordtype">void</span> <a class="code" href="class_config_dialog.html#a8c542efe163d08d0d8f95e59f44aa21f">onCheckForUpdates</a>();
<a name="l00078"></a>00078 
<a name="l00079"></a>00079 <span class="keyword">private</span>:<span class="comment"></span>
<a name="l00080"></a>00080 <span class="comment">  /** Loads the current configuration settings */</span>
<a name="l00081"></a>00081   <span class="keywordtype">void</span> <a class="code" href="class_config_dialog.html#a4c067da89bc2454514265f5d4704838d">loadSettings</a>();<span class="comment"></span>
<a name="l00082"></a>00082 <span class="comment">  /** Creates a new action for a config page. */</span>
<a name="l00083"></a>00083   QAction* <a class="code" href="class_config_dialog.html#a42ed24a153d6cc141d7e95b7e82004ea">createPageAction</a>(<span class="keyword">const</span> QIcon &amp;img, <span class="keyword">const</span> QString &amp;text,
<a name="l00084"></a>00084                             <span class="keyword">const</span> QString &amp;data, QActionGroup *group);<span class="comment"></span>
<a name="l00085"></a>00085 <span class="comment">  /** Adds a new action to the toolbar. */</span>
<a name="l00086"></a>00086   <span class="keywordtype">void</span> <a class="code" href="class_config_dialog.html#a11db8b09442623aea70b42dfac3a6c67">addAction</a>(QAction *action, <span class="keyword">const</span> <span class="keywordtype">char</span> *slot = 0);
<a name="l00087"></a>00087 <span class="comment"></span>
<a name="l00088"></a>00088 <span class="comment">  /** Qt Designer generated object */</span>
<a name="l00089"></a><a class="code" href="class_config_dialog.html#abb4a5d39211db249c0ab3ea23b5f0a99">00089</a>   Ui::ConfigDialog <a class="code" href="class_config_dialog.html#abb4a5d39211db249c0ab3ea23b5f0a99">ui</a>;
<a name="l00090"></a>00090 };
<a name="l00091"></a>00091 
<a name="l00092"></a>00092 <span class="preprocessor">#endif</span>
<a name="l00093"></a>00093 <span class="preprocessor"></span>
</pre></div></div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Mon Aug 30 22:58:54 2010 for Vidalia by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>