From d09ca7b8ba18bee70e4b0c2f3b7774c28c15f256 Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Sat, 4 Mar 2017 20:02:56 -0600 Subject: HorizonWizardPage: add helper function to grab HorizonWizard pointer --- horizonwizardpage.cc | 5 +++++ horizonwizardpage.hh | 3 +++ 2 files changed, 8 insertions(+) diff --git a/horizonwizardpage.cc b/horizonwizardpage.cc index 97cdbef..4f6ba50 100644 --- a/horizonwizardpage.cc +++ b/horizonwizardpage.cc @@ -43,3 +43,8 @@ void HorizonWizardPage::loadWatermark(string page) setPixmap(QWizard::WatermarkPixmap, pixmap); } + +HorizonWizard *HorizonWizardPage::horizonWizard() const +{ + return dynamic_cast(this->wizard()); +} diff --git a/horizonwizardpage.hh b/horizonwizardpage.hh index 65b292c..d0f2cf7 100644 --- a/horizonwizardpage.hh +++ b/horizonwizardpage.hh @@ -4,12 +4,15 @@ #include #include +#include "horizonwizard.hh" + class HorizonWizardPage : public QWizardPage { public: HorizonWizardPage(QWidget *parent = 0) : QWizardPage(parent) {} void loadWatermark(std::string page); + HorizonWizard *horizonWizard() const; }; #endif // HORIZONWIZARDPAGE_HH -- cgit v1.2.3-70-g09d2