00001
00002
00003
00004
00005
00006
00007 #include "Logger.h"
00008 #include <qdebug.h>
00009 #include <QGraphicsPixmapItem>
00010 #include <QGraphicsScene>
00011 #include <QGraphicsView>
00012 #include "TutorialButton.h"
00013 #include "TutorialDlg.h"
00014 #include "TutorialStateChecklistWizardAbstract.h"
00015 #include "TutorialStateContext.h"
00016
00017 TutorialStateChecklistWizardAbstract::TutorialStateChecklistWizardAbstract (TutorialStateContext &context) :
00018 TutorialStateAbstractBase (context)
00019 {
00020 }
00021
00022 void TutorialStateChecklistWizardAbstract::begin ()
00023 {
00024 LOG4CPP_INFO_S ((*mainCat)) << "TutorialStateChecklistWizardAbstract::begin ()";
00025
00026 m_title = createTitle (tr ("Checklist Wizard and Checklist Guide"));
00027 m_background = createPixmapItem (":/engauge/img/panel_checklist.png",
00028 QPoint (0, 30));
00029 m_text0 = createTextItem (tr ("For new Engauge users, a Checklist Wizard\n"
00030 "is available when importing an image file.\n"
00031 "This wizard produces a helpful checklist of\n"
00032 "steps to follow to digitize the image file."),
00033 QPoint (260, 30));
00034 m_text1 = createTextItem (tr ("Step 1 - Enable the menu option Help /\n"
00035 "Checklist Guide Wizard."),
00036 QPoint (285, 125));
00037 m_text2 = createTextItem (tr ("Step 2 - Import the file using File /\n"
00038 "Import. The Checklist Wizard will appear\n"
00039 "and ask some simple questions to\n"
00040 "determine how the image can be\n"
00041 "digitized."),
00042 QPoint (285, 175));
00043 m_text3 = createTextItem (tr ("Additional options are available in\n"
00044 "the various Settings menus.\n\n"
00045 "This ends the tutorial. Good luck!"),
00046 QPoint (285, 270));
00047
00048 QSize backgroundSize = context().tutorialDlg().backgroundSize();
00049
00050 m_previous = new TutorialButton (tr ("Previous"),
00051 context().tutorialDlg().scene());
00052 m_previous->setGeometry (QPoint (buttonMargin (),
00053 backgroundSize.height () - buttonMargin() - m_previous->size().height()));
00054 }
00055
00056 void TutorialStateChecklistWizardAbstract::end ()
00057 {
00058 LOG4CPP_INFO_S ((*mainCat)) << "TutorialStateChecklistWizardAbstract::end ()";
00059
00060 context().tutorialDlg().scene().removeItem (m_title);
00061 context().tutorialDlg().scene().removeItem (m_background);
00062 context().tutorialDlg().scene().removeItem (m_text0);
00063 context().tutorialDlg().scene().removeItem (m_text1);
00064 context().tutorialDlg().scene().removeItem (m_text2);
00065 context().tutorialDlg().scene().removeItem (m_text3);
00066
00067
00068 delete m_title;
00069 delete m_background;
00070 delete m_text0;
00071 delete m_text1;
00072 delete m_text2;
00073 delete m_text3;
00074 delete m_previous;
00075
00076 m_title = 0;
00077 m_background = 0;
00078 m_text0 = 0;
00079 m_text1 = 0;
00080 m_text2 = 0;
00081 m_text3 = 0;
00082 m_previous = 0;
00083 }
00084
00085 TutorialButton *TutorialStateChecklistWizardAbstract::previous()
00086 {
00087 return m_previous;
00088 }