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"><!-- |
---|
15 | var searchBox = new SearchBox("searchBox", "search",false,'Search'); |
---|
16 | --></script> |
---|
17 | <script type="text/javascript"> |
---|
18 | <!-- |
---|
19 | function 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 | } |
---|
31 | function 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 | } |
---|
55 | window.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 Page</span></a></li> |
---|
62 | <li><a href="pages.html"><span>Related 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 List</span></a></li> |
---|
83 | <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> |
---|
84 | <li><a href="functions.html"><span>Class 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 <<a class="el" href="tspmodel_8h_source.html">tspmodel.h</a>></code></p> |
---|
94 | <div class="dynheader"> |
---|
95 | Inheritance 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"> |
---|
103 | Collaboration 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\< QVector\< double \> \>" 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 </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"> </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"> </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"> </td><td class="mdescRight">Class constructor. <a href="#a50a24986bc34b37c6c3b7bb52371b837"></a><br/></td></tr> |
---|
121 | <tr><td class="memItemLeft" align="right" valign="top">void </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"> </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 </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> &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"> </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> </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> &<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"> </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 </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> &<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"> </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> </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"> </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 </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> &fname)</td></tr> |
---|
132 | <tr><td class="mdescLeft"> </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 </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"> </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 </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"> </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 </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> &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"> </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 </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> &fname)</td></tr> |
---|
140 | <tr><td class="mdescLeft"> </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 </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> &<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> &value, int role=Qt::EditRole)</td></tr> |
---|
142 | <tr><td class="mdescLeft"> </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 </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"> </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 © 2007-2010 Lёppa <contacts[at]oleksii[dot]name> </dd></dl> |
---|
149 | <hr/><h2>Constructor & 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> * </td> |
---|
158 | <td class="paramname"> <em>parent</em> = <code>0</code></td> |
---|
159 | <td> ) </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> </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> ) </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"> |
---|
196 | Here 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 &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> & </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> ) </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 &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> & </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 </td> |
---|
244 | <td class="paramname"> <em>role</em> = <code>Qt::DisplayRole</code></td><td> </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> </td><td>An item index to get data from. </td></tr> |
---|
259 | <tr><td valign="top"></td><td valign="top"><em>role</em> </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"> |
---|
270 | Here 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/qmodelindex.html#column" title="QModelIndex::column" alt="" coords="180,5,327,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#isValid" title="QModelIndex::isValid" alt="" coords="181,55,325,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#row" title="QModelIndex::row" alt="" coords="191,106,316,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/qfont.html#setBold" title="QFont::setBold" alt="" coords="199,157,308,185"/> |
---|
278 | </map> |
---|
279 | </div> |
---|
280 | </p> |
---|
281 | |
---|
282 | </div> |
---|
283 | </div> |
---|
284 | <a class="anchor" id="a77881106624bfc203fb97bffe0d7b585"></a><!-- doxytag: member="CTSPModel::flags" ref="a77881106624bfc203fb97bffe0d7b585" args="(const QModelIndex &index) const " --> |
---|
285 | <div class="memitem"> |
---|
286 | <div class="memproto"> |
---|
287 | <table class="memname"> |
---|
288 | <tr> |
---|
289 | <td class="memname">Qt::ItemFlags CTSPModel::flags </td> |
---|
290 | <td>(</td> |
---|
291 | <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> & </td> |
---|
292 | <td class="paramname"> <em>index</em></td> |
---|
293 | <td> ) </td> |
---|
294 | <td> const</td> |
---|
295 | </tr> |
---|
296 | </table> |
---|
297 | </div> |
---|
298 | <div class="memdoc"> |
---|
299 | |
---|
300 | <p>Returns the item flags for the given <em>index</em>. </p> |
---|
301 | <dl><dt><b>Parameters:</b></dt><dd> |
---|
302 | <table border="0" cellspacing="2" cellpadding="0"> |
---|
303 | <tr><td valign="top"></td><td valign="top"><em>index</em> </td><td>An item index to get flags from. </td></tr> |
---|
304 | </table> |
---|
305 | </dd> |
---|
306 | </dl> |
---|
307 | <dl class="return"><dt><b>Returns:</b></dt><dd>Corresponding item flags. </dd></dl> |
---|
308 | |
---|
309 | <p><div class="dynheader"> |
---|
310 | Here is the call graph for this function:</div> |
---|
311 | <div class="dynsection"> |
---|
312 | <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> |
---|
313 | <map name="class_c_t_s_p_model_a77881106624bfc203fb97bffe0d7b585_cgraph_map" id="class_c_t_s_p_model_a77881106624bfc203fb97bffe0d7b585_cgraph"> |
---|
314 | <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"/> |
---|
315 | <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"/> |
---|
316 | </map> |
---|
317 | </div> |
---|
318 | </p> |
---|
319 | |
---|
320 | </div> |
---|
321 | </div> |
---|
322 | <a class="anchor" id="a8c716850f6c31fa42b219d7f84038d71"></a><!-- doxytag: member="CTSPModel::headerData" ref="a8c716850f6c31fa42b219d7f84038d71" args="(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const " --> |
---|
323 | <div class="memitem"> |
---|
324 | <div class="memproto"> |
---|
325 | <table class="memname"> |
---|
326 | <tr> |
---|
327 | <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> |
---|
328 | <td>(</td> |
---|
329 | <td class="paramtype">int </td> |
---|
330 | <td class="paramname"> <em>section</em>, </td> |
---|
331 | </tr> |
---|
332 | <tr> |
---|
333 | <td class="paramkey"></td> |
---|
334 | <td></td> |
---|
335 | <td class="paramtype">Qt::Orientation </td> |
---|
336 | <td class="paramname"> <em>orientation</em>, </td> |
---|
337 | </tr> |
---|
338 | <tr> |
---|
339 | <td class="paramkey"></td> |
---|
340 | <td></td> |
---|
341 | <td class="paramtype">int </td> |
---|
342 | <td class="paramname"> <em>role</em> = <code>Qt::DisplayRole</code></td><td> </td> |
---|
343 | </tr> |
---|
344 | <tr> |
---|
345 | <td></td> |
---|
346 | <td>)</td> |
---|
347 | <td></td><td></td><td> const</td> |
---|
348 | </tr> |
---|
349 | </table> |
---|
350 | </div> |
---|
351 | <div class="memdoc"> |
---|
352 | |
---|
353 | <p>Returns the data for the given <em>role</em> and <em>section</em> in the header with the specified <em>orientation</em>. </p> |
---|
354 | <dl><dt><b>Parameters:</b></dt><dd> |
---|
355 | <table border="0" cellspacing="2" cellpadding="0"> |
---|
356 | <tr><td valign="top"></td><td valign="top"><em>section</em> </td><td>The section to get header data for. </td></tr> |
---|
357 | <tr><td valign="top"></td><td valign="top"><em>orientation</em> </td><td>The orientation to get header data for. </td></tr> |
---|
358 | <tr><td valign="top"></td><td valign="top"><em>role</em> </td><td>The role to get header data for. </td></tr> |
---|
359 | </table> |
---|
360 | </dd> |
---|
361 | </dl> |
---|
362 | <dl class="return"><dt><b>Returns:</b></dt><dd>Corresponding header data.</dd></dl> |
---|
363 | <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> |
---|
364 | |
---|
365 | </div> |
---|
366 | </div> |
---|
367 | <a class="anchor" id="ae25b1d25b13488fde89e381152c62549"></a><!-- doxytag: member="CTSPModel::loadTask" ref="ae25b1d25b13488fde89e381152c62549" args="(const QString &fname)" --> |
---|
368 | <div class="memitem"> |
---|
369 | <div class="memproto"> |
---|
370 | <table class="memname"> |
---|
371 | <tr> |
---|
372 | <td class="memname">bool CTSPModel::loadTask </td> |
---|
373 | <td>(</td> |
---|
374 | <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> & </td> |
---|
375 | <td class="paramname"> <em>fname</em></td> |
---|
376 | <td> ) </td> |
---|
377 | <td></td> |
---|
378 | </tr> |
---|
379 | </table> |
---|
380 | </div> |
---|
381 | <div class="memdoc"> |
---|
382 | |
---|
383 | <p>Loads a task from <em>fname</em>. </p> |
---|
384 | <dl><dt><b>Parameters:</b></dt><dd> |
---|
385 | <table border="0" cellspacing="2" cellpadding="0"> |
---|
386 | <tr><td valign="top"></td><td valign="top"><em>fname</em> </td><td>The name of the file to be loaded. </td></tr> |
---|
387 | </table> |
---|
388 | </dd> |
---|
389 | </dl> |
---|
390 | <dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> on success, otherwise <code>false</code>.</dd></dl> |
---|
391 | <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> |
---|
392 | |
---|
393 | <p><div class="dynheader"> |
---|
394 | Here is the call graph for this function:</div> |
---|
395 | <div class="dynsection"> |
---|
396 | <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> |
---|
397 | <map name="class_c_t_s_p_model_ae25b1d25b13488fde89e381152c62549_cgraph_map" id="class_c_t_s_p_model_ae25b1d25b13488fde89e381152c62549_cgraph"> |
---|
398 | <area shape="rect" id="node3" 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,5,365,33"/> |
---|
399 | <area shape="rect" id="node5" 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,55,392,83"/> |
---|
400 | <area shape="rect" id="node7" 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,106,364,134"/> |
---|
401 | <area shape="rect" id="node9" 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,157,433,185"/> |
---|
402 | <area shape="rect" id="node11" 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,207,423,235"/> |
---|
403 | <area shape="rect" id="node13" 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,258,405,286"/> |
---|
404 | <area shape="rect" id="node15" 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,309,392,337"/> |
---|
405 | </map> |
---|
406 | </div> |
---|
407 | </p> |
---|
408 | |
---|
409 | <p><div class="dynheader"> |
---|
410 | Here is the caller graph for this function:</div> |
---|
411 | <div class="dynsection"> |
---|
412 | <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> |
---|
413 | <map name="class_c_t_s_p_model_ae25b1d25b13488fde89e381152c62549_icgraph_map" id="class_c_t_s_p_model_ae25b1d25b13488fde89e381152c62549_icgraph"> |
---|
414 | <area shape="rect" id="node3" href="class_main_window.html#a8b244be8b7b7db1b08de2a2acb9409db" title="Class constructor." alt="" coords="207,5,383,33"/> |
---|
415 | </map> |
---|
416 | </div> |
---|
417 | </p> |
---|
418 | |
---|
419 | </div> |
---|
420 | </div> |
---|
421 | <a class="anchor" id="a4fcde91257e57ba0e9754418cb83148e"></a><!-- doxytag: member="CTSPModel::numCities" ref="a4fcde91257e57ba0e9754418cb83148e" args="() const " --> |
---|
422 | <div class="memitem"> |
---|
423 | <div class="memproto"> |
---|
424 | <table class="memname"> |
---|
425 | <tr> |
---|
426 | <td class="memname">quint16 CTSPModel::numCities </td> |
---|
427 | <td>(</td> |
---|
428 | <td class="paramname"></td> |
---|
429 | <td> ) </td> |
---|
430 | <td> const</td> |
---|
431 | </tr> |
---|
432 | </table> |
---|
433 | </div> |
---|
434 | <div class="memdoc"> |
---|
435 | |
---|
436 | <p>Returns the number of cities. </p> |
---|
437 | <dl class="return"><dt><b>Returns:</b></dt><dd>Number of cities in the current task.</dd></dl> |
---|
438 | <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> |
---|
439 | |
---|
440 | </div> |
---|
441 | </div> |
---|
442 | <a class="anchor" id="a733908abe1ffabf49ad34ccdabaeeee9"></a><!-- doxytag: member="CTSPModel::numCitiesChanged" ref="a733908abe1ffabf49ad34ccdabaeeee9" args="(int)" --> |
---|
443 | <div class="memitem"> |
---|
444 | <div class="memproto"> |
---|
445 | <table class="memname"> |
---|
446 | <tr> |
---|
447 | <td class="memname">void CTSPModel::numCitiesChanged </td> |
---|
448 | <td>(</td> |
---|
449 | <td class="paramtype">int </td> |
---|
450 | <td class="paramname"></td> |
---|
451 | <td> ) </td> |
---|
452 | <td><code> [signal]</code></td> |
---|
453 | </tr> |
---|
454 | </table> |
---|
455 | </div> |
---|
456 | <div class="memdoc"> |
---|
457 | |
---|
458 | <p>This signal is emitted whenever the number of cities in the task changes. </p> |
---|
459 | <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> |
---|
460 | |
---|
461 | </div> |
---|
462 | </div> |
---|
463 | <a class="anchor" id="ad18e48dd0b0ad56d8e4ae3b1bc039e4a"></a><!-- doxytag: member="CTSPModel::randomize" ref="ad18e48dd0b0ad56d8e4ae3b1bc039e4a" args="()" --> |
---|
464 | <div class="memitem"> |
---|
465 | <div class="memproto"> |
---|
466 | <table class="memname"> |
---|
467 | <tr> |
---|
468 | <td class="memname">void CTSPModel::randomize </td> |
---|
469 | <td>(</td> |
---|
470 | <td class="paramname"></td> |
---|
471 | <td> ) </td> |
---|
472 | <td></td> |
---|
473 | </tr> |
---|
474 | </table> |
---|
475 | </div> |
---|
476 | <div class="memdoc"> |
---|
477 | |
---|
478 | <p>Randomizes the table by setting all its values to random ones. </p> |
---|
479 | <p>Uses TSPSG settings to determine random values range.</p> |
---|
480 | <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> |
---|
481 | |
---|
482 | <p><div class="dynheader"> |
---|
483 | Here is the call graph for this function:</div> |
---|
484 | <div class="dynsection"> |
---|
485 | <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> |
---|
486 | <map name="class_c_t_s_p_model_ad18e48dd0b0ad56d8e4ae3b1bc039e4a_cgraph_map" id="class_c_t_s_p_model_ad18e48dd0b0ad56d8e4ae3b1bc039e4a_cgraph"> |
---|
487 | <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"/> |
---|
488 | <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"/> |
---|
489 | </map> |
---|
490 | </div> |
---|
491 | </p> |
---|
492 | |
---|
493 | </div> |
---|
494 | </div> |
---|
495 | <a class="anchor" id="a419c2b9d40fc2f348b15ae02f442a39b"></a><!-- doxytag: member="CTSPModel::rowCount" ref="a419c2b9d40fc2f348b15ae02f442a39b" args="(const QModelIndex &parent=QModelIndex()) const " --> |
---|
496 | <div class="memitem"> |
---|
497 | <div class="memproto"> |
---|
498 | <table class="memname"> |
---|
499 | <tr> |
---|
500 | <td class="memname">int CTSPModel::rowCount </td> |
---|
501 | <td>(</td> |
---|
502 | <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> & </td> |
---|
503 | <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> |
---|
504 | <td> ) </td> |
---|
505 | <td> const</td> |
---|
506 | </tr> |
---|
507 | </table> |
---|
508 | </div> |
---|
509 | <div class="memdoc"> |
---|
510 | |
---|
511 | <p>Returns the row count in the table. </p> |
---|
512 | <dl class="return"><dt><b>Returns:</b></dt><dd>Number of rows in the table.</dd></dl> |
---|
513 | <p>Actually, this function returns the number of cities in the current task.</p> |
---|
514 | <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> |
---|
515 | |
---|
516 | </div> |
---|
517 | </div> |
---|
518 | <a class="anchor" id="aa73d906286cf369d9e6352348e1aca61"></a><!-- doxytag: member="CTSPModel::saveTask" ref="aa73d906286cf369d9e6352348e1aca61" args="(const QString &fname)" --> |
---|
519 | <div class="memitem"> |
---|
520 | <div class="memproto"> |
---|
521 | <table class="memname"> |
---|
522 | <tr> |
---|
523 | <td class="memname">bool CTSPModel::saveTask </td> |
---|
524 | <td>(</td> |
---|
525 | <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> & </td> |
---|
526 | <td class="paramname"> <em>fname</em></td> |
---|
527 | <td> ) </td> |
---|
528 | <td></td> |
---|
529 | </tr> |
---|
530 | </table> |
---|
531 | </div> |
---|
532 | <div class="memdoc"> |
---|
533 | |
---|
534 | <p>Saves current task to <em>fname</em>. </p> |
---|
535 | <dl><dt><b>Parameters:</b></dt><dd> |
---|
536 | <table border="0" cellspacing="2" cellpadding="0"> |
---|
537 | <tr><td valign="top"></td><td valign="top"><em>fname</em> </td><td>The name of the file to seve to. </td></tr> |
---|
538 | </table> |
---|
539 | </dd> |
---|
540 | </dl> |
---|
541 | <dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> on success, otherwise <code>false</code>.</dd></dl> |
---|
542 | <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> |
---|
543 | |
---|
544 | <p><div class="dynheader"> |
---|
545 | Here is the call graph for this function:</div> |
---|
546 | <div class="dynsection"> |
---|
547 | <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> |
---|
548 | <map name="class_c_t_s_p_model_aa73d906286cf369d9e6352348e1aca61_cgraph_map" id="class_c_t_s_p_model_aa73d906286cf369d9e6352348e1aca61_cgraph"> |
---|
549 | <area shape="rect" id="node3" 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,5,365,33"/> |
---|
550 | <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#error" title="QFile::error" alt="" coords="277,55,363,83"/> |
---|
551 | <area shape="rect" id="node7" 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,106,364,134"/> |
---|
552 | <area shape="rect" id="node9" 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,157,433,185"/> |
---|
553 | <area shape="rect" id="node11" 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,207,423,235"/> |
---|
554 | <area shape="rect" id="node13" 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,258,405,286"/> |
---|
555 | </map> |
---|
556 | </div> |
---|
557 | </p> |
---|
558 | |
---|
559 | </div> |
---|
560 | </div> |
---|
561 | <a class="anchor" id="a614a0e748bdf52c504a0284c07a977ed"></a><!-- doxytag: member="CTSPModel::setData" ref="a614a0e748bdf52c504a0284c07a977ed" args="(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)" --> |
---|
562 | <div class="memitem"> |
---|
563 | <div class="memproto"> |
---|
564 | <table class="memname"> |
---|
565 | <tr> |
---|
566 | <td class="memname">bool CTSPModel::setData </td> |
---|
567 | <td>(</td> |
---|
568 | <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> & </td> |
---|
569 | <td class="paramname"> <em>index</em>, </td> |
---|
570 | </tr> |
---|
571 | <tr> |
---|
572 | <td class="paramkey"></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/qvariant.html">QVariant</a> & </td> |
---|
575 | <td class="paramname"> <em>value</em>, </td> |
---|
576 | </tr> |
---|
577 | <tr> |
---|
578 | <td class="paramkey"></td> |
---|
579 | <td></td> |
---|
580 | <td class="paramtype">int </td> |
---|
581 | <td class="paramname"> <em>role</em> = <code>Qt::EditRole</code></td><td> </td> |
---|
582 | </tr> |
---|
583 | <tr> |
---|
584 | <td></td> |
---|
585 | <td>)</td> |
---|
586 | <td></td><td></td><td></td> |
---|
587 | </tr> |
---|
588 | </table> |
---|
589 | </div> |
---|
590 | <div class="memdoc"> |
---|
591 | |
---|
592 | <p>Sets the <em>role</em> data for the item at <em>index</em> to <em>value</em>. </p> |
---|
593 | <dl><dt><b>Parameters:</b></dt><dd> |
---|
594 | <table border="0" cellspacing="2" cellpadding="0"> |
---|
595 | <tr><td valign="top"></td><td valign="top"><em>index</em> </td><td>The index of the item to set data at. </td></tr> |
---|
596 | <tr><td valign="top"></td><td valign="top"><em>value</em> </td><td>The value of the item data to be set. </td></tr> |
---|
597 | <tr><td valign="top"></td><td valign="top"><em>role</em> </td><td>The role of the item to set data for. </td></tr> |
---|
598 | </table> |
---|
599 | </dd> |
---|
600 | </dl> |
---|
601 | <dl class="return"><dt><b>Returns:</b></dt><dd><code>true</code> on success, otherwise <code>false</code>.</dd></dl> |
---|
602 | <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> |
---|
603 | |
---|
604 | <p><div class="dynheader"> |
---|
605 | Here is the call graph for this function:</div> |
---|
606 | <div class="dynsection"> |
---|
607 | <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> |
---|
608 | <map name="class_c_t_s_p_model_a614a0e748bdf52c504a0284c07a977ed_cgraph_map" id="class_c_t_s_p_model_a614a0e748bdf52c504a0284c07a977ed_cgraph"> |
---|
609 | <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"/> |
---|
610 | <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"/> |
---|
611 | <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"/> |
---|
612 | <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"/> |
---|
613 | <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"/> |
---|
614 | <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"/> |
---|
615 | </map> |
---|
616 | </div> |
---|
617 | </p> |
---|
618 | |
---|
619 | </div> |
---|
620 | </div> |
---|
621 | <a class="anchor" id="aff717cb92ce6426033e85716644b9cef"></a><!-- doxytag: member="CTSPModel::setNumCities" ref="aff717cb92ce6426033e85716644b9cef" args="(int n)" --> |
---|
622 | <div class="memitem"> |
---|
623 | <div class="memproto"> |
---|
624 | <table class="memname"> |
---|
625 | <tr> |
---|
626 | <td class="memname">void CTSPModel::setNumCities </td> |
---|
627 | <td>(</td> |
---|
628 | <td class="paramtype">int </td> |
---|
629 | <td class="paramname"> <em>n</em></td> |
---|
630 | <td> ) </td> |
---|
631 | <td></td> |
---|
632 | </tr> |
---|
633 | </table> |
---|
634 | </div> |
---|
635 | <div class="memdoc"> |
---|
636 | |
---|
637 | <p>Sets number of cities in the current task to <em>n</em>. </p> |
---|
638 | <dl><dt><b>Parameters:</b></dt><dd> |
---|
639 | <table border="0" cellspacing="2" cellpadding="0"> |
---|
640 | <tr><td valign="top"></td><td valign="top"><em>n</em> </td><td>Number of cities to set to.</td></tr> |
---|
641 | </table> |
---|
642 | </dd> |
---|
643 | </dl> |
---|
644 | <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> |
---|
645 | |
---|
646 | <p><div class="dynheader"> |
---|
647 | Here is the call graph for this function:</div> |
---|
648 | <div class="dynsection"> |
---|
649 | <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> |
---|
650 | <map name="class_c_t_s_p_model_aff717cb92ce6426033e85716644b9cef_cgraph_map" id="class_c_t_s_p_model_aff717cb92ce6426033e85716644b9cef_cgraph"> |
---|
651 | <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"/> |
---|
652 | </map> |
---|
653 | </div> |
---|
654 | </p> |
---|
655 | |
---|
656 | </div> |
---|
657 | </div> |
---|
658 | <hr/>The documentation for this class was generated from the following files:<ul> |
---|
659 | <li>src/<a class="el" href="tspmodel_8h_source.html">tspmodel.h</a></li> |
---|
660 | <li>src/tspmodel.cpp</li> |
---|
661 | </ul> |
---|
662 | </div> |
---|
663 | <!--- window showing the filter options --> |
---|
664 | <div id="MSearchSelectWindow" |
---|
665 | onmouseover="return searchBox.OnSearchSelectShow()" |
---|
666 | onmouseout="return searchBox.OnSearchSelectHide()" |
---|
667 | onkeydown="return searchBox.OnSearchSelectKey(event)"> |
---|
668 | <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Defines</a></div> |
---|
669 | |
---|
670 | <!-- iframe showing the search results (closed by default) --> |
---|
671 | <div id="MSearchResultsWindow"> |
---|
672 | <iframe src="" frameborder="0" |
---|
673 | name="MSearchResults" id="MSearchResults"> |
---|
674 | </iframe> |
---|
675 | </div> |
---|
676 | |
---|
677 | <hr size="1"/><address style="text-align: right;"><small>Generated on Wed Mar 3 01:46:35 2010 for TSPSG: TSP Solver and Generator by |
---|
678 | <a href="http://www.doxygen.org/index.html"> |
---|
679 | <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.1 </small></address> |
---|
680 | </body> |
---|
681 | </html> |
---|