<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>Wt examples: FileItem Class Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">Wt examples  <span id="projectnumber">3.2.3</span> </div> </td> </tr> </tbody> </table> </div> <!-- Generated by Doxygen 1.7.5.1 --> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="inherits.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#pub-methods">Public Member Functions</a> | <a href="#pub-static-attribs">Static Public Attributes</a> </div> <div class="headertitle"> <div class="title">FileItem Class Reference</div> </div> </div> <div class="contents"> <!-- doxytag: class="FileItem" --><!-- doxytag: inherits="Wt::WStandardItem" --> <p>WStandardItem which stores a file. <a href="classFileItem.html#details">More...</a></p> <p><code>#include <<a class="el" href="FileItem_8h_source.html">FileItem.h</a>></code></p> <div class="dynheader"> Inheritance diagram for FileItem:</div> <div class="dyncontent"> <div class="center"><img src="classFileItem__inherit__graph.png" border="0" usemap="#FileItem_inherit__map" alt="Inheritance graph"/></div> <map name="FileItem_inherit__map" id="FileItem_inherit__map"> <area shape="rect" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WStandardItem.html" title="Wt::WStandardItem" alt="" coords="5,5,141,32"/></map> <center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div> <p><a href="classFileItem-members.html">List of all members.</a></p> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="pub-methods"></a> Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="classFileItem.html#ae9c6218162b3927196025a91ab339d78">FileItem</a> (const std::string &iconUri, const <a class="elRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WString.html">Wt::WString</a> &<a class="elRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WStandardItem.html#a5cd26b1515b25d32b2872210918d7e68">text</a>, const std::string &fileName)</td></tr> <tr><td colspan="2"><h2><a name="pub-static-attribs"></a> Static Public Attributes</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static const int </td><td class="memItemRight" valign="bottom"><a class="el" href="classFileItem.html#ae1dbc221110c06627765b421c30df2ab">ContentsRole</a> = <a class="elRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/group__modelview.html#gga0ae864e12320f9f89172735e075ed068a9b7eae9fc07ea4fd8afe7bc97954162c">Wt::UserRole</a></td></tr> <tr><td class="memItemLeft" align="right" valign="top">static const int </td><td class="memItemRight" valign="bottom"><a class="el" href="classFileItem.html#aa8d601340669b5628a8bac8e35ccd936">FilePathRole</a> = <a class="elRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/group__modelview.html#gga0ae864e12320f9f89172735e075ed068a9b7eae9fc07ea4fd8afe7bc97954162c">Wt::UserRole</a> + 1</td></tr> <tr><td class="memItemLeft" align="right" valign="top">static const int </td><td class="memItemRight" valign="bottom"><a class="el" href="classFileItem.html#ae072fe0aa9a614bfc39a9f59cf987771">FileNameRole</a> = <a class="elRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/group__modelview.html#gga0ae864e12320f9f89172735e075ed068a9b7eae9fc07ea4fd8afe7bc97954162c">Wt::UserRole</a> + 2</td></tr> </table> <hr/><a name="details" id="details"></a><h2>Detailed Description</h2> <div class="textblock"><p>WStandardItem which stores a file. </p> <p>The <a class="el" href="classSourceView.html" title="View class for source code.">SourceView</a> class reads data from 3 additional roles:</p> <ul> <li>ContentsRole: file contents</li> <li>FilePathRole: the path which holds the file contents</li> <li>FileNameRole: the original file name (used to derive the file type) </li> </ul> <p>Definition at line <a class="el" href="FileItem_8h_source.html#l00028">28</a> of file <a class="el" href="FileItem_8h_source.html">FileItem.h</a>.</p> </div><hr/><h2>Constructor & Destructor Documentation</h2> <a class="anchor" id="ae9c6218162b3927196025a91ab339d78"></a><!-- doxytag: member="FileItem::FileItem" ref="ae9c6218162b3927196025a91ab339d78" args="(const std::string &iconUri, const Wt::WString &text, const std::string &fileName)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">FileItem::FileItem </td> <td>(</td> <td class="paramtype">const std::string & </td> <td class="paramname"><em>iconUri</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="elRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WString.html">Wt::WString</a> & </td> <td class="paramname"><em>text</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const std::string & </td> <td class="paramname"><em>fileName</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="FileItem_8h_source.html#l00035">35</a> of file <a class="el" href="FileItem_8h_source.html">FileItem.h</a>.</p> <div class="fragment"><pre class="fragment"> : <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WStandardItem.html#abe5aebe20c0c5309be95928996e3acf1">WStandardItem</a>(iconUri, text) { <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WStandardItem.html#afbe54e68e576c4902c9085f8966c93ef">setData</a>(fileName, <a class="code" href="classFileItem.html#ae072fe0aa9a614bfc39a9f59cf987771">FileNameRole</a>); <a class="codeRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/classWt_1_1WStandardItem.html#afbe54e68e576c4902c9085f8966c93ef">setData</a>(fileName, <a class="code" href="classFileItem.html#aa8d601340669b5628a8bac8e35ccd936">FilePathRole</a>); } </pre></div> </div> </div> <hr/><h2>Member Data Documentation</h2> <a class="anchor" id="ae1dbc221110c06627765b421c30df2ab"></a><!-- doxytag: member="FileItem::ContentsRole" ref="ae1dbc221110c06627765b421c30df2ab" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const int <a class="el" href="classFileItem.html#ae1dbc221110c06627765b421c30df2ab">FileItem::ContentsRole</a> = <a class="elRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/group__modelview.html#gga0ae864e12320f9f89172735e075ed068a9b7eae9fc07ea4fd8afe7bc97954162c">Wt::UserRole</a><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="FileItem_8h_source.html#l00031">31</a> of file <a class="el" href="FileItem_8h_source.html">FileItem.h</a>.</p> </div> </div> <a class="anchor" id="ae072fe0aa9a614bfc39a9f59cf987771"></a><!-- doxytag: member="FileItem::FileNameRole" ref="ae072fe0aa9a614bfc39a9f59cf987771" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const int <a class="el" href="classFileItem.html#ae072fe0aa9a614bfc39a9f59cf987771">FileItem::FileNameRole</a> = <a class="elRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/group__modelview.html#gga0ae864e12320f9f89172735e075ed068a9b7eae9fc07ea4fd8afe7bc97954162c">Wt::UserRole</a> + 2<code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="FileItem_8h_source.html#l00033">33</a> of file <a class="el" href="FileItem_8h_source.html">FileItem.h</a>.</p> </div> </div> <a class="anchor" id="aa8d601340669b5628a8bac8e35ccd936"></a><!-- doxytag: member="FileItem::FilePathRole" ref="aa8d601340669b5628a8bac8e35ccd936" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const int <a class="el" href="classFileItem.html#aa8d601340669b5628a8bac8e35ccd936">FileItem::FilePathRole</a> = <a class="elRef" doxygen="wt.tags:../../reference/html" href="../../reference/html/group__modelview.html#gga0ae864e12320f9f89172735e075ed068a9b7eae9fc07ea4fd8afe7bc97954162c">Wt::UserRole</a> + 1<code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p>Definition at line <a class="el" href="FileItem_8h_source.html#l00032">32</a> of file <a class="el" href="FileItem_8h_source.html">FileItem.h</a>.</p> </div> </div> <hr/>The documentation for this class was generated from the following file:<ul> <li>/home/koen/project/wt/public-git/wt/examples/wt-homepage/<a class="el" href="FileItem_8h_source.html">FileItem.h</a></li> </ul> </div> <hr size="1"><address style="text-align: right; margin: 3px"><small> Generated on Thu Nov 1 2012 for <a href="http://www.webtoolkit.eu/wt">the C++ Web Toolkit (Wt)</a> by <a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" border="0" style="vertical-align: middle; display: inline-block; height: 2em"></a> 1.7.5.1</small></address> </body> </html>