Sophie

Sophie

distrib > Mandriva > 2010.2 > i586 > by-pkgid > 9601c7beb4ff23e834bfa171795ed560 > files > 209

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: MessageLog.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_b5419f0f3b920f7a66865768144dfe22.html">log</a>
  </div>
</div>
<div class="contents">
<h1>MessageLog.h</h1><a href="_message_log_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 MessageLog.h</span>
<a name="l00013"></a>00013 <span class="comment">** \version $Id: MessageLog.h 4091 2009-08-30 03:10:07Z edmanm $</span>
<a name="l00014"></a>00014 <span class="comment">** \brief Displays log messages and message log settings</span>
<a name="l00015"></a>00015 <span class="comment">*/</span>
<a name="l00016"></a>00016 
<a name="l00017"></a>00017 <span class="preprocessor">#ifndef _MESSAGELOG_H</span>
<a name="l00018"></a>00018 <span class="preprocessor"></span><span class="preprocessor">#define _MESSAGELOG_H</span>
<a name="l00019"></a>00019 <span class="preprocessor"></span>
<a name="l00020"></a>00020 <span class="preprocessor">#include &quot;ui_MessageLog.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 <span class="preprocessor">#include &quot;<a class="code" href="_log_file_8h.html">LogFile.h</a>&quot;</span>
<a name="l00023"></a>00023 <span class="preprocessor">#include &quot;<a class="code" href="_tor_control_8h.html">TorControl.h</a>&quot;</span>
<a name="l00024"></a>00024 <span class="preprocessor">#include &quot;<a class="code" href="_vidalia_settings_8h.html">VidaliaSettings.h</a>&quot;</span>
<a name="l00025"></a>00025 
<a name="l00026"></a>00026 <span class="keyword">class </span><a class="code" href="class_log_tree_item.html">LogTreeItem</a>;
<a name="l00027"></a>00027 <span class="keyword">class </span>QStringList;
<a name="l00028"></a>00028 
<a name="l00029"></a><a class="code" href="class_message_log.html">00029</a> <span class="keyword">class </span><a class="code" href="class_message_log.html">MessageLog</a> : <span class="keyword">public</span> <a class="code" href="class_vidalia_window.html">VidaliaWindow</a>
<a name="l00030"></a>00030 {
<a name="l00031"></a>00031   Q_OBJECT
<a name="l00032"></a>00032 
<a name="l00033"></a>00033 <span class="keyword">public</span>:<span class="comment"></span>
<a name="l00034"></a>00034 <span class="comment">  /** Default constructor **/</span>
<a name="l00035"></a>00035   <a class="code" href="class_message_log.html#ad79c38699f4299570caa7494c5f763c9">MessageLog</a>(QWidget *parent = 0, Qt::WFlags flags = 0);<span class="comment"></span>
<a name="l00036"></a>00036 <span class="comment">  /** Default destructor **/</span>
<a name="l00037"></a>00037   <a class="code" href="class_message_log.html#abf1c33ba127ed073cf91bb0aaa5e0122">~MessageLog</a>();
<a name="l00038"></a>00038   
<a name="l00039"></a>00039 <span class="keyword">protected</span>:<span class="comment"></span>
<a name="l00040"></a>00040 <span class="comment">  /** Called when the user changes the UI translation. */</span>
<a name="l00041"></a>00041   <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_message_log.html#a3e183e8c631a0907872cbe700d771f98">retranslateUi</a>();
<a name="l00042"></a>00042 
<a name="l00043"></a>00043 <span class="keyword">private</span> slots:<span class="comment"></span>
<a name="l00044"></a>00044 <span class="comment">  /** Adds the passed message to the message log as the specified type **/</span>
<a name="l00045"></a>00045   <span class="keywordtype">void</span> <a class="code" href="class_message_log.html#a93c6e629d53969b53da1a8a95981b86d">log</a>(<a class="code" href="namespacetc.html#abb893107129c283d2eb0238e46eb3d4c">tc::Severity</a> severity, <span class="keyword">const</span> QString &amp;msg);<span class="comment"></span>
<a name="l00046"></a>00046 <span class="comment">  /** Called when the user triggers the &quot;Save All&quot; action. */</span>
<a name="l00047"></a>00047   <span class="keywordtype">void</span> <a class="code" href="class_message_log.html#a8d489f46face28711de29a168f0d6505">saveAll</a>();<span class="comment"></span>
<a name="l00048"></a>00048 <span class="comment">  /** Called when the user triggers &quot;Save Selected&quot; action. */</span>
<a name="l00049"></a>00049   <span class="keywordtype">void</span> <a class="code" href="class_message_log.html#ac297e522cbc6ac0e33dc7725be78a05d">saveSelected</a>();<span class="comment"></span>
<a name="l00050"></a>00050 <span class="comment">  /** Called when the user triggers the &quot;Select All&quot; action. */</span>
<a name="l00051"></a>00051   <span class="keywordtype">void</span> <a class="code" href="class_message_log.html#a77db680329754afb4659be6373d99d0e">selectAll</a>();<span class="comment"></span>
<a name="l00052"></a>00052 <span class="comment">  /** Called when the user triggers the &quot;Copy&quot; action. */</span>
<a name="l00053"></a>00053   <span class="keywordtype">void</span> <a class="code" href="class_message_log.html#a4fd1921d2cc96cfb9ee72b985625b034">copy</a>();<span class="comment"></span>
<a name="l00054"></a>00054 <span class="comment">  /** Called when the user triggers the &quot;Clear&quot; action. */</span>
<a name="l00055"></a>00055   <span class="keywordtype">void</span> <a class="code" href="class_message_log.html#a5dac4bb67f625cf09b5e54931a89181e">clear</a>();<span class="comment"></span>
<a name="l00056"></a>00056 <span class="comment">  /** Called when the user triggers the &quot;Find&quot; action. This will search</span>
<a name="l00057"></a>00057 <span class="comment">   * through all currently displayed log entries for text specified by the</span>
<a name="l00058"></a>00058 <span class="comment">   * user, highlighting the entries that contain a match. */</span>
<a name="l00059"></a>00059   <span class="keywordtype">void</span> <a class="code" href="class_message_log.html#a784ad18d7e55a00c144a11beecc5e9bd">find</a>();<span class="comment"></span>
<a name="l00060"></a>00060 <span class="comment">  /** Called when user saves settings **/</span>
<a name="l00061"></a>00061   <span class="keywordtype">void</span> <a class="code" href="class_message_log.html#a395fee07dee9c583407930a98d4341f1">saveSettings</a>();<span class="comment"></span>
<a name="l00062"></a>00062 <span class="comment">  /** Called when user cancels changed settings **/</span>
<a name="l00063"></a>00063   <span class="keywordtype">void</span> <a class="code" href="class_message_log.html#a8053ef97f4629cbb900806f646b957a7">cancelChanges</a>();<span class="comment"></span>
<a name="l00064"></a>00064 <span class="comment">  /** Called when the user clicks &quot;Browse&quot; to select a new log file. */</span>
<a name="l00065"></a>00065   <span class="keywordtype">void</span> <a class="code" href="class_message_log.html#aefa4e05c5114cabc6aee38205328fa2b">browse</a>();<span class="comment"></span>
<a name="l00066"></a>00066 <span class="comment">  /** Called when the user clicks &quot;Help&quot; to see help info about the log. */</span>
<a name="l00067"></a>00067   <span class="keywordtype">void</span> <a class="code" href="class_message_log.html#a86c7d9c14cb26ab6eadd81fa6678e21a">help</a>();
<a name="l00068"></a>00068 
<a name="l00069"></a>00069 <span class="keyword">private</span>:  <span class="comment"></span>
<a name="l00070"></a>00070 <span class="comment">  /** Create and bind actions to events **/</span>
<a name="l00071"></a>00071   <span class="keywordtype">void</span> <a class="code" href="class_message_log.html#aa3e36955cc9fc8107ee2e479db4839c1">createActions</a>();<span class="comment"></span>
<a name="l00072"></a>00072 <span class="comment">  /** Set Tool Tips for various widgets **/</span>
<a name="l00073"></a>00073   <span class="keywordtype">void</span> <a class="code" href="class_message_log.html#a853e0a5d24f10d23ab56f10cba3657d5">setToolTips</a>();<span class="comment"></span>
<a name="l00074"></a>00074 <span class="comment">  /** Loads the saved Message Log settings **/</span>
<a name="l00075"></a>00075   <span class="keywordtype">void</span> <a class="code" href="class_message_log.html#afd6598ece49f8ced646e62cb1a22334a">loadSettings</a>();<span class="comment"></span>
<a name="l00076"></a>00076 <span class="comment">  /** Registers the current message filter with Tor */</span>
<a name="l00077"></a>00077   <span class="keywordtype">void</span> <a class="code" href="class_message_log.html#afd18cef5f103d6ea3077464dc749b2e9">registerLogEvents</a>();<span class="comment"></span>
<a name="l00078"></a>00078 <span class="comment">  /** Saves the given list of items to a file */</span>
<a name="l00079"></a>00079   <span class="keywordtype">void</span> <a class="code" href="class_message_log.html#aae229b36ccadbfea1c21d5de7a67e888">save</a>(<span class="keyword">const</span> QStringList &amp;messages);<span class="comment"></span>
<a name="l00080"></a>00080 <span class="comment">  /** Rotates the log file based on the filename and the current logging status. */</span>
<a name="l00081"></a>00081   <span class="keywordtype">bool</span> <a class="code" href="class_message_log.html#adba18c200f5a1105a4f7b1eb833cbb2c">rotateLogFile</a>(<span class="keyword">const</span> QString &amp;filename);
<a name="l00082"></a>00082 <span class="comment"></span>
<a name="l00083"></a>00083 <span class="comment">  /** A pointer to a TorControl object, used to register for log events */</span>
<a name="l00084"></a><a class="code" href="class_message_log.html#a4024c9e5937b976743bc237982f0d536">00084</a>   <a class="code" href="class_tor_control.html">TorControl</a>* <a class="code" href="class_message_log.html#a4024c9e5937b976743bc237982f0d536">_torControl</a>;<span class="comment"></span>
<a name="l00085"></a>00085 <span class="comment">  /** A VidaliaSettings object that handles getting/saving settings **/</span>
<a name="l00086"></a><a class="code" href="class_message_log.html#a8e8521ba96a0e9d5bdd7cb690c7eb492">00086</a>   <a class="code" href="class_vidalia_settings.html">VidaliaSettings</a>* <a class="code" href="class_message_log.html#a8e8521ba96a0e9d5bdd7cb690c7eb492">_settings</a>;<span class="comment"></span>
<a name="l00087"></a>00087 <span class="comment">  /** Stores the current message filter */</span>
<a name="l00088"></a><a class="code" href="class_message_log.html#acb4f045bde287a3b1eb0c0add222a8b3">00088</a>   uint <a class="code" href="class_message_log.html#acb4f045bde287a3b1eb0c0add222a8b3">_filter</a>;<span class="comment"></span>
<a name="l00089"></a>00089 <span class="comment">  /** Set to true if we will log all messages to a file. */</span>      
<a name="l00090"></a><a class="code" href="class_message_log.html#a6ee2c2da6a8899b59b0cb96c5954c416">00090</a>   <span class="keywordtype">bool</span> <a class="code" href="class_message_log.html#a6ee2c2da6a8899b59b0cb96c5954c416">_enableLogging</a>;  
<a name="l00091"></a>00091   <span class="comment">/* The log file used to store log messages. */</span>
<a name="l00092"></a><a class="code" href="class_message_log.html#a9ea2377f53918ff0f3ee85aa22b7f5fe">00092</a>   <a class="code" href="class_log_file.html">LogFile</a> <a class="code" href="class_message_log.html#a9ea2377f53918ff0f3ee85aa22b7f5fe">_logFile</a>;
<a name="l00093"></a>00093 <span class="comment"></span>
<a name="l00094"></a>00094 <span class="comment">  /** Qt Designer generatated QObject **/</span>
<a name="l00095"></a><a class="code" href="class_message_log.html#a1a07ffbeb4fbdb27371fa9036655fb9a">00095</a>   Ui::MessageLog <a class="code" href="class_message_log.html#a1a07ffbeb4fbdb27371fa9036655fb9a">ui</a>;
<a name="l00096"></a>00096 };
<a name="l00097"></a>00097 
<a name="l00098"></a>00098 <span class="preprocessor">#endif</span>
<a name="l00099"></a>00099 <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>