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).
--- /dev/null
+<?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>了解(&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>ファイル(&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>