Wizard for uploading the files to the database. More...
#include <fileuploadwizard.h>
Public Types | |
enum | Page { Page_Intro, Page_FileSelection, Page_TemplateSelection, Page_TemplateMaker, Page_Preview, Page_Conclusion } |
Public Member Functions | |
FileUploadWizard (QWidget *parent=0) | |
~FileUploadWizard () | |
void | setDefaultButtonLayout () |
QList< QWizard::WizardButton > | getDefaultLayout () |
FileSelectionView * | getFileSelectionView () |
TemplatesView * | getTemplateView () |
Wizard for uploading the files to the database.
The wizard consists of 6 pages:
Page_Intro | |
Page_FileSelection | |
Page_TemplateSelection | |
Page_TemplateMaker | |
Page_Preview | |
Page_Conclusion |
{ Page_Intro, Page_FileSelection, Page_TemplateSelection, Page_TemplateMaker, Page_Preview, Page_Conclusion };
FileUploadWizard::FileUploadWizard | ( | QWidget * | parent = 0 |
) |
: QWizard(parent) { setObjectName("FileUploadWizard"); setWindowTitle("File upload wizard"); setWizardStyle(QWizard::ClassicStyle); // Object initialization fileSelectionView = new FileSelectionView; fileSelectionView->setModel(new FileSelectionModel(fileSelectionView)); templatesView = new TemplatesView; templatesView->setModel(new TemplatesModel(templatesView)); defaultButtonLayout << QWizard::Stretch << QWizard::CancelButton << QWizard::BackButton << QWizard::NextButton << QWizard::FinishButton; // Page creation // Note: geen enkele page hier mag QWizardPage::wizard() aanroepen in zijn // constructor want de QWizard::setPage() is nog niet executed, dus de // wizard() waartoe de page behoort is nog niet bekend! Het nodige daarom via // constructor arguments meegeven. setPage(Page_Intro, new IntroPage(this)); setPage(Page_FileSelection, new FileSelectionPage(this)); setPage(Page_TemplateSelection, new TemplateSelectionPage(this)); setPage(Page_TemplateMaker, new TemplateMakerPage(fileSelectionView->model(), this)); setPage(Page_Preview, new PreviewPage(fileSelectionView->model(), this)); setPage(Page_Conclusion, new ConclusionPage(this)); #ifdef DEBUG_SETSTARTUPPAGE setStartId(FileImportWizard::Page_TemplateMaker); #endif //DEBUG_SETSTARTUPPAGE setDefaultButtonLayout(); }
FileUploadWizard::~FileUploadWizard | ( | ) |
{ delete fileSelectionView; //want "this" is er niet de parent van delete templatesView; //qDebug() << "FileImportWizard destructed..."; }
QList< QWizard::WizardButton > FileUploadWizard::getDefaultLayout | ( | ) |
{
return defaultButtonLayout;
}
FileSelectionView * FileUploadWizard::getFileSelectionView | ( | ) |
{
return fileSelectionView;
}
TemplatesView * FileUploadWizard::getTemplateView | ( | ) |
Referenced by PreviewPage::setVisible().
{
return templatesView;
}
void FileUploadWizard::setDefaultButtonLayout | ( | ) |
Referenced by FileUploadWizard(), and PreviewPage::setVisible().
{ setButtonLayout(defaultButtonLayout); }