[TD]SectionView/ComplexSection - preview, direction selection
- add preview/live update to TaskSectionView & TaskComplexSection - add view direction selector to uis - use SectionNormal as Direction. Make Direction read-only - simplify section line end point calculation - section group command in toolbar - make section and complex section icons consistent - fix compsolid cutting tool - terminology: single/piecewise to offset/aligned
This commit is contained in:
@@ -46,6 +46,9 @@ class DrawComplexSection;
|
||||
|
||||
namespace TechDrawGui
|
||||
{
|
||||
class CompassWidget;
|
||||
class VectorEditWidget;
|
||||
|
||||
class Ui_TaskComplexSection;
|
||||
|
||||
class TaskComplexSection : public QWidget
|
||||
@@ -59,40 +62,85 @@ public:
|
||||
std::vector<App::DocumentObject*> xShapes,
|
||||
App::DocumentObject* profileObject,
|
||||
std::vector<std::string> profileSubs);
|
||||
TaskComplexSection(TechDraw::DrawComplexSection* complexSection);
|
||||
~TaskComplexSection() = default;
|
||||
|
||||
virtual bool accept();
|
||||
virtual bool reject();
|
||||
void saveButtons(QPushButton* btnOK,
|
||||
QPushButton* btnCancel);
|
||||
void enableTaskButtons(bool button);
|
||||
public Q_SLOTS:
|
||||
void onSectionObjectsUseSelectionClicked();
|
||||
void onProfileObjectsUseSelectionClicked();
|
||||
|
||||
protected:
|
||||
void changeEvent(QEvent *event) override;
|
||||
void saveSectionState();
|
||||
void restoreSectionState();
|
||||
|
||||
bool apply(bool forceUpdate = false);
|
||||
void applyQuick(std::string dir);
|
||||
void applyAligned(Base::Vector3d localUnit);
|
||||
|
||||
void setUiPrimary();
|
||||
void setUiEdit();
|
||||
void setUiCommon();
|
||||
|
||||
void checkAll(bool check);
|
||||
void enableAll(bool enable);
|
||||
|
||||
void failNoObject();
|
||||
bool isBaseValid();
|
||||
bool isSectionValid();
|
||||
|
||||
void updateUi();
|
||||
|
||||
protected Q_SLOTS:
|
||||
void onSectionObjectsUseSelectionClicked();
|
||||
void onProfileObjectsUseSelectionClicked();
|
||||
void onUpClicked();
|
||||
void onDownClicked();
|
||||
void onLeftClicked();
|
||||
void onRightClicked();
|
||||
void onIdentifierChanged();
|
||||
void onScaleChanged();
|
||||
void scaleTypeChanged(int index);
|
||||
void liveUpdateClicked();
|
||||
void updateNowClicked();
|
||||
void slotChangeAngle(double newAngle);
|
||||
void slotViewDirectionChanged(Base::Vector3d newDirection);
|
||||
|
||||
private:
|
||||
void createComplexSection();
|
||||
void updateComplexSection();
|
||||
|
||||
QString sourcesToString();
|
||||
std::unique_ptr<Ui_TaskComplexSection> ui;
|
||||
|
||||
TechDraw::DrawPage* m_page;
|
||||
App::Document* m_doc;
|
||||
TechDraw::DrawViewPart* m_baseView;
|
||||
TechDraw::DrawComplexSection* m_section;
|
||||
std::vector<App::DocumentObject*> m_shapes;
|
||||
std::vector<App::DocumentObject*> m_xShapes;
|
||||
App::DocumentObject* m_profileObject;
|
||||
std::vector<std::string> m_profileSubs;
|
||||
std::string m_dirName;
|
||||
std::string m_sectionName;
|
||||
Base::Vector3d m_saveNormal;
|
||||
Base::Vector3d m_saveXDir;
|
||||
std::string m_saveBaseName;
|
||||
std::string m_savePageName;
|
||||
std::string m_saveSymbol;
|
||||
std::string m_saveDirName;
|
||||
Base::Vector3d m_saveDirection;
|
||||
Base::Vector3d m_saveOrigin;
|
||||
double m_saveScale;
|
||||
int m_saveScaleType;
|
||||
bool m_saved;
|
||||
bool m_createMode;
|
||||
Base::Vector3d m_normal;
|
||||
|
||||
QPushButton* m_btnOK;
|
||||
QPushButton* m_btnCancel;
|
||||
int m_applyDeferred;
|
||||
Base::Vector3d m_localUnit;
|
||||
CompassWidget* m_compass;
|
||||
double m_angle;
|
||||
VectorEditWidget* m_viewDirectionWidget;
|
||||
|
||||
};
|
||||
|
||||
@@ -107,13 +155,13 @@ public:
|
||||
std::vector<App::DocumentObject*> xShapes,
|
||||
App::DocumentObject* profileObject,
|
||||
std::vector<std::string> profileSubs);
|
||||
TaskDlgComplexSection(TechDraw::DrawComplexSection* page);
|
||||
~TaskDlgComplexSection() override;
|
||||
|
||||
public:
|
||||
/// is called the TaskView when the dialog is opened
|
||||
void open() override;
|
||||
/// is called by the framework if an button is clicked which has no accept or reject role
|
||||
void clicked(int) override;
|
||||
/// is called by the framework if the dialog is accepted (Ok)
|
||||
bool accept() override;
|
||||
/// is called by the framework if the dialog is rejected (Cancel)
|
||||
@@ -123,8 +171,6 @@ public:
|
||||
{ return false; }
|
||||
void update();
|
||||
|
||||
void modifyStandardButtons(QDialogButtonBox* box) override;
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user