00001
00002
00003
00004
00005
00006
00007 #include "ChecklistGuide.h"
00008 #include "ChecklistGuideBrowser.h"
00009 #include "CmdMediator.h"
00010 #include "EngaugeAssert.h"
00011 #include "Logger.h"
00012 #include <QTextBrowser>
00013
00014 ChecklistGuide::ChecklistGuide (QWidget *parent) :
00015 QDockWidget (parent),
00016 m_browser (0)
00017 {
00018 setVisible (false);
00019 setAllowedAreas (Qt::AllDockWidgetAreas);
00020 setWindowTitle (tr ("Checklist Guide"));
00021 setStatusTip (tr ("Checklist Guide"));
00022 setWhatsThis (tr ("Checklist Guide\n\n"
00023 "This box contains a checklist of step suggested by the Checklist Guide Wizard. Following "
00024 "these steps should produce a set of digitized points in an output file.\n\n"
00025 "To run the Checklist Guide Wizard when an image file is imported, select the "
00026 "Help / Checklist Wizard menu option."));
00027
00028 m_browser = new ChecklistGuideBrowser;
00029 setWidget (m_browser);
00030 }
00031
00032 bool ChecklistGuide::browserIsEmpty () const
00033 {
00034 return m_browser->toPlainText().isEmpty();
00035 }
00036
00037 void ChecklistGuide::closeEvent(QCloseEvent * )
00038 {
00039 LOG4CPP_INFO_S ((*mainCat)) << "ChecklistGuide::closeEvent";
00040
00041 emit signalChecklistClosed();
00042 }
00043
00044 void ChecklistGuide::setTemplateHtml (const QString &html,
00045 const QStringList &curveNames)
00046 {
00047 LOG4CPP_INFO_S ((*mainCat)) << "ChecklistGuide::setTemplateHtml";
00048
00049 m_browser->setTemplateHtml (html,
00050 curveNames);
00051 }
00052
00053 void ChecklistGuide::update (const CmdMediator &cmdMediator,
00054 bool documentIsExported)
00055 {
00056 LOG4CPP_INFO_S ((*mainCat)) << "ChecklistGuide::update";
00057
00058 ENGAUGE_CHECK_PTR (m_browser);
00059
00060 m_browser->update (cmdMediator,
00061 documentIsExported);
00062 }