add xslt transformation
[mdictionary] / doc / html / MainWindow_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>mDictionary: MainWindow.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="annotated.html"><span>Classes</span></a></li>
22       <li class="current"><a href="files.html"><span>Files</span></a></li>
23       <li>
24         <div id="MSearchBox" class="MSearchBoxInactive">
25         <img id="MSearchSelect" src="search/search.png"
26              onmouseover="return searchBox.OnSearchSelectShow()"
27              onmouseout="return searchBox.OnSearchSelectHide()"
28              alt=""/>
29         <input type="text" id="MSearchField" value="Search" accesskey="S"
30              onfocus="searchBox.OnSearchFieldFocus(true)" 
31              onblur="searchBox.OnSearchFieldFocus(false)" 
32              onkeyup="searchBox.OnSearchFieldChange(event)"/>
33         <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
34         </div>
35       </li>
36     </ul>
37   </div>
38   <div class="tabs">
39     <ul>
40       <li><a href="files.html"><span>File&nbsp;List</span></a></li>
41     </ul>
42   </div>
43 <h1>MainWindow.h</h1><a href="MainWindow_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>
44 <a name="l00002"></a>00002 <span class="comment"></span>
45 <a name="l00003"></a>00003 <span class="comment">    This file is part of mDictionary.</span>
46 <a name="l00004"></a>00004 <span class="comment"></span>
47 <a name="l00005"></a>00005 <span class="comment">    mDictionary is free software: you can redistribute it and/or modify</span>
48 <a name="l00006"></a>00006 <span class="comment">    it under the terms of the GNU General Public License as published by</span>
49 <a name="l00007"></a>00007 <span class="comment">    the Free Software Foundation, either version 3 of the License, or</span>
50 <a name="l00008"></a>00008 <span class="comment">    (at your option) any later version.</span>
51 <a name="l00009"></a>00009 <span class="comment"></span>
52 <a name="l00010"></a>00010 <span class="comment">    mDictionary is distributed in the hope that it will be useful,</span>
53 <a name="l00011"></a>00011 <span class="comment">    but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
54 <a name="l00012"></a>00012 <span class="comment">    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
55 <a name="l00013"></a>00013 <span class="comment">    GNU General Public License for more details.</span>
56 <a name="l00014"></a>00014 <span class="comment"></span>
57 <a name="l00015"></a>00015 <span class="comment">    You should have received a copy of the GNU General Public License</span>
58 <a name="l00016"></a>00016 <span class="comment">    along with mDictionary.  If not, see &lt;http://www.gnu.org/licenses/&gt;.</span>
59 <a name="l00017"></a>00017 <span class="comment"></span>
60 <a name="l00018"></a>00018 <span class="comment">    Copyright 2010 Comarch S.A.</span>
61 <a name="l00019"></a>00019 <span class="comment"></span>
62 <a name="l00020"></a>00020 <span class="comment">*******************************************************************************/</span>
63 <a name="l00024"></a>00024 
64 <a name="l00025"></a>00025 <span class="preprocessor">#ifndef MAINWINDOW_H</span>
65 <a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#define MAINWINDOW_H</span>
66 <a name="l00027"></a>00027 <span class="preprocessor"></span>
67 <a name="l00028"></a>00028 <span class="preprocessor">#include &lt;QMainWindow&gt;</span>
68 <a name="l00029"></a>00029 <span class="preprocessor">#include &quot;../../includes/GUIInterface.h&quot;</span>
69 <a name="l00030"></a>00030 <span class="preprocessor">#include &quot;../backbone/backbone.h&quot;</span>
70 <a name="l00031"></a>00031 <span class="preprocessor">#include &quot;<a class="code" href="TranslationWidget_8h.html" title="Implements translation widget.">TranslationWidget.h</a>&quot;</span>
71 <a name="l00032"></a>00032 <span class="preprocessor">#include &quot;WordListWidget.h&quot;</span>
72 <a name="l00033"></a>00033 <span class="preprocessor">#include &quot;<a class="code" href="SearchBarWidget_8h.html" title="Implements search bar.">SearchBarWidget.h</a>&quot;</span>
73 <a name="l00034"></a>00034 <span class="preprocessor">#include &quot;<a class="code" href="MenuWidget_8h.html" title="Implements custom menu.">MenuWidget.h</a>&quot;</span>
74 <a name="l00035"></a>00035 <span class="preprocessor">#include &quot;<a class="code" href="DictManagerWidget_8h.html" title="Dictionary management widget.">DictManagerWidget.h</a>&quot;</span>
75 <a name="l00036"></a>00036 <span class="preprocessor">#include &quot;<a class="code" href="HistoryListDialog_8h.html" title="Implements history list dialog.">HistoryListDialog.h</a>&quot;</span>
76 <a name="l00037"></a>00037 
77 <a name="l00038"></a>00038 <span class="keyword">namespace </span>Ui {
78 <a name="l00039"></a>00039     <span class="keyword">class </span><a class="code" href="classMainWindow.html" title="Implements interface for GUI.">MainWindow</a>;
79 <a name="l00040"></a>00040 }
80 <a name="l00041"></a>00041 
81 <a name="l00043"></a>00043 
82 <a name="l00050"></a><a class="code" href="classMainWindow.html">00050</a> <span class="keyword">class </span><a class="code" href="classMainWindow.html" title="Implements interface for GUI.">MainWindow</a> : <span class="keyword">public</span> <a class="code" href="classGUIInterface.html" title="Interface for different GUIs.">GUIInterface</a>
83 <a name="l00051"></a>00051 {
84 <a name="l00052"></a>00052     Q_OBJECT
85 <a name="l00053"></a>00053 
86 <a name="l00054"></a>00054 <span class="keyword">public</span>:
87 <a name="l00056"></a>00056 
88 <a name="l00061"></a>00061     <span class="keyword">explicit</span> <a class="code" href="classMainWindow.html#a4acc6192d273eb38e9082b4934202b81" title="Constructor.">MainWindow</a>(<a class="code" href="classBackbone.html" title="Inner part of dictionary - glues together GUI and plugins.">Backbone</a>* backbone, QWidget *parent = 0);
89 <a name="l00062"></a>00062     ~<a class="code" href="classMainWindow.html" title="Implements interface for GUI.">MainWindow</a>();
90 <a name="l00063"></a>00063 
91 <a name="l00066"></a>00066 
92 <a name="l00070"></a>00070     QHash&lt;CommonDictInterface*, bool&gt; <a class="code" href="classMainWindow.html#a0fd2d755ce951f3dfb535d555b957de7">getDictionaries</a>();
93 <a name="l00071"></a>00071 
94 <a name="l00073"></a>00073 
95 <a name="l00076"></a>00076     QList&lt;CommonDictInterface*&gt; <a class="code" href="classMainWindow.html#a021ff10f30db21337b54b3dfaae0e9a0" title="Returns all loaded plugins.">getPlugins</a>();
96 <a name="l00077"></a>00077 
97 <a name="l00079"></a>00079 
98 <a name="l00085"></a>00085     <span class="keywordtype">bool</span> <a class="code" href="classMainWindow.html#a88a06565de22a608629bfa4a15ad5839" title="Indicates if GUI is in exact search mode.">exactSearch</a>();
99 <a name="l00086"></a>00086 
100 <a name="l00088"></a>00088 
101 <a name="l00095"></a>00095     <span class="keywordtype">void</span> <a class="code" href="classMainWindow.html#a78e044c5bd7446b0d2105f98573b9489" title="Sets GUI exact search mode.">setExactSearch</a>(<span class="keywordtype">bool</span>);
102 <a name="l00096"></a>00096 
103 <a name="l00097"></a>00097 
104 <a name="l00098"></a>00098  <span class="keyword">public</span> Q_SLOTS:
105 <a name="l00100"></a>00100 
106 <a name="l00105"></a>00105     <span class="keywordtype">void</span> <a class="code" href="classMainWindow.html#a16d0c7d46fc49bfa1cada597e349549a" title="Search in exact mode for given word.">searchExact</a>(QString);
107 <a name="l00106"></a>00106 
108 <a name="l00108"></a>00108 
109 <a name="l00117"></a>00117     <span class="keywordtype">void</span> <a class="code" href="classMainWindow.html#a9a56d2e699da84f9647984852cb6041b" title="Gets word list from backbone and prepares received list to display.">wordListReady</a>();
110 <a name="l00118"></a>00118 
111 <a name="l00120"></a>00120     <span class="keywordtype">void</span> <a class="code" href="classMainWindow.html#afea3664ab8d180bc705b552b7f745136" title="Gets translation strings from backbone and emit signal to display them.">translationsReady</a>();
112 <a name="l00121"></a>00121 
113 <a name="l00123"></a>00123 
114 <a name="l00130"></a>00130     <span class="keywordtype">void</span> <a class="code" href="classMainWindow.html#ab88154764298f46e81f942262170f4b9" title="Adds to history key words from given translations.">addToHistory</a>(QList&lt;Translation*&gt;);
115 <a name="l00131"></a>00131 
116 <a name="l00133"></a>00133     <span class="keywordtype">void</span> <a class="code" href="classMainWindow.html#a655d251389256b1e062513f6ff762543" title="Shows history dialog.">showHistory</a>();
117 <a name="l00134"></a>00134 
118 <a name="l00136"></a>00136 
119 <a name="l00141"></a>00141     <span class="keywordtype">void</span> <a class="code" href="classMainWindow.html#aaac2ae9385150bf83eb6c1d73e745e3c" title="Shows translation of next word in history.">historyNext</a>();
120 <a name="l00142"></a>00142 
121 <a name="l00144"></a>00144 
122 <a name="l00149"></a>00149     <span class="keywordtype">void</span> <a class="code" href="classMainWindow.html#ab3d88584e7391cedb791248dc7b13b78" title="Shows translation of previous word in history.">historyPrev</a>();
123 <a name="l00150"></a>00150 
124 <a name="l00151"></a>00151 <span class="keyword">private</span> Q_SLOTS:
125 <a name="l00154"></a>00154     <span class="keywordtype">void</span> setSearchString(QString);
126 <a name="l00155"></a>00155 
127 <a name="l00157"></a>00157     <span class="keywordtype">void</span> disableMenu();
128 <a name="l00158"></a>00158 
129 <a name="l00160"></a>00160     <span class="keywordtype">void</span> enableMenu();
130 <a name="l00161"></a>00161 
131 <a name="l00164"></a>00164     <span class="keywordtype">void</span> breakSearching();
132 <a name="l00165"></a>00165 
133 <a name="l00166"></a>00166 
134 <a name="l00167"></a>00167 <span class="keyword">protected</span>:
135 <a name="l00171"></a>00171     <span class="keywordtype">void</span> <a class="code" href="classMainWindow.html#a38edb88d43e844aca9d2e762c8706565" title="When user wants to close application, we first sends signal to stop all ongoing searches...">closeEvent</a>(QCloseEvent *);
136 <a name="l00172"></a>00172 
137 <a name="l00173"></a>00173 
138 <a name="l00174"></a>00174 <span class="keyword">private</span>:
139 <a name="l00175"></a>00175     <a class="code" href="classBackbone.html" title="Inner part of dictionary - glues together GUI and plugins.">Backbone</a>* backbone;
140 <a name="l00176"></a>00176     Ui::MainWindow *ui;
141 <a name="l00177"></a>00177 
142 <a name="l00178"></a>00178 
143 <a name="l00179"></a>00179     <a class="code" href="classSearchBarWidget.html" title="Displays search bar.">SearchBarWidget</a>* searchBarWidget;
144 <a name="l00180"></a>00180     <a class="code" href="classTranslationWidget.html" title="Displays translation of word found in dictionaries.">TranslationWidget</a>* translationWidget;
145 <a name="l00181"></a>00181     <a class="code" href="classWordListWidget.html" title="Displays list of words found in dictionaries.">WordListWidget</a>* wordListWidget;
146 <a name="l00182"></a>00182     <a class="code" href="classMenuWidget.html" title="Displays custom menu with tab widget containing all submenus.">MenuWidget</a>* menuWidget;
147 <a name="l00183"></a>00183     <a class="code" href="classDictManagerWidget.html" title="Implements dictionaries management widget.">DictManagerWidget</a>* dictManagerWidget;
148 <a name="l00184"></a>00184 
149 <a name="l00185"></a>00185     <span class="keywordtype">bool</span> _exactSearch;
150 <a name="l00186"></a>00186     QString searchString;
151 <a name="l00187"></a>00187 
152 <a name="l00188"></a>00188     <span class="keywordtype">void</span> connectBackbone();
153 <a name="l00189"></a>00189     <span class="keywordtype">void</span> connectSearchBar();
154 <a name="l00190"></a>00190     <span class="keywordtype">void</span> connectWordList();
155 <a name="l00191"></a>00191     <span class="keywordtype">void</span> connectTranslationWidget();
156 <a name="l00192"></a>00192     <span class="keywordtype">void</span> connectDictManager();
157 <a name="l00193"></a>00193     <span class="keywordtype">void</span> connectMenu();
158 <a name="l00194"></a>00194 };
159 <a name="l00195"></a>00195 
160 <a name="l00196"></a>00196 <span class="preprocessor">#endif // MAINWINDOW_H</span>
161 </pre></div></div>
162 <!--- window showing the filter options -->
163 <div id="MSearchSelectWindow"
164      onmouseover="return searchBox.OnSearchSelectShow()"
165      onmouseout="return searchBox.OnSearchSelectHide()"
166      onkeydown="return searchBox.OnSearchSelectKey(event)">
167 <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></div>
168
169 <!-- iframe showing the search results (closed by default) -->
170 <div id="MSearchResultsWindow">
171 <iframe src="" frameborder="0" 
172         name="MSearchResults" id="MSearchResults">
173 </iframe>
174 </div>
175
176 <hr class="footer"/><address style="text-align: right;"><small>Generated on Thu Aug 12 14:34:59 2010 for mDictionary by&nbsp;
177 <a href="http://www.doxygen.org/index.html">
178 <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
179 </body>
180 </html>