mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-02-03 09:10:32 +05:00
111 lines
3.0 KiB
C
111 lines
3.0 KiB
C
|
// Copyright (C) 2014 CEA/DEN, EDF R&D, OPEN CASCADE
|
||
|
//
|
||
|
// This library is free software; you can redistribute it and/or
|
||
|
// modify it under the terms of the GNU Lesser General Public
|
||
|
// License as published by the Free Software Foundation; either
|
||
|
// version 2.1 of the License, or (at your option) any later version.
|
||
|
//
|
||
|
// This library is distributed in the hope that it will be useful,
|
||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||
|
// Lesser General Public License for more details.
|
||
|
//
|
||
|
// You should have received a copy of the GNU Lesser General Public
|
||
|
// License along with this library; if not, write to the Free Software
|
||
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||
|
//
|
||
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||
|
//
|
||
|
|
||
|
#ifndef GEOMTOOLSGUI_REDUCESTUDYDLG_H
|
||
|
#define GEOMTOOLSGUI_REDUCESTUDYDLG_H
|
||
|
|
||
|
#include "GEOM_ToolsGUI.hxx"
|
||
|
#include <QDialog>
|
||
|
#include <QTreeWidget>
|
||
|
#include <QCheckBox>
|
||
|
|
||
|
#include <GEOMUtils.hxx>
|
||
|
#include <GeometryGUI.h>
|
||
|
#include <GEOM_Displayer.h>
|
||
|
|
||
|
#include <set>
|
||
|
|
||
|
class GEOMToolsGUI_TreeWidgetItem : public QTreeWidgetItem
|
||
|
{
|
||
|
public:
|
||
|
GEOMToolsGUI_TreeWidgetItem( QTreeWidget*, const QStringList&, char*, bool, int = Type );
|
||
|
GEOMToolsGUI_TreeWidgetItem( QTreeWidgetItem*, const QStringList&, char*, bool, int = Type );
|
||
|
~GEOMToolsGUI_TreeWidgetItem();
|
||
|
|
||
|
bool isVisible();
|
||
|
void setVisible( bool, QIcon& );
|
||
|
|
||
|
char* getStudyEntry() const;
|
||
|
|
||
|
private:
|
||
|
char* myStudyEntry;
|
||
|
bool myVisible;
|
||
|
};
|
||
|
|
||
|
class GEOMTOOLSGUI_EXPORT GEOMToolsGUI_ReduceStudyDlg : public QDialog
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
public:
|
||
|
GEOMToolsGUI_ReduceStudyDlg( const GEOM::string_array&, QWidget* );
|
||
|
~GEOMToolsGUI_ReduceStudyDlg();
|
||
|
|
||
|
private slots:
|
||
|
|
||
|
void onUnpublishIntermediate( bool );
|
||
|
void onRemoveIntermediate( bool );
|
||
|
void onKeepSubObjects( bool );
|
||
|
void onRemoveEmptyFolder( bool );
|
||
|
void onSoftRemoval( bool );
|
||
|
|
||
|
void clickOnOk();
|
||
|
void clickOnCancel();
|
||
|
void clickOnHelp();
|
||
|
|
||
|
void onSelectionChanged();
|
||
|
void onItemClicked(QTreeWidgetItem*, int );
|
||
|
void onHeaderClicked( int );
|
||
|
|
||
|
void update();
|
||
|
|
||
|
private:
|
||
|
|
||
|
void onShowOnlySelected();
|
||
|
void checkVisibleIcon( QTreeWidget* );
|
||
|
void sortObjects( QTreeWidget*, std::set<std::string>& );
|
||
|
GEOMToolsGUI_TreeWidgetItem* addSubObject( QTreeWidget*, std::set<std::string>&, GEOM::GEOM_Object_var );
|
||
|
GEOMToolsGUI_TreeWidgetItem* findObjectInTree( QTreeWidget*, GEOM::GEOM_Object_var );
|
||
|
|
||
|
QTreeWidget* myTreeKeptObjects;
|
||
|
QTreeWidget* myTreeRemoveObjects;
|
||
|
|
||
|
QCheckBox* myCBUnpublishIntermediate;
|
||
|
QCheckBox* myCBRemoveIntermediate;
|
||
|
QCheckBox* myCBKeepSubObjects;
|
||
|
QCheckBox* myCBRemoveEmptyFolder;
|
||
|
QCheckBox* myCBSoftRemoval;
|
||
|
|
||
|
std::set<std::string> myMainEntries;
|
||
|
|
||
|
QIcon myVisible;
|
||
|
QIcon myInvisible;
|
||
|
|
||
|
bool mySelectAll;
|
||
|
|
||
|
GEOM_Displayer myDisplayer;
|
||
|
|
||
|
std::set<std::string> myParents;
|
||
|
std::set<std::string> mySubObjects;
|
||
|
std::set<std::string> myOthers;
|
||
|
|
||
|
std::map<QTreeWidget*,bool> myMapTreeSelectAll;
|
||
|
};
|
||
|
|
||
|
#endif
|