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

📄 windowdecorationinterface.html

📁 qtopiaphone英文帮助,用于初学者和开发人员,初学者可以用来学习,开发人员可以用来资料查询.
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><!-- /home/edba/dist/qtopia/main-Sunday/qtopia/doc/windowdecorationinterface.doc:1 --><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>WindowDecorationInterface Class</title><style type="text/css"><!--h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }a:link { color: #004faf; text-decoration: none }a:visited { color: #672967; text-decoration: none }body { background: #ffffff; color: black; }--></style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td width="200" align="left" valign="top"><a href="index.html"><img height="27" width="472" src="dochead.png" border="0"></a><br><font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" align="center" size=32>Qtopia</font>   <a href="index.html">Home</a> - <a href="qtopiaclasses.html">Classes</a> - <a href="qtopiaannotated.html">Annotated</a> - <a href="qtopiafunctions.html">Functions</a> - <a href="qtindex.html">Qt Embedded</a></td><td align="right" valign="top">  <table border="0" cellpadding="0" cellspacing="0" width="137">  <tr>  <td><a href="http://www.trolltech.com/company/about/trolls.html"><img height="100" width="100" src="face.png" border="0"></a></td>  <td><img height="100" width="100" src="qtlogo.png" align="top" border="0"></td>  </tr>  </table></td></tr></table><h1 align=center>WindowDecorationInterface Class Reference</h1><p>The WindowDecorationInterface class provides an interface for Qtopiawindow decoration styles.<a href="#details">More...</a><p><tt>#include &lt;<a href="windowdecorationinterface-h.html">windowdecorationinterface.h</a>&gt;</tt><p><a href="windowdecorationinterface-members.html">List of all member functions.</a><h2>Public Members</h2><ul><li><div class=fn>virtual <a href="#~WindowDecorationInterface"><b>~WindowDecorationInterface</b></a> ()</div></li><li><div class=fn>class <b>WindowData</b> { }</div></li><li><div class=fn>enum <a href="#Metric-enum"><b>Metric</b></a> { TitleHeight, LeftBorder, RightBorder, TopBorder, BottomBorder, OKWidth, CloseWidth, HelpWidth, MaximizeWidth, CornerGrabSize }</div></li><li><div class=fn>virtual int <a href="#metric"><b>metric</b></a> ( Metric&nbsp;m, const&nbsp;WindowData&nbsp;*&nbsp;wd ) const</div></li><li><div class=fn>enum <a href="#Area-enum"><b>Area</b></a> { Border, Title, TitleText }</div></li><li><div class=fn>virtual void <a href="#drawArea"><b>drawArea</b></a> ( Area&nbsp;area, QPainter&nbsp;*&nbsp;p, const&nbsp;WindowData&nbsp;*&nbsp;wd ) const</div></li><li><div class=fn>enum <a href="#Button-enum"><b>Button</b></a> { OK, Close, Help, Maximize }</div></li><li><div class=fn>virtual void <a href="#drawButton"><b>drawButton</b></a> ( Button&nbsp;b, QPainter&nbsp;*&nbsp;p, const&nbsp;WindowData&nbsp;*&nbsp;wd, int&nbsp;x, int&nbsp;y, int&nbsp;w, int&nbsp;h, QWSButton::State&nbsp;state ) const</div></li><li><div class=fn>virtual QRegion <a href="#mask"><b>mask</b></a> ( const&nbsp;WindowData&nbsp;*&nbsp;wd ) const</div></li><li><div class=fn>virtual QString <a href="#name"><b>name</b></a> () const = 0</div></li><li><div class=fn>virtual QPixmap <a href="#icon"><b>icon</b></a> () const = 0</div></li></ul><hr><a name="details"></a><h2>Detailed Description</h2> The WindowDecorationInterface class provides an interface for Qtopiawindow decoration styles.<p> Window decoration styles may be added to Qtopia via plugins. In order towrite a style plugin you must create an interface to your QStyle derivedclass by deriving from the WindowDecorationInterface class and implementingthe pure virtual functions.<p> The window being decorated is defined by theWindowDecorationInterface::WindowData struct:<pre>struct WindowData {    QRect rect;    QPalette palette;    QString caption;    enum Flags { Maximized=0x01, Dialog=0x02, Active=0x04 };    Q_UINT32 flags;    Q_UINT32 reserved;};</pre> <hr><h2>Member Type Documentation</h2><h3 class=fn><a name="Area-enum"></a>WindowDecorationInterface::Area</h3> <ul><li><tt>WindowDecorationInterface::Border</tt> - defines the entire decoration area, excluding the title bar.<li><tt>WindowDecorationInterface::Title</tt> - defines the area at the top of the window that contains thebuttons and captions.  It must extend the full width of the window.<li><tt>WindowDecorationInterface::TitleText</tt> - defines the window caption.</ul><h3 class=fn><a name="Button-enum"></a>WindowDecorationInterface::Button</h3> <ul><li><tt>WindowDecorationInterface::OK</tt> - the OK button.<li><tt>WindowDecorationInterface::Close</tt> - the close button.<li><tt>WindowDecorationInterface::Help</tt> - the help button.<li><tt>WindowDecorationInterface::Maximize</tt> - the maximize/restore button.</ul><h3 class=fn><a name="Metric-enum"></a>WindowDecorationInterface::Metric</h3> <ul><li><tt>WindowDecorationInterface::TitleHeight</tt> - the height of the title.<li><tt>WindowDecorationInterface::LeftBorder</tt> - the width of the border on the left of the window.<li><tt>WindowDecorationInterface::RightBorder</tt> - the width of the border on the right of the window.<li><tt>WindowDecorationInterface::TopBorder</tt> - the width of the border on the top of the window, abovethe title bar.<li><tt>WindowDecorationInterface::BottomBorder</tt> - the width of the border on the bottom of the window.<li><tt>WindowDecorationInterface::OKWidth</tt> - the width of the OK button.<li><tt>WindowDecorationInterface::CloseWidth</tt> - the width of the Close (X) button.<li><tt>WindowDecorationInterface::HelpWidth</tt> - the width of the Help (?) button.<li><tt>WindowDecorationInterface::MaximizeWidth</tt> - the width of the maximize/restore button.<li><tt>WindowDecorationInterface::CornerGrabSize</tt> - the size of the area allowing diagonal resize ateach corner of the window.</ul><hr><h2>Member Function Documentation</h2><h3 class=fn><a name="~WindowDecorationInterface"></a>WindowDecorationInterface::~WindowDecorationInterface ()<tt> [virtual]</tt></h3> <p> Deconstructor.<h3 class=fn>void <a name="drawArea"></a>WindowDecorationInterface::drawArea ( <a href="windowdecorationinterface.html#Area-enum">Area</a>&nbsp;area, QPainter&nbsp;*&nbsp;p, const&nbsp;WindowData&nbsp;*&nbsp;wd ) const<tt> [virtual]</tt></h3> <p> Draw the specified <em>area</em> using QPainter <em>p</em> for window <em>wd</em>.<h3 class=fn>void <a name="drawButton"></a>WindowDecorationInterface::drawButton ( <a href="windowdecorationinterface.html#Button-enum">Button</a>&nbsp;b, QPainter&nbsp;*&nbsp;p, const&nbsp;WindowData&nbsp;*&nbsp;wd, int&nbsp;x, int&nbsp;y, int&nbsp;w, int&nbsp;h, QWSButton::State&nbsp;state ) const<tt> [virtual]</tt></h3> <p> Draw button <em>b</em> with QPainter <em>p</em> for window <em>wd</em> within the boundssupplied by <em>x</em>, <em>y</em>, <em>w</em>, <em>h</em> in the state specified by <em>state</em>.<h3 class=fn>QPixmap <a name="icon"></a>WindowDecorationInterface::icon () const<tt> [pure virtual]</tt></h3> <p> The <a href="#icon">icon</a>() function returns the icon of the decoration. This maybe displayed in the appearance settings dialog.<h3 class=fn>QRegion <a name="mask"></a>WindowDecorationInterface::mask ( const&nbsp;WindowData&nbsp;*&nbsp;wd ) const<tt> [virtual]</tt></h3> <p> Returns the mask of the decoration including all borders and the titlefor window <em>wd</em> as a QRegion.  The window decorations do not necessarilyneed to be rectangular, however the title bar \em must be rectangular andmust be the width of the window.  This ensures the title is drawn correctlyfor maximized windows.<h3 class=fn>int <a name="metric"></a>WindowDecorationInterface::metric ( <a href="windowdecorationinterface.html#Metric-enum">Metric</a>&nbsp;m, const&nbsp;WindowData&nbsp;*&nbsp;wd ) const<tt> [virtual]</tt></h3> <p> returns the metric <em>m</em> for the window <em>wd</em>.<h3 class=fn>QString <a name="name"></a>WindowDecorationInterface::name () const<tt> [pure virtual]</tt></h3> <p> The <a href="#name">name</a>() function returns the name of the decoration. This willbe displayed in the appearance settings dialog.<!-- eof --><hr><p>This file is part of the <a href="../index.html">Qtopia</a> platform,copyright &copy; 1995-2004<a href="http://www.trolltech.com/">Trolltech</a>, all rights reserved.<p><address><hr><div align="center"><table width="100%" cellspacing="0" border="0"><tr><td>Copyright &copy; 2001-2004 Trolltech<td><a href="http://www.trolltech.com/trademarks.html">Trademarks</a><td align="right"><div align="right">Qtopia version 2.0.0</div></table></div></address></body></html>

⌨️ 快捷键说明

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