--- /dev/null
+<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
+<!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">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<title>Urpo: /holvi/arto/ohjelmointi/urpo-0.0/urpo/urpomainwindow.cpp Source File</title>
+<link href="tabs.css" rel="stylesheet" type="text/css"/>
+<link href="search/search.css" rel="stylesheet" type="text/css"/>
+<script type="text/javaScript" src="search/search.js"></script>
+<link href="doxygen.css" rel="stylesheet" type="text/css"/>
+</head>
+<body onload='searchBox.OnSelectItem(0);'>
+<!-- Generated by Doxygen 1.6.3 -->
+<script type="text/javascript"><!--
+var searchBox = new SearchBox("searchBox", "search",false,'Search');
+--></script>
+<div class="navigation" id="top">
+ <div class="tabs">
+ <ul>
+ <li><a href="index.html"><span>Main Page</span></a></li>
+ <li><a href="annotated.html"><span>Classes</span></a></li>
+ <li class="current"><a href="files.html"><span>Files</span></a></li>
+ <li>
+ <div id="MSearchBox" class="MSearchBoxInactive">
+ <img id="MSearchSelect" src="search/search.png"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ alt=""/>
+ <input type="text" id="MSearchField" value="Search" accesskey="S"
+ onfocus="searchBox.OnSearchFieldFocus(true)"
+ onblur="searchBox.OnSearchFieldFocus(false)"
+ onkeyup="searchBox.OnSearchFieldChange(event)"/>
+ <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
+ </div>
+ </li>
+ </ul>
+ </div>
+ <div class="tabs">
+ <ul>
+ <li><a href="files.html"><span>File List</span></a></li>
+ </ul>
+ </div>
+<h1>/holvi/arto/ohjelmointi/urpo-0.0/urpo/urpomainwindow.cpp</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/**************************************************************************</span>
+<a name="l00002"></a>00002 <span class="comment"></span>
+<a name="l00003"></a>00003 <span class="comment"> URPO</span>
+<a name="l00004"></a>00004 <span class="comment"></span>
+<a name="l00005"></a>00005 <span class="comment"> Unix Remote Printing Operation</span>
+<a name="l00006"></a>00006 <span class="comment"> Copyright (c) Arto Hyvättinen 2010</span>
+<a name="l00007"></a>00007 <span class="comment"></span>
+<a name="l00008"></a>00008 <span class="comment"> This file is part of URPO.</span>
+<a name="l00009"></a>00009 <span class="comment"></span>
+<a name="l00010"></a>00010 <span class="comment"> URPO is free software: you can redistribute it and/or modify</span>
+<a name="l00011"></a>00011 <span class="comment"> it under the terms of the GNU General Public License as published by</span>
+<a name="l00012"></a>00012 <span class="comment"> the Free Software Foundation, either version 3 of the License, or</span>
+<a name="l00013"></a>00013 <span class="comment"> (at your option) any later version.</span>
+<a name="l00014"></a>00014 <span class="comment"></span>
+<a name="l00015"></a>00015 <span class="comment"> URPO is distributed in the hope that it will be useful,</span>
+<a name="l00016"></a>00016 <span class="comment"> but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
+<a name="l00017"></a>00017 <span class="comment"> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span>
+<a name="l00018"></a>00018 <span class="comment"> GNU General Public License for more details.</span>
+<a name="l00019"></a>00019 <span class="comment"></span>
+<a name="l00020"></a>00020 <span class="comment"></span>
+<a name="l00021"></a>00021 <span class="comment">**************************************************************************/</span>
+<a name="l00022"></a>00022
+<a name="l00023"></a>00023 <span class="preprocessor">#include "urpomainwindow.h"</span>
+<a name="l00024"></a>00024
+<a name="l00025"></a>00025
+<a name="l00026"></a>00026 <span class="preprocessor">#include "urpoconnectionsettings.h"</span>
+<a name="l00027"></a>00027 <span class="preprocessor">#include "printerlistjob.h"</span>
+<a name="l00028"></a>00028 <span class="preprocessor">#include "debugconsole.h"</span>
+<a name="l00029"></a>00029 <span class="preprocessor">#include "printwidget.h"</span>
+<a name="l00030"></a>00030 <span class="preprocessor">#include "printjob.h"</span>
+<a name="l00031"></a>00031
+<a name="l00032"></a>00032 <span class="preprocessor">#include <QMenuBar></span>
+<a name="l00033"></a>00033 <span class="preprocessor">#include <QMessageBox></span>
+<a name="l00034"></a>00034 <span class="preprocessor">#include <QApplication></span>
+<a name="l00035"></a>00035 <span class="preprocessor">#include <QTextBrowser></span>
+<a name="l00036"></a>00036 <span class="preprocessor">#include <QUrl></span>
+<a name="l00037"></a>00037 <span class="preprocessor">#include <QLocale></span>
+<a name="l00038"></a>00038 <span class="preprocessor">#include <QFile></span>
+<a name="l00039"></a>00039 <span class="preprocessor">#include "settingsdialog.h"</span>
+<a name="l00040"></a>00040
+<a name="l00041"></a>00041 <span class="preprocessor">#define VERSION "0.9" </span>
+<a name="l00043"></a>00043 <span class="preprocessor">UrpoMainWindow::UrpoMainWindow(QWidget *parent)</span>
+<a name="l00044"></a>00044 <span class="preprocessor"></span> : QMainWindow(parent)
+<a name="l00045"></a>00045 {
+<a name="l00046"></a>00046 setWindowTitle(QString(<span class="stringliteral">"URPO "</span>) + VERSION );
+<a name="l00047"></a>00047
+<a name="l00048"></a>00048 <span class="comment">// Load connection settings</span>
+<a name="l00049"></a>00049 settings_ = <span class="keyword">new</span> <a class="code" href="class_urpo_connection_settings.html" title="Connection information, support storing settings.">UrpoConnectionSettings</a>(<span class="stringliteral">"Urpo"</span>,<span class="stringliteral">"Urpo"</span>);
+<a name="l00050"></a>00050 settings_->load();
+<a name="l00051"></a>00051
+<a name="l00052"></a>00052 <span class="comment">// Connect to debug monitor</span>
+<a name="l00053"></a>00053 monitor_ = <span class="keyword">new</span> <a class="code" href="class_debug_console.html" title="Show debug messages.">DebugConsole</a>();
+<a name="l00054"></a>00054 settings_->setDebugMonitor(monitor_);
+<a name="l00055"></a>00055
+<a name="l00056"></a>00056 <span class="comment">// Init central widget</span>
+<a name="l00057"></a>00057 printWidget_ = <span class="keyword">new</span> <a class="code" href="class_print_widget.html" title="GUI Widget of Urpo printing.">PrintWidget</a>;
+<a name="l00058"></a>00058 setCentralWidget(printWidget_);
+<a name="l00059"></a>00059
+<a name="l00060"></a>00060 <span class="comment">// Init Help</span>
+<a name="l00061"></a>00061 initHelp();
+<a name="l00062"></a>00062 <span class="comment">// Init menu</span>
+<a name="l00063"></a>00063 initMenu();
+<a name="l00064"></a>00064
+<a name="l00065"></a>00065 <span class="comment">// Connect buttons</span>
+<a name="l00066"></a>00066 connect( printWidget_, SIGNAL(reconnect()), <span class="keyword">this</span>, SLOT(getPrinters()));
+<a name="l00067"></a>00067 connect( printWidget_, SIGNAL(print(QString,QString)), <span class="keyword">this</span>, SLOT(print(QString,QString)));
+<a name="l00068"></a>00068
+<a name="l00069"></a>00069 <span class="comment">// Init jobs</span>
+<a name="l00070"></a>00070
+<a name="l00071"></a>00071 <span class="comment">// Init printers list job to get printers list</span>
+<a name="l00072"></a>00072 printerListJob_ = <span class="keyword">new</span> <a class="code" href="class_printer_list_job.html" title="Get list of available printers.">PrinterListJob</a>( settings_);
+<a name="l00073"></a>00073 <span class="comment">// Connect finished to printersReceives:</span>
+<a name="l00074"></a>00074 <span class="comment">// - if success, enable printing</span>
+<a name="l00075"></a>00075 <span class="comment">// - if fail, go to Settings dialog</span>
+<a name="l00076"></a>00076 connect( printerListJob_, SIGNAL(finished(<span class="keywordtype">bool</span>,QString)), <span class="keyword">this</span>, SLOT(printersReceived(<span class="keywordtype">bool</span>,QString)));
+<a name="l00077"></a>00077
+<a name="l00078"></a>00078 <span class="comment">// Init print job</span>
+<a name="l00079"></a>00079 printJob_ = <span class="keyword">new</span> <a class="code" href="class_print_job.html" title="File printing job&#39;.">PrintJob</a>(settings_);
+<a name="l00080"></a>00080 connect( printJob_, SIGNAL(finished(<span class="keywordtype">bool</span>,QString)), <span class="keyword">this</span>, SLOT(printFinished(<span class="keywordtype">bool</span>,QString)));
+<a name="l00081"></a>00081
+<a name="l00082"></a>00082 <span class="keywordflow">if</span>( settings_->getHost().isEmpty())
+<a name="l00083"></a>00083 <span class="comment">// If no host settings, go first to settings</span>
+<a name="l00084"></a>00084 settings();
+<a name="l00085"></a>00085 <span class="keywordflow">else</span>
+<a name="l00086"></a>00086 <span class="comment">// Try to get printers list</span>
+<a name="l00087"></a>00087 getPrinters();
+<a name="l00088"></a>00088
+<a name="l00089"></a>00089
+<a name="l00090"></a>00090 }
+<a name="l00091"></a>00091
+<a name="l00092"></a>00092 UrpoMainWindow::~UrpoMainWindow()
+<a name="l00093"></a>00093 {
+<a name="l00094"></a>00094
+<a name="l00095"></a>00095 }
+<a name="l00096"></a>00096
+<a name="l00097"></a><a class="code" href="class_urpo_main_window.html#af4cbd77cd163252a26b9cecd6c34de11">00097</a> <span class="keywordtype">void</span> <a class="code" href="class_urpo_main_window.html#af4cbd77cd163252a26b9cecd6c34de11" title="Start printers getting.">UrpoMainWindow::getPrinters</a>()
+<a name="l00098"></a>00098 {
+<a name="l00099"></a>00099
+<a name="l00100"></a>00100 printWidget_-><a class="code" href="class_print_widget.html#a6a7ec1bbfe668da0e65aae39cd9d5a7e" title="Set status information.">setStatus</a>(tr(<span class="stringliteral">"Connecting..."</span>),<span class="keyword">true</span>);
+<a name="l00101"></a>00101 connect(printWidget_, SIGNAL(cancel()), printerListJob_, SLOT(cancel()));
+<a name="l00102"></a>00102 printerListJob_-><a class="code" href="class_urpo_job.html#ae4549ace1bc2331462d22281b8cbdf0f" title="Start job.">start</a>();
+<a name="l00103"></a>00103
+<a name="l00104"></a>00104 }
+<a name="l00105"></a>00105
+<a name="l00106"></a>00106
+<a name="l00107"></a>00107 <span class="keywordtype">void</span> UrpoMainWindow::initMenu()
+<a name="l00108"></a>00108 {
+<a name="l00109"></a>00109
+<a name="l00110"></a>00110 QAction* settingsAction = <span class="keyword">new</span> QAction( tr(<span class="stringliteral">"Settings"</span>), <span class="keyword">this</span>);
+<a name="l00111"></a>00111 connect(settingsAction, SIGNAL(triggered()), <span class="keyword">this</span>, SLOT(<a class="code" href="class_urpo_main_window.html#abc82e9d98bc76494c11f8f1b733046ae" title="Show settings dialog.">settings</a>()) );
+<a name="l00112"></a>00112 menuBar()->addAction(settingsAction);
+<a name="l00113"></a>00113
+<a name="l00114"></a>00114 QAction* debugAction = <span class="keyword">new</span> QAction( tr(<span class="stringliteral">"Debug"</span>), <span class="keyword">this</span>);
+<a name="l00115"></a>00115 debugAction->setStatusTip(tr(<span class="stringliteral">"Open debug console"</span>));
+<a name="l00116"></a>00116 connect(debugAction, SIGNAL(triggered()), <span class="keyword">this</span>, SLOT(<a class="code" href="class_urpo_main_window.html#a86f59c8dbdf3bc2ac411ef2b826dbd89" title="Show debug window.">debugWindow</a>() ));
+<a name="l00117"></a>00117 menuBar()->addAction(debugAction);
+<a name="l00118"></a>00118
+<a name="l00119"></a>00119 QAction* aboutAction = <span class="keyword">new</span> QAction( tr(<span class="stringliteral">"About"</span>), <span class="keyword">this</span>);
+<a name="l00120"></a>00120 connect(aboutAction, SIGNAL(triggered()), <span class="keyword">this</span>, SLOT(<a class="code" href="class_urpo_main_window.html#a7735827afb283fb173856ba825818769" title="Show about dialog.">about</a>()));
+<a name="l00121"></a>00121 menuBar()->addAction(aboutAction);
+<a name="l00122"></a>00122
+<a name="l00123"></a>00123 QAction* aboutQtAction = <span class="keyword">new</span> QAction( tr(<span class="stringliteral">"About Qt"</span>), <span class="keyword">this</span> );
+<a name="l00124"></a>00124 connect(aboutQtAction, SIGNAL(triggered()), qApp, SLOT(aboutQt()));
+<a name="l00125"></a>00125 menuBar()->addAction(aboutQtAction);
+<a name="l00126"></a>00126
+<a name="l00127"></a>00127
+<a name="l00128"></a>00128 QAction* helpAction = <span class="keyword">new</span> QAction( tr(<span class="stringliteral">"Help"</span>), <span class="keyword">this</span> );
+<a name="l00129"></a>00129 connect( helpAction, SIGNAL(triggered()), <span class="keyword">this</span>, SLOT(<a class="code" href="class_urpo_main_window.html#a4d8b27b7df20f2f2cee6d31f36a0bac1" title="Show help window.">helpWindow</a>()));
+<a name="l00130"></a>00130 menuBar()->addAction(helpAction);
+<a name="l00131"></a>00131
+<a name="l00132"></a>00132 }
+<a name="l00133"></a>00133
+<a name="l00134"></a>00134 <span class="keywordtype">void</span> UrpoMainWindow::initHelp()
+<a name="l00135"></a>00135 {
+<a name="l00136"></a>00136
+<a name="l00137"></a>00137 <span class="comment">// Init help</span>
+<a name="l00138"></a>00138 helpBrowser_ = <span class="keyword">new</span> QTextBrowser();
+<a name="l00139"></a>00139 helpBrowser_->setWindowTitle(tr(<span class="stringliteral">"Urpo Help"</span>));
+<a name="l00140"></a>00140
+<a name="l00141"></a>00141 <span class="comment">// Load help file</span>
+<a name="l00142"></a>00142 <span class="comment">// Try to load locale version index_fi etc.</span>
+<a name="l00143"></a>00143 QString language=QLocale::system().name().left(2);
+<a name="l00144"></a>00144 QString helpfilename = QString(<span class="stringliteral">":/help/index_"</span>) + language + QString(<span class="stringliteral">".html"</span>);
+<a name="l00145"></a>00145
+<a name="l00146"></a>00146 QFile helpfile( helpfilename );
+<a name="l00147"></a>00147 <span class="keywordflow">if</span>( helpfile.exists() )
+<a name="l00148"></a>00148 helpBrowser_->setSource(QUrl( QString(<span class="stringliteral">"qrc"</span>) + helpfilename ));
+<a name="l00149"></a>00149 <span class="keywordflow">else</span>
+<a name="l00150"></a>00150 <span class="comment">// Not find, load general</span>
+<a name="l00151"></a>00151 helpBrowser_->setSource(QUrl(<span class="stringliteral">"qrc:/help/index.html"</span>));
+<a name="l00152"></a>00152
+<a name="l00153"></a>00153 helpBrowser_->setOpenExternalLinks(<span class="keyword">true</span>);
+<a name="l00154"></a>00154
+<a name="l00155"></a>00155 }
+<a name="l00156"></a>00156
+<a name="l00157"></a><a class="code" href="class_urpo_main_window.html#a7b9ba5635e1f9f3a516e0e516c8bb82c">00157</a> <span class="keywordtype">void</span> <a class="code" href="class_urpo_main_window.html#a7b9ba5635e1f9f3a516e0e516c8bb82c" title="Populate printer QCombo and enable printing.">UrpoMainWindow::printersReceived</a>(<span class="keywordtype">bool</span> success, QString error)
+<a name="l00158"></a>00158 {
+<a name="l00159"></a>00159 <span class="comment">// Disconnect cancel button out of printerListJob</span>
+<a name="l00160"></a>00160 disconnect(printWidget_, SIGNAL(cancel()), printerListJob_, SLOT(cancel()));
+<a name="l00161"></a>00161 <span class="keywordflow">if</span>(success)
+<a name="l00162"></a>00162 {
+<a name="l00163"></a>00163 <span class="comment">// PrinterListJob successed</span>
+<a name="l00164"></a>00164 printWidget_-><a class="code" href="class_print_widget.html#a9f5c076fb72f1e0453f58e4351e7b23c" title="Set printers.">setPrinters</a>( printerListJob_-><a class="code" href="class_printer_list_job.html#ac31476343a7d6d4b4dbc98f0a9082992" title="List of printers in system.">getPrinters</a>());
+<a name="l00165"></a>00165 <span class="keywordflow">if</span>( printerListJob_-><a class="code" href="class_printer_list_job.html#ac31476343a7d6d4b4dbc98f0a9082992" title="List of printers in system.">getPrinters</a>().isEmpty())
+<a name="l00166"></a>00166 {
+<a name="l00167"></a>00167 <span class="comment">// No printers, can't print</span>
+<a name="l00168"></a>00168 printWidget_-><a class="code" href="class_print_widget.html#a6a7ec1bbfe668da0e65aae39cd9d5a7e" title="Set status information.">setStatus</a>( QString(<span class="stringliteral">"<font color=red>"</span>) + tr(<span class="stringliteral">"No printers found"</span>) + QString(<span class="stringliteral">"</font>"</span>),<span class="keyword">false</span>);
+<a name="l00169"></a>00169 printWidget_-><a class="code" href="class_print_widget.html#a294239f17167fadcbd924344edf345bc" title="Set ready to print.">setReady</a>(<span class="keyword">false</span>);
+<a name="l00170"></a>00170 }
+<a name="l00171"></a>00171 <span class="keywordflow">else</span>
+<a name="l00172"></a>00172 {
+<a name="l00173"></a>00173 <span class="comment">// Ready to print</span>
+<a name="l00174"></a>00174 printWidget_-><a class="code" href="class_print_widget.html#a294239f17167fadcbd924344edf345bc" title="Set ready to print.">setReady</a>( <span class="keyword">true</span> );
+<a name="l00175"></a>00175 }
+<a name="l00176"></a>00176
+<a name="l00177"></a>00177 }
+<a name="l00178"></a>00178 <span class="keywordflow">else</span>
+<a name="l00179"></a>00179 {
+<a name="l00180"></a>00180 <span class="comment">// Unsuccess!</span>
+<a name="l00181"></a>00181 printWidget_-><a class="code" href="class_print_widget.html#a6a7ec1bbfe668da0e65aae39cd9d5a7e" title="Set status information.">setStatus</a>( QString(<span class="stringliteral">"<font color=red>"</span>) + error + QString(<span class="stringliteral">"</font>"</span>) );
+<a name="l00182"></a>00182 printWidget_-><a class="code" href="class_print_widget.html#a294239f17167fadcbd924344edf345bc" title="Set ready to print.">setReady</a>(<span class="keyword">false</span>);
+<a name="l00183"></a>00183 }
+<a name="l00184"></a>00184 }
+<a name="l00185"></a>00185
+<a name="l00186"></a><a class="code" href="class_urpo_main_window.html#a7735827afb283fb173856ba825818769">00186</a> <span class="keywordtype">void</span> <a class="code" href="class_urpo_main_window.html#a7735827afb283fb173856ba825818769" title="Show about dialog.">UrpoMainWindow::about</a>()
+<a name="l00187"></a>00187 {
+<a name="l00188"></a>00188 <a class="code" href="class_urpo_main_window.html#a7735827afb283fb173856ba825818769" title="Show about dialog.">QMessageBox::about</a>(<span class="keyword">this</span>, tr(<span class="stringliteral">"About Urpo"</span>),
+<a name="l00189"></a>00189 tr(<span class="stringliteral">"<b>Unix Remote Printing Operation %1 </b>"</span>
+<a name="l00190"></a>00190 <span class="stringliteral">"<p>Copyright &copy; Arto Hyv&auml;ttinen 2010"</span>
+<a name="l00191"></a>00191 <span class="stringliteral">"<p>License: General Public License v3"</span>
+<a name="l00192"></a>00192 ).arg(VERSION));
+<a name="l00193"></a>00193 }
+<a name="l00194"></a>00194
+<a name="l00195"></a><a class="code" href="class_urpo_main_window.html#abc82e9d98bc76494c11f8f1b733046ae">00195</a> <span class="keywordtype">void</span> <a class="code" href="class_urpo_main_window.html#abc82e9d98bc76494c11f8f1b733046ae" title="Show settings dialog.">UrpoMainWindow::settings</a>()
+<a name="l00196"></a>00196 {
+<a name="l00197"></a>00197 printWidget_-><a class="code" href="class_print_widget.html#af41b8303b7ebba95e070592f76c47c1e" title="Press print button.">doCancel</a>(); <span class="comment">// Cancel current process</span>
+<a name="l00198"></a>00198
+<a name="l00199"></a>00199 <a class="code" href="class_settings_dialog.html" title="GUI dialog for Urpo Setting.">SettingsDialog</a>* dialog = <span class="keyword">new</span> <a class="code" href="class_settings_dialog.html" title="GUI dialog for Urpo Setting.">SettingsDialog</a>(<span class="keyword">this</span>);
+<a name="l00200"></a>00200 dialog-><a class="code" href="class_settings_dialog.html#a24a50ddb3f66175cf0cca756e7f31df8" title="Set UrpoConnection having connection settings.">setSettings</a>(settings_);
+<a name="l00201"></a>00201 dialog-><a class="code" href="class_settings_dialog.html#a01f13839d5d23033492d95e25a7e1cbd" title="Set QTextBrowser showing help.">setHelp</a>(helpBrowser_);
+<a name="l00202"></a>00202 dialog->show();
+<a name="l00203"></a>00203
+<a name="l00204"></a>00204 <span class="comment">// Dialog done -> get printers</span>
+<a name="l00205"></a>00205 connect( dialog, SIGNAL(accepted()), <span class="keyword">this</span>, SLOT(<a class="code" href="class_urpo_main_window.html#af4cbd77cd163252a26b9cecd6c34de11" title="Start printers getting.">getPrinters</a>()));
+<a name="l00206"></a>00206
+<a name="l00207"></a>00207 }
+<a name="l00208"></a>00208
+<a name="l00209"></a><a class="code" href="class_urpo_main_window.html#a86f59c8dbdf3bc2ac411ef2b826dbd89">00209</a> <span class="keywordtype">void</span> <a class="code" href="class_urpo_main_window.html#a86f59c8dbdf3bc2ac411ef2b826dbd89" title="Show debug window.">UrpoMainWindow::debugWindow</a>()
+<a name="l00210"></a>00210 {
+<a name="l00211"></a>00211 monitor_->show();
+<a name="l00212"></a>00212 monitor_->raise();
+<a name="l00213"></a>00213 monitor_->activateWindow();
+<a name="l00214"></a>00214 }
+<a name="l00215"></a>00215
+<a name="l00216"></a><a class="code" href="class_urpo_main_window.html#a4d8b27b7df20f2f2cee6d31f36a0bac1">00216</a> <span class="keywordtype">void</span> <a class="code" href="class_urpo_main_window.html#a4d8b27b7df20f2f2cee6d31f36a0bac1" title="Show help window.">UrpoMainWindow::helpWindow</a>()
+<a name="l00217"></a>00217 {
+<a name="l00218"></a>00218
+<a name="l00219"></a>00219 <span class="comment">// Show help</span>
+<a name="l00220"></a>00220 helpBrowser_->home();
+<a name="l00221"></a>00221 helpBrowser_->show();
+<a name="l00222"></a>00222 helpBrowser_->raise();
+<a name="l00223"></a>00223 helpBrowser_->activateWindow();
+<a name="l00224"></a>00224 }
+<a name="l00225"></a>00225
+<a name="l00226"></a><a class="code" href="class_urpo_main_window.html#aa23252ae7354606d0c745edfedcf2422">00226</a> <span class="keywordtype">void</span> <a class="code" href="class_urpo_main_window.html#aa23252ae7354606d0c745edfedcf2422" title="Print file.">UrpoMainWindow::print</a>(QString file, QString options)
+<a name="l00227"></a>00227 {
+<a name="l00228"></a>00228 printWidget_-><a class="code" href="class_print_widget.html#a6a7ec1bbfe668da0e65aae39cd9d5a7e" title="Set status information.">setStatus</a>( tr(<span class="stringliteral">"Printing..."</span>), <span class="keyword">true</span> );
+<a name="l00229"></a>00229 connect( printWidget_, SIGNAL(cancel()), printJob_, SLOT(cancel()));
+<a name="l00230"></a>00230 printJob_-><a class="code" href="class_print_job.html#a5ce2230a6599b03abefd3875a43ba62e" title="Print sigle file.">printFile</a>(file,options);
+<a name="l00231"></a>00231 }
+<a name="l00232"></a>00232
+<a name="l00233"></a><a class="code" href="class_urpo_main_window.html#aab72cf54adc0447b61e9030db560d6b3">00233</a> <span class="keywordtype">void</span> <a class="code" href="class_urpo_main_window.html#aab72cf54adc0447b61e9030db560d6b3" title="Print finished, enable buttons.">UrpoMainWindow::printFinished</a>(<span class="keywordtype">bool</span> success, QString errorStr)
+<a name="l00234"></a>00234 {
+<a name="l00235"></a>00235 disconnect( printWidget_, SIGNAL(cancel()), printJob_, SLOT(cancel()));
+<a name="l00236"></a>00236 printWidget_-><a class="code" href="class_print_widget.html#a294239f17167fadcbd924344edf345bc" title="Set ready to print.">setReady</a>(<span class="keyword">true</span>); <span class="comment">// Ready to print again!</span>
+<a name="l00237"></a>00237 <span class="keywordflow">if</span>( success == <span class="keyword">false</span> ) <span class="comment">// Error -- set error message!</span>
+<a name="l00238"></a>00238 {
+<a name="l00239"></a>00239 printWidget_-><a class="code" href="class_print_widget.html#a294239f17167fadcbd924344edf345bc" title="Set ready to print.">setReady</a>(<span class="keyword">true</span>);
+<a name="l00240"></a>00240 printWidget_-><a class="code" href="class_print_widget.html#a6a7ec1bbfe668da0e65aae39cd9d5a7e" title="Set status information.">setStatus</a>( QString(<span class="stringliteral">"<font color=red>"</span>) + errorStr + QString(<span class="stringliteral">"</font>"</span>));
+<a name="l00241"></a>00241 }
+<a name="l00242"></a>00242 }
+</pre></div></div>
+<!--- window showing the filter options -->
+<div id="MSearchSelectWindow"
+ onmouseover="return searchBox.OnSearchSelectShow()"
+ onmouseout="return searchBox.OnSearchSelectHide()"
+ onkeydown="return searchBox.OnSearchSelectKey(event)">
+<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Enumerator</a></div>
+
+<!-- iframe showing the search results (closed by default) -->
+<div id="MSearchResultsWindow">
+<iframe src="" frameborder="0"
+ name="MSearchResults" id="MSearchResults">
+</iframe>
+</div>
+
+<hr class="footer"/><address style="text-align: right;"><small>Generated on Mon Jun 21 21:38:16 2010 for Urpo by
+<a href="http://www.doxygen.org/index.html">
+<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
+</body>
+</html>