2018-03-13 11:39:57 +00:00
|
|
|
#ifndef slic3r_ConfigWizard_hpp_
|
|
|
|
#define slic3r_ConfigWizard_hpp_
|
|
|
|
|
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
#include <wx/dialog.h>
|
|
|
|
|
2019-04-18 00:03:40 +00:00
|
|
|
#include "GUI_Utils.hpp"
|
|
|
|
|
2018-03-13 11:39:57 +00:00
|
|
|
namespace Slic3r {
|
|
|
|
|
|
|
|
class PresetBundle;
|
2018-04-16 14:52:11 +00:00
|
|
|
class PresetUpdater;
|
2018-03-13 11:39:57 +00:00
|
|
|
|
|
|
|
namespace GUI {
|
|
|
|
|
|
|
|
|
2019-04-18 00:03:40 +00:00
|
|
|
class ConfigWizard: public DPIDialog
|
2018-03-13 11:39:57 +00:00
|
|
|
{
|
|
|
|
public:
|
2019-01-30 14:22:17 +00:00
|
|
|
// Why is the Wizard run
|
|
|
|
enum RunReason {
|
|
|
|
RR_DATA_EMPTY, // No or empty datadir
|
|
|
|
RR_DATA_LEGACY, // Pre-updating datadir
|
|
|
|
RR_DATA_INCOMPAT, // Incompatible datadir - Slic3r downgrade situation
|
|
|
|
RR_USER, // User requested the Wizard from the menus
|
|
|
|
};
|
|
|
|
|
2019-06-04 16:01:41 +00:00
|
|
|
// What page should wizard start on
|
|
|
|
enum StartPage {
|
|
|
|
SP_WELCOME,
|
|
|
|
SP_PRINTERS,
|
|
|
|
SP_FILAMENTS,
|
|
|
|
SP_MATERIALS,
|
|
|
|
};
|
|
|
|
|
|
|
|
ConfigWizard();
|
2019-01-30 14:22:17 +00:00
|
|
|
ConfigWizard(ConfigWizard &&) = delete;
|
|
|
|
ConfigWizard(const ConfigWizard &) = delete;
|
|
|
|
ConfigWizard &operator=(ConfigWizard &&) = delete;
|
|
|
|
ConfigWizard &operator=(const ConfigWizard &) = delete;
|
|
|
|
~ConfigWizard();
|
|
|
|
|
|
|
|
// Run the Wizard. Return whether it was completed.
|
2019-06-04 16:01:41 +00:00
|
|
|
bool run(RunReason reason, StartPage start_page = SP_WELCOME);
|
2019-01-30 14:22:17 +00:00
|
|
|
|
|
|
|
static const wxString& name(const bool from_menu = false);
|
2019-04-18 00:03:40 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
void on_dpi_changed(const wxRect &suggested_rect) override ;
|
|
|
|
|
2018-03-13 11:39:57 +00:00
|
|
|
private:
|
2019-01-30 14:22:17 +00:00
|
|
|
struct priv;
|
|
|
|
std::unique_ptr<priv> p;
|
2018-03-13 11:39:57 +00:00
|
|
|
|
2019-01-30 14:22:17 +00:00
|
|
|
friend struct ConfigWizardPage;
|
2018-03-13 11:39:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|