⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 qwt__plot__printfilter_8cpp-source.html

📁 QWT5.01用于Qt开发的二维图形库程序
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<a name="l00455"></a>00455         <span class="keywordflow">if</span> ( scaleWidget )<a name="l00456"></a>00456         {<a name="l00457"></a>00457             QPalette palette = scaleWidget-&gt;palette();<a name="l00458"></a>00458             palette.<a class="code" href="class_qwt_text.html#c7de5839a5c3b1ee367cfbd5691aa105">setColor</a>(QPalette::Active, Palette::Foreground,<a name="l00459"></a>00459                              cache.scaleColor[axis]);<a name="l00460"></a>00460             scaleWidget-&gt;setPalette(palette);<a name="l00461"></a>00461 <a name="l00462"></a>00462             scaleWidget-&gt;setFont(cache.scaleFont[axis]);<a name="l00463"></a>00463             scaleWidget-&gt;setTitle(cache.scaleTitle[axis]);<a name="l00464"></a>00464 <a name="l00465"></a>00465             <span class="keywordtype">int</span> startDist, endDist;<a name="l00466"></a>00466             scaleWidget-&gt;getBorderDistHint(startDist, endDist);<a name="l00467"></a>00467             scaleWidget-&gt;setBorderDist(startDist, endDist);<a name="l00468"></a>00468         }<a name="l00469"></a>00469     }<a name="l00470"></a>00470 <a name="l00471"></a>00471     QPalette p = plot-&gt;palette();<a name="l00472"></a>00472     p.setColor(QPalette::Active, Palette::Background, cache.widgetBackground);<a name="l00473"></a>00473     plot-&gt;setPalette(p);<a name="l00474"></a>00474 <a name="l00475"></a>00475     plot-&gt;setCanvasBackground(cache.canvasBackground);<a name="l00476"></a>00476    <a name="l00477"></a>00477     <span class="keyword">const</span> QwtPlotItemList&amp; itmList = plot-&gt;itemList();<a name="l00478"></a>00478     <span class="keywordflow">for</span> ( QwtPlotItemIterator it = itmList.begin();<a name="l00479"></a>00479         it != itmList.end(); ++it )<a name="l00480"></a>00480     {<a name="l00481"></a>00481         reset(*it);<a name="l00482"></a>00482     }<a name="l00483"></a>00483 <a name="l00484"></a>00484     <span class="keyword">delete</span> d_data-&gt;cache;<a name="l00485"></a>00485     d_data-&gt;cache = 0;<a name="l00486"></a>00486 <a name="l00487"></a>00487     plot-&gt;setAutoReplot(doAutoReplot);<a name="l00488"></a>00488 }<a name="l00489"></a>00489 <a name="l00490"></a><a class="code" href="class_qwt_plot_print_filter.html#1039d36d4d1b536fc7d884d2fd22d397">00490</a> <span class="keywordtype">void</span> <a class="code" href="class_qwt_plot_print_filter.html#524cd56a979aa7ac4b28f0a27e103d8b">QwtPlotPrintFilter::reset</a>(<a class="code" href="class_qwt_plot_item.html">QwtPlotItem</a> *item)<span class="keyword"> const</span><a name="l00491"></a>00491 <span class="keyword"></span>{<a name="l00492"></a>00492     <span class="keywordflow">if</span> ( d_data-&gt;cache == 0 )<a name="l00493"></a>00493         <span class="keywordflow">return</span>;<a name="l00494"></a>00494 <a name="l00495"></a>00495     <span class="keyword">const</span> PrivateData::Cache &amp;cache = *d_data-&gt;cache;<a name="l00496"></a>00496 <a name="l00497"></a>00497     <span class="keywordflow">switch</span>(item-&gt;<a class="code" href="class_qwt_plot_item.html#f153b5a40a60ac626f1c58e69fc4ecad">rtti</a>())<a name="l00498"></a>00498     {<a name="l00499"></a>00499         <span class="keywordflow">case</span> QwtPlotItem::Rtti_PlotGrid:<a name="l00500"></a>00500         {<a name="l00501"></a>00501             <a class="code" href="class_qwt_plot_grid.html">QwtPlotGrid</a> *grid = (<a class="code" href="class_qwt_plot_grid.html">QwtPlotGrid</a> *)item;<a name="l00502"></a>00502 <a name="l00503"></a>00503             QPen pen = grid-&gt;majPen();<a name="l00504"></a>00504             pen.setColor(cache.gridColors[0]);<a name="l00505"></a>00505             grid-&gt;setMajPen(pen);<a name="l00506"></a>00506 <a name="l00507"></a>00507             pen = grid-&gt;minPen();<a name="l00508"></a>00508             pen.setColor(cache.gridColors[1]);<a name="l00509"></a>00509             grid-&gt;setMinPen(pen);<a name="l00510"></a>00510 <a name="l00511"></a>00511             <span class="keywordflow">break</span>;<a name="l00512"></a>00512         }<a name="l00513"></a>00513         <span class="keywordflow">case</span> QwtPlotItem::Rtti_PlotCurve:<a name="l00514"></a>00514         {<a name="l00515"></a>00515             <a class="code" href="class_qwt_plot_curve.html">QwtPlotCurve</a> *c = (<a class="code" href="class_qwt_plot_curve.html">QwtPlotCurve</a> *)item;<a name="l00516"></a>00516 <a name="l00517"></a>00517             <a class="code" href="class_qwt_symbol.html">QwtSymbol</a> symbol = c-&gt;<a class="code" href="class_qwt_plot_curve.html#4278ed4f767e394b6f92ce4e5d25231a">symbol</a>();<a name="l00518"></a>00518 <a name="l00519"></a>00519             <span class="keywordflow">if</span> ( cache.curveSymbolPenColors.contains(c) )<a name="l00520"></a>00520             {<a name="l00521"></a>00521                 symbol.<a class="code" href="class_qwt_symbol.html#2da17316935164c5f0682ce7e6c55827">setPen</a>(cache.curveSymbolPenColors[c]);<a name="l00522"></a>00522             }<a name="l00523"></a>00523 <a name="l00524"></a>00524             <span class="keywordflow">if</span> ( cache.curveSymbolBrushColors.contains(c) )<a name="l00525"></a>00525             {<a name="l00526"></a>00526                 QBrush brush = symbol.<a class="code" href="class_qwt_symbol.html#a23606467898677666953e3ea4478588">brush</a>();<a name="l00527"></a>00527                 brush.setColor(cache.curveSymbolBrushColors[c]);<a name="l00528"></a>00528                 symbol.<a class="code" href="class_qwt_symbol.html#e6aa7281d518bdd4adae8a37bbb5e09a">setBrush</a>(brush);<a name="l00529"></a>00529             }<a name="l00530"></a>00530             c-&gt;<a class="code" href="class_qwt_plot_curve.html#f7ce6652d2ba981c19bddd1b6973bf94">setSymbol</a>(symbol);<a name="l00531"></a>00531 <a name="l00532"></a>00532             <span class="keywordflow">if</span> ( cache.curveColors.contains(c) )<a name="l00533"></a>00533             {<a name="l00534"></a>00534                 QPen pen = c-&gt;<a class="code" href="class_qwt_plot_curve.html#778aafd1385ce833821751d0a8635cef">pen</a>();<a name="l00535"></a>00535                 pen.setColor(cache.curveColors[c]);<a name="l00536"></a>00536                 c-&gt;<a class="code" href="class_qwt_plot_curve.html#08328abaf2c3b67e479d1e485d2d0c4d">setPen</a>(pen);<a name="l00537"></a>00537             }<a name="l00538"></a>00538 <a name="l00539"></a>00539             <span class="keywordflow">break</span>;<a name="l00540"></a>00540         }<a name="l00541"></a>00541         <span class="keywordflow">case</span> QwtPlotItem::Rtti_PlotMarker:<a name="l00542"></a>00542         {<a name="l00543"></a>00543             <a class="code" href="class_qwt_plot_marker.html">QwtPlotMarker</a> *m = (<a class="code" href="class_qwt_plot_marker.html">QwtPlotMarker</a> *)item;<a name="l00544"></a>00544 <a name="l00545"></a>00545             <span class="keywordflow">if</span> ( cache.markerFonts.contains(m) )<a name="l00546"></a>00546             {<a name="l00547"></a>00547                 <a class="code" href="class_qwt_text.html">QwtText</a> label = m-&gt;label();<a name="l00548"></a>00548                 label.<a class="code" href="class_qwt_text.html#d071f3c4fae4512a1cc71554d95eb69a">setFont</a>(cache.markerFonts[m]);<a name="l00549"></a>00549                 m-&gt;setLabel(label);<a name="l00550"></a>00550             }<a name="l00551"></a>00551 <a name="l00552"></a>00552             <span class="keywordflow">if</span> ( cache.markerLabelColors.contains(m) )<a name="l00553"></a>00553             {<a name="l00554"></a>00554                 <a class="code" href="class_qwt_text.html">QwtText</a> label = m-&gt;label();<a name="l00555"></a>00555                 label.<a class="code" href="class_qwt_text.html#c7de5839a5c3b1ee367cfbd5691aa105">setColor</a>(cache.markerLabelColors[m]);<a name="l00556"></a>00556                 m-&gt;setLabel(label);<a name="l00557"></a>00557             }<a name="l00558"></a>00558 <a name="l00559"></a>00559             <span class="keywordflow">if</span> ( cache.markerLineColors.contains(m) )<a name="l00560"></a>00560             {<a name="l00561"></a>00561                 QPen pen = m-&gt;linePen();<a name="l00562"></a>00562                 pen.setColor(cache.markerLineColors[m]);<a name="l00563"></a>00563                 m-&gt;setLinePen(pen);<a name="l00564"></a>00564             }<a name="l00565"></a>00565             <a name="l00566"></a>00566             <a class="code" href="class_qwt_symbol.html">QwtSymbol</a> symbol = m-&gt;symbol();<a name="l00567"></a>00567 <a name="l00568"></a>00568             <span class="keywordflow">if</span> ( cache.markerSymbolPenColors.contains(m) )<a name="l00569"></a>00569             {<a name="l00570"></a>00570                 QPen pen = symbol.<a class="code" href="class_qwt_symbol.html#c4eb82409994757742577a80e9915e79">pen</a>();<a name="l00571"></a>00571                 pen.setColor(cache.markerSymbolPenColors[m]);<a name="l00572"></a>00572                 symbol.<a class="code" href="class_qwt_symbol.html#2da17316935164c5f0682ce7e6c55827">setPen</a>(pen);<a name="l00573"></a>00573             }<a name="l00574"></a>00574 <a name="l00575"></a>00575             <span class="keywordflow">if</span> ( cache.markerSymbolBrushColors.contains(m) )<a name="l00576"></a>00576             {<a name="l00577"></a>00577                 QBrush brush = symbol.<a class="code" href="class_qwt_symbol.html#a23606467898677666953e3ea4478588">brush</a>();<a name="l00578"></a>00578                 brush.setColor(cache.markerSymbolBrushColors[m]);<a name="l00579"></a>00579                 symbol.<a class="code" href="class_qwt_symbol.html#e6aa7281d518bdd4adae8a37bbb5e09a">setBrush</a>(brush);<a name="l00580"></a>00580             }<a name="l00581"></a>00581 <a name="l00582"></a>00582             m-&gt;setSymbol(symbol);<a name="l00583"></a>00583 <a name="l00584"></a>00584             <span class="keywordflow">break</span>;<a name="l00585"></a>00585         }<a name="l00586"></a>00586         <span class="keywordflow">default</span>:<a name="l00587"></a>00587             <span class="keywordflow">break</span>;<a name="l00588"></a>00588     }<a name="l00589"></a>00589 }</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Feb 26 21:22:38 2007 for Qwt User's Guide by&nbsp;<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -