175 lines
17 KiB
HTML
175 lines
17 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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.9.1"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>Qwt User's Guide: qwt_plot_svgitem.cpp Source File</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="navtree.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="resize.js"></script>
|
|
<script type="text/javascript" src="navtreedata.js"></script>
|
|
<script type="text/javascript" src="navtree.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">
|
|
<tbody>
|
|
<tr style="height: 56px;">
|
|
<td id="projectalign" style="padding-left: 0.5em;">
|
|
<div id="projectname">Qwt User's Guide
|
|
 <span id="projectnumber">6.2.0</span>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.9.1 -->
|
|
<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','.html');
|
|
/* @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>
|
|
</div><!-- top -->
|
|
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
|
<div id="nav-tree">
|
|
<div id="nav-tree-contents">
|
|
<div id="nav-sync" class="sync"></div>
|
|
</div>
|
|
</div>
|
|
<div id="splitbar" style="-moz-user-select:none;"
|
|
class="ui-resizable-handle">
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GPL-v2 */
|
|
$(document).ready(function(){initNavTree('qwt__plot__svgitem_8cpp_source.html',''); initResizable(); });
|
|
/* @license-end */
|
|
</script>
|
|
<div id="doc-content">
|
|
<!-- 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 class="header">
|
|
<div class="headertitle">
|
|
<div class="title">qwt_plot_svgitem.cpp</div> </div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/******************************************************************************</span></div>
|
|
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * Qwt Widget Library</span></div>
|
|
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> * Copyright (C) 1997 Josef Wilgen</span></div>
|
|
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * Copyright (C) 2002 Uwe Rathmann</span></div>
|
|
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> *</span></div>
|
|
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * This library is free software; you can redistribute it and/or</span></div>
|
|
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * modify it under the terms of the Qwt License, Version 1.0</span></div>
|
|
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> *****************************************************************************/</span></div>
|
|
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>  </div>
|
|
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="preprocessor">#include "qwt_plot_svgitem.h"</span></div>
|
|
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="preprocessor">#include "qwt_text.h"</span></div>
|
|
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="preprocessor">#include "qwt_graphic.h"</span></div>
|
|
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>  </div>
|
|
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="preprocessor">#include <qsvgrenderer.h></span></div>
|
|
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>  </div>
|
|
<div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="class_qwt_plot_svg_item.html#ae14006d4e9fbbef55632bdc4810f2e51"> 20</a></span> <a class="code" href="class_qwt_plot_svg_item.html#ae14006d4e9fbbef55632bdc4810f2e51">QwtPlotSvgItem::QwtPlotSvgItem</a>( <span class="keyword">const</span> QString& title )</div>
|
|
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>  : <a class="code" href="class_qwt_plot_graphic_item.html">QwtPlotGraphicItem</a>( <a class="code" href="class_qwt_text.html">QwtText</a>( title ) )</div>
|
|
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span> {</div>
|
|
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span> }</div>
|
|
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>  </div>
|
|
<div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="class_qwt_plot_svg_item.html#ac750a4ff902302ab485971fcea6bee38"> 29</a></span> <a class="code" href="class_qwt_plot_svg_item.html#ae14006d4e9fbbef55632bdc4810f2e51">QwtPlotSvgItem::QwtPlotSvgItem</a>( <span class="keyword">const</span> <a class="code" href="class_qwt_text.html">QwtText</a>& title )</div>
|
|
<div class="line"><a name="l00030"></a><span class="lineno"> 30</span>  : <a class="code" href="class_qwt_plot_graphic_item.html">QwtPlotGraphicItem</a>( title )</div>
|
|
<div class="line"><a name="l00031"></a><span class="lineno"> 31</span> {</div>
|
|
<div class="line"><a name="l00032"></a><span class="lineno"> 32</span> }</div>
|
|
<div class="line"><a name="l00033"></a><span class="lineno"> 33</span>  </div>
|
|
<div class="line"><a name="l00035"></a><span class="lineno"><a class="line" href="class_qwt_plot_svg_item.html#a4509baf861772124c71abd1b6514b319"> 35</a></span> <a class="code" href="class_qwt_plot_svg_item.html#a4509baf861772124c71abd1b6514b319">QwtPlotSvgItem::~QwtPlotSvgItem</a>()</div>
|
|
<div class="line"><a name="l00036"></a><span class="lineno"> 36</span> {</div>
|
|
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span> }</div>
|
|
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>  </div>
|
|
<div class="line"><a name="l00047"></a><span class="lineno"><a class="line" href="class_qwt_plot_svg_item.html#aca9592f3d3dca512b7970851b159cf57"> 47</a></span> <span class="keywordtype">bool</span> <a class="code" href="class_qwt_plot_svg_item.html#aca9592f3d3dca512b7970851b159cf57">QwtPlotSvgItem::loadFile</a>( <span class="keyword">const</span> QRectF& rect,</div>
|
|
<div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  <span class="keyword">const</span> QString& fileName )</div>
|
|
<div class="line"><a name="l00049"></a><span class="lineno"> 49</span> {</div>
|
|
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>  <a class="code" href="class_qwt_graphic.html">QwtGraphic</a> <a class="code" href="class_qwt_plot_graphic_item.html#a5251f52a93e1fca5d3b59b086bc4b89e">graphic</a>;</div>
|
|
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  </div>
|
|
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>  QSvgRenderer renderer;</div>
|
|
<div class="line"><a name="l00053"></a><span class="lineno"> 53</span>  </div>
|
|
<div class="line"><a name="l00054"></a><span class="lineno"> 54</span>  <span class="keyword">const</span> <span class="keywordtype">bool</span> ok = renderer.load( fileName );</div>
|
|
<div class="line"><a name="l00055"></a><span class="lineno"> 55</span>  <span class="keywordflow">if</span> ( ok )</div>
|
|
<div class="line"><a name="l00056"></a><span class="lineno"> 56</span>  {</div>
|
|
<div class="line"><a name="l00057"></a><span class="lineno"> 57</span>  QPainter p( &<a class="code" href="class_qwt_plot_graphic_item.html#a5251f52a93e1fca5d3b59b086bc4b89e">graphic</a> );</div>
|
|
<div class="line"><a name="l00058"></a><span class="lineno"> 58</span>  renderer.render( &p );</div>
|
|
<div class="line"><a name="l00059"></a><span class="lineno"> 59</span>  }</div>
|
|
<div class="line"><a name="l00060"></a><span class="lineno"> 60</span>  </div>
|
|
<div class="line"><a name="l00061"></a><span class="lineno"> 61</span>  <a class="code" href="class_qwt_plot_graphic_item.html#a21e216be940deb8b3f40d5427292dde6">setGraphic</a>( rect, <a class="code" href="class_qwt_plot_graphic_item.html#a5251f52a93e1fca5d3b59b086bc4b89e">graphic</a> );</div>
|
|
<div class="line"><a name="l00062"></a><span class="lineno"> 62</span>  </div>
|
|
<div class="line"><a name="l00063"></a><span class="lineno"> 63</span>  <span class="keywordflow">return</span> ok;</div>
|
|
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span> }</div>
|
|
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>  </div>
|
|
<div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="class_qwt_plot_svg_item.html#a9e611f0c845289ddfb9758fa4479e719"> 74</a></span> <span class="keywordtype">bool</span> <a class="code" href="class_qwt_plot_svg_item.html#a9e611f0c845289ddfb9758fa4479e719">QwtPlotSvgItem::loadData</a>( <span class="keyword">const</span> QRectF& rect,</div>
|
|
<div class="line"><a name="l00075"></a><span class="lineno"> 75</span>  <span class="keyword">const</span> QByteArray& data )</div>
|
|
<div class="line"><a name="l00076"></a><span class="lineno"> 76</span> {</div>
|
|
<div class="line"><a name="l00077"></a><span class="lineno"> 77</span>  <a class="code" href="class_qwt_graphic.html">QwtGraphic</a> <a class="code" href="class_qwt_plot_graphic_item.html#a5251f52a93e1fca5d3b59b086bc4b89e">graphic</a>;</div>
|
|
<div class="line"><a name="l00078"></a><span class="lineno"> 78</span>  </div>
|
|
<div class="line"><a name="l00079"></a><span class="lineno"> 79</span>  QSvgRenderer renderer;</div>
|
|
<div class="line"><a name="l00080"></a><span class="lineno"> 80</span>  </div>
|
|
<div class="line"><a name="l00081"></a><span class="lineno"> 81</span>  <span class="keyword">const</span> <span class="keywordtype">bool</span> ok = renderer.load( data );</div>
|
|
<div class="line"><a name="l00082"></a><span class="lineno"> 82</span>  <span class="keywordflow">if</span> ( ok )</div>
|
|
<div class="line"><a name="l00083"></a><span class="lineno"> 83</span>  {</div>
|
|
<div class="line"><a name="l00084"></a><span class="lineno"> 84</span>  QPainter p( &<a class="code" href="class_qwt_plot_graphic_item.html#a5251f52a93e1fca5d3b59b086bc4b89e">graphic</a> );</div>
|
|
<div class="line"><a name="l00085"></a><span class="lineno"> 85</span>  renderer.render( &p );</div>
|
|
<div class="line"><a name="l00086"></a><span class="lineno"> 86</span>  }</div>
|
|
<div class="line"><a name="l00087"></a><span class="lineno"> 87</span>  </div>
|
|
<div class="line"><a name="l00088"></a><span class="lineno"> 88</span>  <a class="code" href="class_qwt_plot_graphic_item.html#a21e216be940deb8b3f40d5427292dde6">setGraphic</a>( rect, <a class="code" href="class_qwt_plot_graphic_item.html#a5251f52a93e1fca5d3b59b086bc4b89e">graphic</a> );</div>
|
|
<div class="line"><a name="l00089"></a><span class="lineno"> 89</span>  </div>
|
|
<div class="line"><a name="l00090"></a><span class="lineno"> 90</span>  <span class="keywordflow">return</span> ok;</div>
|
|
<div class="line"><a name="l00091"></a><span class="lineno"> 91</span> }</div>
|
|
<div class="ttc" id="aclass_qwt_graphic_html"><div class="ttname"><a href="class_qwt_graphic.html">QwtGraphic</a></div><div class="ttdoc">A paint device for scalable graphics.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__graphic_8h_source.html#l00075">qwt_graphic.h:76</a></div></div>
|
|
<div class="ttc" id="aclass_qwt_plot_graphic_item_html"><div class="ttname"><a href="class_qwt_plot_graphic_item.html">QwtPlotGraphicItem</a></div><div class="ttdoc">A plot item, which displays a recorded sequence of QPainter commands.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot__graphicitem_8h_source.html#l00029">qwt_plot_graphicitem.h:30</a></div></div>
|
|
<div class="ttc" id="aclass_qwt_plot_graphic_item_html_a21e216be940deb8b3f40d5427292dde6"><div class="ttname"><a href="class_qwt_plot_graphic_item.html#a21e216be940deb8b3f40d5427292dde6">QwtPlotGraphicItem::setGraphic</a></div><div class="ttdeci">void setGraphic(const QRectF &rect, const QwtGraphic &)</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot__graphicitem_8cpp_source.html#l00082">qwt_plot_graphicitem.cpp:82</a></div></div>
|
|
<div class="ttc" id="aclass_qwt_plot_graphic_item_html_a5251f52a93e1fca5d3b59b086bc4b89e"><div class="ttname"><a href="class_qwt_plot_graphic_item.html#a5251f52a93e1fca5d3b59b086bc4b89e">QwtPlotGraphicItem::graphic</a></div><div class="ttdeci">QwtGraphic graphic() const</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot__graphicitem_8cpp_source.html#l00096">qwt_plot_graphicitem.cpp:96</a></div></div>
|
|
<div class="ttc" id="aclass_qwt_plot_svg_item_html_a4509baf861772124c71abd1b6514b319"><div class="ttname"><a href="class_qwt_plot_svg_item.html#a4509baf861772124c71abd1b6514b319">QwtPlotSvgItem::~QwtPlotSvgItem</a></div><div class="ttdeci">virtual ~QwtPlotSvgItem()</div><div class="ttdoc">Destructor.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot__svgitem_8cpp_source.html#l00035">qwt_plot_svgitem.cpp:35</a></div></div>
|
|
<div class="ttc" id="aclass_qwt_plot_svg_item_html_a9e611f0c845289ddfb9758fa4479e719"><div class="ttname"><a href="class_qwt_plot_svg_item.html#a9e611f0c845289ddfb9758fa4479e719">QwtPlotSvgItem::loadData</a></div><div class="ttdeci">bool loadData(const QRectF &, const QByteArray &)</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot__svgitem_8cpp_source.html#l00074">qwt_plot_svgitem.cpp:74</a></div></div>
|
|
<div class="ttc" id="aclass_qwt_plot_svg_item_html_aca9592f3d3dca512b7970851b159cf57"><div class="ttname"><a href="class_qwt_plot_svg_item.html#aca9592f3d3dca512b7970851b159cf57">QwtPlotSvgItem::loadFile</a></div><div class="ttdeci">bool loadFile(const QRectF &, const QString &fileName)</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot__svgitem_8cpp_source.html#l00047">qwt_plot_svgitem.cpp:47</a></div></div>
|
|
<div class="ttc" id="aclass_qwt_plot_svg_item_html_ae14006d4e9fbbef55632bdc4810f2e51"><div class="ttname"><a href="class_qwt_plot_svg_item.html#ae14006d4e9fbbef55632bdc4810f2e51">QwtPlotSvgItem::QwtPlotSvgItem</a></div><div class="ttdeci">QwtPlotSvgItem(const QString &title=QString())</div><div class="ttdoc">Constructor.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__plot__svgitem_8cpp_source.html#l00020">qwt_plot_svgitem.cpp:20</a></div></div>
|
|
<div class="ttc" id="aclass_qwt_text_html"><div class="ttname"><a href="class_qwt_text.html">QwtText</a></div><div class="ttdoc">A class representing a text.</div><div class="ttdef"><b>Definition:</b> <a href="qwt__text_8h_source.html#l00051">qwt_text.h:52</a></div></div>
|
|
</div><!-- fragment --></div><!-- contents -->
|
|
</div><!-- doc-content -->
|
|
<!-- start footer part -->
|
|
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
|
<ul>
|
|
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><b>qwt_plot_svgitem.cpp</b></li>
|
|
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html>
|