DlgEvaluateMeshImp.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (c) 2006 Werner Mayer <wmayer[at]users.sourceforge.net>     *
00003  *                                                                         *
00004  *   This file is part of the FreeCAD CAx development system.              *
00005  *                                                                         *
00006  *   This library is free software; you can redistribute it and/or         *
00007  *   modify it under the terms of the GNU Library General Public           *
00008  *   License as published by the Free Software Foundation; either          *
00009  *   version 2 of the License, or (at your option) any later version.      *
00010  *                                                                         *
00011  *   This library  is distributed in the hope that it will be useful,      *
00012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00014  *   GNU Library General Public License for more details.                  *
00015  *                                                                         *
00016  *   You should have received a copy of the GNU Library General Public     *
00017  *   License along with this library; see the file COPYING.LIB. If not,    *
00018  *   write to the Free Software Foundation, Inc., 59 Temple Place,         *
00019  *   Suite 330, Boston, MA  02111-1307, USA                                *
00020  *                                                                         *
00021  ***************************************************************************/
00022 
00023 
00024 #ifndef MESHGUI_DLG_EVALUATE_MESH_IMP_H
00025 #define MESHGUI_DLG_EVALUATE_MESH_IMP_H
00026 
00027 #include <map>
00028 #include <QPointer>
00029 
00030 #include <App/Application.h>
00031 #include <App/Document.h>
00032 #include <App/DocumentObserver.h>
00033 #include "ui_DlgEvaluateMesh.h"
00034 
00035 namespace Gui {
00036 class View3DInventor;
00037 }
00038 namespace Mesh {
00039   class Feature;
00040 }
00041 
00042 namespace MeshGui {
00043 class ViewProviderMeshDefects;
00044 
00050 class CleanupHandler : public QObject
00051 {
00052     Q_OBJECT
00053 
00054 public:
00055     CleanupHandler();
00056 
00057 public Q_SLOTS:
00058     void cleanup();
00059 };
00060 
00064 class DlgEvaluateMeshImp : public QDialog, public Ui_DlgEvaluateMesh, public App::DocumentObserver
00065 { 
00066     Q_OBJECT
00067 
00068 public:
00069     DlgEvaluateMeshImp( QWidget* parent = 0, Qt::WFlags fl = 0 );
00070     ~DlgEvaluateMeshImp();
00071 
00072     void setMesh( Mesh::Feature* );
00073 
00074 private:
00076     void slotCreatedDocument(const App::Document& Doc);
00078     void slotDeletedDocument(const App::Document& Doc);
00080     void slotCreatedObject(const App::DocumentObject& Obj);
00082     void slotDeletedObject(const App::DocumentObject& Obj);
00084     void slotChangedObject(const App::DocumentObject& Obj, const App::Property& Prop);
00085 
00086 protected Q_SLOTS:
00087     void on_checkOrientationButton_clicked();
00088     void on_analyzeOrientationButton_clicked();
00089     void on_repairOrientationButton_clicked();
00090 
00091     void on_checkDuplicatedFacesButton_clicked();
00092     void on_analyzeDuplicatedFacesButton_clicked();
00093     void on_repairDuplicatedFacesButton_clicked();
00094 
00095     void on_checkDuplicatedPointsButton_clicked();
00096     void on_analyzeDuplicatedPointsButton_clicked();
00097     void on_repairDuplicatedPointsButton_clicked();
00098 
00099     void on_checkNonmanifoldsButton_clicked();
00100     void on_analyzeNonmanifoldsButton_clicked();
00101     void on_repairNonmanifoldsButton_clicked();
00102 
00103     void on_checkDegenerationButton_clicked();
00104     void on_analyzeDegeneratedButton_clicked();
00105     void on_repairDegeneratedButton_clicked();
00106 
00107     void on_checkIndicesButton_clicked();
00108     void on_analyzeIndicesButton_clicked();
00109     void on_repairIndicesButton_clicked();
00110 
00111     void on_checkSelfIntersectionButton_clicked();
00112     void on_analyzeSelfIntersectionButton_clicked();
00113     void on_repairSelfIntersectionButton_clicked();
00114 
00115     void on_checkFoldsButton_clicked();
00116     void on_analyzeFoldsButton_clicked();
00117     void on_repairFoldsButton_clicked();
00118 
00119     void on_analyzeAllTogether_clicked();
00120     void on_repairAllTogether_clicked();
00121 
00122     void on_refreshButton_clicked();
00123     void on_meshNameButton_activated(int);
00124 
00125 protected:
00126     void refreshList();
00127     void showInformation();
00128     void cleanInformation();
00129     void addViewProvider(const char* vp, const std::vector<unsigned long>& indices);
00130     void removeViewProvider(const char* vp);
00131     void removeViewProviders();
00132     void changeEvent(QEvent *e);
00133 
00134 private:
00135     class Private;
00136     Private* d;
00137 };
00138 
00143 class DockEvaluateMeshImp : public DlgEvaluateMeshImp
00144 { 
00145     Q_OBJECT
00146 
00147 protected:
00148     DockEvaluateMeshImp( QWidget* parent = 0, Qt::WFlags fl = 0 );
00149     ~DockEvaluateMeshImp();
00150     void closeEvent(QCloseEvent* e);
00151 
00152 public:
00153     static DockEvaluateMeshImp* instance();
00154     static void destruct();
00155     static bool hasInstance();
00156   
00157     QSize sizeHint () const;
00158 
00159 private:
00160     static DockEvaluateMeshImp* _instance;
00161 };
00162 
00163 } // namespace MeshGui
00164 
00165 #endif // MESHGUI_DLG_EVALUATE_MESH_IMP_H

Generated on Wed Nov 23 19:00:06 2011 for FreeCAD by  doxygen 1.6.1