Sophie

Sophie

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

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: RouterListItem.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&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_3776330d706700e272fa8df738fecea6.html">network</a>
  </div>
</div>
<div class="contents">
<h1>RouterListItem.cpp</h1><a href="_router_list_item_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 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 RouterListItem.cpp</span>
<a name="l00013"></a>00013 <span class="comment">** \version $Id: RouterListItem.cpp 3768 2009-05-13 19:07:26Z edmanm $</span>
<a name="l00014"></a>00014 <span class="comment">** \brief Item representing a single router and status in a RouterListWidget</span>
<a name="l00015"></a>00015 <span class="comment">*/</span>
<a name="l00016"></a>00016 
<a name="l00017"></a>00017 <span class="preprocessor">#include &quot;<a class="code" href="_router_list_item_8h.html">RouterListItem.h</a>&quot;</span>
<a name="l00018"></a>00018 <span class="preprocessor">#include &quot;<a class="code" href="_router_list_widget_8h.html">RouterListWidget.h</a>&quot;</span>
<a name="l00019"></a>00019 
<a name="l00020"></a>00020 <span class="preprocessor">#include &lt;QHeaderView&gt;</span>
<a name="l00021"></a>00021 
<a name="l00022"></a><a class="code" href="_router_list_item_8cpp.html#ad7ce3670ec0d59fbe35d2fd28aca5a00">00022</a> <span class="preprocessor">#define STATUS_COLUMN   (RouterListWidget::StatusColumn)</span>
<a name="l00023"></a><a class="code" href="_router_list_item_8cpp.html#a0fa016d04955ca9f1eadfcc3d7288628">00023</a> <span class="preprocessor"></span><span class="preprocessor">#define COUNTRY_COLUMN  (RouterListWidget::CountryColumn)</span>
<a name="l00024"></a><a class="code" href="_router_list_item_8cpp.html#a8bee0ddd069f483390183d4e0853a7a9">00024</a> <span class="preprocessor"></span><span class="preprocessor">#define NAME_COLUMN     (RouterListWidget::NameColumn)</span>
<a name="l00025"></a>00025 <span class="preprocessor"></span>
<a name="l00026"></a><a class="code" href="_router_list_item_8cpp.html#a6753e39ac1607a7c8b92a84f476a611c">00026</a> <span class="preprocessor">#define IMG_NODE_OFFLINE    &quot;:/images/icons/node-unresponsive.png&quot;</span>
<a name="l00027"></a><a class="code" href="_router_list_item_8cpp.html#abfc2c77e5dcda092e24555696d9ea173">00027</a> <span class="preprocessor"></span><span class="preprocessor">#define IMG_NODE_SLEEPING   &quot;:/images/icons/node-hibernating.png&quot;</span>
<a name="l00028"></a><a class="code" href="_router_list_item_8cpp.html#a768b034688f0153adad323cc1efe0a9a">00028</a> <span class="preprocessor"></span><span class="preprocessor">#define IMG_NODE_NO_BW      &quot;:/images/icons/node-bw-none.png&quot;</span>
<a name="l00029"></a><a class="code" href="_router_list_item_8cpp.html#a7ffc07b7aa4818e73ea64b562674040c">00029</a> <span class="preprocessor"></span><span class="preprocessor">#define IMG_NODE_LOW_BW     &quot;:/images/icons/node-bw-low.png&quot;</span>
<a name="l00030"></a><a class="code" href="_router_list_item_8cpp.html#aaf426bc6e3a3f029480095a9e8d12192">00030</a> <span class="preprocessor"></span><span class="preprocessor">#define IMG_NODE_MED_BW     &quot;:/images/icons/node-bw-med.png&quot;</span>
<a name="l00031"></a><a class="code" href="_router_list_item_8cpp.html#aca69f3e5342105df6a4ec1bca99e40d0">00031</a> <span class="preprocessor"></span><span class="preprocessor">#define IMG_NODE_HIGH_BW    &quot;:/images/icons/node-bw-high.png&quot;</span>
<a name="l00032"></a><a class="code" href="_router_list_item_8cpp.html#a2a54bd749bbf398fdb8fbe9e1111872d">00032</a> <span class="preprocessor"></span><span class="preprocessor">#define IMG_FLAG_UNKNOWN    &quot;:/images/flags/unknown.png&quot;</span>
<a name="l00033"></a>00033 <span class="preprocessor"></span>
<a name="l00034"></a>00034 <span class="comment"></span>
<a name="l00035"></a>00035 <span class="comment">/** Default constructor. */</span>
<a name="l00036"></a><a class="code" href="class_router_list_item.html#ac01683c1ff27c3a5616eb7ec9950c123">00036</a> <a class="code" href="class_router_list_item.html#ac01683c1ff27c3a5616eb7ec9950c123">RouterListItem::RouterListItem</a>(<a class="code" href="class_router_list_widget.html">RouterListWidget</a> *list, <a class="code" href="class_router_descriptor.html">RouterDescriptor</a> rd)
<a name="l00037"></a>00037   : QTreeWidgetItem()
<a name="l00038"></a>00038 {
<a name="l00039"></a>00039   <a class="code" href="class_router_list_item.html#a8880cf2d5e24e7b96628095b82e40a38">_list</a> = list;
<a name="l00040"></a>00040   <a class="code" href="class_router_list_item.html#af71876b106eef00bc12ad204446bb183">_rd</a>   = 0;
<a name="l00041"></a>00041   <a class="code" href="class_router_list_item.html#a6b7ce381f9ec5a77c23e8e0402f38200">_country</a> = <span class="stringliteral">&quot;~&quot;</span>; <span class="comment">/* Force items with no country to the bottom */</span>
<a name="l00042"></a>00042   setIcon(<a class="code" href="_router_list_item_8cpp.html#a0fa016d04955ca9f1eadfcc3d7288628">COUNTRY_COLUMN</a>, QIcon(<a class="code" href="_router_list_item_8cpp.html#a2a54bd749bbf398fdb8fbe9e1111872d">IMG_FLAG_UNKNOWN</a>));
<a name="l00043"></a>00043   <a class="code" href="class_router_list_item.html#abaefac33d536b4188e4be4767fbea16e">update</a>(rd);
<a name="l00044"></a>00044 }
<a name="l00045"></a>00045 <span class="comment"></span>
<a name="l00046"></a>00046 <span class="comment">/** Destructor. */</span>
<a name="l00047"></a><a class="code" href="class_router_list_item.html#ab3f46a0344a356d25bd60117f51ef361">00047</a> <a class="code" href="class_router_list_item.html#ab3f46a0344a356d25bd60117f51ef361">RouterListItem::~RouterListItem</a>()
<a name="l00048"></a>00048 {
<a name="l00049"></a>00049   <span class="keywordflow">if</span> (<a class="code" href="class_router_list_item.html#af71876b106eef00bc12ad204446bb183">_rd</a>)
<a name="l00050"></a>00050     <span class="keyword">delete</span> <a class="code" href="class_router_list_item.html#af71876b106eef00bc12ad204446bb183">_rd</a>;
<a name="l00051"></a>00051 }
<a name="l00052"></a>00052 <span class="comment"></span>
<a name="l00053"></a>00053 <span class="comment">/** Updates the router descriptor for this item. */</span>
<a name="l00054"></a>00054 <span class="keywordtype">void</span>
<a name="l00055"></a><a class="code" href="class_router_list_item.html#abaefac33d536b4188e4be4767fbea16e">00055</a> <a class="code" href="class_router_list_item.html#abaefac33d536b4188e4be4767fbea16e">RouterListItem::update</a>(<span class="keyword">const</span> <a class="code" href="class_router_descriptor.html">RouterDescriptor</a> &amp;rd)
<a name="l00056"></a>00056 {
<a name="l00057"></a>00057   QIcon statusIcon;
<a name="l00058"></a>00058   <span class="keywordflow">if</span> (<a class="code" href="class_router_list_item.html#af71876b106eef00bc12ad204446bb183">_rd</a>) {
<a name="l00059"></a>00059     <span class="keyword">delete</span> <a class="code" href="class_router_list_item.html#af71876b106eef00bc12ad204446bb183">_rd</a>;
<a name="l00060"></a>00060   }
<a name="l00061"></a>00061   <a class="code" href="class_router_list_item.html#af71876b106eef00bc12ad204446bb183">_rd</a> = <span class="keyword">new</span> <a class="code" href="class_router_descriptor.html">RouterDescriptor</a>(rd);
<a name="l00062"></a>00062   
<a name="l00063"></a>00063   <span class="comment">/* Determine the status value (used for sorting) and icon */</span>
<a name="l00064"></a>00064   <span class="keywordflow">if</span> (<a class="code" href="class_router_list_item.html#af71876b106eef00bc12ad204446bb183">_rd</a>-&gt;<a class="code" href="class_router_descriptor.html#a84295b2e93684a11b9c6f41d24552936">offline</a>()) {
<a name="l00065"></a>00065     <a class="code" href="class_router_list_item.html#a9b260d8c23236d20479be10300ef0168">_statusValue</a> = -1;
<a name="l00066"></a>00066     statusIcon = QIcon(<a class="code" href="_router_list_item_8cpp.html#a6753e39ac1607a7c8b92a84f476a611c">IMG_NODE_OFFLINE</a>);
<a name="l00067"></a>00067     setToolTip(<a class="code" href="_router_list_item_8cpp.html#ad7ce3670ec0d59fbe35d2fd28aca5a00">STATUS_COLUMN</a>, tr(<span class="stringliteral">&quot;Offline&quot;</span>));
<a name="l00068"></a>00068   } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="class_router_list_item.html#af71876b106eef00bc12ad204446bb183">_rd</a>-&gt;<a class="code" href="class_router_descriptor.html#a771edcea29687497ca2a7e9030486ba6">hibernating</a>()) {
<a name="l00069"></a>00069     <a class="code" href="class_router_list_item.html#a9b260d8c23236d20479be10300ef0168">_statusValue</a> = 0;
<a name="l00070"></a>00070     statusIcon = QIcon(<a class="code" href="_router_list_item_8cpp.html#abfc2c77e5dcda092e24555696d9ea173">IMG_NODE_SLEEPING</a>);
<a name="l00071"></a>00071     setToolTip(<a class="code" href="_router_list_item_8cpp.html#ad7ce3670ec0d59fbe35d2fd28aca5a00">STATUS_COLUMN</a>, tr(<span class="stringliteral">&quot;Hibernating&quot;</span>));
<a name="l00072"></a>00072   } <span class="keywordflow">else</span> {
<a name="l00073"></a>00073     <a class="code" href="class_router_list_item.html#a9b260d8c23236d20479be10300ef0168">_statusValue</a> = (qint64)<a class="code" href="class_router_list_item.html#af71876b106eef00bc12ad204446bb183">_rd</a>-&gt;<a class="code" href="class_router_descriptor.html#af8440bef161b61da8cb70e391d1e00c7">observedBandwidth</a>();
<a name="l00074"></a>00074     <span class="keywordflow">if</span> (<a class="code" href="class_router_list_item.html#a9b260d8c23236d20479be10300ef0168">_statusValue</a> &gt;= 400*1024) {
<a name="l00075"></a>00075       statusIcon = QIcon(<a class="code" href="_router_list_item_8cpp.html#aca69f3e5342105df6a4ec1bca99e40d0">IMG_NODE_HIGH_BW</a>);
<a name="l00076"></a>00076     } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="class_router_list_item.html#a9b260d8c23236d20479be10300ef0168">_statusValue</a> &gt;= 60*1024) {
<a name="l00077"></a>00077       statusIcon = QIcon(<a class="code" href="_router_list_item_8cpp.html#aaf426bc6e3a3f029480095a9e8d12192">IMG_NODE_MED_BW</a>);
<a name="l00078"></a>00078     } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (<a class="code" href="class_router_list_item.html#a9b260d8c23236d20479be10300ef0168">_statusValue</a> &gt;= 20*1024) {
<a name="l00079"></a>00079       statusIcon = QIcon(<a class="code" href="_router_list_item_8cpp.html#a7ffc07b7aa4818e73ea64b562674040c">IMG_NODE_LOW_BW</a>);
<a name="l00080"></a>00080     } <span class="keywordflow">else</span> {
<a name="l00081"></a>00081       statusIcon = QIcon(<a class="code" href="_router_list_item_8cpp.html#a768b034688f0153adad323cc1efe0a9a">IMG_NODE_NO_BW</a>);
<a name="l00082"></a>00082     }
<a name="l00083"></a>00083     setToolTip(<a class="code" href="_router_list_item_8cpp.html#ad7ce3670ec0d59fbe35d2fd28aca5a00">STATUS_COLUMN</a>, tr(<span class="stringliteral">&quot;%1 KB/s&quot;</span>).arg(<a class="code" href="class_router_list_item.html#a9b260d8c23236d20479be10300ef0168">_statusValue</a>/1024));
<a name="l00084"></a>00084   }
<a name="l00085"></a>00085   
<a name="l00086"></a>00086   <span class="comment">/* Make the new information visible */</span>
<a name="l00087"></a>00087   setIcon(<a class="code" href="_router_list_item_8cpp.html#ad7ce3670ec0d59fbe35d2fd28aca5a00">STATUS_COLUMN</a>, statusIcon);
<a name="l00088"></a>00088   setText(<a class="code" href="_router_list_item_8cpp.html#a8bee0ddd069f483390183d4e0853a7a9">NAME_COLUMN</a>, <a class="code" href="class_router_list_item.html#af71876b106eef00bc12ad204446bb183">_rd</a>-&gt;<a class="code" href="class_router_descriptor.html#abba7b090e12112fab38e63654bfe8929">name</a>());
<a name="l00089"></a>00089   setToolTip(<a class="code" href="_router_list_item_8cpp.html#a8bee0ddd069f483390183d4e0853a7a9">NAME_COLUMN</a>, QString(<a class="code" href="class_router_list_item.html#af71876b106eef00bc12ad204446bb183">_rd</a>-&gt;<a class="code" href="class_router_descriptor.html#abba7b090e12112fab38e63654bfe8929">name</a>() + <span class="stringliteral">&quot;\r\n&quot;</span> + <a class="code" href="class_router_list_item.html#af71876b106eef00bc12ad204446bb183">_rd</a>-&gt;<a class="code" href="class_router_descriptor.html#afe0a179b9eef0a8c603916e8ac18eab5">platform</a>()));
<a name="l00090"></a>00090 }
<a name="l00091"></a>00091 <span class="comment"></span>
<a name="l00092"></a>00092 <span class="comment">/** Sets the location information for this item&#39;s router descriptor. */</span>
<a name="l00093"></a>00093 <span class="keywordtype">void</span>
<a name="l00094"></a><a class="code" href="class_router_list_item.html#a976336456eb871ddae9a805c3fb8fb47">00094</a> <a class="code" href="class_router_list_item.html#a976336456eb871ddae9a805c3fb8fb47">RouterListItem::setLocation</a>(<span class="keyword">const</span> <a class="code" href="class_geo_ip.html">GeoIp</a> &amp;geoip)
<a name="l00095"></a>00095 {
<a name="l00096"></a>00096   QPixmap flag(<span class="stringliteral">&quot;:/images/flags/&quot;</span> + geoip.<a class="code" href="class_geo_ip.html#a3ac50f7bf1046b6368a73c4071622880">countryCode</a>().toLower() + <span class="stringliteral">&quot;.png&quot;</span>);
<a name="l00097"></a>00097   <span class="keywordflow">if</span> (!flag.isNull()) {
<a name="l00098"></a>00098     setIcon(<a class="code" href="_router_list_item_8cpp.html#a0fa016d04955ca9f1eadfcc3d7288628">COUNTRY_COLUMN</a>, QIcon(flag));
<a name="l00099"></a>00099   }
<a name="l00100"></a>00100   setToolTip(<a class="code" href="_router_list_item_8cpp.html#a0fa016d04955ca9f1eadfcc3d7288628">COUNTRY_COLUMN</a>, geoip.<a class="code" href="class_geo_ip.html#a821197ccf11820d24544f39b6e01296f">toString</a>());
<a name="l00101"></a>00101   
<a name="l00102"></a>00102   <span class="keywordflow">if</span> (<a class="code" href="class_router_list_item.html#af71876b106eef00bc12ad204446bb183">_rd</a>)
<a name="l00103"></a>00103     <a class="code" href="class_router_list_item.html#af71876b106eef00bc12ad204446bb183">_rd</a>-&gt;<a class="code" href="class_router_descriptor.html#a832a333f3d1d475660dd19794e4f77b5">setLocation</a>(geoip.<a class="code" href="class_geo_ip.html#a821197ccf11820d24544f39b6e01296f">toString</a>());
<a name="l00104"></a>00104   <a class="code" href="class_router_list_item.html#a6b7ce381f9ec5a77c23e8e0402f38200">_country</a> = geoip.<a class="code" href="class_geo_ip.html#a3ac50f7bf1046b6368a73c4071622880">countryCode</a>();
<a name="l00105"></a>00105 }
<a name="l00106"></a>00106 <span class="comment"></span>
<a name="l00107"></a>00107 <span class="comment">/** Overload the comparison operator. */</span>
<a name="l00108"></a>00108 <span class="keywordtype">bool</span>
<a name="l00109"></a><a class="code" href="class_router_list_item.html#a6bf73e335558e15a0c48d59801fe16bc">00109</a> <a class="code" href="class_router_list_item.html#a6bf73e335558e15a0c48d59801fe16bc">RouterListItem::operator&lt;</a>(<span class="keyword">const</span> QTreeWidgetItem &amp;other)<span class="keyword"> const</span>
<a name="l00110"></a>00110 <span class="keyword"></span>{
<a name="l00111"></a>00111   <span class="keyword">const</span> <a class="code" href="class_router_list_item.html">RouterListItem</a> *a = <span class="keyword">this</span>;
<a name="l00112"></a>00112   <span class="keyword">const</span> <a class="code" href="class_router_list_item.html">RouterListItem</a> *<a class="code" href="html_8cpp.html#ae81b348b93d155129c2e91ced96c1898">b</a> = (<a class="code" href="class_router_list_item.html">RouterListItem</a> *)&amp;other;
<a name="l00113"></a>00113  
<a name="l00114"></a>00114   <span class="keywordflow">if</span> (<a class="code" href="class_router_list_item.html#a8880cf2d5e24e7b96628095b82e40a38">_list</a>) {
<a name="l00115"></a>00115     Qt::SortOrder order = <a class="code" href="class_router_list_item.html#a8880cf2d5e24e7b96628095b82e40a38">_list</a>-&gt;header()-&gt;sortIndicatorOrder();
<a name="l00116"></a>00116     <span class="keywordflow">switch</span> (<a class="code" href="class_router_list_item.html#a8880cf2d5e24e7b96628095b82e40a38">_list</a>-&gt;sortColumn()) {
<a name="l00117"></a>00117       <span class="keywordflow">case</span> <a class="code" href="class_router_list_widget.html#a76aba4b10ccb2e237a1607c8a2857b9faff4fd49c7fb8dc2d43d9e25f92f520dc">RouterListWidget::StatusColumn</a>:
<a name="l00118"></a>00118         <span class="comment">/* Numeric comparison based on status and/or bandwidth */</span>
<a name="l00119"></a>00119         <span class="keywordflow">if</span> (a-&gt;<a class="code" href="class_router_list_item.html#a9b260d8c23236d20479be10300ef0168">_statusValue</a> == b-&gt;<a class="code" href="class_router_list_item.html#a9b260d8c23236d20479be10300ef0168">_statusValue</a>) {
<a name="l00120"></a>00120           <span class="keywordflow">if</span> (order == Qt::AscendingOrder)
<a name="l00121"></a>00121             <span class="keywordflow">return</span> (a-&gt;<a class="code" href="class_router_list_item.html#a574039ce62ef3ab371d5a78316dbcc24">name</a>().toLower() &gt; b-&gt;<a class="code" href="class_router_list_item.html#a574039ce62ef3ab371d5a78316dbcc24">name</a>().toLower());
<a name="l00122"></a>00122           <span class="keywordflow">else</span>
<a name="l00123"></a>00123             <span class="keywordflow">return</span> (a-&gt;<a class="code" href="class_router_list_item.html#a574039ce62ef3ab371d5a78316dbcc24">name</a>().toLower() &lt; b-&gt;<a class="code" href="class_router_list_item.html#a574039ce62ef3ab371d5a78316dbcc24">name</a>().toLower());
<a name="l00124"></a>00124         }
<a name="l00125"></a>00125         <span class="keywordflow">return</span> (a-&gt;<a class="code" href="class_router_list_item.html#a9b260d8c23236d20479be10300ef0168">_statusValue</a> &lt; b-&gt;<a class="code" href="class_router_list_item.html#a9b260d8c23236d20479be10300ef0168">_statusValue</a>);
<a name="l00126"></a>00126       <span class="keywordflow">case</span> <a class="code" href="class_router_list_widget.html#a76aba4b10ccb2e237a1607c8a2857b9fab3309c35c2eb37d21fd8e3f8e2e2ab8c">RouterListWidget::CountryColumn</a>:
<a name="l00127"></a>00127         <span class="comment">/* Compare based on country code */</span>
<a name="l00128"></a>00128         <span class="keywordflow">if</span> (a-&gt;<a class="code" href="class_router_list_item.html#a6b7ce381f9ec5a77c23e8e0402f38200">_country</a> == b-&gt;<a class="code" href="class_router_list_item.html#a6b7ce381f9ec5a77c23e8e0402f38200">_country</a>) {
<a name="l00129"></a>00129           <span class="keywordflow">if</span> (order == Qt::AscendingOrder)
<a name="l00130"></a>00130             <span class="keywordflow">return</span> (a-&gt;<a class="code" href="class_router_list_item.html#a9b260d8c23236d20479be10300ef0168">_statusValue</a> &gt; b-&gt;<a class="code" href="class_router_list_item.html#a9b260d8c23236d20479be10300ef0168">_statusValue</a>);
<a name="l00131"></a>00131           <span class="keywordflow">else</span>
<a name="l00132"></a>00132             <span class="keywordflow">return</span> (a-&gt;<a class="code" href="class_router_list_item.html#a9b260d8c23236d20479be10300ef0168">_statusValue</a> &lt; b-&gt;<a class="code" href="class_router_list_item.html#a9b260d8c23236d20479be10300ef0168">_statusValue</a>);
<a name="l00133"></a>00133         }
<a name="l00134"></a>00134         <span class="keywordflow">return</span> (a-&gt;<a class="code" href="class_router_list_item.html#a6b7ce381f9ec5a77c23e8e0402f38200">_country</a> &lt; b-&gt;<a class="code" href="class_router_list_item.html#a6b7ce381f9ec5a77c23e8e0402f38200">_country</a>);
<a name="l00135"></a>00135       <span class="keywordflow">case</span> <a class="code" href="class_router_list_widget.html#a76aba4b10ccb2e237a1607c8a2857b9facffc2f1ba6b38d3c6c4b58c4676251c1">RouterListWidget::NameColumn</a>:
<a name="l00136"></a>00136         <span class="comment">/* Case-insensitive comparison based on router name */</span>
<a name="l00137"></a>00137         <span class="keywordflow">if</span> (a-&gt;<a class="code" href="class_router_list_item.html#a574039ce62ef3ab371d5a78316dbcc24">name</a>().toLower() == b-&gt;<a class="code" href="class_router_list_item.html#a574039ce62ef3ab371d5a78316dbcc24">name</a>().toLower()) {
<a name="l00138"></a>00138           <span class="keywordflow">if</span> (order == Qt::AscendingOrder)
<a name="l00139"></a>00139             <span class="keywordflow">return</span> (a-&gt;<a class="code" href="class_router_list_item.html#a9b260d8c23236d20479be10300ef0168">_statusValue</a> &gt; b-&gt;<a class="code" href="class_router_list_item.html#a9b260d8c23236d20479be10300ef0168">_statusValue</a>);
<a name="l00140"></a>00140           <span class="keywordflow">else</span>
<a name="l00141"></a>00141             <span class="keywordflow">return</span> (a-&gt;<a class="code" href="class_router_list_item.html#a9b260d8c23236d20479be10300ef0168">_statusValue</a> &lt; b-&gt;<a class="code" href="class_router_list_item.html#a9b260d8c23236d20479be10300ef0168">_statusValue</a>);
<a name="l00142"></a>00142         }
<a name="l00143"></a>00143         <span class="keywordflow">return</span> (a-&gt;<a class="code" href="class_router_list_item.html#a574039ce62ef3ab371d5a78316dbcc24">name</a>().toLower() &lt; b-&gt;<a class="code" href="class_router_list_item.html#a574039ce62ef3ab371d5a78316dbcc24">name</a>().toLower());
<a name="l00144"></a>00144       <span class="keywordflow">default</span>:
<a name="l00145"></a>00145         <span class="keywordflow">break</span>;
<a name="l00146"></a>00146     }
<a name="l00147"></a>00147   }
<a name="l00148"></a>00148   <span class="keywordflow">return</span> <a class="code" href="class_router_list_item.html#a6bf73e335558e15a0c48d59801fe16bc">QTreeWidgetItem::operator&lt;</a>(other);
<a name="l00149"></a>00149 }
<a name="l00150"></a>00150 
</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>