Back to index

salome-geom  6.5.0
GEOMToolsGUI_PublishDlg.h
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
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 GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 
00023 // GEOM GEOMGUI : GUI for Geometry component
00024 // File   : GEOMToolsGUI_PublishDlg.h
00025 // Author : Roman NIKOLAEV, Open CASCADE S.A.S.
00026 //
00027 
00028 #ifndef GEOMTOOLSGUI_PUBLISHDLG_H
00029 #define GEOMTOOLSGUI_PUBLISHDLG_H
00030 
00031 #include "GEOM_ToolsGUI.hxx"
00032 
00033 #include <QMap>
00034 #include <QList>
00035 #include <QDialog>
00036 #include <QTreeWidgetItem>
00037 
00038 
00039 
00040 
00041 #include <SALOMEDSClient.hxx>
00042 
00043 class QTreeWidget;
00044 class QTreeWidgetItem;
00045 
00046 class SalomeApp_DataObject;
00047 
00048 typedef QPair<QString, QString> Pair;
00049 typedef QList<Pair > BufferedList;
00050 typedef QMap<QString, QTreeWidgetItem*> Entry2ItemMap;
00051 
00052 class GEOMTOOLSGUI_EXPORT GEOMToolsGUI_PublishDlg : public QDialog
00053 { 
00054   Q_OBJECT
00055 
00056 public:
00057   GEOMToolsGUI_PublishDlg( QWidget* );
00058   ~GEOMToolsGUI_PublishDlg();
00059 
00060 protected:
00061   void               initData();
00062   void               buildTree(_PTR(Study) theStudy, SalomeApp_DataObject* theItem);
00063   QTreeWidgetItem*   findParentItem(_PTR(Study) theStudy, SalomeApp_DataObject* theItem, BufferedList& theList);
00064   QTreeWidgetItem*   createItem(QTreeWidgetItem* theItem, Pair theAttributes, bool isCheckable);
00065   void               getDrawableList(QTreeWidgetItem* theItem, QList<QTreeWidgetItem*>& theList);
00066   void               getTails(QTreeWidgetItem* theItem, QList<QTreeWidgetItem*>& theList);
00067   
00068 protected slots:
00069   void clickOnOk();
00070   void clickOnApply();
00071   void clickOnSelectAll();
00072   void clickOnUnSelectAll();
00073   
00074 private:  
00075   QTreeWidget*           myTreeWidget;
00076   SalomeApp_DataObject*  myGeomRoot;
00077   Entry2ItemMap          myEntryToItem;
00078   void processAll(QTreeWidgetItem* theItem, Qt::CheckState state);
00079 };
00080 
00081 
00082 
00083 #endif //GEOMTOOLSGUI_PUBLISHDLG_H