source: tspsg/docs/html/class_c_t_s_p_model.html @ a23f4c292f

0.1.3.145-beta1-symbian0.1.4.170-beta2-bb10appveyorimgbotreadme 0.1.2.100-alpha2
Last change on this file since a23f4c292f was a23f4c292f, checked in by Oleksii Serdiuk, 14 years ago

Added ChangeLog? and updated documenation to contain actual revision info for the header files.

NB: This will be the second public alpha release.

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