| |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
|
|
| #ifndef MATGUI_DIALOG_DLGDISPLAYPROPERTIES_IMP_H |
| #define MATGUI_DIALOG_DLGDISPLAYPROPERTIES_IMP_H |
|
|
| #include <QDialog> |
| #include <memory> |
| #include <vector> |
|
|
| #include <App/Material.h> |
| #include <Gui/Selection/Selection.h> |
| #include <Gui/TaskView/TaskDialog.h> |
| #include <Gui/TaskView/TaskView.h> |
|
|
| #include <Mod/Material/App/Materials.h> |
|
|
| namespace App |
| { |
| class Property; |
| } |
|
|
| namespace MatGui |
| { |
|
|
| class ViewProvider; |
| class Command; |
|
|
| |
| |
| |
| |
| |
| class DlgDisplayPropertiesImp: public QDialog, public Gui::SelectionSingleton::ObserverType |
| { |
| Q_OBJECT |
|
|
| public: |
| explicit DlgDisplayPropertiesImp(QWidget* parent = nullptr, |
| Qt::WindowFlags fl = Qt::WindowFlags()); |
| ~DlgDisplayPropertiesImp() override; |
| |
| void OnChange(Gui::SelectionSingleton::SubjectType& rCaller, |
| Gui::SelectionSingleton::MessageType Reason) override; |
| void showDefaultButtons(bool); |
| void reject() override; |
|
|
| private Q_SLOTS: |
| void onChangeModeActivated(const QString&); |
| void onChangePlotActivated(const QString&); |
| void onSpinTransparencyValueChanged(int); |
| void onSpinPointSizeValueChanged(int); |
| void onButtonLineColorChanged(); |
| void onButtonPointColorChanged(); |
| void onSpinLineWidthValueChanged(int); |
| void onSpinLineTransparencyValueChanged(int); |
| void onButtonCustomAppearanceClicked(); |
| void onButtonColorPlotClicked(); |
| void onMaterialSelected(const std::shared_ptr<Materials::Material>& material); |
|
|
| protected: |
| void changeEvent(QEvent* e) override; |
|
|
| private: |
| void setupConnections(); |
| void setupFilters(); |
| void slotChangedObject(const Gui::ViewProvider&, const App::Property& Prop); |
| void setDisplayModes(const std::vector<Gui::ViewProvider*>&); |
| void setColorPlot(const std::vector<Gui::ViewProvider*>&); |
| void setShapeAppearance(const std::vector<Gui::ViewProvider*>&); |
| void setLineColor(const std::vector<Gui::ViewProvider*>&); |
| void setPointColor(const std::vector<Gui::ViewProvider*>&); |
| void setPointSize(const std::vector<Gui::ViewProvider*>&); |
| void setLineWidth(const std::vector<Gui::ViewProvider*>&); |
| void setTransparency(const std::vector<Gui::ViewProvider*>&); |
| void setLineTransparency(const std::vector<Gui::ViewProvider*>&); |
| std::vector<Gui::ViewProvider*> getSelection() const; |
| void setPropertiesFromSelection(); |
|
|
| private: |
| class Private; |
| std::unique_ptr<Private> d; |
| }; |
|
|
| class TaskDisplayProperties: public Gui::TaskView::TaskDialog |
| { |
| Q_OBJECT |
|
|
| public: |
| TaskDisplayProperties(); |
| ~TaskDisplayProperties() override; |
|
|
| public: |
| bool reject() override; |
|
|
| bool isAllowedAlterDocument() const override |
| { |
| return true; |
| } |
| bool isAllowedAlterView() const override |
| { |
| return true; |
| } |
| bool isAllowedAlterSelection() const override |
| { |
| return true; |
| } |
| QDialogButtonBox::StandardButtons getStandardButtons() const override; |
|
|
| private: |
| DlgDisplayPropertiesImp* widget; |
| }; |
|
|
| } |
|
|
| #endif |
|
|