]> SALOME platform Git repositories - samples/light.git/commitdiff
Salome HOME
Merge from V7_3_BR branch 18/12/2013
authorvsr <vsr@opencascade.com>
Wed, 18 Dec 2013 15:13:57 +0000 (15:13 +0000)
committervsr <vsr@opencascade.com>
Wed, 18 Dec 2013 15:13:57 +0000 (15:13 +0000)
CMakeLists.txt
src/LIGHTGUI/CMakeLists.txt
src/LIGHTGUI/LIGHTGUI.cxx
src/LIGHTGUI/LIGHTGUI.h
src/LIGHTGUI/resources/LIGHT_msg_ja.ts [new file with mode: 0644]

index cbe878d8dff30ede5ba24af7e5252f14010399e6..4c5b22fc542ff93f06a9b162c418d82d1c6cc4c5 100755 (executable)
@@ -28,7 +28,7 @@ CMAKE_POLICY(SET CMP0003 NEW)
 STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
 
 SET(${PROJECT_NAME_UC}_MAJOR_VERSION 7)
-SET(${PROJECT_NAME_UC}_MINOR_VERSION 2)
+SET(${PROJECT_NAME_UC}_MINOR_VERSION 3)
 SET(${PROJECT_NAME_UC}_PATCH_VERSION 0)
 SET(${PROJECT_NAME_UC}_VERSION
   ${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
index 3ebc05ded7af1ff11c5b4b594436236641f71888..05af8e4f84cc24d705cfa9de3179300059b9df75 100644 (file)
@@ -86,6 +86,7 @@ SET(_ts_RESOURCES
   resources/LIGHT_images.ts
   resources/LIGHT_msg_en.ts
   resources/LIGHT_msg_fr.ts
+  resources/LIGHT_msg_ja.ts
 ) 
 
 # --- rules ---
index b6d5c75a52768a9e5e65869b7f13082b00b86319..cf33c861c5f31e78e6875bcca7a33ff2c4751f17 100644 (file)
@@ -589,6 +589,43 @@ void LIGHTGUI::onClear()
   updateObjBrowser( true );
 }
 
+/*!
+  \brief Check if this object is can't be renamed in place
+
+  This method can be re-implemented in the subclasses.
+  Return true in case if object isn't reference or component (module root).
+
+  \param entry column id
+  \return \c true if the item can be renamed by the user in place (e.g. in the Object browser)
+*/
+bool LIGHTGUI::renameAllowed( const QString& entry ) const
+{
+  LIGHTGUI_DataModel* dm = dynamic_cast<LIGHTGUI_DataModel*>( dataModel() );
+  return dm && dm->lineNb( entry ) >= 0;
+}
+
+/*!
+  Rename object by entry.
+  \param entry entry of the object
+  \param name new name of the object
+  \brief Return \c true if rename operation finished successfully, \c false otherwise.
+*/
+bool LIGHTGUI::renameObject( const QString& entry, const QString& name )
+{
+  bool result = false;
+
+  LIGHTGUI_DataModel* dm = dynamic_cast<LIGHTGUI_DataModel*>( dataModel() );
+  if ( dm && dm->lineNb( entry ) ) {
+    int id = LIGHTGUI_DataModel::id( entry );
+    result = dm->setLineText( id, name );
+    if ( result ) {
+      updateLine( id, true );
+      updateObjBrowser( true );
+    }
+  }
+  return result;
+}
+
 /*!
   \fn CAM_Module* createModule();
   \brief Export module instance (factory function).
index eaf57d003d2202611b46a387c93b3feec5b943cf..36cc54cd3c5cd48b15a0649c333e8a4075408929 100644 (file)
@@ -57,6 +57,9 @@ public:
 
   LightApp_Selection*    createSelection() const;
 
+  bool                   renameObject( const QString&, const QString& );
+  bool                   renameAllowed( const QString& ) const;
+
 protected:
   CAM_DataModel*         createDataModel();
   int                    selectedLine();
diff --git a/src/LIGHTGUI/resources/LIGHT_msg_ja.ts b/src/LIGHTGUI/resources/LIGHT_msg_ja.ts
new file mode 100644 (file)
index 0000000..d772329
--- /dev/null
@@ -0,0 +1,190 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS>
+  <context>
+    <name>@default</name>
+    <message>
+      <source>TOP_CLEAR_ALL</source>
+      <translation>すべて消去</translation>
+    </message>
+    <message>
+      <source>STB_CLEAR_ALL</source>
+      <translation>すべてのテキスト行削除</translation>
+    </message>
+    <message>
+      <source>STB_SAVE_FILE</source>
+      <translation>テキスト ファイルを保存します。</translation>
+    </message>
+    <message>
+      <source>TOP_SAVE_FILE</source>
+      <translation>テキスト ファイルの保存</translation>
+    </message>
+    <message>
+      <source>MEN_LIGHT</source>
+      <translation>光</translation>
+    </message>
+    <message>
+      <source>MEN_LOAD_FILE</source>
+      <translation>テキスト ファイルの読み込み</translation>
+    </message>
+    <message>
+      <source>WRN_UNKNOWN_COMMAND</source>
+      <translation>認識されないコマンド !</translation>
+    </message>
+    <message>
+      <source>BUT_OK</source>
+      <translation>了解(&amp;O)</translation>
+    </message>
+    <message>
+      <source>WRN_ADD_FAILED</source>
+      <translation>行を挿入できません。</translation>
+    </message>
+    <message>
+      <source>STB_DISPLAY_LINE</source>
+      <translation>選択行の表示</translation>
+    </message>
+    <message>
+      <source>TOP_DISPLAY_LINE</source>
+      <translation>選択行の表示</translation>
+    </message>
+    <message>
+      <source>MEN_DISPLAY_LINE</source>
+      <translation>選択行の表示</translation>
+    </message>
+    <message>
+      <source>STB_ERASE_LINE</source>
+      <translation>選択した行を削除</translation>
+    </message>
+    <message>
+      <source>TOP_ERASE_LINE</source>
+      <translation>選択行を削除</translation>
+    </message>
+    <message>
+      <source>MEN_ERASE_LINE</source>
+      <translation>選択した行を削除</translation>
+    </message>
+    <message>
+      <source>STB_EDIT_LINE</source>
+      <translation>選択した行を編集</translation>
+    </message>
+    <message>
+      <source>WRN_EDIT_FAILED</source>
+      <translation>行を編集することができません。</translation>
+    </message>
+    <message>
+      <source>WRN_DUMP_FAILED</source>
+      <translation>スナップショット ファイルが失敗しました。</translation>
+    </message>
+    <message>
+      <source>WRN_LOAD_FAILED</source>
+      <translation>ファイルを開くことができません。</translation>
+    </message>
+    <message>
+      <source>TOP_EDIT_LINE</source>
+      <translation>行を編集</translation>
+    </message>
+    <message>
+      <source>MEN_CLEAR_ALL</source>
+      <translation>すべて消去します。</translation>
+    </message>
+    <message>
+      <source>MEN_FILE</source>
+      <translation>ファイル(&amp;F)</translation>
+    </message>
+    <message>
+      <source>LIGHT_ROOT_TOOLTIP</source>
+      <translation>光モジュールのルート オブジェクト</translation>
+    </message>
+    <message>
+      <source>LIGHT_LIGHT</source>
+      <translation>レジェ</translation>
+    </message>
+    <message>
+      <source>MEN_SAVE_FILE</source>
+      <translation>テキスト ファイルを保存します。</translation>
+    </message>
+    <message>
+      <source>WRN_WARNING</source>
+      <translation>注意 !</translation>
+    </message>
+    <message>
+      <source>WRN_DELETE_FAILED</source>
+      <translation>行を削除できません</translation>
+    </message>
+    <message>
+      <source>WRN_SELECT_LINE</source>
+      <translation>不適切な選択 !</translation>
+    </message>
+    <message>
+      <source>TOP_LOAD_FILE</source>
+      <translation>テキスト ファイルを開く</translation>
+    </message>
+    <message>
+      <source>TOP_ADD_LINE</source>
+      <translation>行を追加</translation>
+    </message>
+    <message>
+      <source>MEN_DEL_LINE</source>
+      <translation>行を削除</translation>
+    </message>
+    <message>
+      <source>STB_LOAD_FILE</source>
+      <translation>テキスト ファイルを開く</translation>
+    </message>
+    <message>
+      <source>STB_ADD_LINE</source>
+      <translation>選択した行の前に新しい行を挿入</translation>
+    </message>
+    <message>
+      <source>LIGHT_PARAGRAPH</source>
+      <translation>段落</translation>
+    </message>
+    <message>
+      <source>TOP_DEL_LINE</source>
+      <translation>行を削除</translation>
+    </message>
+    <message>
+      <source>MEN_ADD_LINE</source>
+      <translation>新しい行を挿入</translation>
+    </message>
+    <message>
+      <source>LIGHT_LINE</source>
+      <translation>Line</translation>
+    </message>
+    <message>
+      <source>STB_DEL_LINE</source>
+      <translation>選択した行を削除</translation>
+    </message>
+    <message>
+      <source>MEN_EDIT_LINE</source>
+      <translation>選択した行を編集</translation>
+    </message>
+  </context>
+  <context>
+    <name>LIGHTGUI</name>
+    <message>
+      <source>LIGHTGUI_ADD_LINE</source>
+      <translation>選択した行の前に新しい行を追加します。</translation>
+    </message>
+    <message>
+      <source>LIGHTGUI_MEN_DUMP</source>
+      <translation>クリッパー</translation>
+    </message>
+    <message>
+      <source>LIGHTGUI_MEN_LOAD</source>
+      <translation>読み込み</translation>
+    </message>
+    <message>
+      <source>LIGHTGUI_MEN_TXT_FILES</source>
+      <translation>テキスト ファイル (*.txt)</translation>
+    </message>
+    <message>
+      <source>LIGHTGUI_EDIT_LINE</source>
+      <translation>選択した行を編集</translation>
+    </message>
+    <message>
+      <source>LIGHTGUI_MEN_ALL_FILES</source>
+      <translation>すべてのファイル ( * )</translation>
+    </message>
+  </context>
+</TS>