mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-31 21:12:00 +08:00
Fixed includes on OSX and silenced override warnings.
This commit is contained in:
parent
6762870529
commit
533a2314fd
@ -17,7 +17,7 @@ namespace Slic3r { namespace GUI {
|
|||||||
class App: public wxApp
|
class App: public wxApp
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual bool OnInit();
|
virtual bool OnInit() override;
|
||||||
App() : wxApp() {}
|
App() : wxApp() {}
|
||||||
|
|
||||||
/// Save position, size, and maximize state for a TopLevelWindow (includes Frames) by name in Settings.
|
/// Save position, size, and maximize state for a TopLevelWindow (includes Frames) by name in Settings.
|
||||||
|
@ -127,7 +127,7 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
virtual std::string LogChannel() override { return "UI_Checkbox"s; }
|
virtual std::string LogChannel() override { return "UI_Checkbox"s; }
|
||||||
|
|
||||||
void _on_change(std::string opt_id) {
|
void _on_change(std::string opt_id) override {
|
||||||
if (!this->disable_change_event && this->window->IsEnabled() && this->on_change != nullptr) {
|
if (!this->disable_change_event && this->window->IsEnabled() && this->on_change != nullptr) {
|
||||||
this->on_change(opt_id, this->get_bool());
|
this->on_change(opt_id, this->get_bool());
|
||||||
}
|
}
|
||||||
@ -241,7 +241,7 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
virtual std::string LogChannel() override { return "UI_Choice"s; }
|
virtual std::string LogChannel() override { return "UI_Choice"s; }
|
||||||
|
|
||||||
void _on_change(std::string opt_id) {
|
void _on_change(std::string opt_id) override {
|
||||||
if (!this->disable_change_event && this->window->IsEnabled() && this->on_change != nullptr) {
|
if (!this->disable_change_event && this->window->IsEnabled() && this->on_change != nullptr) {
|
||||||
this->on_change(opt_id, this->get_string());
|
this->on_change(opt_id, this->get_string());
|
||||||
}
|
}
|
||||||
@ -283,7 +283,7 @@ protected:
|
|||||||
void _set_value(double value, bool show_value = false);
|
void _set_value(double value, bool show_value = false);
|
||||||
void _set_value(std::string value);
|
void _set_value(std::string value);
|
||||||
|
|
||||||
void _on_change(std::string opt_id) {
|
void _on_change(std::string opt_id) override {
|
||||||
if (!this->disable_change_event && this->window->IsEnabled() && this->on_change != nullptr) {
|
if (!this->disable_change_event && this->window->IsEnabled() && this->on_change != nullptr) {
|
||||||
this->on_change(opt_id, this->get_string());
|
this->on_change(opt_id, this->get_string());
|
||||||
}
|
}
|
||||||
@ -298,7 +298,7 @@ public:
|
|||||||
|
|
||||||
UI_Point(wxWindow* _parent, Slic3r::ConfigOptionDef _opt);
|
UI_Point(wxWindow* _parent, Slic3r::ConfigOptionDef _opt);
|
||||||
~UI_Point() { _lbl_x->Destroy(); _lbl_y->Destroy(); _ctrl_x->Destroy(); _ctrl_y->Destroy(); }
|
~UI_Point() { _lbl_x->Destroy(); _lbl_y->Destroy(); _ctrl_x->Destroy(); _ctrl_y->Destroy(); }
|
||||||
std::string get_string();
|
std::string get_string() override;
|
||||||
|
|
||||||
void set_value(boost::any value) override; //< Implements set_value
|
void set_value(boost::any value) override; //< Implements set_value
|
||||||
|
|
||||||
@ -347,7 +347,7 @@ class UI_Point3 : public UI_Sizer {
|
|||||||
public:
|
public:
|
||||||
UI_Point3(wxWindow* _parent, Slic3r::ConfigOptionDef _opt);
|
UI_Point3(wxWindow* _parent, Slic3r::ConfigOptionDef _opt);
|
||||||
~UI_Point3() { _lbl_x->Destroy(); _lbl_y->Destroy(); _ctrl_x->Destroy(); _ctrl_y->Destroy(); _lbl_z->Destroy(); _ctrl_z->Destroy(); }
|
~UI_Point3() { _lbl_x->Destroy(); _lbl_y->Destroy(); _ctrl_x->Destroy(); _ctrl_y->Destroy(); _lbl_z->Destroy(); _ctrl_z->Destroy(); }
|
||||||
std::string get_string();
|
std::string get_string() override;
|
||||||
|
|
||||||
void set_value(boost::any value) override; //< Implements set_value
|
void set_value(boost::any value) override; //< Implements set_value
|
||||||
|
|
||||||
|
@ -2,9 +2,11 @@
|
|||||||
#include "Line.hpp"
|
#include "Line.hpp"
|
||||||
#include "ClipperUtils.hpp"
|
#include "ClipperUtils.hpp"
|
||||||
#include "misc_ui.hpp"
|
#include "misc_ui.hpp"
|
||||||
|
#ifdef __APPLE__
|
||||||
|
#include <OpenGL/glu.h>
|
||||||
|
#else
|
||||||
#include <GL/glu.h>
|
#include <GL/glu.h>
|
||||||
|
#endif
|
||||||
namespace Slic3r { namespace GUI {
|
namespace Slic3r { namespace GUI {
|
||||||
|
|
||||||
Scene3D::Scene3D(wxWindow* parent, const wxSize& size) :
|
Scene3D::Scene3D(wxWindow* parent, const wxSize& size) :
|
||||||
|
@ -102,7 +102,7 @@ class ConfigOptionFloat : public ConfigOptionSingle<double>
|
|||||||
public:
|
public:
|
||||||
ConfigOptionFloat() : ConfigOptionSingle<double>(0) {};
|
ConfigOptionFloat() : ConfigOptionSingle<double>(0) {};
|
||||||
ConfigOptionFloat(double _value) : ConfigOptionSingle<double>(_value) {};
|
ConfigOptionFloat(double _value) : ConfigOptionSingle<double>(_value) {};
|
||||||
ConfigOptionFloat* clone() const { return new ConfigOptionFloat(this->value); };
|
ConfigOptionFloat* clone() const override { return new ConfigOptionFloat(this->value); };
|
||||||
|
|
||||||
double getFloat() const override { return this->value; };
|
double getFloat() const override { return this->value; };
|
||||||
void setFloat(double val) override { this->value = val; }
|
void setFloat(double val) override { this->value = val; }
|
||||||
@ -199,7 +199,7 @@ class ConfigOptionInts : public ConfigOptionVector<int>
|
|||||||
ConfigOptionInts(const std::vector<int> _values) : ConfigOptionVector<int>(_values) {};
|
ConfigOptionInts(const std::vector<int> _values) : ConfigOptionVector<int>(_values) {};
|
||||||
ConfigOptionInts* clone() const override { return new ConfigOptionInts(this->values); };
|
ConfigOptionInts* clone() const override { return new ConfigOptionInts(this->values); };
|
||||||
|
|
||||||
std::string serialize() const {
|
std::string serialize() const override {
|
||||||
std::ostringstream ss;
|
std::ostringstream ss;
|
||||||
for (std::vector<int>::const_iterator it = this->values.begin(); it != this->values.end(); ++it) {
|
for (std::vector<int>::const_iterator it = this->values.begin(); it != this->values.end(); ++it) {
|
||||||
if (it - this->values.begin() != 0) ss << ",";
|
if (it - this->values.begin() != 0) ss << ",";
|
||||||
@ -208,7 +208,7 @@ class ConfigOptionInts : public ConfigOptionVector<int>
|
|||||||
return ss.str();
|
return ss.str();
|
||||||
};
|
};
|
||||||
|
|
||||||
std::vector<std::string> vserialize() const {
|
std::vector<std::string> vserialize() const override {
|
||||||
std::vector<std::string> vv;
|
std::vector<std::string> vv;
|
||||||
vv.reserve(this->values.size());
|
vv.reserve(this->values.size());
|
||||||
for (std::vector<int>::const_iterator it = this->values.begin(); it != this->values.end(); ++it) {
|
for (std::vector<int>::const_iterator it = this->values.begin(); it != this->values.end(); ++it) {
|
||||||
@ -219,7 +219,7 @@ class ConfigOptionInts : public ConfigOptionVector<int>
|
|||||||
return vv;
|
return vv;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool deserialize(std::string str, bool append = false) {
|
bool deserialize(std::string str, bool append = false) override {
|
||||||
if (!append) this->values.clear();
|
if (!append) this->values.clear();
|
||||||
std::istringstream is(str);
|
std::istringstream is(str);
|
||||||
std::string item_str;
|
std::string item_str;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user