Includes cleanup:

GUI_App.hpp      (should not include) MainFrame.hpp
MainFrame.hpp    Plater.hpp
ModelArrange.hpp Model.hpp
Slicing.hpp      PrintConfig.hpp
FillBase.hpp     PrintConfig.hpp
GUI_App.hpp      PrintConfig.hpp
OptionsGroup.hpp GUI_App.hpp
This commit is contained in:
Lukas Matena 2020-05-26 17:42:57 +02:00
parent ee1942e4e9
commit 48c186331a
43 changed files with 105 additions and 37 deletions

View file

@ -53,6 +53,8 @@
#include "slic3r/GUI/3DScene.hpp"
#include "slic3r/GUI/InstanceCheck.hpp"
#include "slic3r/GUI/AppConfig.hpp"
#include "slic3r/GUI/MainFrame.hpp"
#include "slic3r/GUI/Plater.hpp"
#endif /* SLIC3R_GUI */
using namespace Slic3r;

View file

@ -11,13 +11,13 @@
#include "../libslic3r.h"
#include "../BoundingBox.hpp"
#include "../PrintConfig.hpp"
#include "../Utils.hpp"
namespace Slic3r {
class ExPolygon;
class Surface;
enum InfillPattern : int;
class InfillFailedException : public std::runtime_error {
public:

View file

@ -1,4 +1,6 @@
#include "ModelArrange.hpp"
#include <libslic3r/Model.hpp>
#include "MTUtils.hpp"
namespace Slic3r {

View file

@ -1,11 +1,14 @@
#ifndef MODELARRANGE_HPP
#define MODELARRANGE_HPP
#include <libslic3r/Model.hpp>
#include <libslic3r/Arrange.hpp>
namespace Slic3r {
class Model;
class ModelInstance;
using ModelInstancePtrs = std::vector<ModelInstance*>;
using arrangement::ArrangePolygon;
using arrangement::ArrangePolygons;
using arrangement::ArrangeParams;

View file

@ -33,7 +33,7 @@ enum PrintHostType {
htOctoPrint, htDuet, htFlashAir, htAstroBox
};
enum InfillPattern {
enum InfillPattern : int {
ipRectilinear, ipMonotonous, ipGrid, ipTriangles, ipStars, ipCubic, ipLine, ipConcentric, ipHoneycomb, ip3DHoneycomb,
ipGyroid, ipHilbertCurve, ipArchimedeanChords, ipOctagramSpiral, ipCount,
};

View file

@ -11,7 +11,6 @@
#include "libslic3r.h"
#include "Utils.hpp"
#include "PrintConfig.hpp"
namespace Slic3r
{
@ -19,6 +18,7 @@ namespace Slic3r
class PrintConfig;
class PrintObjectConfig;
class ModelObject;
class DynamicPrintConfig;
// Parameters to guide object slicing and support generation.
// The slicing parameters account for a raft and whether the 1st object layer is printed with a normal or a bridging flow

View file

@ -1,6 +1,7 @@
#include "BackgroundSlicingProcess.hpp"
#include "GUI_App.hpp"
#include "GUI.hpp"
#include "MainFrame.hpp"
#include <wx/app.h>
#include <wx/panel.h>
@ -34,6 +35,7 @@
#include "RemovableDriveManager.hpp"
#include "slic3r/Utils/Thread.hpp"
#include "slic3r/GUI/Plater.hpp"
namespace Slic3r {

View file

@ -1,4 +1,5 @@
#include "BedShapeDialog.hpp"
#include "GUI_App.hpp"
#include <wx/wx.h>
#include <wx/numformatter.h>

View file

@ -4,6 +4,7 @@
// The dialog opens from Print Settins tab->Bed Shape : Set...
#include "OptionsGroup.hpp"
#include "GUI_Utils.hpp"
#include "2DBed.hpp"
#include "I18N.hpp"

View file

@ -27,6 +27,7 @@
#include "libslic3r/Utils.hpp"
#include "GUI.hpp"
#include "GUI_App.hpp"
#include "GUI_Utils.hpp"
#include "slic3r/Config/Snapshot.hpp"
#include "slic3r/Utils/PresetUpdater.hpp"

View file

@ -2,6 +2,7 @@
#include "libslic3r/GCode/PreviewData.hpp"
#include "GUI.hpp"
#include "GUI_App.hpp"
#include "Plater.hpp"
#include "I18N.hpp"
#include "ExtruderSequenceDialog.hpp"
#include "libslic3r/Print.hpp"

View file

@ -3,6 +3,8 @@
#include "I18N.hpp"
#include "Field.hpp"
#include "wxExtensions.hpp"
#include "Plater.hpp"
#include "MainFrame.hpp"
#include "libslic3r/PrintConfig.hpp"

View file

@ -23,6 +23,8 @@
#include "slic3r/GUI/OpenGLManager.hpp"
#include "slic3r/GUI/3DBed.hpp"
#include "slic3r/GUI/Camera.hpp"
#include "slic3r/GUI/Plater.hpp"
#include "slic3r/GUI/MainFrame.hpp"
#include "GUI_App.hpp"
#include "GUI_ObjectList.hpp"

View file

@ -5,7 +5,6 @@
#include <memory>
#include <chrono>
#include "3DScene.hpp"
#include "GLToolbar.hpp"
#include "GLShader.hpp"
#include "Event.hpp"

View file

@ -3,6 +3,7 @@
#include "3DScene.hpp"
#include "GLCanvas3D.hpp"
#include "GUI_App.hpp"
#include "Plater.hpp"
#include <GL/glew.h>

View file

@ -6,6 +6,7 @@
#include "slic3r/GUI/GLCanvas3D.hpp"
#include "slic3r/GUI/GUI_App.hpp"
#include "slic3r/GUI/Camera.hpp"
#include "slic3r/GUI/Plater.hpp"
#include <wx/event.h>
#include <wx/bitmap.h>

View file

@ -37,6 +37,8 @@
#include "AppConfig.hpp"
#include "PresetBundle.hpp"
#include "3DScene.hpp"
#include "MainFrame.hpp"
#include "Plater.hpp"
#include "../Utils/PresetUpdater.hpp"
#include "../Utils/PrintHost.hpp"

View file

@ -3,8 +3,7 @@
#include <memory>
#include <string>
#include "libslic3r/PrintConfig.hpp"
#include "MainFrame.hpp"
#include "Preset.hpp"
#include "ImGuiWrapper.hpp"
#include "ConfigWizard.hpp"
#include "OpenGLManager.hpp"
@ -30,11 +29,21 @@ class PresetBundle;
class PresetUpdater;
class ModelObject;
class PrintHostJobQueue;
class Model;
namespace GUI{
class RemovableDriveManager;
class OtherInstanceMessageHandler;
class MainFrame;
class Sidebar;
class ObjectManipulation;
class ObjectSettings;
class ObjectList;
class ObjectLayers;
class Plater;
enum FileType
{
FT_STL,

View file

@ -2,9 +2,11 @@
#include "GUI_ObjectList.hpp"
#include "OptionsGroup.hpp"
#include "GUI_App.hpp"
#include "PresetBundle.hpp"
#include "libslic3r/Model.hpp"
#include "GLCanvas3D.hpp"
#include "Plater.hpp"
#include <boost/algorithm/string.hpp>

View file

@ -4,6 +4,7 @@
#include "GUI_ObjectLayers.hpp"
#include "GUI_App.hpp"
#include "I18N.hpp"
#include "Plater.hpp"
#include "OptionsGroup.hpp"
#include "PresetBundle.hpp"

View file

@ -4,11 +4,14 @@
#include "GLCanvas3D.hpp"
#include "OptionsGroup.hpp"
#include "GUI_App.hpp"
#include "wxExtensions.hpp"
#include "PresetBundle.hpp"
#include "libslic3r/Model.hpp"
#include "libslic3r/Geometry.hpp"
#include "Selection.hpp"
#include "Plater.hpp"
#include "MainFrame.hpp"
#include <boost/algorithm/string.hpp>
#include "slic3r/Utils/FixModelByWin10.hpp"

View file

@ -2,8 +2,10 @@
#include "GUI_ObjectList.hpp"
#include "OptionsGroup.hpp"
#include "GUI_App.hpp"
#include "wxExtensions.hpp"
#include "PresetBundle.hpp"
#include "Plater.hpp"
#include "libslic3r/Model.hpp"
#include <boost/algorithm/string.hpp>

View file

@ -10,6 +10,7 @@
#include "GLCanvas3D.hpp"
#include "PresetBundle.hpp"
#include "DoubleSlider.hpp"
#include "Plater.hpp"
#include <wx/notebook.h>
#include <wx/glcanvas.h>

View file

@ -12,6 +12,7 @@
#include <algorithm>
#include "slic3r/GUI/GUI_App.hpp"
#include "slic3r/GUI/Plater.hpp"
namespace Slic3r {

View file

@ -8,6 +8,7 @@
#include "slic3r/GUI/GUI_App.hpp"
#include "slic3r/GUI/PresetBundle.hpp"
#include "slic3r/GUI/Camera.hpp"
#include "slic3r/GUI/Plater.hpp"
#include "libslic3r/Model.hpp"

View file

@ -3,6 +3,7 @@
#include "slic3r/GUI/GLCanvas3D.hpp"
#include "slic3r/GUI/Camera.hpp"
#include "slic3r/GUI/Gizmos/GLGizmosCommon.hpp"
#include "slic3r/GUI/MainFrame.hpp"
#include <GL/glew.h>

View file

@ -6,6 +6,7 @@
#include "libslic3r/SLAPrint.hpp"
#include "slic3r/GUI/GUI_App.hpp"
#include "slic3r/GUI/Camera.hpp"
#include "slic3r/GUI/Plater.hpp"
#include <GL/glew.h>

View file

@ -6,6 +6,7 @@
#include "slic3r/GUI/GUI_App.hpp"
#include "slic3r/GUI/GUI_ObjectManipulation.hpp"
#include "slic3r/GUI/PresetBundle.hpp"
#include "slic3r/GUI/Plater.hpp"
#include "slic3r/Utils/UndoRedo.hpp"
#include "slic3r/GUI/Gizmos/GLGizmoMove.hpp"

View file

@ -1,5 +1,10 @@
#include "GUI_App.hpp"
#include "InstanceCheck.hpp"
#include "Plater.hpp"
#ifdef _WIN32
#include "MainFrame.hpp"
#endif
#include "libslic3r/Utils.hpp"
#include "libslic3r/Config.hpp"

View file

@ -3,6 +3,7 @@
#include <wx/window.h>
#include <wx/button.h>
#include "OptionsGroup.hpp"
#include "GUI_App.hpp"
#include "I18N.hpp"
namespace Slic3r

View file

@ -29,6 +29,7 @@
#include "InstanceCheck.hpp"
#include "I18N.hpp"
#include "GLCanvas3D.hpp"
#include "Plater.hpp"
#include <fstream>
#include "GUI_App.hpp"

View file

@ -12,7 +12,6 @@
#include <map>
#include "GUI_Utils.hpp"
#include "Plater.hpp"
#include "Event.hpp"
class wxNotebook;
@ -27,6 +26,8 @@ namespace GUI
class Tab;
class PrintHostQueueDialog;
class Plater;
class MainFrame;
enum QuickSlice
{

View file

@ -6,6 +6,7 @@
#include "PresetBundle.hpp"
#include "AppConfig.hpp"
#include "GLCanvas3D.hpp"
#include "Plater.hpp"
#include <wx/glcanvas.h>

View file

@ -1,5 +1,7 @@
#include "OptionsGroup.hpp"
#include "ConfigExceptions.hpp"
#include "Plater.hpp"
#include "GUI_App.hpp"
#include <utility>
#include <wx/numformatter.h>
@ -100,6 +102,36 @@ const t_field& OptionsGroup::build_field(const t_config_option_key& id, const Co
return field;
}
OptionsGroup::OptionsGroup( wxWindow* _parent, const wxString& title,
bool is_tab_opt /* = false */,
column_t extra_clmn /* = nullptr */) :
m_parent(_parent), title(title),
m_show_modified_btns(is_tab_opt),
staticbox(title!=""), extra_column(extra_clmn)
{
if (staticbox) {
stb = new wxStaticBox(_parent, wxID_ANY, _(title));
if (!wxOSX) stb->SetBackgroundStyle(wxBG_STYLE_PAINT);
stb->SetFont(wxOSX ? wxGetApp().normal_font() : wxGetApp().bold_font());
} else
stb = nullptr;
sizer = (staticbox ? new wxStaticBoxSizer(stb, wxVERTICAL) : new wxBoxSizer(wxVERTICAL));
auto num_columns = 1U;
if (label_width != 0) num_columns++;
if (extra_column != nullptr) num_columns++;
m_grid_sizer = new wxFlexGridSizer(0, num_columns, 1,0);
static_cast<wxFlexGridSizer*>(m_grid_sizer)->SetFlexibleDirection(wxBOTH/*wxHORIZONTAL*/);
static_cast<wxFlexGridSizer*>(m_grid_sizer)->AddGrowableCol(label_width == 0 ? 0 : !extra_column ? 1 : 2 );
#if 0//#ifdef __WXGTK__
m_panel = new wxPanel( _parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
sizer->Fit(m_panel);
sizer->Add(m_panel, 0, wxEXPAND | wxALL, wxOSX||!staticbox ? 0: 5);
#else
sizer->Add(m_grid_sizer, 0, wxEXPAND | wxALL, wxOSX||!staticbox ? 0: 5);
#endif /* __WXGTK__ */
}
void OptionsGroup::add_undo_buttuns_to_sizer(wxSizer* sizer, const t_field& field)
{
if (!m_show_modified_btns) {

View file

@ -11,7 +11,6 @@
#include "libslic3r/PrintConfig.hpp"
#include "Field.hpp"
#include "GUI_App.hpp"
#include "I18N.hpp"
// Translate the ifdef
@ -171,32 +170,7 @@ public:
}
OptionsGroup( wxWindow* _parent, const wxString& title, bool is_tab_opt = false,
column_t extra_clmn = nullptr) :
m_parent(_parent), title(title),
m_show_modified_btns(is_tab_opt),
staticbox(title!=""), extra_column(extra_clmn) {
if (staticbox) {
stb = new wxStaticBox(_parent, wxID_ANY, _(title));
if (!wxOSX) stb->SetBackgroundStyle(wxBG_STYLE_PAINT);
stb->SetFont(wxOSX ? wxGetApp().normal_font() : wxGetApp().bold_font());
} else
stb = nullptr;
sizer = (staticbox ? new wxStaticBoxSizer(stb, wxVERTICAL) : new wxBoxSizer(wxVERTICAL));
auto num_columns = 1U;
if (label_width != 0) num_columns++;
if (extra_column != nullptr) num_columns++;
m_grid_sizer = new wxFlexGridSizer(0, num_columns, 1,0);
static_cast<wxFlexGridSizer*>(m_grid_sizer)->SetFlexibleDirection(wxBOTH/*wxHORIZONTAL*/);
static_cast<wxFlexGridSizer*>(m_grid_sizer)->AddGrowableCol(label_width == 0 ? 0 : !extra_column ? 1 : 2 );
#if 0//#ifdef __WXGTK__
m_panel = new wxPanel( _parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
sizer->Fit(m_panel);
sizer->Add(m_panel, 0, wxEXPAND | wxALL, wxOSX||!staticbox ? 0: 5);
#else
sizer->Add(m_grid_sizer, 0, wxEXPAND | wxALL, wxOSX||!staticbox ? 0: 5);
#endif /* __WXGTK__ */
}
column_t extra_clmn = nullptr);
wxGridSizer* get_grid_sizer() { return m_grid_sizer; }

View file

@ -1,6 +1,7 @@
#include "Preferences.hpp"
#include "AppConfig.hpp"
#include "OptionsGroup.hpp"
#include "GUI_App.hpp"
#include "I18N.hpp"
namespace Slic3r {
@ -364,4 +365,4 @@ void PreferencesDialog::create_settings_mode_widget()
} // GUI
} // Slic3r
} // Slic3r

View file

@ -10,6 +10,7 @@
#include "libslic3r/PrintConfig.hpp"
#include "GUI_App.hpp"
#include "Plater.hpp"
#include "Tab.hpp"
#include "PresetBundle.hpp"

View file

@ -9,6 +9,7 @@
#include "GUI_ObjectList.hpp"
#include "Gizmos/GLGizmoBase.hpp"
#include "Camera.hpp"
#include "Plater.hpp"
#include "libslic3r/Model.hpp"

View file

@ -3,6 +3,7 @@
#include "3DScene.hpp"
#include "GUI.hpp"
#include "../Utils/UndoRedo.hpp"
#include "Plater.hpp"
#include <string>

View file

@ -32,6 +32,8 @@
#include "GUI_App.hpp"
#include "GUI_ObjectList.hpp"
#include "ConfigWizard.hpp"
#include "Plater.hpp"
#include "MainFrame.hpp"
#include "format.hpp"
namespace Slic3r {

View file

@ -33,6 +33,8 @@
#include "Event.hpp"
#include "wxExtensions.hpp"
#include "ConfigManipulation.hpp"
#include "Preset.hpp"
#include "GUI_App.hpp"
namespace Slic3r {
namespace GUI {

View file

@ -13,6 +13,7 @@
#include "GUI_ObjectList.hpp"
#include "I18N.hpp"
#include "GUI_Utils.hpp"
#include "Plater.hpp"
#include "../Utils/MacDarkMode.hpp"
#ifndef __WXGTK__// msw_menuitem_bitmaps is used for MSW and OSX

View file

@ -25,6 +25,7 @@
#include "slic3r/GUI/UpdateDialogs.hpp"
#include "slic3r/GUI/ConfigWizard.hpp"
#include "slic3r/GUI/GUI_App.hpp"
#include "slic3r/GUI/Plater.hpp"
#include "slic3r/GUI/format.hpp"
#include "slic3r/Utils/Http.hpp"
#include "slic3r/Config/Version.hpp"