\hypertarget{classMainWindow}{
\section{MainWindow Class Reference}
\label{classMainWindow}\index{MainWindow@{MainWindow}}
}


Implements interface for GUI.  




{\ttfamily \#include $<$MainWindow.h$>$}

Inheritance diagram for MainWindow:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2cm]{classMainWindow}
\end{center}
\end{figure}
\subsection*{Public Slots}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{classMainWindow_a16d0c7d46fc49bfa1cada597e349549a}{searchExact} (QString)
\begin{DoxyCompactList}\small\item\em Search in exact mode for given word. \item\end{DoxyCompactList}\item 
void \hyperlink{classMainWindow_a9a56d2e699da84f9647984852cb6041b}{wordListReady} ()
\begin{DoxyCompactList}\small\item\em Gets word list from backbone and prepares received list to display. \item\end{DoxyCompactList}\item 
\hypertarget{classMainWindow_afea3664ab8d180bc705b552b7f745136}{
void \hyperlink{classMainWindow_afea3664ab8d180bc705b552b7f745136}{translationsReady} ()}
\label{classMainWindow_afea3664ab8d180bc705b552b7f745136}

\begin{DoxyCompactList}\small\item\em Gets translation strings from backbone and emit signal to display them. \item\end{DoxyCompactList}\item 
void \hyperlink{classMainWindow_ab88154764298f46e81f942262170f4b9}{addToHistory} (QList$<$ \hyperlink{classTranslation}{Translation} $\ast$ $>$)
\begin{DoxyCompactList}\small\item\em Adds to history key words from given translations. \item\end{DoxyCompactList}\item 
\hypertarget{classMainWindow_a655d251389256b1e062513f6ff762543}{
void \hyperlink{classMainWindow_a655d251389256b1e062513f6ff762543}{showHistory} ()}
\label{classMainWindow_a655d251389256b1e062513f6ff762543}

\begin{DoxyCompactList}\small\item\em Shows history dialog. \item\end{DoxyCompactList}\item 
void \hyperlink{classMainWindow_aaac2ae9385150bf83eb6c1d73e745e3c}{historyNext} ()
\begin{DoxyCompactList}\small\item\em Shows translation of next word in history. \item\end{DoxyCompactList}\item 
void \hyperlink{classMainWindow_ab3d88584e7391cedb791248dc7b13b78}{historyPrev} ()
\begin{DoxyCompactList}\small\item\em Shows translation of previous word in history. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{classMainWindow_a4acc6192d273eb38e9082b4934202b81}{MainWindow} (\hyperlink{classBackbone}{Backbone} $\ast$backbone, QWidget $\ast$parent=0)
\begin{DoxyCompactList}\small\item\em Constructor. \item\end{DoxyCompactList}\item 
QHash$<$ \hyperlink{classCommonDictInterface}{CommonDictInterface} $\ast$, bool $>$ \hyperlink{classMainWindow_a0fd2d755ce951f3dfb535d555b957de7}{getDictionaries} ()
\item 
QList$<$ \hyperlink{classCommonDictInterface}{CommonDictInterface} $\ast$ $>$ \hyperlink{classMainWindow_a021ff10f30db21337b54b3dfaae0e9a0}{getPlugins} ()
\begin{DoxyCompactList}\small\item\em Returns all loaded plugins. \item\end{DoxyCompactList}\item 
bool \hyperlink{classMainWindow_a88a06565de22a608629bfa4a15ad5839}{exactSearch} ()
\begin{DoxyCompactList}\small\item\em Indicates if GUI is in exact search mode. \item\end{DoxyCompactList}\item 
void \hyperlink{classMainWindow_a78e044c5bd7446b0d2105f98573b9489}{setExactSearch} (bool)
\begin{DoxyCompactList}\small\item\em Sets GUI exact search mode. \item\end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{classMainWindow_a38edb88d43e844aca9d2e762c8706565}{
void \hyperlink{classMainWindow_a38edb88d43e844aca9d2e762c8706565}{closeEvent} (QCloseEvent $\ast$)}
\label{classMainWindow_a38edb88d43e844aca9d2e762c8706565}

\begin{DoxyCompactList}\small\item\em When user wants to close application, we first sends signal to stop all ongoing searches. \item\end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Implements interface for GUI. Create all of GUI subcomponents, and connects all GUI interface signals with suitable backbone signals and slots. Only this class has direct access to backbone object. It manages all request of subcomponents e. g. searching of given word, displaying history, removing dictionary. It also provide data from backbone to subcomponents e. g. result of search. 

\subsection{Constructor \& Destructor Documentation}
\hypertarget{classMainWindow_a4acc6192d273eb38e9082b4934202b81}{
\index{MainWindow@{MainWindow}!MainWindow@{MainWindow}}
\index{MainWindow@{MainWindow}!MainWindow@{MainWindow}}
\subsubsection[{MainWindow}]{\setlength{\rightskip}{0pt plus 5cm}MainWindow::MainWindow ({\bf Backbone} $\ast$ {\em backbone}, \/  QWidget $\ast$ {\em parent} = {\ttfamily 0})\hspace{0.3cm}{\ttfamily  \mbox{[}explicit\mbox{]}}}}
\label{classMainWindow_a4acc6192d273eb38e9082b4934202b81}


Constructor. 


\begin{DoxyParams}{Parameters}
\item[{\em backbone}]object which will doing all searches and returns data \item[{\em parent}]parent widget of this window \end{DoxyParams}


\subsection{Member Function Documentation}
\hypertarget{classMainWindow_ab88154764298f46e81f942262170f4b9}{
\index{MainWindow@{MainWindow}!addToHistory@{addToHistory}}
\index{addToHistory@{addToHistory}!MainWindow@{MainWindow}}
\subsubsection[{addToHistory}]{\setlength{\rightskip}{0pt plus 5cm}void MainWindow::addToHistory (QList$<$ {\bf Translation} $\ast$ $>$ {\em trans})\hspace{0.3cm}{\ttfamily  \mbox{[}virtual, slot\mbox{]}}}}
\label{classMainWindow_ab88154764298f46e81f942262170f4b9}


Adds to history key words from given translations. 

By default this slot is connected to signal searchTranslations, and passed translation list contains only translation with the same key, so only one word is added to history. 
\begin{DoxyParams}{Parameters}
\item[{\em list}]of translations with key words \end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\hyperlink{classGUIInterface_a9855cd24df15d961ec062f0c6b80a263}{searchTranslations()} 
\end{DoxySeeAlso}


Implements \hyperlink{classGUIInterface_a4081962fcbd7e8063bb87fcc444b6124}{GUIInterface}.

\hypertarget{classMainWindow_a88a06565de22a608629bfa4a15ad5839}{
\index{MainWindow@{MainWindow}!exactSearch@{exactSearch}}
\index{exactSearch@{exactSearch}!MainWindow@{MainWindow}}
\subsubsection[{exactSearch}]{\setlength{\rightskip}{0pt plus 5cm}bool MainWindow::exactSearch ()}}
\label{classMainWindow_a88a06565de22a608629bfa4a15ad5839}


Indicates if GUI is in exact search mode. 

When GUI is in exact search mode it search for word, and if find exacly matching translation it directly displays it, whithout displaying matching word list. This mode is used for browsing search history and search words from application arguments. \begin{DoxyReturn}{Returns}
flag indicating if GUI is in exact search mode 
\end{DoxyReturn}


Reimplemented from \hyperlink{classGUIInterface_a83f7716f43447730aeda078cc202d48b}{GUIInterface}.

\hypertarget{classMainWindow_a0fd2d755ce951f3dfb535d555b957de7}{
\index{MainWindow@{MainWindow}!getDictionaries@{getDictionaries}}
\index{getDictionaries@{getDictionaries}!MainWindow@{MainWindow}}
\subsubsection[{getDictionaries}]{\setlength{\rightskip}{0pt plus 5cm}QHash$<$ {\bf CommonDictInterface} $\ast$, bool $>$ MainWindow::getDictionaries ()\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classMainWindow_a0fd2d755ce951f3dfb535d555b957de7}
Returns all loaded dictionaries with infromation about that they are active/inactive

\begin{DoxyReturn}{Returns}
Hash of pointers to dictionary and boolean flag indicating if dictionary is active 
\end{DoxyReturn}


Implements \hyperlink{classGUIInterface_a65f5532b1d404c41f22e6408138bd87a}{GUIInterface}.

\hypertarget{classMainWindow_a021ff10f30db21337b54b3dfaae0e9a0}{
\index{MainWindow@{MainWindow}!getPlugins@{getPlugins}}
\index{getPlugins@{getPlugins}!MainWindow@{MainWindow}}
\subsubsection[{getPlugins}]{\setlength{\rightskip}{0pt plus 5cm}QList$<$ {\bf CommonDictInterface} $\ast$ $>$ MainWindow::getPlugins ()\hspace{0.3cm}{\ttfamily  \mbox{[}virtual\mbox{]}}}}
\label{classMainWindow_a021ff10f30db21337b54b3dfaae0e9a0}


Returns all loaded plugins. 

\begin{DoxyReturn}{Returns}
List of pointers to plugins 
\end{DoxyReturn}


Implements \hyperlink{classGUIInterface_a232872064056fdcfa752b314d9e34bfa}{GUIInterface}.

\hypertarget{classMainWindow_aaac2ae9385150bf83eb6c1d73e745e3c}{
\index{MainWindow@{MainWindow}!historyNext@{historyNext}}
\index{historyNext@{historyNext}!MainWindow@{MainWindow}}
\subsubsection[{historyNext}]{\setlength{\rightskip}{0pt plus 5cm}void MainWindow::historyNext ()\hspace{0.3cm}{\ttfamily  \mbox{[}virtual, slot\mbox{]}}}}
\label{classMainWindow_aaac2ae9385150bf83eb6c1d73e745e3c}


Shows translation of next word in history. 

It will work only if there is available next word in history. \hyperlink{classTranslation}{Translation} of word is searched with \hyperlink{classMainWindow_a16d0c7d46fc49bfa1cada597e349549a}{searchExact()} function \begin{DoxySeeAlso}{See also}
\hyperlink{classMainWindow_a16d0c7d46fc49bfa1cada597e349549a}{searchExact()} 
\end{DoxySeeAlso}


Implements \hyperlink{classGUIInterface_a9b9d53a56b052cf4c7d5e5bc158b8036}{GUIInterface}.

\hypertarget{classMainWindow_ab3d88584e7391cedb791248dc7b13b78}{
\index{MainWindow@{MainWindow}!historyPrev@{historyPrev}}
\index{historyPrev@{historyPrev}!MainWindow@{MainWindow}}
\subsubsection[{historyPrev}]{\setlength{\rightskip}{0pt plus 5cm}void MainWindow::historyPrev ()\hspace{0.3cm}{\ttfamily  \mbox{[}virtual, slot\mbox{]}}}}
\label{classMainWindow_ab3d88584e7391cedb791248dc7b13b78}


Shows translation of previous word in history. 

It will work only if there is available previous word in history. \hyperlink{classTranslation}{Translation} of word is searched with \hyperlink{classMainWindow_a16d0c7d46fc49bfa1cada597e349549a}{searchExact()} function \begin{DoxySeeAlso}{See also}
\hyperlink{classMainWindow_a16d0c7d46fc49bfa1cada597e349549a}{searchExact()} 
\end{DoxySeeAlso}


Implements \hyperlink{classGUIInterface_a47243e01c2d2e3887ee3fef656f84475}{GUIInterface}.

\hypertarget{classMainWindow_a16d0c7d46fc49bfa1cada597e349549a}{
\index{MainWindow@{MainWindow}!searchExact@{searchExact}}
\index{searchExact@{searchExact}!MainWindow@{MainWindow}}
\subsubsection[{searchExact}]{\setlength{\rightskip}{0pt plus 5cm}void MainWindow::searchExact (QString {\em word})\hspace{0.3cm}{\ttfamily  \mbox{[}virtual, slot\mbox{]}}}}
\label{classMainWindow_a16d0c7d46fc49bfa1cada597e349549a}


Search in exact mode for given word. 

GUI will be automaticaly set into exact search mode, and after search or break will be unset from exact search mode. 
\begin{DoxyParams}{Parameters}
\item[{\em word}]which will be searched in dictionaries \end{DoxyParams}


Implements \hyperlink{classGUIInterface_a39d3969fbadaea6da410a93dc3bebdd7}{GUIInterface}.

\hypertarget{classMainWindow_a78e044c5bd7446b0d2105f98573b9489}{
\index{MainWindow@{MainWindow}!setExactSearch@{setExactSearch}}
\index{setExactSearch@{setExactSearch}!MainWindow@{MainWindow}}
\subsubsection[{setExactSearch}]{\setlength{\rightskip}{0pt plus 5cm}void MainWindow::setExactSearch (bool {\em exact})}}
\label{classMainWindow_a78e044c5bd7446b0d2105f98573b9489}


Sets GUI exact search mode. 

When GUI is in exact search mode it search for word, and if find exacly matching translation it directly displays it, whithout displaying matching word list. This mode is used for browsing search history and search words from application arguments. 
\begin{DoxyParams}{Parameters}
\item[{\em exactSearch}]flag indicating if GUI will be in exact search mode \end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\hyperlink{classMainWindow_a88a06565de22a608629bfa4a15ad5839}{exactSearch()} 
\end{DoxySeeAlso}


Reimplemented from \hyperlink{classGUIInterface_a4d9a8b5392fdbcec9a0b8663eba3c571}{GUIInterface}.

\hypertarget{classMainWindow_a9a56d2e699da84f9647984852cb6041b}{
\index{MainWindow@{MainWindow}!wordListReady@{wordListReady}}
\index{wordListReady@{wordListReady}!MainWindow@{MainWindow}}
\subsubsection[{wordListReady}]{\setlength{\rightskip}{0pt plus 5cm}void MainWindow::wordListReady ()\hspace{0.3cm}{\ttfamily  \mbox{[}virtual, slot\mbox{]}}}}
\label{classMainWindow_a9a56d2e699da84f9647984852cb6041b}


Gets word list from backbone and prepares received list to display. 

Checks if received list is empty, in that case displays suitable information. If GUI is in exact search mode it will search for exact word in received list, and if word is found it will emit signal to display it's translation. Otherwise it will display list of matching words and show suitable information. \begin{DoxySeeAlso}{See also}
\hyperlink{classMainWindow_a88a06565de22a608629bfa4a15ad5839}{exactSearch()} 

\hyperlink{classGUIInterface_a10454da99d774b68a38f1f0c374c4c51}{showTranslation()} 
\end{DoxySeeAlso}


Implements \hyperlink{classGUIInterface_a0387f70e18b390cf1e229cbeb27a61c8}{GUIInterface}.



The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item 
\hyperlink{MainWindow_8h}{MainWindow.h}\item 
MainWindow.cpp\end{DoxyCompactItemize}
