Public Types | Public Member Functions

FileUploadWizard Class Reference

Wizard for uploading the files to the database. More...

#include <fileuploadwizard.h>

Inheritance diagram for FileUploadWizard:
Inheritance graph
[legend]
Collaboration diagram for FileUploadWizard:
Collaboration graph
[legend]

List of all members.

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 ()
FileSelectionViewgetFileSelectionView ()
TemplatesViewgetTemplateView ()

Detailed Description

Wizard for uploading the files to the database.

fileuploadwizard_introductionpage_sample.png

The wizard consists of 6 pages:

Note:
To be able to upload to the database you must have the privilege to do so. You can check this with the ProjectEditor.
Todo:
For some unknown reason the FileUploadWizard is very slow on page change, especially when a file is leaded in TemplateMakerPage and you are redirected to TemplateSelectionPage. This should be checked.

Member Enumeration Documentation

Enumerator:
Page_Intro 
Page_FileSelection 
Page_TemplateSelection 
Page_TemplateMaker 
Page_Preview 
Page_Conclusion 

              {
        Page_Intro, Page_FileSelection, Page_TemplateSelection, Page_TemplateMaker,
        Page_Preview, Page_Conclusion
    };


Constructor & Destructor Documentation

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...";
}


Member Function Documentation

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);
}


The documentation for this class was generated from the following files: