source: tspsg-svn/trunk/docs/html/class_c_t_s_p_model.html @ 121

Last change on this file since 121 was 112, checked in by laleppa, 15 years ago

Updated translations and regenerated documentation.

File size: 45.8 KB
Line 
1<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3<html xmlns="http://www.w3.org/1999/xhtml">
4<head>
5<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
6<title>TSPSG: TSP Solver and Generator: CTSPModel Class Reference</title>
7<link href="tabs.css" rel="stylesheet" type="text/css"/>
8<link href="search/search.css" rel="stylesheet" type="text/css"/>
9<script type="text/javaScript" src="search/search.js"></script>
10<link href="doxygen.css" rel="stylesheet" type="text/css"/>
11</head>
12<body onload='searchBox.OnSelectItem(0);'>
13<!-- Generated by Doxygen 1.6.1 -->
14<script type="text/javascript"><!--
15var searchBox = new SearchBox("searchBox", "search",false,'Search');
16--></script>
17<script type="text/javascript">
18<!--
19function changeDisplayState (e){
20  var num=this.id.replace(/[^[0-9]/g,'');
21  var button=this.firstChild;
22  var sectionDiv=document.getElementById('dynsection'+num);
23  if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){
24    sectionDiv.style.display='block';
25    button.src='open.gif';
26  }else{
27    sectionDiv.style.display='none';
28    button.src='closed.gif';
29  }
30}
31function initDynSections(){
32  var divs=document.getElementsByTagName('div');
33  var sectionCounter=1;
34  for(var i=0;i<divs.length-1;i++){
35    if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){
36      var header=divs[i];
37      var section=divs[i+1];
38      var button=header.firstChild;
39      if (button!='IMG'){
40        divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);
41        button=document.createElement('img');
42        divs[i].insertBefore(button,divs[i].firstChild);
43      }
44      header.style.cursor='pointer';
45      header.onclick=changeDisplayState;
46      header.id='dynheader'+sectionCounter;
47      button.src='closed.gif';
48      section.id='dynsection'+sectionCounter;
49      section.style.display='none';
50      section.style.marginLeft='14px';
51      sectionCounter++;
52    }
53  }
54}
55window.onload = initDynSections;
56-->
57</script>
58<div class="navigation" id="top">
59  <div class="tabs">
60    <ul>
61      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
62      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
63      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
64      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
65      <li><a href="files.html"><span>Files</span></a></li>
66      <li>
67        <div id="MSearchBox" class="MSearchBoxInactive">
68        <img id="MSearchSelect" src="search/search.png"
69             onmouseover="return searchBox.OnSearchSelectShow()"
70             onmouseout="return searchBox.OnSearchSelectHide()"
71             alt=""/>
72        <input type="text" id="MSearchField" value="Search" accesskey="S"
73             onfocus="searchBox.OnSearchFieldFocus(true)" 
74             onblur="searchBox.OnSearchFieldFocus(false)" 
75             onkeyup="searchBox.OnSearchFieldChange(event)"/>
76        <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
77        </div>
78      </li>
79    </ul>
80  </div>
81  <div class="tabs">
82    <ul>
83      <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
84      <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
85      <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
86    </ul>
87  </div>
88</div>
89<div class="contents">
90<h1>CTSPModel Class Reference</h1><!-- doxytag: class="CTSPModel" --><!-- doxytag: inherits="QAbstractTableModel" -->
91<p>This class implements table model for manipulating a task. 
92<a href="#_details">More...</a></p>
93
94<p><code>#include &lt;<a class="el" href="tspmodel_8h_source.html">tspmodel.h</a>&gt;</code></p>
95<div class="dynheader">
96Inheritance diagram for CTSPModel:</div>
97<div class="dynsection">
98<div class="center"><img src="class_c_t_s_p_model__inherit__graph.png" border="0" usemap="#_c_t_s_p_model_inherit__map" alt="Inheritance graph"/></div>
99<map name="_c_t_s_p_model_inherit__map" id="_c_t_s_p_model_inherit__map">
100<area shape="rect" id="node2" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qabstracttablemodel.html" title="QAbstractTableModel" alt="" coords="5,6,152,34"/>
101</map>
102<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
103<div class="dynheader">
104Collaboration diagram for CTSPModel:</div>
105<div class="dynsection">
106<div class="center"><img src="class_c_t_s_p_model__coll__graph.png" border="0" usemap="#_c_t_s_p_model_coll__map" alt="Collaboration graph"/></div>
107<map name="_c_t_s_p_model_coll__map" id="_c_t_s_p_model_coll__map">
108<area shape="rect" id="node2" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qabstracttablemodel.html" title="QAbstractTableModel" alt="" coords="5,6,152,34"/>
109<area shape="rect" id="node4" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qvector.html" title="QVector\&lt; QVector\&lt; double \&gt; \&gt;" alt="" coords="176,6,379,34"/>
110<area shape="rect" id="node6" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qsettings.html" title="QSettings" alt="" coords="403,6,483,34"/>
111</map>
112<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
113
114<p><a href="class_c_t_s_p_model-members.html">List of all members.</a></p>
115<table border="0" cellpadding="0" cellspacing="0">
116<tr><td colspan="2"><h2>Signals</h2></td></tr>
117<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_t_s_p_model.html#a733908abe1ffabf49ad34ccdabaeeee9">numCitiesChanged</a> (int)</td></tr>
118<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This signal is emitted whenever the number of cities in the task changes.  <a href="#a733908abe1ffabf49ad34ccdabaeeee9"></a><br/></td></tr>
119<tr><td colspan="2"><h2>Public Member Functions</h2></td></tr>
120<tr><td class="memItemLeft" align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_t_s_p_model.html#a50a24986bc34b37c6c3b7bb52371b837">CTSPModel</a> (<a class="elRef" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qobject.html">QObject</a> *parent=0)</td></tr>
121<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Class constructor.  <a href="#a50a24986bc34b37c6c3b7bb52371b837"></a><br/></td></tr>
122<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_t_s_p_model.html#a4944812fdf6d348735db401f966b4f4a">clear</a> ()</td></tr>
123<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Resets the table, setting all its elements to 0.  <a href="#a4944812fdf6d348735db401f966b4f4a"></a><br/></td></tr>
124<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_t_s_p_model.html#ac1942bbffc1313543641881e456f2e55">columnCount</a> (const <a class="elRef" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qmodelindex.html">QModelIndex</a> &amp;parent=<a class="elRef" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qmodelindex.html">QModelIndex</a>()) const </td></tr>
125<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the column count in the table.  <a href="#ac1942bbffc1313543641881e456f2e55"></a><br/></td></tr>
126<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qvariant.html">QVariant</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_t_s_p_model.html#aad200081a43582e766096807c04227dc">data</a> (const <a class="elRef" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qmodelindex.html">QModelIndex</a> &amp;<a class="elRef" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qabstracttablemodel.html#index">index</a>, int role=Qt::DisplayRole) const </td></tr>
127<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the data stored under the given <em>role</em> for the item referred to by the <em>index</em><a href="#aad200081a43582e766096807c04227dc"></a><br/></td></tr>
128<tr><td class="memItemLeft" align="right" valign="top">Qt::ItemFlags&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_t_s_p_model.html#a77881106624bfc203fb97bffe0d7b585">flags</a> (const <a class="elRef" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qmodelindex.html">QModelIndex</a> &amp;<a class="elRef" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qabstracttablemodel.html#index">index</a>) const </td></tr>
129<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the item flags for the given <em>index</em><a href="#a77881106624bfc203fb97bffe0d7b585"></a><br/></td></tr>
130<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qvariant.html">QVariant</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_t_s_p_model.html#a8c716850f6c31fa42b219d7f84038d71">headerData</a> (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const </td></tr>
131<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the data for the given <em>role</em> and <em>section</em> in the header with the specified <em>orientation</em><a href="#a8c716850f6c31fa42b219d7f84038d71"></a><br/></td></tr>
132<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_t_s_p_model.html#ae25b1d25b13488fde89e381152c62549">loadTask</a> (const <a class="elRef" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qstring.html">QString</a> &amp;fname)</td></tr>
133<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Loads a task from <em>fname</em><a href="#ae25b1d25b13488fde89e381152c62549"></a><br/></td></tr>
134<tr><td class="memItemLeft" align="right" valign="top">quint16&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_t_s_p_model.html#a4fcde91257e57ba0e9754418cb83148e">numCities</a> () const </td></tr>
135<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the number of cities.  <a href="#a4fcde91257e57ba0e9754418cb83148e"></a><br/></td></tr>
136<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_t_s_p_model.html#ad18e48dd0b0ad56d8e4ae3b1bc039e4a">randomize</a> ()</td></tr>
137<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Randomizes the table by setting all its values to random ones.  <a href="#ad18e48dd0b0ad56d8e4ae3b1bc039e4a"></a><br/></td></tr>
138<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_t_s_p_model.html#a419c2b9d40fc2f348b15ae02f442a39b">rowCount</a> (const <a class="elRef" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qmodelindex.html">QModelIndex</a> &amp;parent=<a class="elRef" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qmodelindex.html">QModelIndex</a>()) const </td></tr>
139<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the row count in the table.  <a href="#a419c2b9d40fc2f348b15ae02f442a39b"></a><br/></td></tr>
140<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_t_s_p_model.html#aa73d906286cf369d9e6352348e1aca61">saveTask</a> (const <a class="elRef" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qstring.html">QString</a> &amp;fname)</td></tr>
141<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Saves current task to <em>fname</em><a href="#aa73d906286cf369d9e6352348e1aca61"></a><br/></td></tr>
142<tr><td class="memItemLeft" align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_t_s_p_model.html#a614a0e748bdf52c504a0284c07a977ed">setData</a> (const <a class="elRef" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qmodelindex.html">QModelIndex</a> &amp;<a class="elRef" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qabstracttablemodel.html#index">index</a>, const <a class="elRef" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qvariant.html">QVariant</a> &amp;value, int role=Qt::EditRole)</td></tr>
143<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the <em>role</em> data for the item at <em>index</em> to <em>value</em><a href="#a614a0e748bdf52c504a0284c07a977ed"></a><br/></td></tr>
144<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_t_s_p_model.html#aff717cb92ce6426033e85716644b9cef">setNumCities</a> (int n)</td></tr>
145<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets number of cities in the current task to <em>n</em><a href="#aff717cb92ce6426033e85716644b9cef"></a><br/></td></tr>
146</table>
147<hr/><a name="_details"></a><h2>Detailed Description</h2>
148<p>This class implements table model for manipulating a task. </p>
149<dl class="author"><dt><b>Author:</b></dt><dd>Copyright &copy; 2007-2010 Lёppa &lt;contacts[at]oleksii[dot]name&gt; </dd></dl>
150<hr/><h2>Constructor &amp; Destructor Documentation</h2>
151<a class="anchor" id="a50a24986bc34b37c6c3b7bb52371b837"></a><!-- doxytag: member="CTSPModel::CTSPModel" ref="a50a24986bc34b37c6c3b7bb52371b837" args="(QObject *parent=0)" -->
152<div class="memitem">
153<div class="memproto">
154      <table class="memname">
155        <tr>
156          <td class="memname">CTSPModel::CTSPModel </td>
157          <td>(</td>
158          <td class="paramtype"><a class="elRef" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qobject.html">QObject</a> *&nbsp;</td>
159          <td class="paramname"> <em>parent</em> = <code>0</code></td>
160          <td>&nbsp;)&nbsp;</td>
161          <td></td>
162        </tr>
163      </table>
164</div>
165<div class="memdoc">
166
167<p>Class constructor. </p>
168<dl><dt><b>Parameters:</b></dt><dd>
169  <table border="0" cellspacing="2" cellpadding="0">
170    <tr><td valign="top"></td><td valign="top"><em>parent</em>&nbsp;</td><td>The parent of the table model. </td></tr>
171  </table>
172  </dd>
173</dl>
174
175</div>
176</div>
177<hr/><h2>Member Function Documentation</h2>
178<a class="anchor" id="a4944812fdf6d348735db401f966b4f4a"></a><!-- doxytag: member="CTSPModel::clear" ref="a4944812fdf6d348735db401f966b4f4a" args="()" -->
179<div class="memitem">
180<div class="memproto">
181      <table class="memname">
182        <tr>
183          <td class="memname">void CTSPModel::clear </td>
184          <td>(</td>
185          <td class="paramname"></td>
186          <td>&nbsp;)&nbsp;</td>
187          <td></td>
188        </tr>
189      </table>
190</div>
191<div class="memdoc">
192
193<p>Resets the table, setting all its elements to 0. </p>
194<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_c_t_s_p_model.html#ad18e48dd0b0ad56d8e4ae3b1bc039e4a" title="Randomizes the table by setting all its values to random ones.">randomize()</a> </dd></dl>
195
196<p><div class="dynheader">
197Here is the call graph for this function:</div>
198<div class="dynsection">
199<div class="center"><img src="class_c_t_s_p_model_a4944812fdf6d348735db401f966b4f4a_cgraph.png" border="0" usemap="#class_c_t_s_p_model_a4944812fdf6d348735db401f966b4f4a_cgraph_map" alt=""></div>
200<map name="class_c_t_s_p_model_a4944812fdf6d348735db401f966b4f4a_cgraph_map" id="class_c_t_s_p_model_a4944812fdf6d348735db401f966b4f4a_cgraph">
201<area shape="rect" id="node3" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qabstracttablemodel.html#index" title="QAbstractTableModel::index" alt="" coords="183,5,367,33"/>
202</map>
203</div>
204</p>
205
206</div>
207</div>
208<a class="anchor" id="ac1942bbffc1313543641881e456f2e55"></a><!-- doxytag: member="CTSPModel::columnCount" ref="ac1942bbffc1313543641881e456f2e55" args="(const QModelIndex &amp;parent=QModelIndex()) const " -->
209<div class="memitem">
210<div class="memproto">
211      <table class="memname">
212        <tr>
213          <td class="memname">int CTSPModel::columnCount </td>
214          <td>(</td>
215          <td class="paramtype">const <a class="elRef" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qmodelindex.html">QModelIndex</a> &amp;&nbsp;</td>
216          <td class="paramname"> <em>parent</em> = <code><a class="elRef" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qmodelindex.html">QModelIndex</a>()</code></td>
217          <td>&nbsp;)&nbsp;</td>
218          <td> const</td>
219        </tr>
220      </table>
221</div>
222<div class="memdoc">
223
224<p>Returns the column count in the table. </p>
225<dl class="return"><dt><b>Returns:</b></dt><dd>Number of columns in the table.</dd></dl>
226<p>Actually, this function returns the number of cities in the current task.</p>
227<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_c_t_s_p_model.html#a4fcde91257e57ba0e9754418cb83148e" title="Returns the number of cities.">numCities()</a>, <a class="el" href="class_c_t_s_p_model.html#a419c2b9d40fc2f348b15ae02f442a39b" title="Returns the row count in the table.">rowCount()</a> </dd></dl>
228
229</div>
230</div>
231<a class="anchor" id="aad200081a43582e766096807c04227dc"></a><!-- doxytag: member="CTSPModel::data" ref="aad200081a43582e766096807c04227dc" args="(const QModelIndex &amp;index, int role=Qt::DisplayRole) const " -->
232<div class="memitem">
233<div class="memproto">
234      <table class="memname">
235        <tr>
236          <td class="memname"><a class="elRef" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qvariant.html">QVariant</a> CTSPModel::data </td>
237          <td>(</td>
238          <td class="paramtype">const <a class="elRef" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qmodelindex.html">QModelIndex</a> &amp;&nbsp;</td>
239          <td class="paramname"> <em>index</em>, </td>
240        </tr>
241        <tr>
242          <td class="paramkey"></td>
243          <td></td>
244          <td class="paramtype">int&nbsp;</td>
245          <td class="paramname"> <em>role</em> = <code>Qt::DisplayRole</code></td><td>&nbsp;</td>
246        </tr>
247        <tr>
248          <td></td>
249          <td>)</td>
250          <td></td><td></td><td> const</td>
251        </tr>
252      </table>
253</div>
254<div class="memdoc">
255
256<p>Returns the data stored under the given <em>role</em> for the item referred to by the <em>index</em>. </p>
257<dl><dt><b>Parameters:</b></dt><dd>
258  <table border="0" cellspacing="2" cellpadding="0">
259    <tr><td valign="top"></td><td valign="top"><em>index</em>&nbsp;</td><td>An item index to get data from. </td></tr>
260    <tr><td valign="top"></td><td valign="top"><em>role</em>&nbsp;</td><td>The role to get data for. </td></tr>
261  </table>
262  </dd>
263</dl>
264<dl class="return"><dt><b>Returns:</b></dt><dd>Corresponding data.</dd></dl>
265<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_c_t_s_p_model.html#a614a0e748bdf52c504a0284c07a977ed" title="Sets the role data for the item at index to value.">setData()</a>, <a class="el" href="class_c_t_s_p_model.html#a8c716850f6c31fa42b219d7f84038d71" title="Returns the data for the given role and section in the header with the specified...">headerData()</a> </dd></dl>
266
267<p><dl class="hacks"><dt><b><a class="el" href="hacks.html#_hacks000002">Hack:</a></b></dt><dd>HACK: Converting to string to prevent spinbox in edit mode </dd></dl>
268</p>
269
270<p><div class="dynheader">
271Here is the call graph for this function:</div>
272<div class="dynsection">
273<div class="center"><img src="class_c_t_s_p_model_aad200081a43582e766096807c04227dc_cgraph.png" border="0" usemap="#class_c_t_s_p_model_aad200081a43582e766096807c04227dc_cgraph_map" alt=""></div>
274<map name="class_c_t_s_p_model_aad200081a43582e766096807c04227dc_cgraph_map" id="class_c_t_s_p_model_aad200081a43582e766096807c04227dc_cgraph">
275<area shape="rect" id="node3" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qvector.html#at" title="QVector::at" alt="" coords="209,5,297,33"/>
276<area shape="rect" id="node5" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qmodelindex.html#column" title="QModelIndex::column" alt="" coords="180,55,327,83"/>
277<area shape="rect" id="node7" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qmodelindex.html#isValid" title="QModelIndex::isValid" alt="" coords="181,106,325,134"/>
278<area shape="rect" id="node9" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qmodelindex.html#row" title="QModelIndex::row" alt="" coords="191,157,316,185"/>
279<area shape="rect" id="node11" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qfont.html#setBold" title="QFont::setBold" alt="" coords="199,207,308,235"/>
280</map>
281</div>
282</p>
283
284</div>
285</div>
286<a class="anchor" id="a77881106624bfc203fb97bffe0d7b585"></a><!-- doxytag: member="CTSPModel::flags" ref="a77881106624bfc203fb97bffe0d7b585" args="(const QModelIndex &amp;index) const " -->
287<div class="memitem">
288<div class="memproto">
289      <table class="memname">
290        <tr>
291          <td class="memname">Qt::ItemFlags CTSPModel::flags </td>
292          <td>(</td>
293          <td class="paramtype">const <a class="elRef" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qmodelindex.html">QModelIndex</a> &amp;&nbsp;</td>
294          <td class="paramname"> <em>index</em></td>
295          <td>&nbsp;)&nbsp;</td>
296          <td> const</td>
297        </tr>
298      </table>
299</div>
300<div class="memdoc">
301
302<p>Returns the item flags for the given <em>index</em>. </p>
303<dl><dt><b>Parameters:</b></dt><dd>
304  <table border="0" cellspacing="2" cellpadding="0">
305    <tr><td valign="top"></td><td valign="top"><em>index</em>&nbsp;</td><td>An item index to get flags from. </td></tr>
306  </table>
307  </dd>
308</dl>
309<dl class="return"><dt><b>Returns:</b></dt><dd>Corresponding item flags. </dd></dl>
310
311<p><div class="dynheader">
312Here is the call graph for this function:</div>
313<div class="dynsection">
314<div class="center"><img src="class_c_t_s_p_model_a77881106624bfc203fb97bffe0d7b585_cgraph.png" border="0" usemap="#class_c_t_s_p_model_a77881106624bfc203fb97bffe0d7b585_cgraph_map" alt=""></div>
315<map name="class_c_t_s_p_model_a77881106624bfc203fb97bffe0d7b585_cgraph_map" id="class_c_t_s_p_model_a77881106624bfc203fb97bffe0d7b585_cgraph">
316<area shape="rect" id="node3" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qmodelindex.html#column" title="QModelIndex::column" alt="" coords="180,5,327,33"/>
317<area shape="rect" id="node5" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qmodelindex.html#row" title="QModelIndex::row" alt="" coords="191,55,316,83"/>
318</map>
319</div>
320</p>
321
322</div>
323</div>
324<a class="anchor" id="a8c716850f6c31fa42b219d7f84038d71"></a><!-- doxytag: member="CTSPModel::headerData" ref="a8c716850f6c31fa42b219d7f84038d71" args="(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const " -->
325<div class="memitem">
326<div class="memproto">
327      <table class="memname">
328        <tr>
329          <td class="memname"><a class="elRef" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qvariant.html">QVariant</a> CTSPModel::headerData </td>
330          <td>(</td>
331          <td class="paramtype">int&nbsp;</td>
332          <td class="paramname"> <em>section</em>, </td>
333        </tr>
334        <tr>
335          <td class="paramkey"></td>
336          <td></td>
337          <td class="paramtype">Qt::Orientation&nbsp;</td>
338          <td class="paramname"> <em>orientation</em>, </td>
339        </tr>
340        <tr>
341          <td class="paramkey"></td>
342          <td></td>
343          <td class="paramtype">int&nbsp;</td>
344          <td class="paramname"> <em>role</em> = <code>Qt::DisplayRole</code></td><td>&nbsp;</td>
345        </tr>
346        <tr>
347          <td></td>
348          <td>)</td>
349          <td></td><td></td><td> const</td>
350        </tr>
351      </table>
352</div>
353<div class="memdoc">
354
355<p>Returns the data for the given <em>role</em> and <em>section</em> in the header with the specified <em>orientation</em>. </p>
356<dl><dt><b>Parameters:</b></dt><dd>
357  <table border="0" cellspacing="2" cellpadding="0">
358    <tr><td valign="top"></td><td valign="top"><em>section</em>&nbsp;</td><td>The section to get header data for. </td></tr>
359    <tr><td valign="top"></td><td valign="top"><em>orientation</em>&nbsp;</td><td>The orientation to get header data for. </td></tr>
360    <tr><td valign="top"></td><td valign="top"><em>role</em>&nbsp;</td><td>The role to get header data for. </td></tr>
361  </table>
362  </dd>
363</dl>
364<dl class="return"><dt><b>Returns:</b></dt><dd>Corresponding header data.</dd></dl>
365<p>For horizontal headers, the section number corresponds to the column number of items shown beneath it. For vertical headers, the section number typically to the row number of items shown alongside it. </p>
366
367</div>
368</div>
369<a class="anchor" id="ae25b1d25b13488fde89e381152c62549"></a><!-- doxytag: member="CTSPModel::loadTask" ref="ae25b1d25b13488fde89e381152c62549" args="(const QString &amp;fname)" -->
370<div class="memitem">
371<div class="memproto">
372      <table class="memname">
373        <tr>
374          <td class="memname">bool CTSPModel::loadTask </td>
375          <td>(</td>
376          <td class="paramtype">const <a class="elRef" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qstring.html">QString</a> &amp;&nbsp;</td>
377          <td class="paramname"> <em>fname</em></td>
378          <td>&nbsp;)&nbsp;</td>
379          <td></td>
380        </tr>
381      </table>
382</div>
383<div class="memdoc">
384
385<p>Loads a task from <em>fname</em>. </p>
386<dl><dt><b>Parameters:</b></dt><dd>
387  <table border="0" cellspacing="2" cellpadding="0">
388    <tr><td valign="top"></td><td valign="top"><em>fname</em>&nbsp;</td><td>The name of the file to be loaded. </td></tr>
389  </table>
390  </dd>
391</dl>
392<dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> on success, otherwise <code>false</code>.</dd></dl>
393<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_c_t_s_p_model.html#aa73d906286cf369d9e6352348e1aca61" title="Saves current task to fname.">saveTask()</a> </dd></dl>
394
395<p><div class="dynheader">
396Here is the call graph for this function:</div>
397<div class="dynsection">
398<div class="center"><img src="class_c_t_s_p_model_ae25b1d25b13488fde89e381152c62549_cgraph.png" border="0" usemap="#class_c_t_s_p_model_ae25b1d25b13488fde89e381152c62549_cgraph_map" alt=""></div>
399<map name="class_c_t_s_p_model_ae25b1d25b13488fde89e381152c62549_cgraph_map" id="class_c_t_s_p_model_ae25b1d25b13488fde89e381152c62549_cgraph">
400<area shape="rect" id="node3" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qapplication.html#activeWindow" title="QApplication::activeWindow" alt="" coords="229,5,411,33"/>
401<area shape="rect" id="node5" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qfile.html#close" title="QFile::close" alt="" coords="275,55,365,83"/>
402<area shape="rect" id="node7" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qmessagebox.html#critical" title="QMessageBox::critical" alt="" coords="244,106,396,134"/>
403<area shape="rect" id="node9" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qdatastream.html#device" title="QDataStream::device" alt="" coords="248,157,392,185"/>
404<area shape="rect" id="node11" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qfile.html#open" title="QFile::open" alt="" coords="276,207,364,235"/>
405<area shape="rect" id="node13" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qapplication.html#restoreOverrideCursor" title="QApplication::restoreOverrideCursor" alt="" coords="207,258,433,286"/>
406<area shape="rect" id="node15" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qapplication.html#setOverrideCursor" title="QApplication::setOverrideCursor" alt="" coords="217,309,423,337"/>
407<area shape="rect" id="node17" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qdatastream.html#setVersion" title="QDataStream::setVersion" alt="" coords="235,359,405,387"/>
408<area shape="rect" id="node19" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qdatastream.html#status" title="QDataStream::status" alt="" coords="248,410,392,438"/>
409</map>
410</div>
411</p>
412
413<p><div class="dynheader">
414Here is the caller graph for this function:</div>
415<div class="dynsection">
416<div class="center"><img src="class_c_t_s_p_model_ae25b1d25b13488fde89e381152c62549_icgraph.png" border="0" usemap="#class_c_t_s_p_model_ae25b1d25b13488fde89e381152c62549_icgraph_map" alt=""></div>
417<map name="class_c_t_s_p_model_ae25b1d25b13488fde89e381152c62549_icgraph_map" id="class_c_t_s_p_model_ae25b1d25b13488fde89e381152c62549_icgraph">
418<area shape="rect" id="node3" href="class_main_window.html#a8b244be8b7b7db1b08de2a2acb9409db" title="Class constructor." alt="" coords="207,5,383,33"/>
419</map>
420</div>
421</p>
422
423</div>
424</div>
425<a class="anchor" id="a4fcde91257e57ba0e9754418cb83148e"></a><!-- doxytag: member="CTSPModel::numCities" ref="a4fcde91257e57ba0e9754418cb83148e" args="() const " -->
426<div class="memitem">
427<div class="memproto">
428      <table class="memname">
429        <tr>
430          <td class="memname">quint16 CTSPModel::numCities </td>
431          <td>(</td>
432          <td class="paramname"></td>
433          <td>&nbsp;)&nbsp;</td>
434          <td> const</td>
435        </tr>
436      </table>
437</div>
438<div class="memdoc">
439
440<p>Returns the number of cities. </p>
441<dl class="return"><dt><b>Returns:</b></dt><dd>Number of cities in the current task.</dd></dl>
442<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_c_t_s_p_model.html#ac1942bbffc1313543641881e456f2e55" title="Returns the column count in the table.">columnCount()</a>, <a class="el" href="class_c_t_s_p_model.html#a419c2b9d40fc2f348b15ae02f442a39b" title="Returns the row count in the table.">rowCount()</a>, <a class="el" href="class_c_t_s_p_model.html#aff717cb92ce6426033e85716644b9cef" title="Sets number of cities in the current task to n.">setNumCities()</a> </dd></dl>
443
444</div>
445</div>
446<a class="anchor" id="a733908abe1ffabf49ad34ccdabaeeee9"></a><!-- doxytag: member="CTSPModel::numCitiesChanged" ref="a733908abe1ffabf49ad34ccdabaeeee9" args="(int)" -->
447<div class="memitem">
448<div class="memproto">
449      <table class="memname">
450        <tr>
451          <td class="memname">void CTSPModel::numCitiesChanged </td>
452          <td>(</td>
453          <td class="paramtype">int&nbsp;</td>
454          <td class="paramname"></td>
455          <td>&nbsp;)&nbsp;</td>
456          <td><code> [signal]</code></td>
457        </tr>
458      </table>
459</div>
460<div class="memdoc">
461
462<p>This signal is emitted whenever the number of cities in the task changes. </p>
463<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_c_t_s_p_model.html#aff717cb92ce6426033e85716644b9cef" title="Sets number of cities in the current task to n.">setNumCities()</a> </dd></dl>
464
465</div>
466</div>
467<a class="anchor" id="ad18e48dd0b0ad56d8e4ae3b1bc039e4a"></a><!-- doxytag: member="CTSPModel::randomize" ref="ad18e48dd0b0ad56d8e4ae3b1bc039e4a" args="()" -->
468<div class="memitem">
469<div class="memproto">
470      <table class="memname">
471        <tr>
472          <td class="memname">void CTSPModel::randomize </td>
473          <td>(</td>
474          <td class="paramname"></td>
475          <td>&nbsp;)&nbsp;</td>
476          <td></td>
477        </tr>
478      </table>
479</div>
480<div class="memdoc">
481
482<p>Randomizes the table by setting all its values to random ones. </p>
483<p>Uses TSPSG settings to determine random values range.</p>
484<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_c_t_s_p_model.html#a4944812fdf6d348735db401f966b4f4a" title="Resets the table, setting all its elements to 0.">clear()</a> </dd></dl>
485
486<p><div class="dynheader">
487Here is the call graph for this function:</div>
488<div class="dynsection">
489<div class="center"><img src="class_c_t_s_p_model_ad18e48dd0b0ad56d8e4ae3b1bc039e4a_cgraph.png" border="0" usemap="#class_c_t_s_p_model_ad18e48dd0b0ad56d8e4ae3b1bc039e4a_cgraph_map" alt=""></div>
490<map name="class_c_t_s_p_model_ad18e48dd0b0ad56d8e4ae3b1bc039e4a_cgraph_map" id="class_c_t_s_p_model_ad18e48dd0b0ad56d8e4ae3b1bc039e4a_cgraph">
491<area shape="rect" id="node3" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qabstracttablemodel.html#index" title="QAbstractTableModel::index" alt="" coords="215,5,399,33"/>
492<area shape="rect" id="node5" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qsettings.html#value" title="QSettings::value" alt="" coords="249,55,364,83"/>
493</map>
494</div>
495</p>
496
497</div>
498</div>
499<a class="anchor" id="a419c2b9d40fc2f348b15ae02f442a39b"></a><!-- doxytag: member="CTSPModel::rowCount" ref="a419c2b9d40fc2f348b15ae02f442a39b" args="(const QModelIndex &amp;parent=QModelIndex()) const " -->
500<div class="memitem">
501<div class="memproto">
502      <table class="memname">
503        <tr>
504          <td class="memname">int CTSPModel::rowCount </td>
505          <td>(</td>
506          <td class="paramtype">const <a class="elRef" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qmodelindex.html">QModelIndex</a> &amp;&nbsp;</td>
507          <td class="paramname"> <em>parent</em> = <code><a class="elRef" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qmodelindex.html">QModelIndex</a>()</code></td>
508          <td>&nbsp;)&nbsp;</td>
509          <td> const</td>
510        </tr>
511      </table>
512</div>
513<div class="memdoc">
514
515<p>Returns the row count in the table. </p>
516<dl class="return"><dt><b>Returns:</b></dt><dd>Number of rows in the table.</dd></dl>
517<p>Actually, this function returns the number of cities in the current task.</p>
518<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_c_t_s_p_model.html#ac1942bbffc1313543641881e456f2e55" title="Returns the column count in the table.">columnCount()</a>, <a class="el" href="class_c_t_s_p_model.html#a4fcde91257e57ba0e9754418cb83148e" title="Returns the number of cities.">numCities()</a> </dd></dl>
519
520</div>
521</div>
522<a class="anchor" id="aa73d906286cf369d9e6352348e1aca61"></a><!-- doxytag: member="CTSPModel::saveTask" ref="aa73d906286cf369d9e6352348e1aca61" args="(const QString &amp;fname)" -->
523<div class="memitem">
524<div class="memproto">
525      <table class="memname">
526        <tr>
527          <td class="memname">bool CTSPModel::saveTask </td>
528          <td>(</td>
529          <td class="paramtype">const <a class="elRef" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qstring.html">QString</a> &amp;&nbsp;</td>
530          <td class="paramname"> <em>fname</em></td>
531          <td>&nbsp;)&nbsp;</td>
532          <td></td>
533        </tr>
534      </table>
535</div>
536<div class="memdoc">
537
538<p>Saves current task to <em>fname</em>. </p>
539<dl><dt><b>Parameters:</b></dt><dd>
540  <table border="0" cellspacing="2" cellpadding="0">
541    <tr><td valign="top"></td><td valign="top"><em>fname</em>&nbsp;</td><td>The name of the file to seve to. </td></tr>
542  </table>
543  </dd>
544</dl>
545<dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> on success, otherwise <code>false</code>.</dd></dl>
546<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_c_t_s_p_model.html#ae25b1d25b13488fde89e381152c62549" title="Loads a task from fname.">loadTask()</a> </dd></dl>
547
548<p><div class="dynheader">
549Here is the call graph for this function:</div>
550<div class="dynsection">
551<div class="center"><img src="class_c_t_s_p_model_aa73d906286cf369d9e6352348e1aca61_cgraph.png" border="0" usemap="#class_c_t_s_p_model_aa73d906286cf369d9e6352348e1aca61_cgraph_map" alt=""></div>
552<map name="class_c_t_s_p_model_aa73d906286cf369d9e6352348e1aca61_cgraph_map" id="class_c_t_s_p_model_aa73d906286cf369d9e6352348e1aca61_cgraph">
553<area shape="rect" id="node3" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qapplication.html#activeWindow" title="QApplication::activeWindow" alt="" coords="229,5,411,33"/>
554<area shape="rect" id="node5" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qfile.html#close" title="QFile::close" alt="" coords="275,55,365,83"/>
555<area shape="rect" id="node7" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qmessagebox.html#critical" title="QMessageBox::critical" alt="" coords="244,106,396,134"/>
556<area shape="rect" id="node9" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qfile.html#error" title="QFile::error" alt="" coords="277,157,363,185"/>
557<area shape="rect" id="node11" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qfile.html#open" title="QFile::open" alt="" coords="276,207,364,235"/>
558<area shape="rect" id="node13" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qfile.html#remove" title="QFile::remove" alt="" coords="269,258,371,286"/>
559<area shape="rect" id="node15" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qapplication.html#restoreOverrideCursor" title="QApplication::restoreOverrideCursor" alt="" coords="207,309,433,337"/>
560<area shape="rect" id="node17" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qapplication.html#setOverrideCursor" title="QApplication::setOverrideCursor" alt="" coords="217,359,423,387"/>
561<area shape="rect" id="node19" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qdatastream.html#setVersion" title="QDataStream::setVersion" alt="" coords="235,410,405,438"/>
562</map>
563</div>
564</p>
565
566</div>
567</div>
568<a class="anchor" id="a614a0e748bdf52c504a0284c07a977ed"></a><!-- doxytag: member="CTSPModel::setData" ref="a614a0e748bdf52c504a0284c07a977ed" args="(const QModelIndex &amp;index, const QVariant &amp;value, int role=Qt::EditRole)" -->
569<div class="memitem">
570<div class="memproto">
571      <table class="memname">
572        <tr>
573          <td class="memname">bool CTSPModel::setData </td>
574          <td>(</td>
575          <td class="paramtype">const <a class="elRef" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qmodelindex.html">QModelIndex</a> &amp;&nbsp;</td>
576          <td class="paramname"> <em>index</em>, </td>
577        </tr>
578        <tr>
579          <td class="paramkey"></td>
580          <td></td>
581          <td class="paramtype">const <a class="elRef" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qvariant.html">QVariant</a> &amp;&nbsp;</td>
582          <td class="paramname"> <em>value</em>, </td>
583        </tr>
584        <tr>
585          <td class="paramkey"></td>
586          <td></td>
587          <td class="paramtype">int&nbsp;</td>
588          <td class="paramname"> <em>role</em> = <code>Qt::EditRole</code></td><td>&nbsp;</td>
589        </tr>
590        <tr>
591          <td></td>
592          <td>)</td>
593          <td></td><td></td><td></td>
594        </tr>
595      </table>
596</div>
597<div class="memdoc">
598
599<p>Sets the <em>role</em> data for the item at <em>index</em> to <em>value</em>. </p>
600<dl><dt><b>Parameters:</b></dt><dd>
601  <table border="0" cellspacing="2" cellpadding="0">
602    <tr><td valign="top"></td><td valign="top"><em>index</em>&nbsp;</td><td>The index of the item to set data at. </td></tr>
603    <tr><td valign="top"></td><td valign="top"><em>value</em>&nbsp;</td><td>The value of the item data to be set. </td></tr>
604    <tr><td valign="top"></td><td valign="top"><em>role</em>&nbsp;</td><td>The role of the item to set data for. </td></tr>
605  </table>
606  </dd>
607</dl>
608<dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> on success, otherwise <code>false</code>.</dd></dl>
609<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_c_t_s_p_model.html#aad200081a43582e766096807c04227dc" title="Returns the data stored under the given role for the item referred to by the index...">data()</a> </dd></dl>
610
611<p><div class="dynheader">
612Here is the call graph for this function:</div>
613<div class="dynsection">
614<div class="center"><img src="class_c_t_s_p_model_a614a0e748bdf52c504a0284c07a977ed_cgraph.png" border="0" usemap="#class_c_t_s_p_model_a614a0e748bdf52c504a0284c07a977ed_cgraph_map" alt=""></div>
615<map name="class_c_t_s_p_model_a614a0e748bdf52c504a0284c07a977ed_cgraph_map" id="class_c_t_s_p_model_a614a0e748bdf52c504a0284c07a977ed_cgraph">
616<area shape="rect" id="node3" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qmodelindex.html#column" title="QModelIndex::column" alt="" coords="199,5,345,33"/>
617<area shape="rect" id="node5" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qmodelindex.html#isValid" title="QModelIndex::isValid" alt="" coords="200,55,344,83"/>
618<area shape="rect" id="node7" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qmodelindex.html#row" title="QModelIndex::row" alt="" coords="209,106,335,134"/>
619<area shape="rect" id="node9" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qvariant.html#toDouble" title="QVariant::toDouble" alt="" coords="207,157,337,185"/>
620<area shape="rect" id="node11" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qvariant.html#toString" title="QVariant::toString" alt="" coords="209,207,335,235"/>
621<area shape="rect" id="node13" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qsettings.html#value" title="QSettings::value" alt="" coords="215,258,329,286"/>
622</map>
623</div>
624</p>
625
626</div>
627</div>
628<a class="anchor" id="aff717cb92ce6426033e85716644b9cef"></a><!-- doxytag: member="CTSPModel::setNumCities" ref="aff717cb92ce6426033e85716644b9cef" args="(int n)" -->
629<div class="memitem">
630<div class="memproto">
631      <table class="memname">
632        <tr>
633          <td class="memname">void CTSPModel::setNumCities </td>
634          <td>(</td>
635          <td class="paramtype">int&nbsp;</td>
636          <td class="paramname"> <em>n</em></td>
637          <td>&nbsp;)&nbsp;</td>
638          <td></td>
639        </tr>
640      </table>
641</div>
642<div class="memdoc">
643
644<p>Sets number of cities in the current task to <em>n</em>. </p>
645<dl><dt><b>Parameters:</b></dt><dd>
646  <table border="0" cellspacing="2" cellpadding="0">
647    <tr><td valign="top"></td><td valign="top"><em>n</em>&nbsp;</td><td>Number of cities to set to.</td></tr>
648  </table>
649  </dd>
650</dl>
651<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="class_c_t_s_p_model.html#a4fcde91257e57ba0e9754418cb83148e" title="Returns the number of cities.">numCities()</a> </dd></dl>
652
653<p><div class="dynheader">
654Here is the call graph for this function:</div>
655<div class="dynsection">
656<div class="center"><img src="class_c_t_s_p_model_aff717cb92ce6426033e85716644b9cef_cgraph.png" border="0" usemap="#class_c_t_s_p_model_aff717cb92ce6426033e85716644b9cef_cgraph_map" alt=""></div>
657<map name="class_c_t_s_p_model_aff717cb92ce6426033e85716644b9cef_cgraph_map" id="class_c_t_s_p_model_aff717cb92ce6426033e85716644b9cef_cgraph">
658<area shape="rect" id="node3" doxygen="qt-4.6.tag:http://doc.trolltech.com/4.6/" href="http://doc.trolltech.com/4.6/qvector.html#resize" title="QVector::resize" alt="" coords="229,5,341,33"/>
659</map>
660</div>
661</p>
662
663</div>
664</div>
665<hr/>The documentation for this class was generated from the following files:<ul>
666<li>src/<a class="el" href="tspmodel_8h_source.html">tspmodel.h</a></li>
667<li>src/tspmodel.cpp</li>
668</ul>
669</div>
670<!--- window showing the filter options -->
671<div id="MSearchSelectWindow"
672     onmouseover="return searchBox.OnSearchSelectShow()"
673     onmouseout="return searchBox.OnSearchSelectHide()"
674     onkeydown="return searchBox.OnSearchSelectKey(event)">
675<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&nbsp;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&nbsp;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&nbsp;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&nbsp;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&nbsp;</span>Defines</a></div>
676
677<!-- iframe showing the search results (closed by default) -->
678<div id="MSearchResultsWindow">
679<iframe src="" frameborder="0" 
680        name="MSearchResults" id="MSearchResults">
681</iframe>
682</div>
683
684<hr size="1"/><address style="text-align: right;"><small>Generated on Wed Apr 28 02:47:16 2010 for TSPSG: TSP Solver and Generator by&nbsp;
685<a href="http://www.doxygen.org/index.html">
686<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address>
687</body>
688</html>
Note: See TracBrowser for help on using the repository browser.