You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					179 lines
				
				9.6 KiB
			
		
		
			
		
	
	
					179 lines
				
				9.6 KiB
			| 
								 
											7 years ago
										 
									 | 
							
								<!-- HTML header for doxygen 1.8.13-->
							 | 
						||
| 
								 | 
							
								<!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"/>
							 | 
						||
| 
								 | 
							
								<meta http-equiv="X-UA-Compatible" content="IE=9"/>
							 | 
						||
| 
								 | 
							
								<meta name="generator" content="Doxygen 1.8.14"/>
							 | 
						||
| 
								 | 
							
								<meta name="viewport" content="width=device-width, initial-scale=1"/>
							 | 
						||
| 
								 | 
							
								<title>QtMvvm: QtMvvm::Formatter Class Reference</title>
							 | 
						||
| 
								 | 
							
								<link href="tabs.css" rel="stylesheet" type="text/css"/>
							 | 
						||
| 
								 | 
							
								<script type="text/javascript" src="jquery.js"></script>
							 | 
						||
| 
								 | 
							
								<script type="text/javascript" src="dynsections.js"></script>
							 | 
						||
| 
								 | 
							
								<link href="search/search.css" rel="stylesheet" type="text/css"/>
							 | 
						||
| 
								 | 
							
								<script type="text/javascript" src="search/searchdata.js"></script>
							 | 
						||
| 
								 | 
							
								<script type="text/javascript" src="search/search.js"></script>
							 | 
						||
| 
								 | 
							
								<link href="doxygen.css" rel="stylesheet" type="text/css" />
							 | 
						||
| 
								 | 
							
								</head>
							 | 
						||
| 
								 | 
							
								<body>
							 | 
						||
| 
								 | 
							
								<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
							 | 
						||
| 
								 | 
							
								<div id="titlearea">
							 | 
						||
| 
								 | 
							
								<table cellspacing="0" cellpadding="0" style="display: inline;">
							 | 
						||
| 
								 | 
							
								 <tbody>
							 | 
						||
| 
								 | 
							
								 <tr style="height: 56px;">
							 | 
						||
| 
								 | 
							
								  <td id="projectalign" style="padding-left: 0.5em;">
							 | 
						||
| 
								 | 
							
								   <div id="projectname">QtMvvm
							 | 
						||
| 
								 | 
							
								    <span id="projectnumber">1.1.0</span>
							 | 
						||
| 
								 | 
							
								   </div>
							 | 
						||
| 
								 | 
							
								   <div id="projectbrief">A mvvm oriented library for Qt, to create Projects for Widgets and Quick in parallel</div>
							 | 
						||
| 
								 | 
							
								  </td>
							 | 
						||
| 
								 | 
							
								 </tr>
							 | 
						||
| 
								 | 
							
								 </tbody>
							 | 
						||
| 
								 | 
							
								</table>
							 | 
						||
| 
								 | 
							
								<a style="float: right;" target="_blank"  href="https://github.com/Skycoder42/QtMvvm">
							 | 
						||
| 
								 | 
							
								<img style="padding: 10px;" src="GitHub_Logo.png"/>
							 | 
						||
| 
								 | 
							
								</a>
							 | 
						||
| 
								 | 
							
								</div>
							 | 
						||
| 
								 | 
							
								<!-- end header part -->
							 | 
						||
| 
								 | 
							
								<!-- Generated by Doxygen 1.8.14 -->
							 | 
						||
| 
								 | 
							
								<script type="text/javascript">
							 | 
						||
| 
								 | 
							
								/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
							 | 
						||
| 
								 | 
							
								var searchBox = new SearchBox("searchBox", "search",false,'Search');
							 | 
						||
| 
								 | 
							
								/* @license-end */
							 | 
						||
| 
								 | 
							
								</script>
							 | 
						||
| 
								 | 
							
								<script type="text/javascript" src="menudata.js"></script>
							 | 
						||
| 
								 | 
							
								<script type="text/javascript" src="menu.js"></script>
							 | 
						||
| 
								 | 
							
								<script type="text/javascript">
							 | 
						||
| 
								 | 
							
								/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
							 | 
						||
| 
								 | 
							
								$(function() {
							 | 
						||
| 
								 | 
							
								  initMenu('',true,false,'search.php','Search');
							 | 
						||
| 
								 | 
							
								  $(document).ready(function() { init_search(); });
							 | 
						||
| 
								 | 
							
								});
							 | 
						||
| 
								 | 
							
								/* @license-end */</script>
							 | 
						||
| 
								 | 
							
								<div id="main-nav"></div>
							 | 
						||
| 
								 | 
							
								<!-- window showing the filter options -->
							 | 
						||
| 
								 | 
							
								<div id="MSearchSelectWindow"
							 | 
						||
| 
								 | 
							
								     onmouseover="return searchBox.OnSearchSelectShow()"
							 | 
						||
| 
								 | 
							
								     onmouseout="return searchBox.OnSearchSelectHide()"
							 | 
						||
| 
								 | 
							
								     onkeydown="return searchBox.OnSearchSelectKey(event)">
							 | 
						||
| 
								 | 
							
								</div>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								<!-- iframe showing the search results (closed by default) -->
							 | 
						||
| 
								 | 
							
								<div id="MSearchResultsWindow">
							 | 
						||
| 
								 | 
							
								<iframe src="javascript:void(0)" frameborder="0" 
							 | 
						||
| 
								 | 
							
								        name="MSearchResults" id="MSearchResults">
							 | 
						||
| 
								 | 
							
								</iframe>
							 | 
						||
| 
								 | 
							
								</div>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								<div id="nav-path" class="navpath">
							 | 
						||
| 
								 | 
							
								  <ul>
							 | 
						||
| 
								 | 
							
								<li class="navelem"><a class="el" href="namespace_qt_mvvm.html">QtMvvm</a></li><li class="navelem"><a class="el" href="class_qt_mvvm_1_1_formatter.html">Formatter</a></li>  </ul>
							 | 
						||
| 
								 | 
							
								</div>
							 | 
						||
| 
								 | 
							
								</div><!-- top -->
							 | 
						||
| 
								 | 
							
								<div class="header">
							 | 
						||
| 
								 | 
							
								  <div class="summary">
							 | 
						||
| 
								 | 
							
								<a href="#pub-methods">Public Member Functions</a> |
							 | 
						||
| 
								 | 
							
								<a href="class_qt_mvvm_1_1_formatter-members.html">List of all members</a>  </div>
							 | 
						||
| 
								 | 
							
								  <div class="headertitle">
							 | 
						||
| 
								 | 
							
								<div class="title">QtMvvm::Formatter Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div>  </div>
							 | 
						||
| 
								 | 
							
								</div><!--header-->
							 | 
						||
| 
								 | 
							
								<div class="contents">
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								<p>A class to format the preview text in the delegates.  
							 | 
						||
| 
								 | 
							
								 <a href="class_qt_mvvm_1_1_formatter.html#details">More...</a></p>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								<p><code>#include <<a class="el" href="inputviewfactory_8h_source.html">inputviewfactory.h</a>></code></p>
							 | 
						||
| 
								 | 
							
								<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
							 | 
						||
| 
								 | 
							
								  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for QtMvvm::Formatter:</div>
							 | 
						||
| 
								 | 
							
								<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
							 | 
						||
| 
								 | 
							
								</div>
							 | 
						||
| 
								 | 
							
								<div id="dynsection-0-content" class="dyncontent" style="display:none;">
							 | 
						||
| 
								 | 
							
								 <div class="center">
							 | 
						||
| 
								 | 
							
								  <img src="class_qt_mvvm_1_1_formatter.png" usemap="#QtMvvm::Formatter_map" alt=""/>
							 | 
						||
| 
								 | 
							
								  <map id="QtMvvm::Formatter_map" name="QtMvvm::Formatter_map">
							 | 
						||
| 
								 | 
							
								<area href="class_qt_mvvm_1_1_simple_formatter.html" title="A very basic formatter that uses QString::arg with the value on the format string. " alt="QtMvvm::SimpleFormatter< T >" shape="rect" coords="0,56,187,80"/>
							 | 
						||
| 
								 | 
							
								</map>
							 | 
						||
| 
								 | 
							
								 </div></div>
							 | 
						||
| 
								 | 
							
								<table class="memberdecls">
							 | 
						||
| 
								 | 
							
								<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
							 | 
						||
| 
								 | 
							
								Public Member Functions</h2></td></tr>
							 | 
						||
| 
								 | 
							
								<tr class="memitem:a05b3d40f352bb939321b75fd908ebc5e"><td class="memItemLeft" align="right" valign="top">virtual <a class="elRef" target="_blank" doxygen="/home/sky/Qt/Docs/Qt-5.11.1/qtcore/qtcore.tags:https://doc.qt.io/qt-5/" href="https://doc.qt.io/qt-5/qstring.html">QString</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="class_qt_mvvm_1_1_formatter.html#a05b3d40f352bb939321b75fd908ebc5e">format</a> (const <a class="elRef" target="_blank" doxygen="/home/sky/Qt/Docs/Qt-5.11.1/qtcore/qtcore.tags:https://doc.qt.io/qt-5/" href="https://doc.qt.io/qt-5/qstring.html">QString</a> &formatString, const <a class="elRef" target="_blank" doxygen="/home/sky/Qt/Docs/Qt-5.11.1/qtcore/qtcore.tags:https://doc.qt.io/qt-5/" href="https://doc.qt.io/qt-5/qvariant.html">QVariant</a> &value, const QVariantMap &viewProperties) const =0</td></tr>
							 | 
						||
| 
								 | 
							
								<tr class="memdesc:a05b3d40f352bb939321b75fd908ebc5e"><td class="mdescLeft"> </td><td class="mdescRight">Is called to format a value to a localized, human readable text.  <a href="#a05b3d40f352bb939321b75fd908ebc5e">More...</a><br /></td></tr>
							 | 
						||
| 
								 | 
							
								<tr class="separator:a05b3d40f352bb939321b75fd908ebc5e"><td class="memSeparator" colspan="2"> </td></tr>
							 | 
						||
| 
								 | 
							
								</table>
							 | 
						||
| 
								 | 
							
								<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
							 | 
						||
| 
								 | 
							
								<div class="textblock"><p>A class to format the preview text in the delegates. </p>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								<p class="definition">Definition at line <a class="el" href="inputviewfactory_8h_source.html#l00016">16</a> of file <a class="el" href="inputviewfactory_8h_source.html">inputviewfactory.h</a>.</p>
							 | 
						||
| 
								 | 
							
								</div><h2 class="groupheader">Member Function Documentation</h2>
							 | 
						||
| 
								 | 
							
								<a id="a05b3d40f352bb939321b75fd908ebc5e"></a>
							 | 
						||
| 
								 | 
							
								<h2 class="memtitle"><span class="permalink"><a href="#a05b3d40f352bb939321b75fd908ebc5e">◆ </a></span>format()</h2>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								<div class="memitem">
							 | 
						||
| 
								 | 
							
								<div class="memproto">
							 | 
						||
| 
								 | 
							
								<table class="mlabels">
							 | 
						||
| 
								 | 
							
								  <tr>
							 | 
						||
| 
								 | 
							
								  <td class="mlabels-left">
							 | 
						||
| 
								 | 
							
								      <table class="memname">
							 | 
						||
| 
								 | 
							
								        <tr>
							 | 
						||
| 
								 | 
							
								          <td class="memname">QtMvvm::Formatter::format </td>
							 | 
						||
| 
								 | 
							
								          <td>(</td>
							 | 
						||
| 
								 | 
							
								          <td class="paramtype">const <a class="elRef" target="_blank" doxygen="/home/sky/Qt/Docs/Qt-5.11.1/qtcore/qtcore.tags:https://doc.qt.io/qt-5/" href="https://doc.qt.io/qt-5/qstring.html">QString</a> & </td>
							 | 
						||
| 
								 | 
							
								          <td class="paramname"><em>formatString</em>, </td>
							 | 
						||
| 
								 | 
							
								        </tr>
							 | 
						||
| 
								 | 
							
								        <tr>
							 | 
						||
| 
								 | 
							
								          <td class="paramkey"></td>
							 | 
						||
| 
								 | 
							
								          <td></td>
							 | 
						||
| 
								 | 
							
								          <td class="paramtype">const <a class="elRef" target="_blank" doxygen="/home/sky/Qt/Docs/Qt-5.11.1/qtcore/qtcore.tags:https://doc.qt.io/qt-5/" href="https://doc.qt.io/qt-5/qvariant.html">QVariant</a> & </td>
							 | 
						||
| 
								 | 
							
								          <td class="paramname"><em>value</em>, </td>
							 | 
						||
| 
								 | 
							
								        </tr>
							 | 
						||
| 
								 | 
							
								        <tr>
							 | 
						||
| 
								 | 
							
								          <td class="paramkey"></td>
							 | 
						||
| 
								 | 
							
								          <td></td>
							 | 
						||
| 
								 | 
							
								          <td class="paramtype">const QVariantMap & </td>
							 | 
						||
| 
								 | 
							
								          <td class="paramname"><em>viewProperties</em> </td>
							 | 
						||
| 
								 | 
							
								        </tr>
							 | 
						||
| 
								 | 
							
								        <tr>
							 | 
						||
| 
								 | 
							
								          <td></td>
							 | 
						||
| 
								 | 
							
								          <td>)</td>
							 | 
						||
| 
								 | 
							
								          <td></td><td> const</td>
							 | 
						||
| 
								 | 
							
								        </tr>
							 | 
						||
| 
								 | 
							
								      </table>
							 | 
						||
| 
								 | 
							
								  </td>
							 | 
						||
| 
								 | 
							
								  <td class="mlabels-right">
							 | 
						||
| 
								 | 
							
								<span class="mlabels"><span class="mlabel">pure virtual</span></span>  </td>
							 | 
						||
| 
								 | 
							
								  </tr>
							 | 
						||
| 
								 | 
							
								</table>
							 | 
						||
| 
								 | 
							
								</div><div class="memdoc">
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								<p>Is called to format a value to a localized, human readable text. </p>
							 | 
						||
| 
								 | 
							
								<dl class="params"><dt>Parameters</dt><dd>
							 | 
						||
| 
								 | 
							
								  <table class="params">
							 | 
						||
| 
								 | 
							
								    <tr><td class="paramname">formatString</td><td>Some kind of format string, depending on what your formatter wants here </td></tr>
							 | 
						||
| 
								 | 
							
								    <tr><td class="paramname">value</td><td>The actual value, packet as a variant </td></tr>
							 | 
						||
| 
								 | 
							
								    <tr><td class="paramname">viewProperties</td><td>Additional properies set on the delegate </td></tr>
							 | 
						||
| 
								 | 
							
								  </table>
							 | 
						||
| 
								 | 
							
								  </dd>
							 | 
						||
| 
								 | 
							
								</dl>
							 | 
						||
| 
								 | 
							
								<dl class="section return"><dt>Returns</dt><dd>A localized, human readable text, the formatted the value based on formatString</dd></dl>
							 | 
						||
| 
								 | 
							
								<p>formatString can be whatever you need it to be, but typically it is a localized text with a placeholder to be replaced with the given value. See <a class="el" href="class_qt_mvvm_1_1_input_view_factory.html#a72023fe9a6c9b5863c59c41d7cc080e6" title="Formats the value using the internally registered Formatter for the given type. ">InputViewFactory::format</a> for known formats.</p>
							 | 
						||
| 
								 | 
							
								<dl class="section see"><dt>See also</dt><dd><a class="el" href="class_qt_mvvm_1_1_input_view_factory.html#a72023fe9a6c9b5863c59c41d7cc080e6" title="Formats the value using the internally registered Formatter for the given type. ">InputViewFactory::format</a> </dd></dl>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								<p>Implemented in <a class="el" href="class_qt_mvvm_1_1_simple_formatter.html#a983f335597dd9e78a4c3cf9da85ab895">QtMvvm::SimpleFormatter< T ></a>.</p>
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								</div>
							 | 
						||
| 
								 | 
							
								</div>
							 | 
						||
| 
								 | 
							
								<hr/>The documentation for this class was generated from the following files:<ul>
							 | 
						||
| 
								 | 
							
								<li><a class="el" href="inputviewfactory_8h_source.html">inputviewfactory.h</a></li>
							 | 
						||
| 
								 | 
							
								<li>inputviewfactory.dox</li>
							 | 
						||
| 
								 | 
							
								</ul>
							 | 
						||
| 
								 | 
							
								</div><!-- contents -->
							 | 
						||
| 
								 | 
							
								<!-- start footer part -->
							 | 
						||
| 
								 | 
							
								<hr class="footer"/><address class="footer"><small>
							 | 
						||
| 
								 | 
							
								Generated on Wed Aug 8 2018 19:15:45 for QtMvvm by  <a href="http://www.doxygen.org/index.html">
							 | 
						||
| 
								 | 
							
								<img class="footer" src="doxygen.png" alt="doxygen"/>
							 | 
						||
| 
								 | 
							
								</a> 1.8.14
							 | 
						||
| 
								 | 
							
								</small></address>
							 | 
						||
| 
								 | 
							
								</body>
							 | 
						||
| 
								 | 
							
								</html>
							 |