22c6a6666fd6bede667b5684b9297be49b98f247
[mdictionary] / doc / latex / classBackbone.tex
1 \hypertarget{classBackbone}{
2 \section{Backbone Class Reference}
3 \label{classBackbone}\index{Backbone@{Backbone}}
4 }
5
6
7 Inner part of dictionary -\/ glues together GUI and plugins.  
8
9
10
11
12 {\ttfamily \#include $<$backbone.h$>$}
13
14 \subsection*{Public Slots}
15 \begin{DoxyCompactItemize}
16 \item 
17 \hypertarget{classBackbone_a1ede318bd5d226a8fa566f13452fb07d}{
18 void \hyperlink{classBackbone_a1ede318bd5d226a8fa566f13452fb07d}{stopSearching} ()}
19 \label{classBackbone_a1ede318bd5d226a8fa566f13452fb07d}
20
21 \begin{DoxyCompactList}\small\item\em stops all current searches \item\end{DoxyCompactList}\item 
22 void \hyperlink{classBackbone_a3b1f2cf8de594cbd18bef4ca854337e2}{search} (QString word)
23 \begin{DoxyCompactList}\small\item\em search for a word translation \item\end{DoxyCompactList}\item 
24 void \hyperlink{classBackbone_ac23b486119652095d956413a6e68afec}{selectedDictionaries} (QList$<$ \hyperlink{classCommonDictInterface}{CommonDictInterface} $\ast$ $>$)
25 \begin{DoxyCompactList}\small\item\em sets active dictionaries (searches are performed only in active dicts \item\end{DoxyCompactList}\item 
26 void \hyperlink{classBackbone_aaf91c7fe4e12d7007ca761dc89c14c8a}{addDictionary} (\hyperlink{classCommonDictInterface}{CommonDictInterface} $\ast$dict, bool active=1)
27 \begin{DoxyCompactList}\small\item\em adds new dictionary and activate it \item\end{DoxyCompactList}\item 
28 void \hyperlink{classBackbone_aa61afbf8ef2e05c0c2a9634fbdccad19}{quit} ()
29 \begin{DoxyCompactList}\small\item\em stops all current activity -\/ emiting signal \item\end{DoxyCompactList}\item 
30 \hypertarget{classBackbone_a61b78f5ee989400a2b2d7630b8145bb8}{
31 void \hyperlink{classBackbone_a61b78f5ee989400a2b2d7630b8145bb8}{translationReady} ()}
32 \label{classBackbone_a61b78f5ee989400a2b2d7630b8145bb8}
33
34 \begin{DoxyCompactList}\small\item\em Fired with given interval during searches -\/ checking if translation is ready. \item\end{DoxyCompactList}\item 
35 \hypertarget{classBackbone_a0be266198b2ae39efcce38aabb984d61}{
36 void \hyperlink{classBackbone_a0be266198b2ae39efcce38aabb984d61}{htmlTranslationReady} ()}
37 \label{classBackbone_a0be266198b2ae39efcce38aabb984d61}
38
39 \begin{DoxyCompactList}\small\item\em Fired with given interval during html searches -\/ checking if html is ready. \item\end{DoxyCompactList}\item 
40 void \hyperlink{classBackbone_a056fc494ed689f253d83fc2366c07931}{removeDictionary} (\hyperlink{classCommonDictInterface}{CommonDictInterface} $\ast$dict)
41 \begin{DoxyCompactList}\small\item\em Removes given dictionary. \item\end{DoxyCompactList}\item 
42 \hypertarget{classBackbone_a3ed4ea8df862807b83dfdec36e4c7ea8}{
43 void \hyperlink{classBackbone_a3ed4ea8df862807b83dfdec36e4c7ea8}{dictUpdated} ()}
44 \label{classBackbone_a3ed4ea8df862807b83dfdec36e4c7ea8}
45
46 \begin{DoxyCompactList}\small\item\em saves plugins new state/configuration after each change \item\end{DoxyCompactList}\item 
47 void \hyperlink{classBackbone_a67dbca9402d40e4678f879ff8da3866e}{searchHtml} (QList$<$ \hyperlink{classTranslation}{Translation} $\ast$ $>$)
48 \begin{DoxyCompactList}\small\item\em Performs search for final translation (html/xml) form. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
49 \subsection*{Signals}
50 \begin{DoxyCompactItemize}
51 \item 
52 \hypertarget{classBackbone_afef04921ba89c424eb882cc14153de39}{
53 void \hyperlink{classBackbone_afef04921ba89c424eb882cc14153de39}{closeOk} ()}
54 \label{classBackbone_afef04921ba89c424eb882cc14153de39}
55
56 \begin{DoxyCompactList}\small\item\em emmited when backbone is ready to close -\/ after getting stop signal it should kill all threads and so on \item\end{DoxyCompactList}\item 
57 \hypertarget{classBackbone_ae50cec4f0c49149a46e913b31bcef92c}{
58 void \hyperlink{classBackbone_ae50cec4f0c49149a46e913b31bcef92c}{ready} ()}
59 \label{classBackbone_ae50cec4f0c49149a46e913b31bcef92c}
60
61 \begin{DoxyCompactList}\small\item\em emitted when there are search result ready to fetch \item\end{DoxyCompactList}\item 
62 \hypertarget{classBackbone_a7e218d1df6d69ddf3ddbc5c3d2ba9453}{
63 void \hyperlink{classBackbone_a7e218d1df6d69ddf3ddbc5c3d2ba9453}{htmlReady} ()}
64 \label{classBackbone_a7e218d1df6d69ddf3ddbc5c3d2ba9453}
65
66 \begin{DoxyCompactList}\small\item\em emitted when html result is ready to fetch \item\end{DoxyCompactList}\end{DoxyCompactItemize}
67 \subsection*{Public Member Functions}
68 \begin{DoxyCompactItemize}
69 \item 
70 \hyperlink{classBackbone_a68059c8a2598fbbba42c29a332b2472f}{Backbone} (QString pluginPath=\char`\"{}\char`\"{}, QString configPath=\char`\"{}\char`\"{}, bool dry=0, QObject $\ast$parent=0)
71 \item 
72 \hypertarget{classBackbone_a6edbf4e5819dbc551ab54dad66f474f2}{
73 {\bfseries Backbone} (const \hyperlink{classBackbone}{Backbone} \&b)}
74 \label{classBackbone_a6edbf4e5819dbc551ab54dad66f474f2}
75
76 \item 
77 QHash$<$ \hyperlink{classCommonDictInterface}{CommonDictInterface} $\ast$, bool $>$ \hyperlink{classBackbone_a4b027f51bb4cc3803f6be85bc25d6a4b}{getDictionaries} ()
78 \item 
79 QList$<$ \hyperlink{classCommonDictInterface}{CommonDictInterface} $\ast$ $>$ \hyperlink{classBackbone_a2fdfa0cf73fda5304635b61455b48db9}{getPlugins} ()
80 \item 
81 \hyperlink{classHistory}{History} $\ast$ \hyperlink{classBackbone_ac91e19871d56331ce0d744b8ea936e00}{history} ()
82 \item 
83 QMultiHash$<$ QString, \hyperlink{classTranslation}{Translation} $\ast$ $>$ \hyperlink{classBackbone_adeaabfee86975f65b8e728b8582caa35}{result} ()
84 \item 
85 int \hyperlink{classBackbone_addad48903943006b6a4661169f80ee5a}{searchLimit} () const 
86 \item 
87 int \hyperlink{classBackbone_ad0ddecf22c51867e984cb4e6a745d67c}{activeSearches} () const 
88 \item 
89 QStringList \hyperlink{classBackbone_a56df9bdfbe82998011f95ecb3c5bd7db}{htmls} ()
90 \end{DoxyCompactItemize}
91
92
93 \subsection{Detailed Description}
94 Inner part of dictionary -\/ glues together GUI and plugins. \hyperlink{classBackbone}{Backbone} is responsible for managing plugins and dictionaries, starting new searches and threads, merging search results from multiple dictionaries.
95
96 Each plugin may live in multiple instances -\/ each with its own dictionary, backbone must provide way to create them at start (with specific \hyperlink{classSettings}{Settings}) and distinguich each ditionary. 
97
98 \subsection{Constructor \& Destructor Documentation}
99 \hypertarget{classBackbone_a68059c8a2598fbbba42c29a332b2472f}{
100 \index{Backbone@{Backbone}!Backbone@{Backbone}}
101 \index{Backbone@{Backbone}!Backbone@{Backbone}}
102 \subsubsection[{Backbone}]{\setlength{\rightskip}{0pt plus 5cm}Backbone::Backbone (QString {\em pluginPath} = {\ttfamily \char`\"{}\char`\"{}}, \/  QString {\em configPath} = {\ttfamily \char`\"{}\char`\"{}}, \/  bool {\em dry} = {\ttfamily 0}, \/  QObject $\ast$ {\em parent} = {\ttfamily 0})}}
103 \label{classBackbone_a68059c8a2598fbbba42c29a332b2472f}
104
105 \begin{DoxyParams}{Parameters}
106 \item[{\em pluginPath}]path to plugins (leave blank for default) \item[{\em configPath}]path to folder with configuration files \end{DoxyParams}
107
108
109 \subsection{Member Function Documentation}
110 \hypertarget{classBackbone_ad0ddecf22c51867e984cb4e6a745d67c}{
111 \index{Backbone@{Backbone}!activeSearches@{activeSearches}}
112 \index{activeSearches@{activeSearches}!Backbone@{Backbone}}
113 \subsubsection[{activeSearches}]{\setlength{\rightskip}{0pt plus 5cm}int Backbone::activeSearches () const}}
114 \label{classBackbone_ad0ddecf22c51867e984cb4e6a745d67c}
115 \begin{DoxyReturn}{Returns}
116 number of active searches 
117 \end{DoxyReturn}
118 \hypertarget{classBackbone_aaf91c7fe4e12d7007ca761dc89c14c8a}{
119 \index{Backbone@{Backbone}!addDictionary@{addDictionary}}
120 \index{addDictionary@{addDictionary}!Backbone@{Backbone}}
121 \subsubsection[{addDictionary}]{\setlength{\rightskip}{0pt plus 5cm}void Backbone::addDictionary ({\bf CommonDictInterface} $\ast$ {\em dict}, \/  bool {\em active} = {\ttfamily 1})\hspace{0.3cm}{\ttfamily  \mbox{[}slot\mbox{]}}}}
122 \label{classBackbone_aaf91c7fe4e12d7007ca761dc89c14c8a}
123
124
125 adds new dictionary and activate it 
126
127
128 \begin{DoxyParams}{Parameters}
129 \item[{\em dict}]dictionary to be added \item[{\em active}]decides whether searches are perfomed in given dictionaries \end{DoxyParams}
130 \hypertarget{classBackbone_a4b027f51bb4cc3803f6be85bc25d6a4b}{
131 \index{Backbone@{Backbone}!getDictionaries@{getDictionaries}}
132 \index{getDictionaries@{getDictionaries}!Backbone@{Backbone}}
133 \subsubsection[{getDictionaries}]{\setlength{\rightskip}{0pt plus 5cm}QHash$<$ {\bf CommonDictInterface} $\ast$, bool $>$ Backbone::getDictionaries ()}}
134 \label{classBackbone_a4b027f51bb4cc3803f6be85bc25d6a4b}
135 \begin{DoxyReturn}{Returns}
136 all loadded dictionaries with activity state flag 
137 \end{DoxyReturn}
138 \hypertarget{classBackbone_a2fdfa0cf73fda5304635b61455b48db9}{
139 \index{Backbone@{Backbone}!getPlugins@{getPlugins}}
140 \index{getPlugins@{getPlugins}!Backbone@{Backbone}}
141 \subsubsection[{getPlugins}]{\setlength{\rightskip}{0pt plus 5cm}QList$<$ {\bf CommonDictInterface} $\ast$ $>$ Backbone::getPlugins ()}}
142 \label{classBackbone_a2fdfa0cf73fda5304635b61455b48db9}
143 \begin{DoxyReturn}{Returns}
144 all loadded plugins 
145 \end{DoxyReturn}
146 \hypertarget{classBackbone_ac91e19871d56331ce0d744b8ea936e00}{
147 \index{Backbone@{Backbone}!history@{history}}
148 \index{history@{history}!Backbone@{Backbone}}
149 \subsubsection[{history}]{\setlength{\rightskip}{0pt plus 5cm}{\bf History} $\ast$ Backbone::history ()}}
150 \label{classBackbone_ac91e19871d56331ce0d744b8ea936e00}
151 \begin{DoxyReturn}{Returns}
152 history of performed searches 
153 \end{DoxyReturn}
154 \hypertarget{classBackbone_a56df9bdfbe82998011f95ecb3c5bd7db}{
155 \index{Backbone@{Backbone}!htmls@{htmls}}
156 \index{htmls@{htmls}!Backbone@{Backbone}}
157 \subsubsection[{htmls}]{\setlength{\rightskip}{0pt plus 5cm}QStringList Backbone::htmls ()}}
158 \label{classBackbone_a56df9bdfbe82998011f95ecb3c5bd7db}
159 \begin{DoxyReturn}{Returns}
160 final translation (after searching for html) 
161 \end{DoxyReturn}
162 \hypertarget{classBackbone_aa61afbf8ef2e05c0c2a9634fbdccad19}{
163 \index{Backbone@{Backbone}!quit@{quit}}
164 \index{quit@{quit}!Backbone@{Backbone}}
165 \subsubsection[{quit}]{\setlength{\rightskip}{0pt plus 5cm}void Backbone::quit ()\hspace{0.3cm}{\ttfamily  \mbox{[}slot\mbox{]}}}}
166 \label{classBackbone_aa61afbf8ef2e05c0c2a9634fbdccad19}
167
168
169 stops all current activity -\/ emiting signal 
170
171 \begin{DoxySeeAlso}{See also}
172 \hyperlink{classBackbone_afef04921ba89c424eb882cc14153de39}{closeOk} 
173 \end{DoxySeeAlso}
174 \hypertarget{classBackbone_a056fc494ed689f253d83fc2366c07931}{
175 \index{Backbone@{Backbone}!removeDictionary@{removeDictionary}}
176 \index{removeDictionary@{removeDictionary}!Backbone@{Backbone}}
177 \subsubsection[{removeDictionary}]{\setlength{\rightskip}{0pt plus 5cm}void Backbone::removeDictionary ({\bf CommonDictInterface} $\ast$ {\em dict})\hspace{0.3cm}{\ttfamily  \mbox{[}slot\mbox{]}}}}
178 \label{classBackbone_a056fc494ed689f253d83fc2366c07931}
179
180
181 Removes given dictionary. 
182
183
184 \begin{DoxyParams}{Parameters}
185 \item[{\em dict}]dictionary to be deleted \end{DoxyParams}
186 \hypertarget{classBackbone_adeaabfee86975f65b8e728b8582caa35}{
187 \index{Backbone@{Backbone}!result@{result}}
188 \index{result@{result}!Backbone@{Backbone}}
189 \subsubsection[{result}]{\setlength{\rightskip}{0pt plus 5cm}QMultiHash$<$ QString, {\bf Translation} $\ast$ $>$ Backbone::result ()}}
190 \label{classBackbone_adeaabfee86975f65b8e728b8582caa35}
191 \begin{DoxyReturn}{Returns}
192 return search fesult 
193 \end{DoxyReturn}
194 \hypertarget{classBackbone_a3b1f2cf8de594cbd18bef4ca854337e2}{
195 \index{Backbone@{Backbone}!search@{search}}
196 \index{search@{search}!Backbone@{Backbone}}
197 \subsubsection[{search}]{\setlength{\rightskip}{0pt plus 5cm}void Backbone::search (QString {\em word})\hspace{0.3cm}{\ttfamily  \mbox{[}slot\mbox{]}}}}
198 \label{classBackbone_a3b1f2cf8de594cbd18bef4ca854337e2}
199
200
201 search for a word translation 
202
203
204 \begin{DoxyParams}{Parameters}
205 \item[{\em word}]to be translated \end{DoxyParams}
206 \hypertarget{classBackbone_a67dbca9402d40e4678f879ff8da3866e}{
207 \index{Backbone@{Backbone}!searchHtml@{searchHtml}}
208 \index{searchHtml@{searchHtml}!Backbone@{Backbone}}
209 \subsubsection[{searchHtml}]{\setlength{\rightskip}{0pt plus 5cm}void Backbone::searchHtml (QList$<$ {\bf Translation} $\ast$ $>$ {\em translations})\hspace{0.3cm}{\ttfamily  \mbox{[}slot\mbox{]}}}}
210 \label{classBackbone_a67dbca9402d40e4678f879ff8da3866e}
211
212
213 Performs search for final translation (html/xml) form. 
214
215
216 \begin{DoxyParams}{Parameters}
217 \item[{\em list}]of Translation$\ast$ to be searched for \end{DoxyParams}
218 \hypertarget{classBackbone_addad48903943006b6a4661169f80ee5a}{
219 \index{Backbone@{Backbone}!searchLimit@{searchLimit}}
220 \index{searchLimit@{searchLimit}!Backbone@{Backbone}}
221 \subsubsection[{searchLimit}]{\setlength{\rightskip}{0pt plus 5cm}int Backbone::searchLimit () const}}
222 \label{classBackbone_addad48903943006b6a4661169f80ee5a}
223 \begin{DoxyReturn}{Returns}
224 maximum number of word that plugin could find 
225 \end{DoxyReturn}
226 \hypertarget{classBackbone_ac23b486119652095d956413a6e68afec}{
227 \index{Backbone@{Backbone}!selectedDictionaries@{selectedDictionaries}}
228 \index{selectedDictionaries@{selectedDictionaries}!Backbone@{Backbone}}
229 \subsubsection[{selectedDictionaries}]{\setlength{\rightskip}{0pt plus 5cm}void Backbone::selectedDictionaries (QList$<$ {\bf CommonDictInterface} $\ast$ $>$ {\em activeDicts})\hspace{0.3cm}{\ttfamily  \mbox{[}slot\mbox{]}}}}
230 \label{classBackbone_ac23b486119652095d956413a6e68afec}
231
232
233 sets active dictionaries (searches are performed only in active dicts 
234
235
236 \begin{DoxyParams}{Parameters}
237 \item[{\em List}]of dictionaris to be activated \end{DoxyParams}
238
239
240 The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
241 \item 
242 backbone.h\item 
243 backbone.cpp\end{DoxyCompactItemize}