DlgDisplayPropertiesImp.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef GUI_DIALOG_DLGDISPLAYPROPERTIES_IMP_H
00025 #define GUI_DIALOG_DLGDISPLAYPROPERTIES_IMP_H
00026
00027 #include <vector>
00028 #include <boost/signals.hpp>
00029
00030 #include "ui_DlgDisplayProperties.h"
00031 #include "Selection.h"
00032 #include <App/Material.h>
00033
00034 namespace App
00035 {
00036 class Property;
00037 }
00038
00039 namespace Gui {
00040
00041 class ViewProvider;
00042 class Command;
00043
00044 namespace Dialog {
00045 typedef boost::signals::connection DlgDisplayPropertiesImp_Connection;
00046
00052 class DlgDisplayPropertiesImp : public QDialog, public Ui_DlgDisplayProperties,
00053 public Gui::SelectionSingleton::ObserverType
00054 {
00055 Q_OBJECT
00056
00057 public:
00058 DlgDisplayPropertiesImp( QWidget* parent = 0, Qt::WFlags fl = 0 );
00059 ~DlgDisplayPropertiesImp();
00061 void OnChange(Gui::SelectionSingleton::SubjectType &rCaller,
00062 Gui::SelectionSingleton::MessageType Reason);
00063
00064 private Q_SLOTS:
00065 void on_changeMaterial_activated(const QString&);
00066 void on_changeMode_activated(const QString&);
00067 void on_changePlot_activated(const QString&);
00068 void on_buttonColor_changed();
00069 void on_spinTransparency_valueChanged(int);
00070 void on_spinPointSize_valueChanged(int);
00071 void on_buttonLineColor_changed();
00072 void on_spinLineWidth_valueChanged(int);
00073 void on_spinLineTransparency_valueChanged(int);
00074 void on_buttonUserDefinedMaterial_clicked();
00075 void on_buttonColorPlot_clicked();
00076
00077 protected:
00078 void changeEvent(QEvent *e);
00079
00080 private:
00081 void slotChangedObject(const Gui::ViewProvider&, const App::Property& Prop);
00082 void reject();
00083 void setDisplayModes(const std::vector<ViewProvider*>&);
00084 void setMaterial(const std::vector<ViewProvider*>&);
00085 void setColorPlot(const std::vector<ViewProvider*>&);
00086 void fillupMaterials();
00087 void setShapeColor(const std::vector<ViewProvider*>&);
00088 void setLineColor(const std::vector<ViewProvider*>&);
00089 void setPointSize(const std::vector<ViewProvider*>&);
00090 void setLineWidth(const std::vector<ViewProvider*>&);
00091 void setTransparency(const std::vector<ViewProvider*>&);
00092 void setLineTransparency(const std::vector<ViewProvider*>&);
00093 std::vector<ViewProvider*> getSelection() const;
00094 QMap<QString, App::Material::MaterialType> Materials;
00095
00096 DlgDisplayPropertiesImp_Connection connectChangedObject;
00097 };
00098
00099 }
00100 }
00101
00102 #endif // GUI_DIALOG_DLGDISPLAYPROPERTIES_IMP_H