📄 serverinterface.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><!-- /home/edba/dist/qtopia/main-Sunday/qtopia/src/server/serverinterface.cpp:171 --><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>ServerInterface 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>ServerInterface Class Reference</h1><p>The ServerInterface class provides an interface for Qtopiacustom launchers.<a href="#details">More...</a><p><tt>#include <<a href="serverinterface-h.html">serverinterface.h</a>></tt><p><a href="serverinterface-members.html">List of all member functions.</a><h2>Public Members</h2><ul><li><div class=fn>virtual <b>~ServerInterface</b> ()</div></li><li><div class=fn>virtual void <a href="#createGUI"><b>createGUI</b></a> () = 0</div></li><li><div class=fn>virtual void <a href="#showGUI"><b>showGUI</b></a> () = 0</div></li><li><div class=fn>virtual void <a href="#destroyGUI"><b>destroyGUI</b></a> () = 0</div></li><li><div class=fn>virtual void <a href="#typeAdded"><b>typeAdded</b></a> ( const QString & type, const QString & name, const QPixmap & pixmap, const QPixmap & bgPixmap ) = 0</div></li><li><div class=fn>virtual void <a href="#typeRemoved"><b>typeRemoved</b></a> ( const QString & type ) = 0</div></li><li><div class=fn>virtual void <a href="#applicationAdded"><b>applicationAdded</b></a> ( const QString & type, const AppLnk & app ) = 0</div></li><li><div class=fn>virtual void <a href="#applicationRemoved"><b>applicationRemoved</b></a> ( const QString & type, const AppLnk & app ) = 0</div></li><li><div class=fn>virtual void <a href="#allApplicationsRemoved"><b>allApplicationsRemoved</b></a> () = 0</div></li><li><div class=fn>enum <a href="#ApplicationState-enum"><b>ApplicationState</b></a> { Launching, Running, Terminated, Raised }</div></li><li><div class=fn>virtual void <a href="#applicationStateChanged"><b>applicationStateChanged</b></a> ( const QString & name, ApplicationState state ) = 0</div></li><li><div class=fn>virtual void <a href="#documentAdded"><b>documentAdded</b></a> ( const DocLnk & doc ) = 0</div></li><li><div class=fn>virtual void <a href="#documentRemoved"><b>documentRemoved</b></a> ( const DocLnk & doc ) = 0</div></li><li><div class=fn>virtual void <a href="#allDocumentsRemoved"><b>allDocumentsRemoved</b></a> () = 0</div></li><li><div class=fn>virtual void <a href="#documentChanged"><b>documentChanged</b></a> ( const DocLnk & oldDoc, const DocLnk & newDoc ) = 0</div></li><li><div class=fn>virtual void <a href="#storageChanged"><b>storageChanged</b></a> ( const QList<FileSystem> & ) = 0</div></li><li><div class=fn>virtual void <a href="#applicationScanningProgress"><b>applicationScanningProgress</b></a> ( int percent ) = 0</div></li><li><div class=fn>virtual void <a href="#documentScanningProgress"><b>documentScanningProgress</b></a> ( int percent ) = 0</div></li><li><div class=fn>virtual bool <a href="#requiresApplications"><b>requiresApplications</b></a> () const = 0</div></li><li><div class=fn>virtual bool <a href="#requiresDocuments"><b>requiresDocuments</b></a> () const = 0</div></li><li><div class=fn>enum <a href="#DockArea-enum"><b>DockArea</b></a> { Top, Bottom, Left, Right }</div></li></ul><h2>Static Public Members</h2><ul><li><div class=fn>const AppLnkSet & <a href="#appLnks"><b>appLnks</b></a> ()</div></li><li><div class=fn>void <a href="#dockWidget"><b>dockWidget</b></a> ( QWidget * w, DockArea placement )</div></li><li><div class=fn>void <b>dockWidget</b> ( QWidget * w, DockArea placement, const QSize & s )</div></li></ul><hr><a name="details"></a><h2>Detailed Description</h2> The ServerInterface class provides an interface for Qtopiacustom launchers.<p> The ServerInterface allows the user interface of the launcher to becustomized to suit the device. For a PDA style device, the defaultlauncher is strongly recommended, however specialist devices maychoose to provide a launcher better suited to the application.<p> The launcher is fixed for any particular device and is not loadedas a plugin. Launcher interfaces mustbe compilied into the server by editing server.pro and server.cpp.<hr><h2>Member Type Documentation</h2><h3 class=fn><a name="ApplicationState-enum"></a>ServerInterface::ApplicationState</h3><p> The ApplicationState enum type specifies the state of an application.The possible values are: <ul><li> <a href="#ApplicationState-enum">Launching</a> - the application has been requested, but is not yet running.<li> <a href="#ApplicationState-enum">Running</a> - the application is running.<li> <a href="#ApplicationState-enum">Terminated</a> - the application has been terminated.</ul><h3 class=fn><a name="DockArea-enum"></a>ServerInterface::DockArea</h3><p> The DockArea enum type defines the areas where widgets can be docked:<ul><li> <a href="#DockArea-enum">Top</a> - the top of the screen.<li> <a href="#DockArea-enum">Bottom</a> - the Bottom of the screen.<li> <a href="#DockArea-enum">Left</a> - the Left of the screen.<li> <a href="#DockArea-enum">Right</a> - the Right of the screen.</ul><hr><h2>Member Function Documentation</h2><h3 class=fn>void <a name="allApplicationsRemoved"></a>ServerInterface::allApplicationsRemoved ()<tt> [pure virtual]</tt></h3><p> Remove all applications from the launcher.<h3 class=fn>void <a name="allDocumentsRemoved"></a>ServerInterface::allDocumentsRemoved ()<tt> [pure virtual]</tt></h3><p> Remove all documents from the launcher.<h3 class=fn>const <a href="applnkset.html">AppLnkSet</a> & <a name="appLnks"></a>ServerInterface::appLnks ()<tt> [static]</tt></h3><p> Returns the current set of available applications.<h3 class=fn>void <a name="applicationAdded"></a>ServerInterface::applicationAdded ( const QString & type, const <a href="applnk.html">AppLnk</a> & app )<tt> [pure virtual]</tt></h3><p> Add an application <em>app</em> of type <em>type</em> to the launcher.<p> <p>See also <a href="#applicationRemoved">applicationRemoved</a>().<h3 class=fn>void <a name="applicationRemoved"></a>ServerInterface::applicationRemoved ( const QString & type, const <a href="applnk.html">AppLnk</a> & app )<tt> [pure virtual]</tt></h3><p> Remove an application <em>app</em> of type <em>type</em> from the launcher.<p> <p>See also <a href="#applicationAdded">applicationAdded</a>().<h3 class=fn>void <a name="applicationScanningProgress"></a>ServerInterface::applicationScanningProgress ( int percent )<tt> [pure virtual]</tt></h3><p> The system is scanning for installed applications. <em>percent</em>provides the percentage of the filesystems scanned. This function willalways be called with <em>percent</em> equal to zero when scanning starts,and with <em>percent</em> equal to 100 when scanning is complete.<h3 class=fn>void <a name="applicationStateChanged"></a>ServerInterface::applicationStateChanged ( const QString & name, <a href="serverinterface.html#ApplicationState-enum">ApplicationState</a> state )<tt> [pure virtual]</tt></h3><p> The application <em>name</em> has changed state to <em>state</em>. This can be usedto show launch notification and update a list of running applications.<h3 class=fn>void <a name="createGUI"></a>ServerInterface::createGUI ()<tt> [pure virtual]</tt></h3><p> Implement this function to create the custom launcher UI.<p> <p>See also <a href="#showGUI">showGUI</a>().<h3 class=fn>void <a name="destroyGUI"></a>ServerInterface::destroyGUI ()<tt> [pure virtual]</tt></h3><p> Implement this function to destroy the custom launcher UI. All resourcesallocated by <a href="#createGUI">createGUI</a>() must be released.<h3 class=fn>void <a name="dockWidget"></a>ServerInterface::dockWidget ( QWidget * w, <a href="serverinterface.html#DockArea-enum">DockArea</a> placement )<tt> [static]</tt></h3><p> Docks a top-level widget <em>w</em> on a side of the screen specified by<em>placement</em>. The widget is placedaccording to the order that it was docked, its sizeHint() and whetherpreviously docked widgets are visible. The desktop area available toQWidget::showMaximized() will exclude any visible docked widgets.<p> For example, if a widget isdocked at the bottom of the screen, its sizeHint() will define itsheight and it will use the full width of the screen. If a widget isthen docked to the right, its sizeHint() will define its width andit will be as high as possible without coveringthe widget docked at the bottom.<p> This function is useful for reserving system areas such as taskbarsand input methods that should not be covered by applications.<h3 class=fn>void <a name="documentAdded"></a>ServerInterface::documentAdded ( const <a href="doclnk.html">DocLnk</a> & doc )<tt> [pure virtual]</tt></h3><p> Add a document <em>doc</em> to the launcher.<p> <p>See also <a href="#documentRemoved">documentRemoved</a>().<h3 class=fn>void <a name="documentChanged"></a>ServerInterface::documentChanged ( const <a href="doclnk.html">DocLnk</a> & oldDoc, const <a href="doclnk.html">DocLnk</a> & newDoc )<tt> [pure virtual]</tt></h3><p> Change document properties of existing document <em>oldDoc</em> to <em>newDoc</em>.<h3 class=fn>void <a name="documentRemoved"></a>ServerInterface::documentRemoved ( const <a href="doclnk.html">DocLnk</a> & doc )<tt> [pure virtual]</tt></h3><p> Remove a document <em>doc</em> to the launcher.<p> <p>See also <a href="#documentAdded">documentAdded</a>().<h3 class=fn>void <a name="documentScanningProgress"></a>ServerInterface::documentScanningProgress ( int percent )<tt> [pure virtual]</tt></h3><p> The system is scanning for documents. <em>percent</em>provides the percentage of the filesystems scanned. This function willalways be called with <em>percent</em> equal to zero when scanning starts,and with <em>percent</em> equal to 100 when scanning is complete.<h3 class=fn>bool <a name="requiresApplications"></a>ServerInterface::requiresApplications () const<tt> [pure virtual]</tt></h3><p> Return TRUE if the custom launcher requires the server to scan forapplications.<h3 class=fn>bool <a name="requiresDocuments"></a>ServerInterface::requiresDocuments () const<tt> [pure virtual]</tt></h3><p> Return TRUE if the custom launcher requires the server to scan fordocuments.<h3 class=fn>void <a name="showGUI"></a>ServerInterface::showGUI ()<tt> [pure virtual]</tt></h3><p> Implement this function to show the custom launcher UI forthe first time. Will be called after <a href="#createGUI">createGUI</a>().<h3 class=fn>void <a name="storageChanged"></a>ServerInterface::storageChanged ( const QList<FileSystem> & )<tt> [pure virtual]</tt></h3><p> A filesystem has been added or removed.<h3 class=fn>void <a name="typeAdded"></a>ServerInterface::typeAdded ( const QString & type, const QString & name, const QPixmap & pixmap, const QPixmap & bgPixmap )<tt> [pure virtual]</tt></h3><p> An application category <em>type</em> has been added, for example "Games".<em>name</em> is the translated name of the category. <em>pixmap</em> and<em>bgPixmap</em> are small and large icons for the new type.<p> Types can be added or removed at any time, for example, when a storagecard containing a non-standard category is inserted or removed.<p> <p>See also <a href="#typeRemoved">typeRemoved</a>().<h3 class=fn>void <a name="typeRemoved"></a>ServerInterface::typeRemoved ( const QString & type )<tt> [pure virtual]</tt></h3><p> An application category <em>type</em> has been removed.<p> Types can be added or removed at any time, for example, when a storagecard containing a non-standard category is inserted or removed.<p> <p>See also <a href="#typeAdded">typeAdded</a>().<!-- eof --><hr><p>This file is part of the <a href="../index.html">Qtopia</a> platform,copyright © 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 © 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 + -