Commit 23f57566 authored by Jan Möbius's avatar Jan Möbius

Translations for DataControl

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@6747 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 72ec0e02
include (plugin)
openflipper_plugin (INCDIRS ${CMAKE_BINARY_DIR}/ACG)
openflipper_plugin (INCDIRS ${CMAKE_BINARY_DIR}/ACG TRANSLATION_LANGUAGES de_DE )
add_dependencies(Plugin-Datacontrol ACG)
......@@ -104,10 +104,10 @@ void DataControlPlugin::slotUpdateContextMenu( int _objectId) {
if ( ! PluginFunctions::getObject(_objectId,object) )
return;
sourceAction_->setText( "Source" );
sourceAction_->setText( tr("Source" ));
sourceAction_->setChecked( object->source() );
targetAction_->setText( "Target" );
targetAction_->setText( tr("Target" ));
targetAction_->setChecked( object->target() );
}
......
......@@ -105,7 +105,7 @@ void DataControlPlugin::pluginsInitialized() {
emit addContextMenuItem(contextMenu->menuAction() , DATA_ALL , CONTEXTOBJECTMENU);
QIcon icon = QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"datacontrol-material.png");
QAction* material = new QAction(icon, "Material Properties", 0);
QAction* material = new QAction(icon, tr("Material Properties"), 0);
connect (material, SIGNAL( triggered() ), this, SLOT ( slotMaterialProperties() ));
emit addContextMenuItem(material , DATA_ALL , CONTEXTOBJECTMENU);
......
......@@ -130,7 +130,7 @@ class DataControlPlugin : public QObject, BaseInterface, ToolboxInterface, KeyIn
QString name(){ return (QString("DataControl")); };
/// Description of the Plugin
QString description() { return (QString("Manages Data Objects")); };
QString description() { return (QString(tr("Manages Data Objects"))); };
private :
/// Widget for Toolbox
......
......@@ -52,59 +52,59 @@
void DataControlPlugin::setDescriptions(){
emit setSlotDescription("getObject(QString)","Returns the id of an object with given name.",
QStringList("Name"), QStringList("Name of an object"));
emit setSlotDescription("getObject(QString)",tr("Returns the id of an object with given name."),
QStringList(tr("Name")), QStringList(tr("Name of an object")));
emit setSlotDescription("getObjectName(int)","Returns the name of an object with given id.",
QStringList("objectId"), QStringList("ID of an object"));
emit setSlotDescription("getObjectName(int)",tr("Returns the name of an object with given id."),
QStringList(tr("objectId")), QStringList(tr("ID of an object")));
emit setSlotDescription("hideObject(int)","Hide object with the given id.",
QStringList("objectId"), QStringList("ID of an object"));
emit setSlotDescription("hideObject(int)",tr("Hide object with the given id."),
QStringList(tr("objectId")), QStringList(tr("ID of an object")));
emit setSlotDescription("showObject(int)","Show object with the given id.",
QStringList("objectId"), QStringList("ID of an object"));
emit setSlotDescription("showObject(int)",tr("Show object with the given id."),
QStringList(tr("objectId")), QStringList(tr("ID of an object")));
emit setSlotDescription("setTarget(int,bool)","Set given object as target.",
QString("ObjectId,Target").split(","),
QString("id of the object, set object as target?").split(","));
emit setSlotDescription("setTarget(int,bool)",tr("Set given object as target."),
QString(tr("ObjectId,Target")).split(","),
QString(tr("id of the object, set object as target?")).split(","));
emit setSlotDescription("setSource(int,bool)","Set given object as source.",
QString("ObjectId,Source").split(","),
QString("id of the object, set object as source?").split(","));
emit setSlotDescription("setSource(int,bool)",tr("Set given object as source."),
QString(tr("ObjectId,Source")).split(","),
QString(tr("id of the object, set object as source?")).split(","));
emit setSlotDescription("setObjectName(int,QString)","Set name of given object.",
QString("ObjectId,name").split(","),
QString("id of the object, the new name").split(","));
emit setSlotDescription("setObjectName(int,QString)",tr("Set name of given object."),
QString(tr("ObjectId,name")).split(","),
QString(tr("id of the object, the new name")).split(","));
emit setSlotDescription("groupObjects(idList,QString)","Group given Objects together.",
QString("objectIds,groupName").split(","),
QString("List of objects that should be grouped., Name of the group.").split(","));
emit setSlotDescription("groupObjects(idList,QString)",tr("Group given Objects together."),
QString(tr("objectIds,groupName")).split(","),
QString(tr("List of objects that should be grouped., Name of the group.")).split(","));
emit setSlotDescription("groupObjects(idList)","Group given Objects together.",
QStringList("objectIds"), QStringList("List of objects that should be grouped."));
emit setSlotDescription("groupObjects(idList)",tr("Group given Objects together."),
QStringList(tr("objectIds")), QStringList(tr("List of objects that should be grouped.")));
emit setSlotDescription("objectDelete(int)","Delete an object",
QStringList("objectId"), QStringList("Delete the given object."));
emit setSlotDescription("objectDelete(int)",tr("Delete an object"),
QStringList(tr("objectId")), QStringList(tr("Delete the given object.")));
emit setSlotDescription("copyObject(int)","Create a copy of an object",
QStringList("objectId"), QStringList("Object to copy."));
emit setSlotDescription("copyObject(int)",tr("Create a copy of an object"),
QStringList(tr("objectId")), QStringList(tr("Object to copy.")));
emit setSlotDescription("setAllTarget()","Set All objects as targets",
emit setSlotDescription("setAllTarget()",tr("Set All objects as targets"),
QStringList(), QStringList());
emit setSlotDescription("setAllSource()","Set All objects as source",
emit setSlotDescription("setAllSource()",tr("Set All objects as source"),
QStringList(), QStringList());
emit setSlotDescription("clearAllTarget()","Clear targets",
emit setSlotDescription("clearAllTarget()",tr("Clear targets"),
QStringList(), QStringList());
emit setSlotDescription("clearAllSource()","Clear sources",
emit setSlotDescription("clearAllSource()",tr("Clear sources"),
QStringList(), QStringList());
emit setSlotDescription("showAll()","Show all objects",
emit setSlotDescription("showAll()",tr("Show all objects"),
QStringList(), QStringList());
emit setSlotDescription("hideAll()","Hide all objects",
emit setSlotDescription("hideAll()",tr("Hide all objects"),
QStringList(), QStringList());
}
......@@ -155,8 +155,8 @@ QString DataControlPlugin::getObjectName( int objectId ) {
BaseObjectData* object;
if ( ! PluginFunctions::getObject(objectId,object) ) {
emit log(LOGERR,"getObjectName : unable to get object" );
return QString("Unknown Object");
emit log(LOGERR,tr("getObjectName : unable to get object") );
return QString(tr("Unknown Object"));
} else
return object->name() ;
......@@ -292,7 +292,7 @@ void DataControlPlugin::groupObjects(idList _objectIDs, QString _groupName) {
}
if (objs.size() == 0){
emit log("No objects to group.");
emit log(tr("No objects to group."));
return;
}
......@@ -305,7 +305,7 @@ void DataControlPlugin::groupObjects(idList _objectIDs, QString _groupName) {
BaseObject* parent = (objs[0])->parent();
for ( int i = 1 ; i < objs.size() ; ++i){
if ( parent != (objs[i])->parent() ){
emit log("Cannot group Objects with different parents");
emit log(tr("Cannot group Objects with different parents"));
return;
}
......@@ -322,7 +322,7 @@ void DataControlPlugin::groupObjects(idList _objectIDs, QString _groupName) {
//set groupName
if (_groupName == "")
groupItem->setName("newGroup " + QString::number(groupItem->id()));
groupItem->setName(tr("newGroup ") + QString::number(groupItem->id()));
else
groupItem->setName( _groupName );
parent->appendChild( dynamic_cast< BaseObject* >( groupItem ) );
......
......@@ -71,7 +71,7 @@ void DataControlPlugin::slotPopupRemove ( ) {
QMessageBox msgBox;
msgBox.setText("Do you really want to remove the selected objects?");
msgBox.setText(tr("Do you really want to remove the selected objects?"));
msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
msgBox.setDefaultButton(QMessageBox::No);
......@@ -204,7 +204,7 @@ void DataControlPlugin::slotGroup() {
//compare parent
if ( parent != item->parent() ){
emit log("Cannot group Objects with different parents");
emit log(tr("Cannot group Objects with different parents"));
return;
}
......@@ -217,8 +217,8 @@ void DataControlPlugin::slotGroup() {
//create new group
if (parent == 0)
parent = PluginFunctions::objectRoot();
GroupObject* groupItem = new GroupObject( "newGroup", dynamic_cast< GroupObject* >(parent));
groupItem->setName("newGroup " + QString::number(groupItem->id()));
GroupObject* groupItem = new GroupObject( tr("newGroup"), dynamic_cast< GroupObject* >(parent));
groupItem->setName(tr("newGroup ") + QString::number(groupItem->id()));
parent->appendChild( dynamic_cast< BaseObject* >( groupItem ) );
groupItem->setParent( parent );
......@@ -281,40 +281,40 @@ void DataControlPlugin::slotCustomContextMenuRequested ( const QPoint & _pos ) {
action = menu.addAction("Copy",this,SLOT ( slotCopy() ));
icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"edit-copy.png");
action->setIcon(icon);
menu.addAction("Group",this,SLOT ( slotGroup() ));
menu.addAction(tr("Group"),this,SLOT ( slotGroup() ));
menu.addSeparator();
menu.addAction("Remove",this,SLOT ( slotPopupRemove() ));
menu.addAction(tr("Remove"),this,SLOT ( slotPopupRemove() ));
}else
// check if the item is a group item
if ( item->isGroup() ) {
action = menu.addAction("Zoom to objects",this,SLOT ( slotZoomTo() ));
action = menu.addAction(tr("Zoom to objects"),this,SLOT ( slotZoomTo() ));
icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"zoom-in.png");
action->setIcon(icon);
menu.addAction("Ungroup",this,SLOT ( slotUngroup() ));
menu.addAction(tr("Ungroup"),this,SLOT ( slotUngroup() ));
menu.addSeparator();
action = menu.addAction("Rename",this,SLOT ( slotRename() ));
action = menu.addAction(tr("Rename"),this,SLOT ( slotRename() ));
icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"edit-rename.png");
action->setIcon(icon);
menu.addSeparator();
action = menu.addAction("Remove",this,SLOT ( slotPopupRemove() ));
action = menu.addAction(tr("Remove"),this,SLOT ( slotPopupRemove() ));
icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"datacontrol-delete-item.png");
action->setIcon(icon);
} else {
action = menu.addAction("Zoom to object",this,SLOT ( slotZoomTo() ));
action = menu.addAction(tr("Zoom to object"),this,SLOT ( slotZoomTo() ));
icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"zoom-in.png");
action->setIcon(icon);
action = menu.addAction("Copy",this,SLOT ( slotCopy() ));
action = menu.addAction(tr("Copy"),this,SLOT ( slotCopy() ));
icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"edit-copy.png");
action->setIcon(icon);
action = menu.addAction("Rename",this,SLOT ( slotRename() ));
action = menu.addAction(tr("Rename"),this,SLOT ( slotRename() ));
icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"edit-rename.png");
action->setIcon(icon);
action = menu.addAction("Material Properties",this,SLOT ( slotMaterialProperties() ));
action = menu.addAction(tr("Material Properties"),this,SLOT ( slotMaterialProperties() ));
icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"datacontrol-material.png");
action->setIcon(icon);
menu.addAction("Group",this,SLOT ( slotGroup() ));
menu.addAction(tr("Group"),this,SLOT ( slotGroup() ));
menu.addSeparator();
action = menu.addAction("Remove",this,SLOT ( slotPopupRemove() ));
action = menu.addAction(tr("Remove"),this,SLOT ( slotPopupRemove() ));
icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"datacontrol-delete-item.png");
action->setIcon(icon);
}
......@@ -357,66 +357,66 @@ void DataControlPlugin::slotHeaderCustomContextMenuRequested ( const QPoint & _p
//Show / Hide
case 1 :
icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"drawModes.png");
action = menu.addAction(icon,"Show all",this,SLOT ( showAll() ));
action = menu.addAction(icon,tr("Show all"),this,SLOT ( showAll() ));
action->setData( QVariant() );
if (types.count() > 1)
for (int i=0; i < types.count(); i++){
action = menu.addAction(icon, "Show all of type '" + typeName(types[i]) + "'",this,SLOT ( showAll() ));
action = menu.addAction(icon, tr("Show all of type '") + typeName(types[i]) + "'",this,SLOT ( showAll() ));
action->setData( QVariant( types[i] ) );
}
menu.addSeparator();
action = menu.addAction("Hide all",this,SLOT ( hideAll() ));
action = menu.addAction(tr("Hide all"),this,SLOT ( hideAll() ));
action->setData( QVariant() );
if (types.count() > 1)
for (int i=0; i < types.count(); i++){
action = menu.addAction("Hide all of type '" + typeName(types[i]) + "'",this,SLOT ( hideAll() ));
action = menu.addAction(tr("Hide all of type '") + typeName(types[i]) + "'",this,SLOT ( hideAll() ));
action->setData( QVariant( types[i] ) );
}
break;
// Source
case 2 :
action = menu.addAction("Select all",this,SLOT ( setAllSource() ));
action = menu.addAction(tr("Select all"),this,SLOT ( setAllSource() ));
action->setData( QVariant() );
if (types.count() > 1)
for (int i=0; i < types.count(); i++){
action = menu.addAction(icon, "Select all of type '" + typeName(types[i]) + "'",this,SLOT ( setAllSource() ));
action = menu.addAction(icon, tr("Select all of type '") + typeName(types[i]) + "'",this,SLOT ( setAllSource() ));
action->setData( QVariant( types[i] ) );
}
menu.addSeparator();
action = menu.addAction("Deselect all",this,SLOT ( clearAllSource() ));
action = menu.addAction(tr("Deselect all"),this,SLOT ( clearAllSource() ));
action->setData( QVariant() );
if (types.count() > 1)
for (int i=0; i < types.count(); i++){
action = menu.addAction(icon, "Deselect all of type '" + typeName(types[i]) + "'",this,SLOT ( clearAllSource() ));
action = menu.addAction(icon, tr("Deselect all of type '") + typeName(types[i]) + "'",this,SLOT ( clearAllSource() ));
action->setData( QVariant( types[i] ) );
}
break;
// Target
case 3 :
action = menu.addAction("Select all",this,SLOT ( setAllTarget() ));
action = menu.addAction(tr("Select all"),this,SLOT ( setAllTarget() ));
action->setData( QVariant() );
if (types.count() > 1)
for (int i=0; i < types.count(); i++){
action = menu.addAction(icon, "Select all of type '" + typeName(types[i]) + "'",this,SLOT ( setAllTarget() ));
action = menu.addAction(icon, tr("Select all of type '") + typeName(types[i]) + "'",this,SLOT ( setAllTarget() ));
action->setData( QVariant( types[i] ) );
}
menu.addSeparator();
action = menu.addAction("Deselect all",this,SLOT ( clearAllTarget() ));
action = menu.addAction(tr("Deselect all"),this,SLOT ( clearAllTarget() ));
action->setData( QVariant() );
if (types.count() > 1)
for (int i=0; i < types.count(); i++){
action = menu.addAction(icon, "Deselect all of type '" + typeName(types[i]) + "'",this,SLOT ( clearAllTarget() ));
action = menu.addAction(icon, tr("Deselect all of type '") + typeName(types[i]) + "'",this,SLOT ( clearAllTarget() ));
action->setData( QVariant( types[i] ) );
}
......
......@@ -38,7 +38,7 @@
* $Author: moebius $ *
* $Date: 2009-02-27 17:31:45 +0100 (Fr, 27. Feb 2009) $ *
* *
\*===========================================================================*/#
\*===========================================================================*/
#ifndef TREEITEM_HH
#define TREEITEM_HH
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment