Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-release > by-pkgid > ea24284f03fd4a8a4b64047514d93f64 > files > 210

lib64kdegames1-devel-3.5.9-2mdv2008.1.x86_64.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en_US" xml:lang="en_US">

<head>
  <title>libkdegames: KScoreDialog Class Reference (libkdegames)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

  <meta http-equiv="Content-Style-Type" content="text/css" />

  <meta http-equiv="pics-label" content='(pics-1.1 "http://www.icra.org/ratingsv02.html" comment "ICRAonline DE v2.0" l gen true for "http://www.kde.org"  r (nz 1 vz 1 lz 1 oz 1 cb 1) "http://www.rsac.org/ratingsv01.html" l gen true for "http://www.kde.org"  r (n 0 s 0 v 0 l 0))' />

  <meta name="trademark" content="KDE e.V." />
  <meta name="description" content="K Desktop Environment Homepage, KDE.org" />
  <meta name="MSSmartTagsPreventParsing" content="true" />
  <meta name="robots" content="all" />

  <link rel="shortcut icon" href="../../favicon.ico" />

<link rel="stylesheet" media="screen" type="text/css" title="APIDOX" href="doxygen.css" />



</head>

<body>

<div id="nav_header_top" align="right">
  <a href="#content" class="doNotDisplay" accesskey="2">Skip to main content ::</a>

  <a href="../.."><img id="nav_header_logo" alt="Home" align="left" src="../../kde_gear_64.png" border="0" /></a>
  <span class="doNotDisplay">::</span>

  <div id="nav_header_title" align="left">KDE API Reference</div>


</div>

<div id="nav_header_bottom" align="right">
  <span class="doNotDisplay">:: <a href="#navigation" accesskey="5">Skip to Link Menu</a><br/></span>
  <div id="nav_header_bottom_right" style="text-align: left;">
/ <a href="../..">API Reference</a>
 / <a href=".">libkdegames</a>
  </div>
</div>


<table id="main" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
      <td valign="top" class="menuheader" height="0"></td>

  <td id="contentcolumn" valign="top" rowspan="2" >
    <div id="content" style="padding-top: 0px;"><div style="width:100%; margin: 0px; padding: 0px;">
    <a name="content"></a>


<!-- Generated by Doxygen 1.5.5 -->
<div class="contents">
<h1>KScoreDialog Class Reference</h1><!-- doxytag: class="KScoreDialog" --><!-- doxytag: inherits="KDialogBase" --><code>#include &lt;<a class="el" href="kscoredialog_8h-source.html">kscoredialog.h</a>&gt;</code>
<p>
Inherits KDialogBase.
<p>

<p>
<a href="classKScoreDialog-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
A simple high score dialog. 
<p>Definition at line <a class="el" href="kscoredialog_8h-source.html#l00040">40</a> of file <a class="el" href="kscoredialog_8h-source.html">kscoredialog.h</a>.</p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><b>Fields</b> { <br>
&nbsp;&nbsp;<b>Name</b> =  1 &lt;&lt; 0, 
<b>Level</b> =  1 &lt;&lt; 1, 
<b>Custom1</b> =  1 &lt;&lt; 10, 
<b>Custom2</b> =  1 &lt;&lt; 11, 
<br>
&nbsp;&nbsp;<b>Custom3</b> =  1 &lt;&lt; 12, 
<b>Date</b> =  1 &lt;&lt; 27, 
<b>Time</b> =  1 &lt;&lt; 28, 
<b>Score</b> =  1 &lt;&lt; 29
<br>
 }</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8828e1fbb9891d612f47108ba02bdfb8"></a><!-- doxytag: member="KScoreDialog::FieldInfo" ref="8828e1fbb9891d612f47108ba02bdfb8" args="" -->
typedef QMap&lt; int, QString &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><b>FieldInfo</b></td></tr>

<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKScoreDialog.html#c2e1147f6306f59d1384fb20f45b3ae0">KScoreDialog</a> (int fields, QWidget *parent=0, const char *name=0)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKScoreDialog.html#283b3b7c9f21a0645ff7969888acd48b">setConfigGroup</a> (const QString &amp;group)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKScoreDialog.html#45a3d033394d1f00f998f493a6a79567">setComment</a> (const QString &amp;comment)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKScoreDialog.html#35ef7e3de122607ec46cbc67e6469fdc">addField</a> (int field, const QString &amp;header, const QString &amp;key)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKScoreDialog.html#9cadc963057622d3702ef195b2b464c5">addScore</a> (int newScore, const FieldInfo &amp;newInfo, bool askName, bool lessIsMore)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c19d7bcb95e7300e3dbb9682765dc15c"></a><!-- doxytag: member="KScoreDialog::addScore" ref="c19d7bcb95e7300e3dbb9682765dc15c" args="(int newScore, const FieldInfo &amp;newInfo, bool askName=true)" -->
int&nbsp;</td><td class="memItemRight" valign="bottom"><b>addScore</b> (int newScore, const FieldInfo &amp;newInfo, bool askName=true)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKScoreDialog.html#84e6649a8597d48f15a5e191ade183e6">highScore</a> ()</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="332c91d926f9ccab244f7b0040754531"></a><!-- doxytag: member="KScoreDialog::show" ref="332c91d926f9ccab244f7b0040754531" args="()" -->
virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><b>show</b> ()</td></tr>

</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="c2e1147f6306f59d1384fb20f45b3ae0"></a><!-- doxytag: member="KScoreDialog::KScoreDialog" ref="c2e1147f6306f59d1384fb20f45b3ae0" args="(int fields, QWidget *parent=0, const char *name=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">KScoreDialog::KScoreDialog           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>fields</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QWidget *&nbsp;</td>
          <td class="paramname"> <em>parent</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&nbsp;</td>
          <td class="paramname"> <em>name</em> = <code>0</code></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>fields</em>&nbsp;</td><td>Which fields should be listed. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>parent</em>&nbsp;</td><td>passed to parent QWidget constructor </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>name</em>&nbsp;</td><td>passed to parent QWidget constructor </td></tr>
  </table>
</dl>

<p>Definition at line <a class="el" href="kscoredialog_8cpp-source.html#l00067">67</a> of file <a class="el" href="kscoredialog_8cpp-source.html">kscoredialog.cpp</a>.</p>

</div>
</div><p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="283b3b7c9f21a0645ff7969888acd48b"></a><!-- doxytag: member="KScoreDialog::setConfigGroup" ref="283b3b7c9f21a0645ff7969888acd48b" args="(const QString &amp;group)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void KScoreDialog::setConfigGroup           </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&nbsp;</td>
          <td class="paramname"> <em>group</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>group</em>&nbsp;</td><td>to use for reading/writing highscores from/to. By default the class will use "High Score" </td></tr>
  </table>
</dl>

<p>Definition at line <a class="el" href="kscoredialog_8cpp-source.html#l00101">101</a> of file <a class="el" href="kscoredialog_8cpp-source.html">kscoredialog.cpp</a>.</p>

</div>
</div><p>
<a class="anchor" name="45a3d033394d1f00f998f493a6a79567"></a><!-- doxytag: member="KScoreDialog::setComment" ref="45a3d033394d1f00f998f493a6a79567" args="(const QString &amp;comment)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void KScoreDialog::setComment           </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&nbsp;</td>
          <td class="paramname"> <em>comment</em>          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>comment</em>&nbsp;</td><td>to add when showing high-scores. The comment is only used once. </td></tr>
  </table>
</dl>

<p>Definition at line <a class="el" href="kscoredialog_8cpp-source.html#l00107">107</a> of file <a class="el" href="kscoredialog_8cpp-source.html">kscoredialog.cpp</a>.</p>

</div>
</div><p>
<a class="anchor" name="35ef7e3de122607ec46cbc67e6469fdc"></a><!-- doxytag: member="KScoreDialog::addField" ref="35ef7e3de122607ec46cbc67e6469fdc" args="(int field, const QString &amp;header, const QString &amp;key)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void KScoreDialog::addField           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>field</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QString &amp;&nbsp;</td>
          <td class="paramname"> <em>header</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QString &amp;&nbsp;</td>
          <td class="paramname"> <em>key</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Define an extra FieldInfo entry. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>field</em>&nbsp;</td><td>Id of this field </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>header</em>&nbsp;</td><td>Header shown in the dialog for this field </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>key</em>&nbsp;</td><td>used to store this field with. </td></tr>
  </table>
</dl>

<p>Definition at line <a class="el" href="kscoredialog_8cpp-source.html#l00112">112</a> of file <a class="el" href="kscoredialog_8cpp-source.html">kscoredialog.cpp</a>.</p>

</div>
</div><p>
<a class="anchor" name="9cadc963057622d3702ef195b2b464c5"></a><!-- doxytag: member="KScoreDialog::addScore" ref="9cadc963057622d3702ef195b2b464c5" args="(int newScore, const FieldInfo &amp;newInfo, bool askName, bool lessIsMore)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int KScoreDialog::addScore           </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>newScore</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const FieldInfo &amp;&nbsp;</td>
          <td class="paramname"> <em>newInfo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>askName</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&nbsp;</td>
          <td class="paramname"> <em>lessIsMore</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Adds a new score to the list. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>newScore</em>&nbsp;</td><td>the score of this game. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>newInfo</em>&nbsp;</td><td>additional info about the score. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>askName</em>&nbsp;</td><td>Whether to prompt for the players name. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>lessIsMore</em>&nbsp;</td><td>If true, the lowest score is the best score.</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd>The highscore position if the score was good enough to make it into the list (1 being topscore) or 0 otherwise. </dd></dl>

<p>Definition at line <a class="el" href="kscoredialog_8cpp-source.html#l00326">326</a> of file <a class="el" href="kscoredialog_8cpp-source.html">kscoredialog.cpp</a>.</p>

</div>
</div><p>
<a class="anchor" name="84e6649a8597d48f15a5e191ade183e6"></a><!-- doxytag: member="KScoreDialog::highScore" ref="84e6649a8597d48f15a5e191ade183e6" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int KScoreDialog::highScore           </td>
          <td>(</td>
          <td class="paramname">          </td>
          <td>&nbsp;)&nbsp;</td>
          <td width="100%"></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Returns the current best score. 
<p>

<p>Definition at line <a class="el" href="kscoredialog_8cpp-source.html#l00392">392</a> of file <a class="el" href="kscoredialog_8cpp-source.html">kscoredialog.cpp</a>.</p>

</div>
</div><p>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="kscoredialog_8h-source.html">kscoredialog.h</a><li><a class="el" href="kscoredialog_8cpp-source.html">kscoredialog.cpp</a></ul>
</div>
    </div></div>


      </td>
  </tr>
  <tr>
    <td valign="top" id="leftmenu" width="25%">
      <a name="navigation"></a>
      <div class="menu_box"><h2>libkdegames</h2>
<div class="nav_list">
<ul><li><a href="index.html">Main Page</a></li><li><a href="hierarchy.html">Class Hierarchy</a></li><li><a href="classes.html">Alphabetical List</a></li><li><a href="annotated.html">Class List</a></li><li><a href="files.html">File List</a></li><li><a href="functions.html">Class Members</a></li><li><a href="pages.html">Related Pages</a></li></ul>
<!--
<h2>Class Picker</h2>
<div style="text-align: center;">
<form name="guideform">
<select name="guidelinks" style="width:100%;" onChange="window.location=document.guideform.guidelinks.options[document.guideform.guidelinks.selectedIndex].value">
<option value="annotated.html">-- Choose --</option>
  <option value="classKCanvasRootPixmap.html">kcanvasrootpixmap</option>,  <option value="classKCardDialog.html">kcarddialog</option>,  <option value="classKChat.html">kchat</option>,  <option value="classKChatBase.html">kchatbase</option>,  <option value="classKChatBaseText.html">kchatbasetext</option>,  <option value="classKExtHighscore_1_1Item.html">kexthighscore::item</option>,  <option value="classKExtHighscore_1_1ItemArray.html">kexthighscore::itemarray</option>,  <option value="classKExtHighscore_1_1Manager.html">kexthighscore::manager</option>,  <option value="classKExtHighscore_1_1MultiplayerScores.html">kexthighscore::multiplayerscores</option>,  <option value="classKExtHighscore_1_1Score.html">kexthighscore::score</option>,  <option value="classKGame.html">kgame</option>,  <option value="classKGameChat.html">kgamechat</option>,  <option value="classKGameComputerIO.html">kgamecomputerio</option>,  <option value="classKGameConnectDialog.html">kgameconnectdialog</option>,  <option value="classKGameDialog.html">kgamedialog</option>,  <option value="classKGameDialogChatConfig.html">kgamedialogchatconfig</option>,  <option value="classKGameDialogConfig.html">kgamedialogconfig</option>,  <option value="classKGameErrorDialog.html">kgameerrordialog</option>,  <option value="classKGameErrorMessageDialog.html">kgameerrormessagedialog</option>,  <option value="classKGameIO.html">kgameio</option>,  <option value="classKGameKeyIO.html">kgamekeyio</option>,  <option value="classKGameLCD.html">kgamelcd</option>,  <option value="classKGameLCDClock.html">kgamelcdclock</option>,  <option value="classKGameLCDList.html">kgamelcdlist</option>,  <option value="classKGameMisc.html">kgamemisc</option>,  <option value="classKGameMouseIO.html">kgamemouseio</option>,  <option value="classKGameNetwork.html">kgamenetwork</option>,  <option value="classKGameProcess.html">kgameprocess</option>,  <option value="classKGameProcessIO.html">kgameprocessio</option>,  <option value="classKGameProgress.html">kgameprogress</option>,  <option value="classKGameProperty.html">kgameproperty</option>,  <option value="classKGamePropertyBase.html">kgamepropertybase</option>,  <option value="classKGamePropertyHandler.html">kgamepropertyhandler</option>,  <option value="classKGameSequence.html">kgamesequence</option>,  <option value="classKGrid2D_1_1Generic.html">kgrid2d::generic</option>,  <option value="classKGrid2D_1_1Hexagonal.html">kgrid2d::hexagonal</option>,  <option value="classKGrid2D_1_1HexagonalBase.html">kgrid2d::hexagonalbase</option>,  <option value="classKGrid2D_1_1Square.html">kgrid2d::square</option>,  <option value="classKGrid2D_1_1SquareBase.html">kgrid2d::squarebase</option>,  <option value="classKHighscore.html">khighscore</option>,  <option value="classKMessageClient.html">kmessageclient</option>,  <option value="classKMessageDirect.html">kmessagedirect</option>,  <option value="classKMessageIO.html">kmessageio</option>,  <option value="classKMessageServer.html">kmessageserver</option>,  <option value="classKMessageServerSocket.html">kmessageserversocket</option>,  <option value="classKMessageSocket.html">kmessagesocket</option>,  <option value="classKPlayer.html">kplayer</option>,  <option value="classKScoreDialog.html">kscoredialog</option>,  <option value="classKStdGameAction.html">kstdgameaction</option>,
</select>
</form>
</div>
-->
</div></div>
<div class="menu_box"><h2>API Dox</h2>
<div class="nav_list">
<ul>
<li><a href="../../libkdegames/html/index.html">libkdegames</a></li>
</ul></div></div>


        </td>
</tr>
</table>

<span class="doNotDisplay">
  <a href="http://www.kde.org/" accesskey="8">KDE Home</a> |
  <a href="http://accessibility.kde.org/" accesskey="9">KDE Accessibility Home</a> |
  <a href="http://www.kde.org/media/accesskeys.php" accesskey="0">Description of Access Keys</a>
</span>


<div style="height: 8px"></div>

<div id="footer">
  <div id="footer_left">
    Maintained by <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;groo&#116;&#64;kde&#46;or&#x67;">Adriaan de Groot</a>
and
<a href="&#109;a&#105;&#108;&#116;&#111;&#58;w&#105;nter&#64;kde&#46;or&#x67">Allen Winter</a>.
<br/>
    KDE and K Desktop Environment are trademarks of <a href="http://www.kde.org/areas/kde-ev/" title="Homepage of the KDE non-profit Organization">KDE e.V.</a> |
    <a href="http://www.kde.org/contact/impressum.php">Legal</a>
  </div>
  <div id="footer_right"><img src="/media/images/footer_right.png" style="margin: 0px" alt="" /></div>
</div>

<!--
WARNING: DO NOT SEND MAIL TO THE FOLLOWING EMAIL ADDRESS! YOU WILL
BE BLOCKED INSTANTLY AND PERMANENTLY!
<a href="mailto:aaaatrap-425acc3b5374943f@kde.org">Block me</a>
WARNING END
-->

</body>
</html>