Salome HOME
Merge from V6_main_20120808 08Aug12
[modules/gui.git] / src / SalomeApp / SalomeApp_NoteBookDlg.h
index 431b50ced7d01ea82acf5cb60927e53d2959871f..8e8ec08621453900c4bbaade4a59cd89457a2c67 100644 (file)
@@ -1,11 +1,11 @@
-// Copyright (C) 2008  OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+// Copyright (C) 2007-2012  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.
 //
-// This library is distributed in the hope that it will be useful
+// 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.
 //
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 // File:    SalomeApp_NoteBookDlg.h
 // Author : Roman NIKOLAEV, Open CASCADE S.A.S.
 // Module : GUI
-
+//
 #ifndef SALOMEAPP_NOTEBOOKDLG_H
 #define SALOMEAPP_NOTEBOOKDLG_H
 
@@ -35,6 +36,7 @@
 class QWidget;
 class QPushButton;
 class QTableWidgetItem;
+class NoteBook_Table;
 
 struct NoteBoox_Variable
 {
@@ -53,7 +55,7 @@ typedef QMap< int, NoteBoox_Variable > VariableMap;
 class SALOMEAPP_EXPORT NoteBook_TableRow : public QWidget
 {
  public:
-  NoteBook_TableRow(int, QWidget* parent=0);
+  NoteBook_TableRow(int, NoteBook_Table* parentTable, QWidget* parent=0 );
   virtual ~NoteBook_TableRow();
 
   int  GetIndex() const { return myIndex; }
@@ -76,9 +78,11 @@ class SALOMEAPP_EXPORT NoteBook_TableRow : public QWidget
   static bool IsRealValue(const QString theValue, double* theResult = 0);
   static bool IsIntegerValue(const QString theValue, int* theResult = 0);
   static bool IsBooleanValue(const QString theValue, bool* theResult = 0);
+  bool IsValidStringValue(const QString theName);
   
  private:
   int               myIndex;
+  NoteBook_Table*   myParentTable;
   QTableWidgetItem* myRowHeader;
   QTableWidgetItem* myVariableName;
   QTableWidgetItem* myVariableValue;
@@ -93,7 +97,7 @@ class SALOMEAPP_EXPORT NoteBook_Table : public QTableWidget
 
   void Init(_PTR(Study) theStudy);
   static QString Variable2String(const std::string& theVarName,
-                                _PTR(Study) theStudy);
+                                 _PTR(Study) theStudy);
 
   bool IsValid() const;
 
@@ -118,6 +122,8 @@ class SALOMEAPP_EXPORT NoteBook_Table : public QTableWidget
 
   void ResetMaps();
 
+  QList<NoteBook_TableRow*>          myRows;
+
   public slots:
     void onItemChanged(QTableWidgetItem* theItem);
 
@@ -126,7 +132,6 @@ class SALOMEAPP_EXPORT NoteBook_Table : public QTableWidget
     
  private:
   bool isProcessItemChangedSignal;
-  QList<NoteBook_TableRow*>          myRows;
 
   bool        myIsModified;
   QList<int>  myRemovedRows;