Merge branch 'cppgui' of https://github.com/lordofhyphens/Slic3r into cppgui

This commit is contained in:
Joseph Lenox 2018-07-22 21:35:12 -05:00
commit 383ed3e995
4 changed files with 14 additions and 12 deletions

View File

@ -17,7 +17,7 @@ namespace Slic3r { namespace GUI {
class App: public wxApp
{
public:
virtual bool OnInit();
virtual bool OnInit() override;
App() : wxApp() {}
/// Save position, size, and maximize state for a TopLevelWindow (includes Frames) by name in Settings.

View File

@ -129,7 +129,7 @@ public:
protected:
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) {
this->on_change(opt_id, this->get_bool());
}
@ -243,7 +243,7 @@ public:
protected:
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) {
this->on_change(opt_id, this->get_string());
}
@ -285,7 +285,7 @@ protected:
void _set_value(double value, bool show_value = false);
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) {
this->on_change(opt_id, this->get_string());
}
@ -300,7 +300,7 @@ public:
UI_Point(wxWindow* _parent, Slic3r::ConfigOptionDef _opt);
~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
@ -349,7 +349,7 @@ class UI_Point3 : public UI_Sizer {
public:
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(); }
std::string get_string();
std::string get_string() override;
void set_value(boost::any value) override; //< Implements set_value

View File

@ -2,9 +2,11 @@
#include "Line.hpp"
#include "ClipperUtils.hpp"
#include "misc_ui.hpp"
#ifdef __APPLE__
#include <OpenGL/glu.h>
#else
#include <GL/glu.h>
#endif
namespace Slic3r { namespace GUI {
Scene3D::Scene3D(wxWindow* parent, const wxSize& size) :

View File

@ -102,7 +102,7 @@ class ConfigOptionFloat : public ConfigOptionSingle<double>
public:
ConfigOptionFloat() : ConfigOptionSingle<double>(0) {};
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; };
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* clone() const override { return new ConfigOptionInts(this->values); };
std::string serialize() const {
std::string serialize() const override {
std::ostringstream ss;
for (std::vector<int>::const_iterator it = this->values.begin(); it != this->values.end(); ++it) {
if (it - this->values.begin() != 0) ss << ",";
@ -208,7 +208,7 @@ class ConfigOptionInts : public ConfigOptionVector<int>
return ss.str();
};
std::vector<std::string> vserialize() const {
std::vector<std::string> vserialize() const override {
std::vector<std::string> vv;
vv.reserve(this->values.size());
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;
};
bool deserialize(std::string str, bool append = false) {
bool deserialize(std::string str, bool append = false) override {
if (!append) this->values.clear();
std::istringstream is(str);
std::string item_str;