API documentation updated
[chessclock] / www / html / chessclockwidget_8h_source.html
1 <!-- This comment will put IE 6, 7 and 8 in quirks mode -->
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml">
4 <head>
5 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
6 <title>Chess Clock: /holvi/arto/ohjelmointi/ChessClock/chessclock/classes/chessclockwidget.h Source File</title>
7 <link href="tabs.css" rel="stylesheet" type="text/css"/>
8 <link href="search/search.css" rel="stylesheet" type="text/css"/>
9 <script type="text/javaScript" src="search/search.js"></script>
10 <link href="doxygen.css" rel="stylesheet" type="text/css"/>
11 </head>
12 <body onload='searchBox.OnSelectItem(0);'>
13 <!-- Generated by Doxygen 1.6.3 -->
14 <script type="text/javascript"><!--
15 var searchBox = new SearchBox("searchBox", "search",false,'Search');
16 --></script>
17 <div class="navigation" id="top">
18   <div class="tabs">
19     <ul>
20       <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
21       <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
22       <li><a href="annotated.html"><span>Classes</span></a></li>
23       <li class="current"><a href="files.html"><span>Files</span></a></li>
24       <li>
25         <div id="MSearchBox" class="MSearchBoxInactive">
26         <img id="MSearchSelect" src="search/search.png"
27              onmouseover="return searchBox.OnSearchSelectShow()"
28              onmouseout="return searchBox.OnSearchSelectHide()"
29              alt=""/>
30         <input type="text" id="MSearchField" value="Search" accesskey="S"
31              onfocus="searchBox.OnSearchFieldFocus(true)" 
32              onblur="searchBox.OnSearchFieldFocus(false)" 
33              onkeyup="searchBox.OnSearchFieldChange(event)"/>
34         <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
35         </div>
36       </li>
37     </ul>
38   </div>
39   <div class="tabs">
40     <ul>
41       <li><a href="files.html"><span>File&nbsp;List</span></a></li>
42       <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
43     </ul>
44   </div>
45 <h1>/holvi/arto/ohjelmointi/ChessClock/chessclock/classes/chessclockwidget.h</h1><a href="chessclockwidget_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001  <span class="comment">/**************************************************************************</span>
46 <a name="l00002"></a>00002 <span class="comment"></span>
47 <a name="l00003"></a>00003 <span class="comment">    Chess Clock</span>
48 <a name="l00004"></a>00004 <span class="comment"></span>
49 <a name="l00005"></a>00005 <span class="comment">    Copyright (c) Arto Hyvättinen 2010</span>
50 <a name="l00006"></a>00006 <span class="comment"></span>
51 <a name="l00007"></a>00007 <span class="comment">    This file is part of Chess Clock software.</span>
52 <a name="l00008"></a>00008 <span class="comment"></span>
53 <a name="l00009"></a>00009 <span class="comment">    Chess Clock is free software: you can redistribute it and/or modify</span>
54 <a name="l00010"></a>00010 <span class="comment">    it under the terms of the GNU General Public License as published by</span>
55 <a name="l00011"></a>00011 <span class="comment">    the Free Software Foundation, either version 3 of the License, or</span>
56 <a name="l00012"></a>00012 <span class="comment">    (at your option) any later version.</span>
57 <a name="l00013"></a>00013 <span class="comment"></span>
58 <a name="l00014"></a>00014 <span class="comment">    Chess Clock is distributed in the hope that it will be useful,</span>
59 <a name="l00015"></a>00015 <span class="comment">    but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
60 <a name="l00016"></a>00016 <span class="comment">    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
61 <a name="l00017"></a>00017 <span class="comment">    GNU General Public License for more details.</span>
62 <a name="l00018"></a>00018 <span class="comment"></span>
63 <a name="l00019"></a>00019 <span class="comment"></span>
64 <a name="l00020"></a>00020 <span class="comment">**************************************************************************/</span>
65 <a name="l00021"></a>00021 
66 <a name="l00022"></a>00022 <span class="preprocessor">#ifndef CHESSCLOCKWIDGET_H</span>
67 <a name="l00023"></a>00023 <span class="preprocessor"></span><span class="preprocessor">#define CHESSCLOCKWIDGET_H</span>
68 <a name="l00024"></a>00024 <span class="preprocessor"></span>
69 <a name="l00025"></a>00025 <span class="preprocessor">#include &quot;<a class="code" href="chessclock_8h.html">chessclock.h</a>&quot;</span>
70 <a name="l00026"></a>00026 <span class="preprocessor">#include &lt;QPixmap&gt;</span>
71 <a name="l00027"></a>00027 <span class="preprocessor">#include &lt;QString&gt;</span>
72 <a name="l00028"></a>00028 
73 <a name="l00029"></a>00029 <span class="keyword">class </span>QVBoxLayout;
74 <a name="l00030"></a>00030 <span class="keyword">class </span>QLabel;
75 <a name="l00031"></a>00031 
76 <a name="l00039"></a><a class="code" href="class_chess_clock_widget.html">00039</a> <span class="keyword">class </span><a class="code" href="class_chess_clock_widget.html" title="Simple chess clock widget.">ChessClockWidget</a> : <span class="keyword">public</span> <a class="code" href="class_chess_clock.html" title="Clock of a individual player.">ChessClock</a>
77 <a name="l00040"></a>00040 {
78 <a name="l00041"></a>00041     Q_OBJECT
79 <a name="l00042"></a>00042 <span class="keyword">public</span>:
80 <a name="l00043"></a>00043     <a class="code" href="class_chess_clock_widget.html#a3fc783fbb476ac2350a37ed758159f01">ChessClockWidget</a>(<span class="keywordtype">bool</span> white, QWidget *parent = 0);
81 <a name="l00049"></a>00049     <span class="keywordtype">void</span> <a class="code" href="class_chess_clock_widget.html#a0e7ee0766c9684ade44ff548c82d308d" title="Set time begin of turn shown green.">setGreenTime</a>(<span class="keywordtype">int</span> msecs);
82 <a name="l00050"></a>00050 
83 <a name="l00051"></a>00051 signals:
84 <a name="l00052"></a>00052 
85 <a name="l00053"></a>00053 <span class="keyword">public</span> slots:
86 <a name="l00054"></a>00054     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_chess_clock_widget.html#ac61998d19019342ea4ab93651e32a2ad" title="Refresh clock information.">repaintClock</a>();
87 <a name="l00055"></a>00055 
88 <a name="l00056"></a>00056 <span class="keyword">protected</span>:
89 <a name="l00058"></a>00058     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_chess_clock_widget.html#ac8e5ab41fe2a39435ce6cda4e918a030" title="Init pictures from resources.">initPictures</a>();
90 <a name="l00060"></a>00060     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_chess_clock_widget.html#a4fa15ed70f11741d4b19f29f03f33fe1" title="Init QLabels.">initLabels</a>();
91 <a name="l00062"></a>00062     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_chess_clock_widget.html#a1fb6b231f34b1cbd22d63fbbd5fcdfaa" title="Init top: picture, details, loser mark.">initTop</a>();
92 <a name="l00065"></a>00065     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="class_chess_clock_widget.html#a76878585557986e4cb287a61426c385d" title="Init time left in bottom.">initBottom</a>();
93 <a name="l00066"></a>00066 
94 <a name="l00068"></a>00068    <span class="keyword">static</span> QString <a class="code" href="class_chess_clock_widget.html#a2044879e6a098be2f3467234ee6ad8c9" title="Convert msecs to h:mm:ss QString.">timeString</a>(<span class="keywordtype">int</span> msecs);
95 <a name="l00069"></a>00069 
96 <a name="l00070"></a>00070 <span class="keyword">protected</span>:
97 <a name="l00071"></a>00071 
98 <a name="l00072"></a><a class="code" href="class_chess_clock_widget.html#a01ed1d1d2c361035a18759d71579cae5">00072</a>     QPixmap <a class="code" href="class_chess_clock_widget.html#a01ed1d1d2c361035a18759d71579cae5">picActive_</a>;
99 <a name="l00073"></a><a class="code" href="class_chess_clock_widget.html#a29a634972ab639701db2926b7ba57ebf">00073</a>     QPixmap <a class="code" href="class_chess_clock_widget.html#a29a634972ab639701db2926b7ba57ebf">picPassive_</a>;
100 <a name="l00074"></a><a class="code" href="class_chess_clock_widget.html#aae5f8a2e8d543b73cf00b898d151f5e7">00074</a>     QPixmap <a class="code" href="class_chess_clock_widget.html#aae5f8a2e8d543b73cf00b898d151f5e7">picLoser_</a>;
101 <a name="l00075"></a>00075 
102 <a name="l00076"></a><a class="code" href="class_chess_clock_widget.html#a0ccc35d293627ec749f5d59e76a33b8e">00076</a>     QLabel* <a class="code" href="class_chess_clock_widget.html#a0ccc35d293627ec749f5d59e76a33b8e">pictureLabel_</a>;
103 <a name="l00077"></a><a class="code" href="class_chess_clock_widget.html#a4185a840e7d461cf84d580c57a1c12f9">00077</a>     QLabel* <a class="code" href="class_chess_clock_widget.html#a4185a840e7d461cf84d580c57a1c12f9">timeUsedLabel_</a>;
104 <a name="l00078"></a><a class="code" href="class_chess_clock_widget.html#a5dd50d99a38ae15fadf497818d23c249">00078</a>     QLabel* <a class="code" href="class_chess_clock_widget.html#a5dd50d99a38ae15fadf497818d23c249">timeAverageLabel_</a>;
105 <a name="l00079"></a><a class="code" href="class_chess_clock_widget.html#a12db89f00b41cc0cff52a231f42cb6a8">00079</a>     QLabel* <a class="code" href="class_chess_clock_widget.html#a12db89f00b41cc0cff52a231f42cb6a8">turnLabel_</a>;
106 <a name="l00080"></a><a class="code" href="class_chess_clock_widget.html#acdabe9a520cd2933bfc123aa4ca2d4b6">00080</a>     QLabel* <a class="code" href="class_chess_clock_widget.html#acdabe9a520cd2933bfc123aa4ca2d4b6">turnTimeLabel_</a>;
107 <a name="l00081"></a><a class="code" href="class_chess_clock_widget.html#a6ad3fb59c2e7a22d3a137734cb1b8743">00081</a>     QLabel* <a class="code" href="class_chess_clock_widget.html#a6ad3fb59c2e7a22d3a137734cb1b8743">loserLabel_</a>;
108 <a name="l00082"></a><a class="code" href="class_chess_clock_widget.html#a31e798ae2b57a3cc8c57cf250765e298">00082</a>     QLabel* <a class="code" href="class_chess_clock_widget.html#a31e798ae2b57a3cc8c57cf250765e298">leftLabel_</a>;
109 <a name="l00083"></a>00083 
110 <a name="l00084"></a><a class="code" href="class_chess_clock_widget.html#a905b8c74dc718068c6591b303601d2a3">00084</a>     QVBoxLayout* <a class="code" href="class_chess_clock_widget.html#a905b8c74dc718068c6591b303601d2a3">mainLayout</a>;
111 <a name="l00085"></a>00085 
112 <a name="l00086"></a><a class="code" href="class_chess_clock_widget.html#abb258a7c3b33ef3e89019ac3a2aa5ac8">00086</a>     <span class="keywordtype">int</span> <a class="code" href="class_chess_clock_widget.html#abb258a7c3b33ef3e89019ac3a2aa5ac8">greenTime_</a>; 
113 <a name="l00089"></a>00089 };
114 <a name="l00090"></a>00090 
115 <a name="l00091"></a>00091 <span class="preprocessor">#endif // CHESSCLOCKWIDGET_H</span>
116 </pre></div></div>
117 <!--- window showing the filter options -->
118 <div id="MSearchSelectWindow"
119      onmouseover="return searchBox.OnSearchSelectShow()"
120      onmouseout="return searchBox.OnSearchSelectHide()"
121      onkeydown="return searchBox.OnSearchSelectKey(event)">
122 <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&nbsp;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&nbsp;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&nbsp;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&nbsp;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&nbsp;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&nbsp;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&nbsp;</span>Enumerator</a></div>
123
124 <!-- iframe showing the search results (closed by default) -->
125 <div id="MSearchResultsWindow">
126 <iframe src="" frameborder="0" 
127         name="MSearchResults" id="MSearchResults">
128 </iframe>
129 </div>
130
131 <hr class="footer"/><address style="text-align: right;"><small>Generated on Thu Aug 19 21:04:20 2010 for Chess Clock by&nbsp;
132 <a href="http://www.doxygen.org/index.html">
133 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
134 </body>
135 </html>