Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > contrib > by-pkgid > 87682cd952d919324b3a8c179c71b7df > files > 88

libqwt0-devel-0.3.0-3mdk.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><meta name="robots" content="noindex">
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>QwtPixFrame Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body bgcolor="#ffffff">
<!-- Generated by Doxygen 1.2.3 on Thu Dec 14 00:27:17 2000 -->
<center>
<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; <a class="qindex" href="pages.html">Related Pages</a> &nbsp; </center>
<hr><h1>QwtPixFrame  Class Reference</h1>A frame containing a pixmap into which can be drawn. 
<a href="#_details">More...</a>
<p>
<code>#include &lt;qwt_pixframe.h&gt;</code>
<p>
Inherits QFrame.
<p>
Inherited by QwtPlotPixFrame.
<p>
Inheritance diagram for QwtPixFrame<p><center><img src="class_qwtpixframe_inherit_graph.gif" border="0" usemap="#QwtPixFrame_inherit_map" alt="Inheritance graph"></center>
<map name="QwtPixFrame_inherit_map">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="class_qwtpixframe-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0>
<tr><td colspan=2><br><h2>Public Methods</h2></td></tr>
<tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="class_qwtpixframe.html#a0">QwtPixFrame</a> (QWidget *parent, const char *name =0)</td></tr>
<tr><td nowrap align=right valign=top>&nbsp;</td><td valign=bottom><a class="el" href="class_qwtpixframe.html#a1">~QwtPixFrame</a> ()</td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="class_qwtpixframe.html#a2">setPixmap</a> (const QPixmap &amp;pix)</td></tr>
<tr><td nowrap align=right valign=top>const QPixmap*&nbsp;</td><td valign=bottom><a class="el" href="class_qwtpixframe.html#a3">pixmap</a> () const</td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="class_qwtpixframe.html#a4">fillPixmap</a> (const QColor &amp;c)</td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="class_qwtpixframe.html#a5">clearPixmap</a> ()</td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="class_qwtpixframe.html#a6">updatePixmap</a> ()</td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="class_qwtpixframe.html#a7">updatePixmapRect</a> (const QRect &amp;r)</td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="class_qwtpixframe.html#a8">setPixmapBackground</a> (const QColor &amp;c)</td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="class_qwtpixframe.html#a9">setVariableSize</a> (bool tf)</td></tr>
<tr><td nowrap align=right valign=top>const QColor&amp;&nbsp;</td><td valign=bottom><a class="el" href="class_qwtpixframe.html#a10">pixmapBackground</a> () const</td></tr>
<tr><td colspan=2><br><h2>Signals</h2></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="class_qwtpixframe.html#j0">pixmapResized</a> ()</td></tr>
<tr><td colspan=2><br><h2>Protected Methods</h2></td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="class_qwtpixframe.html#b0">adjustPixmap</a> ()</td></tr>
<tr><td nowrap align=right valign=top>void&nbsp;</td><td valign=bottom><a class="el" href="class_qwtpixframe.html#b1">adjustFrame</a> ()</td></tr>
<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="class_qwtpixframe.html#b2">paintEvent</a> (QPaintEvent *e)</td></tr>
<tr><td nowrap align=right valign=top><a name="b3" doxytag="QwtPixFrame::resizeEvent"></a>
virtual void&nbsp;</td><td valign=bottom><b>resizeEvent</b> (QResizeEvent *e)</td></tr>
<tr><td nowrap align=right valign=top>virtual void&nbsp;</td><td valign=bottom><a class="el" href="class_qwtpixframe.html#b4">frameChanged</a> ()</td></tr>
<tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr>
<tr><td nowrap align=right valign=top><a name="n0" doxytag="QwtPixFrame::d_pix"></a>
QPixmap&nbsp;</td><td valign=bottom><b>d_pix</b></td></tr>
<tr><td nowrap align=right valign=top><a name="n1" doxytag="QwtPixFrame::d_adjustPixmap"></a>
bool&nbsp;</td><td valign=bottom><b>d_adjustPixmap</b></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
A frame containing a pixmap into which can be drawn.
<p>

<p>
 QwtPixFrame is a frame which contains a pixmap. The size of the pixmap is dynamically adjusted in order to fit the frame's contents.<dl compact><dt>
<b>Example</b><dd>
 <div class="fragment"><pre>
#include "../include/qwt_pixframe.h&gt;

class ParentClass : ...
{
        ...
        QwtPixFrame *pixframe;
        ...
        void newPicture();
        ...
private slots:
        void repaintPixmap();
}

//
//     Connect pixmapResized() to a slot
//
ParentClass::ParentClass(...)
{
        ...
        connect(pixframe, SIGNAL(pixmapResized()), SLOT(repaintPixmap()));
}

//
// Repaint when the pixmap has been resized
//
ParentClass::repaintPixmap()
{
        QPainter p;
        p.begin(pixframe-&gt;pixmap());
  redraw_picture(&amp;p, pixframe-&gt;pixmap().rect());
        p.end();
        // Note: No updatePixmap() required here
}

//
// Renew the pixmap's contents independently
//
ParentClass::newPicture()
{
        // Change the pixmap's contents
        draw_new_picture(pixframe-&gt;pixmap());
         // Generate paint event
        pixframe-&gt;updatePixmap();
}
</div></pre> </dl>
<p>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a name="a0" doxytag="QwtPixFrame::QwtPixFrame"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
QwtPixFrame::QwtPixFrame (
          </b></td>
          <td valign="bottom"><b>
QWidget * <em>parent</em>, 
          </b></td>
        </tr>
        <tr>
          <td></td>
          <td><b>
const char * <em>name</em> = 0&nbsp;)
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
CTOR.
<p>
    </td>
  </tr>
</table>
<a name="a1" doxytag="QwtPixFrame::~QwtPixFrame"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
QwtPixFrame::~QwtPixFrame (
          </b></td>
          <td valign="bottom"><b>
)
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
DTOR.
<p>
    </td>
  </tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a name="b1" doxytag="QwtPixFrame::adjustFrame"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
void QwtPixFrame::adjustFrame (
          </b></td>
          <td valign="bottom"><b>
)<code> [protected]</code>
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Resize the frame according to the pixmap size.
<p>
    </td>
  </tr>
</table>
<a name="b0" doxytag="QwtPixFrame::adjustPixmap"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
void QwtPixFrame::adjustPixmap (
          </b></td>
          <td valign="bottom"><b>
)<code> [protected]</code>
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Resize the pixmap according to the frame size.
<p>
    </td>
  </tr>
</table>
<a name="a5" doxytag="QwtPixFrame::clearPixmap"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
void QwtPixFrame::clearPixmap (
          </b></td>
          <td valign="bottom"><b>
)
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Clear the contents of the pixmap and fill it with its background color.
<p>
    </td>
  </tr>
</table>
<a name="a4" doxytag="QwtPixFrame::fillPixmap"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
void QwtPixFrame::fillPixmap (
          </b></td>
          <td valign="bottom"><b>
const QColor &amp; <em>c</em>&nbsp;)
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Fill the pixmap with a specified color.
<p>
<dl compact><dt>
<b>Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>c</em>
&nbsp;</td><td>
 Fill color </td></tr>
</table>
</dl>    </td>
  </tr>
</table>
<a name="b4" doxytag="QwtPixFrame::frameChanged"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
void QwtPixFrame::frameChanged (
          </b></td>
          <td valign="bottom"><b>
)<code> [protected, virtual]</code>
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Notify a change of the frame.
<p>
    </td>
  </tr>
</table>
<a name="b2" doxytag="QwtPixFrame::paintEvent"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
void QwtPixFrame::paintEvent (
          </b></td>
          <td valign="bottom"><b>
QPaintEvent * <em>e</em>&nbsp;)<code> [protected, virtual]</code>
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Paint event.
<p>
    </td>
  </tr>
</table>
<a name="a3" doxytag="QwtPixFrame::pixmap"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
const QPixmap * QwtPixFrame::pixmap (
          </b></td>
          <td valign="bottom"><b>
) const
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
<dl compact><dt>
<b>Returns: </b><dd>
 a pointer to the enclosed pixmap </dl>    </td>
  </tr>
</table>
<a name="a10" doxytag="QwtPixFrame::pixmapBackground"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
const QColor &amp; QwtPixFrame::pixmapBackground (
          </b></td>
          <td valign="bottom"><b>
) const
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
<dl compact><dt>
<b>Returns: </b><dd>
 the pixmap's background color </dl><dl compact><dt>
<b>See also: </b><dd>
 <a class="el" href="class_qwtpixframe.html#a8">setPixmapBackground</a>(const QColor &amp;c) </dl>    </td>
  </tr>
</table>
<a name="j0" doxytag="QwtPixFrame::pixmapResized"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
void QwtPixFrame::pixmapResized (
          </b></td>
          <td valign="bottom"><b>
)<code> [signal]</code>
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
A signal which is emitted when the size of the pixmap has been changed.
<p>

<p>
 When resized, the pixmap is cleared and filled with its background color.     </td>
  </tr>
</table>
<a name="a2" doxytag="QwtPixFrame::setPixmap"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
void QwtPixFrame::setPixmap (
          </b></td>
          <td valign="bottom"><b>
const QPixmap &amp; <em>pix</em>&nbsp;)
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Assign a pixmap.
<p>

<p>
 If the variable size feature is enabled (disabled by default), the size of the frame will not change when a new pixmap has been assigned.     </td>
  </tr>
</table>
<a name="a8" doxytag="QwtPixFrame::setPixmapBackground"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
void QwtPixFrame::setPixmapBackground (
          </b></td>
          <td valign="bottom"><b>
const QColor &amp; <em>c</em>&nbsp;)
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Assign a background color the the pixmap.
<p>
<dl compact><dt>
<b>Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>c</em>
&nbsp;</td><td>
 New background color </td></tr>
</table>
</dl>    </td>
  </tr>
</table>
<a name="a9" doxytag="QwtPixFrame::setVariableSize"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
void QwtPixFrame::setVariableSize (
          </b></td>
          <td valign="bottom"><b>
bool <em>tf</em>&nbsp;)
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Set resizing policy.
<p>
<dl compact><dt>
<b>Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>tf</em>
&nbsp;</td><td>
 Adjust pixmap size (TRUE) or frame size (FALSE).
<p>
</td></tr>
</table>
</dl>If tf is TRUE, the pixmap will be adjusted when the frame is resized or when the frame style is changed. If set to FALSE, the size of the pixmap will remain constant and the frame size will be adjusted. The default value is TRUE.     </td>
  </tr>
</table>
<a name="a6" doxytag="QwtPixFrame::updatePixmap"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
void QwtPixFrame::updatePixmap (
          </b></td>
          <td valign="bottom"><b>
)
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Maps the pixmap to the screen.
<p>

<p>
 This function synchronizes the screen contents with the current contents of the pixmap. It generates a paint event which updates the widget.
<p>
<dl compact><dt>
<b>Warning: </b><dd>
 When the widget gets resized, a paint event is generated automatically after the <a class="el" href="class_qwtpixframe.html#j0">pixmapResized</a>() signal has been emitted. It is not necessary to call <a class="el" href="class_qwtpixframe.html#a6">updatePixmap</a>() within a slot which is connected to <a class="el" href="class_qwtpixframe.html#j0">pixmapResized</a>(). </dl>    </td>
  </tr>
</table>
<a name="a7" doxytag="QwtPixFrame::updatePixmapRect"></a><p>
<table width="100%" cellpadding="2" cellspacing="0" border="0">
  <tr>
    <td class="md">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td nowrap valign="top"><b> 
void QwtPixFrame::updatePixmapRect (
          </b></td>
          <td valign="bottom"><b>
const QRect &amp; <em>r</em>&nbsp;)
          </b></td>
        </tr>

      </table>
    </td>
  </tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Repaint a part of the pixmap.
<p>
<dl compact><dt>
<b>Parameters: </b><dd>
<table border=0 cellspacing=2 cellpadding=0>
<tr><td valign=top><em>r</em>
&nbsp;</td><td>
 part of the pixmap to be redrawn in pixmap coordinates </td></tr>
</table>
</dl>    </td>
  </tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li>qwt_pixframe.h<li>qwt_pixframe.cpp</ul>
<hr><address><small>Generated at Thu Dec 14 00:27:18 2000 for Qwt User's Guide by
<a href="http://www.stack.nl/~dimitri/doxygen/index.html">
<img src="doxygen.gif" alt="doxygen" align="middle" border=0 
width=110 height=53></a>1.2.3 written by <a href="mailto:dimitri@stack.nl">Dimitri van Heesch</a>,
 &copy;&nbsp;1997-2000</small></address>
</body>
</html>