RemoveComponents.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 MESHGUI_REMOVECOMPONENTS_H
00025 #define MESHGUI_REMOVECOMPONENTS_H
00026
00027 #include <QDialog>
00028 #include <Inventor/nodes/SoEventCallback.h>
00029 #include <Gui/TaskView/TaskDialog.h>
00030 #include <Gui/TaskView/TaskView.h>
00031
00032
00033 class SoEventCallback;
00034 namespace App { class DocumentObject; }
00035 namespace Gui { class View3DInventorViewer; }
00036 namespace Gui { class Document; }
00037 namespace Mesh { class Feature; }
00038
00039 namespace MeshGui {
00040 class ViewProviderMesh;
00041 class Ui_RemoveComponents;
00042
00048 class MeshGuiExport RemoveComponents : public QWidget
00049 {
00050 Q_OBJECT
00051
00052 public:
00053 RemoveComponents(QWidget* parent = 0, Qt::WFlags fl = 0);
00054 ~RemoveComponents();
00055 void reject();
00056 void deleteSelection();
00057 void invertSelection();
00058
00059 public Q_SLOTS:
00060 void on_selectRegion_clicked();
00061 void on_selectAll_clicked();
00062 void on_selectComponents_clicked();
00063 void on_selectTriangle_clicked();
00064 void on_deselectRegion_clicked();
00065 void on_deselectAll_clicked();
00066 void on_deselectComponents_clicked();
00067 void on_deselectTriangle_clicked();
00068
00069 protected:
00070 void changeEvent(QEvent *e);
00071
00072 private:
00073 std::list<ViewProviderMesh*> getViewProviders(const Gui::Document*) const;
00074 Gui::View3DInventorViewer* getViewer() const;
00075 void startInteractiveCallback(Gui::View3DInventorViewer* ,SoEventCallbackCB *);
00076 void stopInteractiveCallback(Gui::View3DInventorViewer*);
00077
00078 static void selectGLCallback(void * ud, SoEventCallback * n);
00079 static void pickFaceCallback(void * ud, SoEventCallback * n);
00080
00081 private:
00082 Ui_RemoveComponents* ui;
00083 SoEventCallbackCB *_interactiveMode;
00084 bool selectRegion;
00085 };
00086
00090 class MeshGuiExport RemoveComponentsDialog : public QDialog
00091 {
00092 Q_OBJECT
00093
00094 public:
00095 RemoveComponentsDialog(QWidget* parent = 0, Qt::WFlags fl = 0);
00096 ~RemoveComponentsDialog();
00097 void reject();
00098
00099 private Q_SLOTS:
00100 void clicked(QAbstractButton* btn);
00101
00102 private:
00103 RemoveComponents* widget;
00104 };
00105
00109 class TaskRemoveComponents : public Gui::TaskView::TaskDialog
00110 {
00111 Q_OBJECT
00112
00113 public:
00114 TaskRemoveComponents();
00115 ~TaskRemoveComponents();
00116
00117 public:
00118 bool accept();
00119 void clicked(int);
00120
00121 virtual QDialogButtonBox::StandardButtons getStandardButtons() const
00122 { return QDialogButtonBox::Ok | QDialogButtonBox::Close; }
00123 virtual bool isAllowedAlterDocument(void) const
00124 { return true; }
00125 virtual void modifyStandardButtons(QDialogButtonBox*);
00126
00127 private:
00128 RemoveComponents* widget;
00129 Gui::TaskView::TaskBox* taskbox;
00130 };
00131
00132 }
00133
00134 #endif // MESHGUI_REMOVECOMPONENTS_H