| 1 | #include <wizard/wizard.h> |
|---|
| 2 | |
|---|
| 3 | Wizard * Wizard::_self = 0; |
|---|
| 4 | |
|---|
| 5 | Wizard::Wizard(QWidget *parent) |
|---|
| 6 | :QWizard(parent) |
|---|
| 7 | { |
|---|
| 8 | _accountConnectionPage = new AccountConnectionPage; |
|---|
| 9 | _accountPage = new AccountPage; |
|---|
| 10 | _accountTypeSelectPage = new AccountTypeSelectPage; |
|---|
| 11 | _audioPage = new AudioPage; |
|---|
| 12 | _finishedPage = new FinishedPage; |
|---|
| 13 | _introPage = new IntroPage; |
|---|
| 14 | _videoPage = new VideoPage; |
|---|
| 15 | |
|---|
| 16 | setPage(Page_Intro,_introPage); |
|---|
| 17 | setPage(Page_Audio,_audioPage); |
|---|
| 18 | setPage(Page_Video,_videoPage); |
|---|
| 19 | setPage(Page_AccountSelectPage,_accountTypeSelectPage); |
|---|
| 20 | setPage(Page_Account,_accountPage); |
|---|
| 21 | setPage(Page_AccountConnectionPage,_accountConnectionPage); |
|---|
| 22 | setPage(Page_Finished,_finishedPage); |
|---|
| 23 | |
|---|
| 24 | QPixmap pix = QPixmap(":/qute.png").scaled(80,80,Qt::KeepAspectRatio,Qt::SmoothTransformation); |
|---|
| 25 | setPixmap(QWizard::WatermarkPixmap,pix); |
|---|
| 26 | setPixmap(QWizard::LogoPixmap,pix); |
|---|
| 27 | //setPixmap(QWizard::BannerPixmap,pix); |
|---|
| 28 | //setPixmap(QWizard::BackgroundPixmap,pix); |
|---|
| 29 | } |
|---|
| 30 | |
|---|
| 31 | Wizard::~Wizard() |
|---|
| 32 | { |
|---|
| 33 | |
|---|
| 34 | } |
|---|
| 35 | |
|---|
| 36 | void Wizard::setAccountType(EnumAccountType::AccountType accountType) |
|---|
| 37 | { |
|---|
| 38 | _accountPage->setAccountType(accountType); |
|---|
| 39 | } |
|---|
| 40 | |
|---|
| 41 | Wizard * Wizard::self() |
|---|
| 42 | { |
|---|
| 43 | if(!_self) |
|---|
| 44 | _self = new Wizard; |
|---|
| 45 | |
|---|
| 46 | return _self; |
|---|
| 47 | } |
|---|
| 48 | |
|---|
| 49 | void Wizard::changeEvent(QEvent *e) |
|---|
| 50 | { |
|---|
| 51 | QWizard::changeEvent(e); |
|---|
| 52 | /*switch (e->type()) { |
|---|
| 53 | case QEvent::LanguageChange: |
|---|
| 54 | break; |
|---|
| 55 | default: |
|---|
| 56 | break; |
|---|
| 57 | }*/ |
|---|
| 58 | } |
|---|