#ifndef __REDIRECTPAGE_H__ #define __REDIRECTPAGE_H__ #include class RedirectPage : public Wt::WTemplate { public: RedirectPage(); void setRedirect(const std::string &path, const std::string &text = ""); void setMessage(const std::string &message); void redirect(const std::string &path); protected: void onTimeout(); private: Wt::JSignal m_history; int m_historySize = 0; Wt::WTimer *m_timer = nullptr; Wt::WAnchor *m_anchor = nullptr; int m_time = 5000; std::string m_redirect; std::string m_text; }; #endif // __REDIRECTPAGE_H__