From 2856cd229722c6e48b0ab8baeda6a907e9a1bdc2 Mon Sep 17 00:00:00 2001 From: jfa Date: Wed, 15 Jun 2005 12:48:28 +0000 Subject: [PATCH] Remove useless code, Improve resources file --- src/VISUGUI/VISU_msg_en.po | 6 ---- src/VISUGUI/VisuGUI_CutPlanesDlg.cxx | 54 ++++++++-------------------- src/VISUGUI/VisuGUI_CutPlanesDlg.h | 24 ++++--------- 3 files changed, 22 insertions(+), 62 deletions(-) diff --git a/src/VISUGUI/VISU_msg_en.po b/src/VISUGUI/VISU_msg_en.po index 951f6947..22245b12 100644 --- a/src/VISUGUI/VISU_msg_en.po +++ b/src/VISUGUI/VISU_msg_en.po @@ -138,9 +138,6 @@ msgstr "Erase" msgid "VisuGUI::MEN_EXPORT_TABLE" msgstr "Export Table" -#msgid "VisuGUI::MEN_FILE" -#msgstr "" - msgid "VisuGUI::MEN_INSIDEFRAME" msgstr "Insideframe" @@ -239,9 +236,6 @@ msgstr "Copy" msgid "VisuGUI::MEN_SELECTION" msgstr "Selection" -msgid "VisuGUI::MEN_REPRESENTATION" -msgstr "Representation" - msgid "VisuGUI::MEN_DISPLAY_SELECTION" msgstr "Display Selection" diff --git a/src/VISUGUI/VisuGUI_CutPlanesDlg.cxx b/src/VISUGUI/VisuGUI_CutPlanesDlg.cxx index 0614b3c4..3478808f 100644 --- a/src/VISUGUI/VisuGUI_CutPlanesDlg.cxx +++ b/src/VISUGUI/VisuGUI_CutPlanesDlg.cxx @@ -454,7 +454,6 @@ void VisuGUI_CutPlanesPane::onPreviewCheck (bool thePreview) //################################################################### - /*! Constructor */ @@ -516,49 +515,26 @@ VisuGUI_CutPlanesDlg::VisuGUI_CutPlanesDlg (QWidget* parent, bool theIsCreation, // this, SLOT(onWindowActivated(SUIT_ViewWindow*))); } -void VisuGUI_CutPlanesDlg::accept() { +void VisuGUI_CutPlanesDlg::initFromPrsObject (VISU::CutPlanes_i* thePrs) +{ + myPrs = thePrs; + myScalarPane->initFromPrsObject(thePrs); + myCutPane->initFromPrsObject(thePrs); +} + +int VisuGUI_CutPlanesDlg::storeToPrsObject (VISU::CutPlanes_i* thePrs) +{ + return (myScalarPane->storeToPrsObject(thePrs) && + myCutPane->storeToPrsObject(thePrs)); +} + +void VisuGUI_CutPlanesDlg::accept() +{ if (myScalarPane->check()) QDialog::accept(); -/*jfa tmp: - if (myScalarPane->check()) { - if (!isModal()) { - if (storeToPrsObject(myPrs)) { - if (myIsCreation) { - if (VISU::GetViewWindow() != NULL) { - try { - visuGUI->CreateActor(myPrs); - } - catch (...) { - reject(); - return; - } - VISU::GetViewWindow()->onFitAll(); - } - } else { - visuGUI->RecreateActor(myPrs); - if (SVTK_ViewWindow* vf = VISU::GetViewWindow()) { - if (vf->getRenderer()->GetActors()->GetNumberOfItems() > 0) { - vf->getRenderer()->ResetCameraClippingRange(); - vf->Repaint(); - } - } - } - } else { - if (myIsCreation) { - visuGUI->DeletePresentation(myPrs); - } - } - } - QDialog::accept(); - } -*/ } void VisuGUI_CutPlanesDlg::reject() { - //jfa tmp:if (myIsCreation && (!isModal())) { - //jfa tmp: visuGUI->DeletePresentation(myPrs); - //jfa tmp: VisuGUI::application()->objectBrowser()->updateTree(); - //jfa tmp:} QDialog::reject(); } diff --git a/src/VISUGUI/VisuGUI_CutPlanesDlg.h b/src/VISUGUI/VisuGUI_CutPlanesDlg.h index 0fb35b6f..19d10b82 100644 --- a/src/VISUGUI/VisuGUI_CutPlanesDlg.h +++ b/src/VISUGUI/VisuGUI_CutPlanesDlg.h @@ -101,43 +101,34 @@ private slots: }; - class VisuGUI_CutPlanesDlg : public QDialog { Q_OBJECT public: //VisuGUI_CutPlanesDlg(QWidget* parent, bool theIsCreation = true, bool theIsModal = false); - VisuGUI_CutPlanesDlg(QWidget* parent, bool theIsCreation = true, bool theIsModal = true); + VisuGUI_CutPlanesDlg (QWidget* parent, bool theIsCreation = true, bool theIsModal = true); ~VisuGUI_CutPlanesDlg() {}; - void initFromPrsObject(VISU::CutPlanes_i* thePrs) - {myPrs=thePrs; myScalarPane->initFromPrsObject(thePrs); myCutPane->initFromPrsObject(thePrs);} - - int storeToPrsObject(VISU::CutPlanes_i* thePrs) - {return myScalarPane->storeToPrsObject(thePrs) && myCutPane->storeToPrsObject(thePrs);} + void initFromPrsObject (VISU::CutPlanes_i* thePrs); + int storeToPrsObject (VISU::CutPlanes_i* thePrs); protected slots: - void accept(); - void reject(); - void onWindowActivated( SUIT_ViewWindow* ); + void accept(); + void reject(); + void onWindowActivated (SUIT_ViewWindow*); private: VisuGUI_CutPlanesPane* myCutPane; VisuGUI_ScalarBarPane* myScalarPane; - VISU::CutPlanes_i* myPrs; + VISU::CutPlanes_i* myPrs; bool myIsCreation; - - //SUIT_ViewManager *myMgr; - //SUIT_ViewWindow *myStudyWnd; }; class VisuGUI_NumEditItem: public QTableItem { - // Q_OBJECT - public: VisuGUI_NumEditItem(QTable* table, EditType et, const QString& text ): QTableItem(table, et, text) {}; @@ -146,5 +137,4 @@ public: QWidget* createEditor() const; }; - #endif // VISUGUI_CUTPLANESDLG_H -- 2.39.2