diff --git a/Core/Core.cc b/Core/Core.cc
index d1f34a7dfb5e27a9b64436a51ce30bc2aeda61ea..b5338171693f6bcb15b95e3cbb2754f25267fc2e 100644
--- a/Core/Core.cc
+++ b/Core/Core.cc
@@ -213,7 +213,7 @@ Core::init() {
splash_ = new QSplashScreen(splashPixmap);
splash_->show();
- splash_->showMessage("Initializing mainwindow" ,
+ splash_->showMessage(tr("Initializing mainwindow") ,
Qt::AlignBottom | Qt::AlignLeft , Qt::white);
QApplication::processEvents();
}
@@ -434,9 +434,9 @@ Core::init() {
);
scriptEngine_.globalObject().setProperty("core", scriptInstance);
- emit log(LOGOUT,"Core Scripting initialized with Name : core ");
+ emit log(LOGOUT,tr("Core Scripting initialized with Name : core "));
- emit log(LOGOUT,"Available scripting functions :");
+ emit log(LOGOUT,tr("Available scripting functions :"));
QScriptValueIterator it(scriptInstance);
while (it.hasNext()) {
@@ -490,7 +490,7 @@ Core::init() {
for ( int i = 0 ; i < (int)optionFiles.size(); ++i) {
if ( OpenFlipper::Options::gui() && OpenFlipper::Options::splash() ) {
- splash_->showMessage("Loading Configuration File " + QString::number(i) + "/" + QString::number(optionFiles.size()) ,
+ splash_->showMessage(tr("Loading Configuration File ") + QString::number(i) + "/" + QString::number(optionFiles.size()) ,
Qt::AlignBottom | Qt::AlignLeft , Qt::white);
QApplication::processEvents();
}
@@ -509,7 +509,7 @@ Core::init() {
// ===============================================================================================
if ( OpenFlipper::Options::lang().contains("UTF") || OpenFlipper::Options::lang().contains("utf") ) {
- emit log(LOGWARN,"UTF8-Locale used!");
+ emit log(LOGWARN,tr("UTF8-Locale used!"));
// emit log(LOGWARN,"Only OFF files are fully supported with UTF8. Others might fail.");
// emit log(LOGWARN,"You can change your locale by :");
// emit log(LOGWARN,"export LANG=C");
@@ -595,7 +595,7 @@ Core::slotMouseEventIdentify( QMouseEvent* _event )
if ( senderPointer == coreWidget_->examiner_widgets_[i] ) {
examinerId = i;
if ( OpenFlipper::Options::doSlotDebugging() )
- emit log(LOGINFO,"slotMouseEventIdentify from examiner " + QString::number(i) );
+ emit log(LOGINFO,tr("slotMouseEventIdentify from examiner ") + QString::number(i) );
break;
}
}
@@ -629,7 +629,7 @@ Core::slotMouseEvent( QMouseEvent* _event )
if ( senderPointer == coreWidget_->examiner_widgets_[i] ) {
examinerId = i;
if ( OpenFlipper::Options::doSlotDebugging() ) {
- QString message = "slotMouseEvent from examiner " + QString::number(i) + " with ";
+ QString message = tr("slotMouseEvent from examiner ") + QString::number(i) + " with ";
if ( _event->type() == QEvent::MouseButtonRelease )
message += " MouseButtonRelease";
@@ -640,7 +640,7 @@ Core::slotMouseEvent( QMouseEvent* _event )
else if ( _event->type() == QEvent::MouseMove )
message += " MouseMove";
else
- message += "unknown event type";
+ message += tr("unknown event type");
emit log(LOGINFO,message );
}
@@ -710,7 +710,7 @@ void Core::updateView() {
if ( OpenFlipper::Options::doSlotDebugging() ) {
if ( sender() != 0 ) {
if ( sender()->metaObject() != 0 ) {
- emit log(LOGINFO,"updateView() called by " + QString( sender()->metaObject()->className() ) );
+ emit log(LOGINFO,tr("updateView() called by ") + QString( sender()->metaObject()->className() ) );
}
}
}
@@ -727,7 +727,7 @@ void Core::updateView() {
// redraw time not reached ... waiting for timer event for next redraw
if ( redrawTimer_->isActive() ) {
if ( OpenFlipper::Options::doSlotDebugging() )
- emit log(LOGINFO,"Too early for redraw! Delaying request from " +
+ emit log(LOGINFO,tr("Too early for redraw! Delaying request from ") +
QString( sender()->metaObject()->className() ) );
return;
}
@@ -850,7 +850,7 @@ void Core::multiViewMode( int _mode ) {
break;
default:
- emit log(LOGERR,"Requested illegal multiview mode!");
+ emit log(LOGERR,tr("Requested illegal multiview mode!"));
}
}
@@ -885,10 +885,10 @@ Core::writeOnExit() {
INIFile ini;
if ( ! ini.connect( inifile ,false) ) {
- emit log(LOGERR,"Failed to connect to users ini file");
+ emit log(LOGERR,tr("Failed to connect to users ini file"));
if ( ! ini.connect( inifile,true) ) {
- emit log(LOGERR,"Can not create user ini file");
+ emit log(LOGERR,tr("Can not create user ini file"));
} else {
writeApplicationOptions(ini);
ini.disconnect();
@@ -955,7 +955,7 @@ void Core::slotLogToFile(Logtype _type, QString _message){
if ( logFile_->open(QFile::WriteOnly) ) {
logStream_ = new QTextStream (logFile_);
}else{
- emit log(LOGERR, "Unable to open logfile!");
+ emit log(LOGERR, tr("Unable to open logfile!"));
return;
}
}
@@ -1001,7 +1001,7 @@ void Core::slotSetSlotDescription(QString _slotName, QString _slotDescrip
pluginInfo = &plugins[i];
if (pluginInfo == 0){
- emit log(LOGERR, "Unable to set slot-description. Plugin not found!");
+ emit log(LOGERR, tr("Unable to set slot-description. Plugin not found!"));
return;
}
@@ -1048,7 +1048,7 @@ void Core::slotGetDescription(QString _function, QString& _fnDescript
pluginInfo = &plugins[i];
if (pluginInfo == 0){
- emit log(LOGERR, "Unable to get slot-description. Plugin not found!");
+ emit log(LOGERR, tr("Unable to get slot-description. Plugin not found!"));
return;
}
@@ -1070,7 +1070,7 @@ void Core::snapshotBaseFileName(const QString& _fname, unsigned int _viewerId ){
if ( OpenFlipper::Options::gui() ) {
if ( _viewerId >= OpenFlipper::Options::examinerWidgets() ) {
- emit log(LOGERR,"Unable to snapshotBaseFileName for viewer " + QString::number(_viewerId) );
+ emit log(LOGERR,tr("Unable to snapshotBaseFileName for viewer ") + QString::number(_viewerId) );
return;
}
@@ -1084,7 +1084,7 @@ void Core::snapshot( unsigned int _viewerId ){
if ( OpenFlipper::Options::gui() ) {
if ( _viewerId >= OpenFlipper::Options::examinerWidgets() ) {
- emit log(LOGERR,"Unable to create snapshot for viewer " + QString::number(_viewerId) );
+ emit log(LOGERR,tr("Unable to create snapshot for viewer ") + QString::number(_viewerId) );
return;
}
coreWidget_->examiner_widgets_[_viewerId]->snapshot();
@@ -1137,7 +1137,7 @@ void Core::writeVersionNumbers(QString _filename){
INIFile ini;
if ( ! ini.connect(_filename,true) ) {
- emit log(LOGERR,"Failed to connect to _ini file" + _filename);
+ emit log(LOGERR,tr("Failed to connect to _ini file") + _filename);
return;
}
@@ -1187,67 +1187,67 @@ void Core::setDescriptions(){
connect(this, SIGNAL(setSlotDescription(QString,QString,QStringList,QStringList)),
this, SLOT(slotSetSlotDescription(QString,QString,QStringList,QStringList)) );
- emit setSlotDescription("updateView()", "Redraw the contents of the viewer.", QStringList(), QStringList());
- emit setSlotDescription("clearAll()", "Clear all data objects.", QStringList(), QStringList());
- emit setSlotDescription("exitApplication()", "Quit OpenFlipper", QStringList(), QStringList());
- emit setSlotDescription("fullscreen(bool)", "Enable or disable fullscreen mode",
- QStringList("enabled") ,
- QStringList("Enable or disable fullscreen mode"));
- emit setSlotDescription("loggerState(int)", "Change the logger window state", QStringList("Change the logger window state"), QStringList());
- emit setSlotDescription("showToolbox(bool)", "Show or hide toolbox", QStringList("Show or hide the toolbox"), QStringList());
- emit setSlotDescription("multiViewMode(int)", "Switch MultiView Mode",
- QStringList("Mode"), QStringList("0: One Viewer\n 1: Grid \n 2: Horizontal split"));
-
- emit setSlotDescription("restrictFrameRate(bool)", "Restrict FrameRate to MaxFrameRate",
- QStringList("enabled"), QStringList("restriction switch"));
- emit setSlotDescription("setMaxFrameRate(int)", "set the maximal framerate (automatically enables framerate restriction)",
- QStringList("frameRate"), QStringList("Maximum frameRate"));
- emit setSlotDescription("snapshotBaseFileName(QString&)", "Set a filename for storing snapshots."
+ emit setSlotDescription("updateView()", tr("Redraw the contents of the viewer."), QStringList(), QStringList());
+ emit setSlotDescription("clearAll()", tr("Clear all data objects."), QStringList(), QStringList());
+ emit setSlotDescription("exitApplication()", tr("Quit OpenFlipper"), QStringList(), QStringList());
+ emit setSlotDescription("fullscreen(bool)", tr("Enable or disable fullscreen mode"),
+ QStringList(tr("enabled")) ,
+ QStringList(tr("Enable or disable fullscreen mode")));
+ emit setSlotDescription("loggerState(int)", tr("Change the logger window state"), QStringList(tr("Change the logger window state")), QStringList());
+ emit setSlotDescription("showToolbox(bool)", tr("Show or hide toolbox"), QStringList(tr("Show or hide the toolbox")), QStringList());
+ emit setSlotDescription("multiViewMode(int)", tr("Switch MultiView Mode"),
+ QStringList(tr("Mode")), QStringList(tr("0: One Viewer\n 1: Grid \n 2: Horizontal split")));
+
+ emit setSlotDescription("restrictFrameRate(bool)", tr("Restrict FrameRate to MaxFrameRate"),
+ QStringList(tr("enabled")), QStringList(tr("restriction switch")));
+ emit setSlotDescription("setMaxFrameRate(int)", tr("set the maximal framerate (automatically enables framerate restriction)"),
+ QStringList(tr("frameRate")), QStringList(tr("Maximum frameRate")));
+ emit setSlotDescription("snapshotBaseFileName(QString&)", tr("Set a filename for storing snapshots.")
, QStringList(), QStringList());
- emit setSlotDescription("snapshot()", "Make a snapshot of the viewer. If no filename"
+ emit setSlotDescription("snapshot()", tr("Make a snapshot of the viewer. If no filename"
" was set using snapshotBaseFileName() the snapshot is stored"
" in snap.png in the current directory. For every snapshot"
- " a counter is added to the filename.", QStringList(), QStringList());
- emit setSlotDescription("resizeViewer(int,int)", "Resize the viewer",
- QString("width,height").split(","),
- QString("new width for the viewer,new height for the viewer").split(","));
- emit setSlotDescription("writeVersionNumbers(QString)", "write the current versions of all plugins to INI file",
- QStringList("filename"),
- QStringList("fullpath to a file where the versions should be written to."));
+ " a counter is added to the filename."), QStringList(), QStringList());
+ emit setSlotDescription("resizeViewer(int,int)", tr("Resize the viewer"),
+ QString(tr("width,height")).split(","),
+ QString(tr("new width for the viewer,new height for the viewer")).split(","));
+ emit setSlotDescription("writeVersionNumbers(QString)", tr("write the current versions of all plugins to INI file"),
+ QStringList(tr("filename")),
+ QStringList(tr("fullpath to a file where the versions should be written to.")));
//save slots
- emit setSlotDescription("saveObject(int,QString)", "Save object to file. If the file exists it will be overwritten.",
- QString("object-id,filename").split(","),
- QString("id of the object, complete path and filename").split(","));
- emit setSlotDescription("saveObjectTo(int,QString)", "Save object to file. The location can be chosen in a dialog. "
- "(only works if GUI is available)",
- QString("object-id,filename").split(","),
- QString("id of the object, initial filename for the dialog").split(","));
- emit setSlotDescription("saveAllObjects()", "Saves all target objects. "
- "If no filename is available a dialog is shown. (only works if GUI is available)",QStringList(), QStringList());
- emit setSlotDescription("saveAllObjectsTo()", "Saves all target objects. The locations can be chosen in dialogs. "
- "(only works if GUI is available)",QStringList(), QStringList());
- emit setSlotDescription("saveSettings()", "Show the dialog to save the current setting. (only works if GUI is available)",QStringList(), QStringList());
+ emit setSlotDescription("saveObject(int,QString)", tr("Save object to file. If the file exists it will be overwritten."),
+ QString(tr("object-id,filename")).split(","),
+ QString(tr("id of the object, complete path and filename")).split(","));
+ emit setSlotDescription("saveObjectTo(int,QString)", tr("Save object to file. The location can be chosen in a dialog. "
+ "(only works if GUI is available)"),
+ QString(tr("object-id,filename")).split(","),
+ QString(tr("id of the object, initial filename for the dialog")).split(","));
+ emit setSlotDescription("saveAllObjects()", tr("Saves all target objects. "
+ "If no filename is available a dialog is shown. (only works if GUI is available)"),QStringList(), QStringList());
+ emit setSlotDescription("saveAllObjectsTo()", tr("Saves all target objects. The locations can be chosen in dialogs. "
+ "(only works if GUI is available)"),QStringList(), QStringList());
+ emit setSlotDescription("saveSettings()", tr("Show the dialog to save the current setting. (only works if GUI is available)"),QStringList(), QStringList());
//load slots
- emit setSlotDescription("loadObject()", "Show the dialog to load an object. (only works if GUI is available)",QStringList(), QStringList());
- emit setSlotDescription("getObjectId(QString)", "Return identifier of object with specified name. Returns -1 if object was not found.",QStringList(), QStringList());
- emit setSlotDescription("loadSettings()", "Show the dialog to load settings. (only works if GUI is available)",QStringList(), QStringList());
- emit setSlotDescription("loadSettings(QString)", "load settings from file.",QStringList(), QStringList());
-
- emit setSlotDescription("createWidget(QString,QString)", "Create a widget from an ui file",
- QString("Object name,ui file").split(","),
- QString("Name of the new widget in script,ui file to load").split(","));
-
- emit setSlotDescription("addToolbox(QString,QWidget*)", "Add a widget as a toolbox",
- QString("Toolbox Entry name,Widget").split(","),
- QString("Name of the new widget in the toolbox,Pointer to the new widget").split(","));
-
- emit setSlotDescription("addViewMode(QString,QString)", "Add a new viewmode",
- QString("Name,Toolbox List").split(","),
- QString("Name of the new Viewmode, ; seperated list of toolboxes visible in this viewmode").split(","));
-
- emit setSlotDescription("objectList(QString,QStringList)", "Returns object list",
- QString("Selection type,Object types").split(","),
- QString("Type of object selection (all,source,target),Object type (All,PolyMesh,TriangleMesh,...)").split(";"));
+ emit setSlotDescription("loadObject()", tr("Show the dialog to load an object. (only works if GUI is available)"),QStringList(), QStringList());
+ emit setSlotDescription("getObjectId(QString)", tr("Return identifier of object with specified name. Returns -1 if object was not found."),QStringList(), QStringList());
+ emit setSlotDescription("loadSettings()", tr("Show the dialog to load settings. (only works if GUI is available)"),QStringList(), QStringList());
+ emit setSlotDescription("loadSettings(QString)", tr("load settings from file."),QStringList(), QStringList());
+
+ emit setSlotDescription("createWidget(QString,QString)", tr("Create a widget from an ui file"),
+ QString(tr("Object name,ui file")).split(","),
+ QString(tr("Name of the new widget in script,ui file to load")).split(","));
+
+ emit setSlotDescription("addToolbox(QString,QWidget*)", tr("Add a widget as a toolbox"),
+ QString(tr("Toolbox Entry name,Widget")).split(","),
+ QString(tr("Name of the new widget in the toolbox,Pointer to the new widget")).split(","));
+
+ emit setSlotDescription("addViewMode(QString,QString)", tr("Add a new viewmode"),
+ QString(tr("Name,Toolbox List")).split(","),
+ QString(tr("Name of the new Viewmode, ; seperated list of toolboxes visible in this viewmode")).split(","));
+
+ emit setSlotDescription("objectList(QString,QStringList)", tr("Returns object list"),
+ QString(tr("Selection type,Object types")).split(","),
+ QString(tr("Type of object selection (all,source,target),Object type (All,PolyMesh,TriangleMesh,...)")).split(";"));
}
void Core::slotDeleteObject( int _id ){
diff --git a/Core/ParseIni.cc b/Core/ParseIni.cc
index c12c566681d1ee9304bd0a85ec9f05baf23fc5bd..8b895f3bb18affd2623793fd92c7f031e1789c6a 100644
--- a/Core/ParseIni.cc
+++ b/Core/ParseIni.cc
@@ -614,12 +614,12 @@ void Core::openIniFile( QString _filename,
INIFile ini;
if ( ! ini.connect(_filename,false) ) {
- emit log(LOGERR,"Failed to connect to ini file" + _filename);
+ emit log(LOGERR,tr("Failed to connect to ini file") + _filename);
return;
}
if ( OpenFlipper::Options::gui() ) {
- coreWidget_->statusMessage( "Loading ini File " + _filename + " ...");
+ coreWidget_->statusMessage( tr("Loading ini File ") + _filename + " ...");
coreWidget_->setStatus(ApplicationStatus::BLOCKED );
}
@@ -663,8 +663,8 @@ void Core::openIniFile( QString _filename,
if ( ini.get_entry( tmpType, sectionName , "type" )) {
type = DataType(tmpType);
- emit log(LOGWARN, "This ini file uses old int style ObjectType fields!" );
- emit log(LOGWARN, "Please convert it to new format! ( ... just save it )" );
+ emit log(LOGWARN, tr("This ini file uses old int style ObjectType fields!") );
+ emit log(LOGWARN, tr("Please convert it to new format! ( ... just save it )") );
} else {
QString typeName="";
@@ -672,14 +672,14 @@ void Core::openIniFile( QString _filename,
if ( ini.get_entry( typeName, sectionName , "type" )) {
type = typeId(typeName);
} else
- emit log(LOGWARN, "Unable to get DataType for object " + sectionName + " assuming Triangle Mesh" );
+ emit log(LOGWARN, tr("Unable to get DataType for object ") + sectionName + tr(" assuming Triangle Mesh") );
}
int newObjectId = loadObject(type, path);
BaseObject* object = objectRoot_->childExists( newObjectId );
if ( object == 0 ) {
- emit log(LOGERR,"Unable to open Object " + path);
+ emit log(LOGERR,tr("Unable to open Object ") + path);
continue;
}
@@ -714,7 +714,7 @@ void Core::openIniFile( QString _filename,
coreWidget_->examiner_widgets_[i]->viewAll();
}
- coreWidget_->statusMessage( "Loading ini File " + _filename + " ... Done", 4000);
+ coreWidget_->statusMessage( tr("Loading ini File ") + _filename + tr(" ... Done"), 4000);
coreWidget_->setStatus(ApplicationStatus::READY );
}
@@ -730,12 +730,12 @@ void Core::writeIniFile(QString _filename,
INIFile ini;
if ( ! ini.connect(_filename,true) ) {
- emit log(LOGERR,"Failed to connect to _ini file" + _filename);
+ emit log(LOGERR,tr("Failed to connect to _ini file") + _filename);
return;
}
if ( OpenFlipper::Options::gui() ) {
- coreWidget_->statusMessage( "Saving ini File " + _filename + " ...");
+ coreWidget_->statusMessage( tr("Saving ini File ") + _filename + " ...");
coreWidget_->setStatus(ApplicationStatus::BLOCKED );
}
@@ -796,7 +796,7 @@ void Core::writeIniFile(QString _filename,
ini.disconnect();
if ( OpenFlipper::Options::gui() ) {
- coreWidget_->statusMessage( "Saving ini File " + _filename + " ... Done", 4000);
+ coreWidget_->statusMessage( tr("Saving ini File ") + _filename + tr(" ... Done"), 4000);
coreWidget_->setStatus(ApplicationStatus::READY );
}
}
diff --git a/Core/ParseObj.cc b/Core/ParseObj.cc
index c209fd009720f3af5afadff761940c0af635b409..9d1b5a96764f6cb552d3275a6316c9d1b7f74cd7 100644
--- a/Core/ParseObj.cc
+++ b/Core/ParseObj.cc
@@ -76,13 +76,13 @@ void Core::openObjFile(QString _filename)
if (!in)
{
- emit log(LOGERR,"Cannot open to obj file" + _filename);
+ emit log(LOGERR,tr("Cannot open to obj file") + _filename);
return;
}
if ( OpenFlipper::Options::gui() )
{
- coreWidget_->statusMessage( "Loading obj File " + _filename + " ...");
+ coreWidget_->statusMessage( tr("Loading obj File ") + _filename + " ...");
coreWidget_->setStatus(ApplicationStatus::BLOCKED );
}
@@ -129,7 +129,7 @@ void Core::openObjFile(QString _filename)
if ( OpenFlipper::Options::gui() )
{
- coreWidget_->statusMessage( "Loading obj File " + _filename + " ... done", 4000);
+ coreWidget_->statusMessage( tr("Loading obj File ") + _filename + tr(" ... done"), 4000);
coreWidget_->setStatus(ApplicationStatus::READY );
}
@@ -168,7 +168,7 @@ void Core::preprocessObjFile(QString _filename)
std::fstream in(fname.c_str(), std::ios_base::in);
if (!in)
{
- emit log(LOGERR,"Cannot open to obj file" + _filename);
+ emit log(LOGERR,tr("Cannot open to obj file") + _filename);
return;
}
@@ -249,7 +249,7 @@ void Core::preprocessObjFile(QString _filename)
if (!typeFound)
{
dataType = DATA_TRIANGLE_MESH;
- emit log(LOGWARN, "Unable to get DataType for object " + _filename + " - assuming Triangle Mesh" );
+ emit log(LOGWARN, tr("Unable to get DataType for object ") + _filename + tr(" - assuming Triangle Mesh") );
}
@@ -269,7 +269,7 @@ void Core::preprocessObjFile(QString _filename)
BaseObject* object = objectRoot_->childExists( newObjectId );
if ( object == 0 )
- emit log(LOGERR,"Unable to open Object " + path);
+ emit log(LOGERR,tr("Unable to open Object ") + path);
if ( newActiveObject )
emit objectSelectionChanged(-1);
@@ -285,14 +285,14 @@ void Core::writeObjFile(QString _filename, bool _relativePaths, bool _targetOnly
std::fstream out(fname.c_str(), std::ios_base::out);
if (!out)
{
- emit log(LOGERR,"Cannot open to obj file" + _filename);
+ emit log(LOGERR,tr("Cannot open to obj file") + _filename);
return;
}
if ( OpenFlipper::Options::gui() )
{
- coreWidget_->statusMessage( "Saving obj File " + _filename + " ...");
+ coreWidget_->statusMessage( tr("Saving obj File ") + _filename + " ...");
coreWidget_->setStatus(ApplicationStatus::BLOCKED );
}
@@ -327,7 +327,7 @@ void Core::writeObjFile(QString _filename, bool _relativePaths, bool _targetOnly
if ( OpenFlipper::Options::gui() )
{
- coreWidget_->statusMessage( "Saving obj File " + _filename + " ... done", 4000);
+ coreWidget_->statusMessage( tr("Saving obj File ") + _filename + tr(" ... done"), 4000);
coreWidget_->setStatus(ApplicationStatus::READY );
}
diff --git a/Core/PluginCommunication.cc b/Core/PluginCommunication.cc
index 97bd046005b4ac2def3a544ccce30f6a5f209e69..36c3e8614729d14381c50cb92294640444724a74 100644
--- a/Core/PluginCommunication.cc
+++ b/Core/PluginCommunication.cc
@@ -75,11 +75,11 @@ void Core::slotObjectUpdated(int _identifier) {
if ( OpenFlipper::Options::doSlotDebugging() ) {
if ( sender() != 0 ) {
if ( sender()->metaObject() != 0 ) {
- emit log(LOGINFO,"updatedObject( " + QString::number(_identifier) + " ) called by " +
+ emit log(LOGINFO,"updatedObject( " + QString::number(_identifier) + tr(" ) called by ") +
QString( sender()->metaObject()->className() ) );
}
} else {
- emit log(LOGINFO,"updatedObject( " + QString::number(_identifier) + " ) called by Core" );
+ emit log(LOGINFO,"updatedObject( " + QString::number(_identifier) + tr(" ) called by Core") );
}
}
@@ -90,7 +90,7 @@ void Core::slotObjectUpdated(int _identifier) {
BaseObject* object = 0;
if ( _identifier != -1 ) {
if ( !PluginFunctions::getObject(_identifier,object) ) {
- emit log(LOGERR,"updated_objects called for non existing object with id : " + QString::number(_identifier) );
+ emit log(LOGERR,tr("updated_objects called for non existing object with id : ") + QString::number(_identifier) );
return;
}
}
@@ -189,7 +189,7 @@ void Core::slotUpdateTexture( QString _name , int _identifier){
if ( OpenFlipper::Options::doSlotDebugging() ) {
if ( sender() != 0 ) {
if ( sender()->metaObject() != 0 ) {
- emit log(LOGINFO,"slotUpdateTexture( " + _name + " , " + QString::number(_identifier) + " ) called by " +
+ emit log(LOGINFO,"slotUpdateTexture( " + _name + " , " + QString::number(_identifier) + tr(" ) called by ") +
QString( sender()->metaObject()->className() ) );
}
}
@@ -218,7 +218,7 @@ void Core::slotSetTextureMode(QString _textureName, QString _mode, int _id) {
if ( OpenFlipper::Options::doSlotDebugging() ) {
if ( sender() != 0 ) {
if ( sender()->metaObject() != 0 ) {
- emit log(LOGINFO,"slotSetTextureMode( " + _textureName + " , " + _mode + " , " + QString::number(_id) + " ) called by " +
+ emit log(LOGINFO,"slotSetTextureMode( " + _textureName + " , " + _mode + " , " + QString::number(_id) + tr(" ) called by ") +
QString( sender()->metaObject()->className() ) );
}
}
@@ -235,7 +235,7 @@ void Core::slotSetTextureMode(QString _textureName ,QString _mode) {
if ( OpenFlipper::Options::doSlotDebugging() ) {
if ( sender() != 0 ) {
if ( sender()->metaObject() != 0 ) {
- emit log(LOGINFO,"slotSetTextureMode( " + _textureName + " , " + _mode + " ) called by " +
+ emit log(LOGINFO,"slotSetTextureMode( " + _textureName + " , " + _mode + tr(" ) called by ") +
QString( sender()->metaObject()->className() ) );
}
}
@@ -251,7 +251,7 @@ void Core::slotTextureUpdated( QString _textureName , int _identifier ) {
if ( OpenFlipper::Options::doSlotDebugging() ) {
if ( sender() != 0 ) {
if ( sender()->metaObject() != 0 ) {
- emit log(LOGINFO,"slotTextureUpdated( " + _textureName + " , " + QString::number(_identifier) + " ) called by " +
+ emit log(LOGINFO,"slotTextureUpdated( " + _textureName + " , " + QString::number(_identifier) + tr(" ) called by ") +
QString( sender()->metaObject()->className() ) );
}
}
diff --git a/Core/PluginLoader.cc b/Core/PluginLoader.cc
index 5ec7f106b0e8149cff3b3c8699f554582854b600..f4d3d0d8e50fa1f6bc4b39118aa55792ffd7b830 100644
--- a/Core/PluginLoader.cc
+++ b/Core/PluginLoader.cc
@@ -161,7 +161,7 @@ void Core::loadPlugins()
if (ini.get_entry( additionalPlugins,"Plugins",loadKeys[keyit] ) ) {
for ( uint i = 0 ; i < additionalPlugins.size(); ++i) {
iniPlugins << additionalPlugins[i];
- emit log(LOGOUT,"Additional Plugin from ini file : " + additionalPlugins[i] );
+ emit log(LOGOUT,tr("Additional Plugin from ini file : ") + additionalPlugins[i] );
}
}
}
@@ -169,7 +169,7 @@ void Core::loadPlugins()
ini.disconnect();
} else
- emit log(LOGWARN,"Failed to connect to ProgramOptions.ini file: " + configFiles[fileCount]);
+ emit log(LOGWARN,tr("Failed to connect to ProgramOptions.ini file: ") + configFiles[fileCount]);
}
pluginlist = iniPlugins << pluginlist;
@@ -196,7 +196,7 @@ void Core::loadPlugins()
dontLoadPlugins_[i] = dontLoadPlugins_[i].trimmed();
for ( int i = 0 ; i < dontLoadPlugins_.size(); ++i )
- emit log(LOGWARN,"Skipping Plugins :\t " + dontLoadPlugins_[i] );
+ emit log(LOGWARN,tr("Skipping Plugins :\t ") + dontLoadPlugins_[i] );
emit log(LOGOUT,"=============================================================================================");
@@ -205,7 +205,7 @@ void Core::loadPlugins()
for ( int i = 0 ; i < pluginlist.size() ; ++i) {
if ( OpenFlipper::Options::gui() && OpenFlipper::Options::splash() ) {
- splashMessage_ = "Loading Plugin " + QString::number(i) + "/" + QString::number(pluginlist.size());
+ splashMessage_ = tr("Loading Plugin ") + QString::number(i) + "/" + QString::number(pluginlist.size());
splash_->showMessage( splashMessage_ , Qt::AlignBottom | Qt::AlignLeft , Qt::white);
QApplication::processEvents();
}
@@ -217,7 +217,7 @@ void Core::loadPlugins()
emit pluginsInitialized();
- emit log(LOGOUT,"Loaded " + QString::number(plugins.size()) + " Plugin(s)" );
+ emit log(LOGOUT,tr("Loaded ") + QString::number(plugins.size()) + tr(" Plugin(s)") );
}
/** @brief slot for loading Plugins
@@ -321,12 +321,12 @@ void Core::unloadPlugin(QString name){
plugins.erase(plugins.begin() + i);
- emit log(LOGOUT,"Unloaded Plugin :\t\t " + name);
+ emit log(LOGOUT,tr("Unloaded Plugin :\t\t ") + name);
return;
}
- log(LOGERR, "Unable to unload plugin '" + name + "' (plugin wasn't found)");
+ log(LOGERR, tr("Unable to unload plugin '") + name + tr("' (plugin wasn't found)"));
}
/** @brief prevent OpenFlipper from loading plugins on the next start (slot)
@@ -369,7 +369,7 @@ void Core::loadPlugin(QString filename, bool silent){
// Check if it is a BasePlugin
BaseInterface* basePlugin = qobject_cast< BaseInterface * >(plugin);
if ( basePlugin ) {
- emit log(LOGOUT,"Found Plugin :\t\t " + basePlugin->name() + " at " + filename);
+ emit log(LOGOUT,tr("Found Plugin :\t\t ") + basePlugin->name() + tr(" at ") + filename);
if ( OpenFlipper::Options::gui() && OpenFlipper::Options::splash() ) {
splashMessage_ = splashMessage_ + " " + basePlugin->name() ;
@@ -385,21 +385,21 @@ void Core::loadPlugin(QString filename, bool silent){
if (plugins[k].name == name_nospace){
if (silent || OpenFlipper::Options::nogui() ){ //dont load the plugin
- emit log(LOGWARN, "\t\t\t Already loaded from " + plugins[k].path);
+ emit log(LOGWARN, tr("\t\t\t Already loaded from ") + plugins[k].path);
emit log(LOGOUT,"=============================================================================================");
return;
}else{ //ask the user
int ret = QMessageBox::question(coreWidget_,
tr("Plugin already loaded"),
- "A Plugin with the same name was already loaded from " +
- plugins[k].path + ".\n"
- "You can only load the new plugin if you unload the existing one first.\n\n"
- "Do you want to unload the existing plugin first?",
+ tr("A Plugin with the same name was already loaded from ") +
+ plugins[k].path + tr(".\n"
+ "You can only load the new plugin if you unload the existing one first.\n\n"
+ "Do you want to unload the existing plugin first?"),
QMessageBox::Yes|QMessageBox::No, QMessageBox::No);
if (ret == QMessageBox::Yes)
unloadPlugin(plugins[k].name);
else{
- emit log(LOGWARN, "\t\t\t Already loaded from " + plugins[k].path);
+ emit log(LOGWARN, tr("\t\t\t Already loaded from ") + plugins[k].path);
emit log(LOGOUT,"=============================================================================================");
return;
}
@@ -408,7 +408,7 @@ void Core::loadPlugin(QString filename, bool silent){
}
if ( dontLoadPlugins_.contains(basePlugin->name(), Qt::CaseInsensitive) ) {
- emit log(LOGWARN,"OpenFlipper.ini prevented Plugin " + basePlugin->name() + " from being loaded! ");
+ emit log(LOGWARN,tr("OpenFlipper.ini prevented Plugin ") + basePlugin->name() + tr(" from being loaded! "));
emit log(LOGOUT,"=============================================================================================");
return;
}
@@ -416,22 +416,22 @@ void Core::loadPlugin(QString filename, bool silent){
//Check if it is a BasePlugin
SecurityInterface * securePlugin = qobject_cast< SecurityInterface * >(plugin);
if ( securePlugin ) {
- emit log(LOGINFO,"Plugin uses security interface. Trying to authenticate against plugin ...");
+ emit log(LOGINFO,tr("Plugin uses security interface. Trying to authenticate against plugin ..."));
bool success = false;
QMetaObject::invokeMethod(plugin,"authenticate", Q_RETURN_ARG( bool , success ) ) ;
if ( success )
- emit log(LOGINFO,"... ok. Loading plugin ");
+ emit log(LOGINFO,tr("... ok. Loading plugin "));
else {
- emit log(LOGERR,"... failed. Plugin access denied.");
+ emit log(LOGERR,tr("... failed. Plugin access denied."));
emit log(LOGOUT,"=============================================================================================");
return;
}
}
- emit log(LOGOUT,"Plugin Desciption :\t\t " + basePlugin->description());
+ emit log(LOGOUT,tr("Plugin Desciption :\t\t ") + basePlugin->description());
supported = "BaseInterface ";
@@ -448,7 +448,7 @@ void Core::loadPlugin(QString filename, bool silent){
if ( OpenFlipper::Options::nogui() ) {
if ( ! checkSlot( plugin , "noguiSupported()" ) ) {
- emit log(LOGWARN,"Running in nogui mode which is unsupported by this plugin, skipping" );
+ emit log(LOGWARN,tr("Running in nogui mode which is unsupported by this plugin, skipping") );
emit log(LOGOUT,"=============================================================================================");
return;
}
@@ -458,13 +458,13 @@ void Core::loadPlugin(QString filename, bool silent){
// Check for baseInterface of old style!
if ( checkSignal(plugin,"updated_objects(int)") ) {
- log(LOGERR,"Plugin Uses old style updated_objects! Convert to updatedObject!");
+ log(LOGERR,tr("Plugin Uses old style updated_objects! Convert to updatedObject!"));
emit log(LOGOUT,"=============================================================================================");
return;
}
if ( checkSignal(plugin,"update_view()") ) {
- log(LOGERR,"Plugin Uses old style update_view! Convert to updateView!");
+ log(LOGERR,tr("Plugin Uses old style update_view! Convert to updateView!"));
emit log(LOGOUT,"=============================================================================================");
return;
}
@@ -488,7 +488,7 @@ void Core::loadPlugin(QString filename, bool silent){
connect(this,SIGNAL(objectPropertiesChanged(int)),plugin,SLOT(slotObjectPropertiesChanged(int)), Qt::DirectConnection);
if ( checkSignal(plugin,"visibilityChanged()" ) )
- emit log (LOGERR,"Signal visibilityChanged() now requires objectid or -1 as argument " );
+ emit log (LOGERR,tr("Signal visibilityChanged() now requires objectid or -1 as argument " ));
if ( checkSignal(plugin,"visibilityChanged(int)") )
connect(plugin,SIGNAL(visibilityChanged(int)),this,SLOT(slotVisibilityChanged(int)), Qt::DirectConnection);
@@ -497,10 +497,10 @@ void Core::loadPlugin(QString filename, bool silent){
connect(this,SIGNAL(visibilityChanged(int)),plugin,SLOT(slotVisibilityChanged(int)), Qt::DirectConnection);
if ( checkSignal(plugin,"activeObjectChanged()" ) )
- emit log (LOGERR,"Signal activeObjectChanged() is now objectSelectionChanged( int _objectId ) " );
+ emit log (LOGERR,tr("Signal activeObjectChanged() is now objectSelectionChanged( int _objectId ) ") );
if ( checkSlot(plugin,"slotActiveObjectChanged()" ) )
- emit log (LOGERR,"Slot slotActiveObjectChanged() is now slotObjectSelectionChanged( int _objectId ) " );
+ emit log (LOGERR,tr("Slot slotActiveObjectChanged() is now slotObjectSelectionChanged( int _objectId ) ") );
if ( checkSlot(plugin,"slotAllCleared()") )
connect(this,SIGNAL(allCleared()),plugin,SLOT(slotAllCleared()));
@@ -1002,11 +1002,11 @@ void Core::loadPlugin(QString filename, bool silent){
QString scriptingName = info.name.remove(" ").toLower();
scriptEngine_.globalObject().setProperty(scriptingName, scriptInstance);
- emit log(LOGOUT,"Registered scriping with name :\t " + scriptingName);
+ emit log(LOGOUT,tr("Registered scriping with name :\t ") + scriptingName);
info.rpcName = scriptingName;
- emit log(LOGOUT,"Available scripting functions :");
+ emit log(LOGOUT,tr("Available scripting functions :"));
QScriptValueIterator it(scriptInstance);
while (it.hasNext()) {
@@ -1090,7 +1090,7 @@ void Core::loadPlugin(QString filename, bool silent){
}
- emit log(LOGOUT,"Supported Interfaces :\t " + supported);
+ emit log(LOGOUT,tr("Supported Interfaces :\t ") + supported);
//========================================================================================
@@ -1121,8 +1121,8 @@ void Core::loadPlugin(QString filename, bool silent){
emit log(LOGOUT,"=============================================================================================");
} else {
- emit log(LOGERR,"Unable to load Plugin :\t " + filename );
- emit log(LOGERR,"Error was : " + loader.errorString() );
+ emit log(LOGERR,tr("Unable to load Plugin :\t ") + filename );
+ emit log(LOGERR,tr("Error was : ") + loader.errorString() );
emit log(LOGOUT,"=============================================================================================");
}
diff --git a/Core/RPC.cc b/Core/RPC.cc
index 9159024e9ec98195702c65bf3a68a8476fad849b..1ff50b7b0d114e52d8e879d9ac1bd5002c9f20b6 100644
--- a/Core/RPC.cc
+++ b/Core/RPC.cc
@@ -104,14 +104,14 @@ void Core::slotCall( QString _pluginName , QString _functionName , bool& _succes
if ( plugin == -1 ) {
_success = false;
- emit log(LOGERR, "Unable to call function from Plugin : " + _pluginName + " ( Plugin not Found! )");
+ emit log(LOGERR, tr("Unable to call function from Plugin : ") + _pluginName + tr(" ( Plugin not Found! )"));
return;
}
if ( !plugins[plugin].rpcFunctions.contains(_functionName) ) {
_success = false;
- emit log(LOGERR, "Unable to call function from Plugin : " + _pluginName);
- emit log(LOGERR, "Function " + _functionName + " not found!");
+ emit log(LOGERR, tr("Unable to call function from Plugin : ") + _pluginName);
+ emit log(LOGERR, tr("Function ") + _functionName + tr(" not found!"));
return;
}
@@ -120,7 +120,7 @@ void Core::slotCall( QString _pluginName , QString _functionName , bool& _succes
_success = false;
QScriptValue result = scriptEngine_.uncaughtException();
QString exception = result.toString();
- emit log( LOGERR , "RPC failed with : " + exception );
+ emit log( LOGERR , tr("RPC failed with : ") + exception );
return;
}
@@ -135,7 +135,7 @@ void Core::slotCall( QString _expression , bool& _success ) {
_success = false;
QScriptValue result = scriptEngine_.uncaughtException();
QString exception = result.toString();
- emit log( LOGERR , "RPC failed with : " + exception );
+ emit log( LOGERR , tr("RPC failed with : ") + exception );
return;
}
diff --git a/Core/openFunctions.cc b/Core/openFunctions.cc
index 9d6a3cbc80fa51d646e4c39b75dd42578c268823..2104bb0a5ed98c3243381be46be7902d7a4da254 100644
--- a/Core/openFunctions.cc
+++ b/Core/openFunctions.cc
@@ -112,7 +112,7 @@ void Core::slotExecuteAfterStartup() {
bool scriptingSupport = false;
slotPluginExists("scripting",scriptingSupport);
if ( ! scriptingSupport ) {
- emit log(LOGERR ,"No scripting support available, please check if we load a scripting plugin .. Skipping script execution on startup");
+ emit log(LOGERR ,tr("No scripting support available, please check if we load a scripting plugin .. Skipping script execution on startup"));
}
// Collect all script files from the scripting subdirectory and execute them if possible
@@ -169,7 +169,7 @@ int Core::loadObject ( QString _filename ) {
return -2;
} else
if (_filename.endsWith(".ofs")) {
- emit log(LOGINFO ,"Starting script execution of " + _filename);
+ emit log(LOGINFO ,tr("Starting script execution of ") + _filename);
emit executeFileScript(_filename);
} else
return loadObject( DATA_TRIANGLE_MESH, _filename);
@@ -188,7 +188,7 @@ int Core::loadObject( DataType _type, QString _filename) {
if ( OpenFlipper::Options::gui() ) {
- coreWidget_->statusMessage( "Loading " + _filename + " ...");
+ coreWidget_->statusMessage( tr("Loading ") + _filename + " ...");
if ( !OpenFlipper::Options::loadingSettings() )
coreWidget_->setStatus(ApplicationStatus::PROCESSING );
}
@@ -198,9 +198,9 @@ int Core::loadObject( DataType _type, QString _filename) {
if ( OpenFlipper::Options::gui() ) {
if ( id != -1 )
- coreWidget_->statusMessage( "Loading " + _filename + " ... done", 4000 );
+ coreWidget_->statusMessage( tr("Loading ") + _filename + tr(" ... done"), 4000 );
else
- coreWidget_->statusMessage( "Loading " + _filename + " ... failed!", 4000 );
+ coreWidget_->statusMessage( tr("Loading ") + _filename + tr(" ... failed!"), 4000 );
if ( !OpenFlipper::Options::loadingSettings() )
coreWidget_->setStatus(ApplicationStatus::READY );
@@ -232,7 +232,7 @@ void Core::slotAddEmptyObject( DataType _type , int& _id ) {
void Core::slotCopyObject( int _oldId , int& _newId ) {
if ( _oldId == -1 ) {
- emit log(LOGERR,"Requested copy for illegal Object id : " + QString::number(_oldId) );
+ emit log(LOGERR,tr("Requested copy for illegal Object id : ") + QString::number(_oldId) );
_newId = -1;
return;
}
@@ -241,7 +241,7 @@ void Core::slotCopyObject( int _oldId , int& _newId ) {
BaseObject* object = objectRoot_->childExists(_oldId);
if ( !object ) {
- emit log(LOGERR,"Requested copy for unknown Object id : " + QString::number(_oldId) );
+ emit log(LOGERR,tr("Requested copy for unknown Object id : ") + QString::number(_oldId) );
_newId = -1;
return ;
}
@@ -250,7 +250,7 @@ void Core::slotCopyObject( int _oldId , int& _newId ) {
BaseObject* copy = object->copy();
if ( copy == 0 ) {
- emit log(LOGERR,"Unable to create a copy of the object.");
+ emit log(LOGERR,tr("Unable to create a copy of the object."));
return;
}
@@ -287,11 +287,11 @@ void Core::slotObjectOpened ( int _id ) {
if ( OpenFlipper::Options::doSlotDebugging() ) {
if ( sender() != 0 ) {
if ( sender()->metaObject() != 0 ) {
- emit log(LOGINFO,"slotObjectOpened( " + QString::number(_id) + " ) called by " +
+ emit log(LOGINFO,tr("slotObjectOpened( ") + QString::number(_id) + tr(" ) called by ") +
QString( sender()->metaObject()->className() ) );
}
} else {
- emit log(LOGINFO,"slotObjectOpened( " + QString::number(_id) + " ) called by Core" );
+ emit log(LOGINFO,tr("slotObjectOpened( ") + QString::number(_id) + tr(" ) called by Core") );
}
}
@@ -390,11 +390,11 @@ void Core::slotEmptyObjectAdded ( int _id ) {
if ( OpenFlipper::Options::doSlotDebugging() ) {
if ( sender() != 0 ) {
if ( sender()->metaObject() != 0 ) {
- emit log(LOGINFO,"slotEmptyObjectAdded( " + QString::number(_id) + " ) called by " +
+ emit log(LOGINFO,tr("slotEmptyObjectAdded( ") + QString::number(_id) + tr(" ) called by ") +
QString( sender()->metaObject()->className() ) );
}
} else {
- emit log(LOGINFO,"slotEmptyObjectAdded( " + QString::number(_id) + " ) called by Core" );
+ emit log(LOGINFO,tr("slotEmptyObjectAdded( ") + QString::number(_id) + tr(" ) called by Core") );
}
}
@@ -437,7 +437,7 @@ void Core::slotAddEmptyObjectMenu() {
}
widget->show();
}else
- emit log(LOGERR,"Could not show 'add Empty' dialog. Missing file-plugins.");
+ emit log(LOGERR,tr("Could not show 'add Empty' dialog. Missing file-plugins."));
}
//========================================================================================
@@ -462,7 +462,7 @@ void Core::loadObject() {
delete widget;
}else
- emit log(LOGERR,"Could not show 'load objects' dialog. Missing file-plugins.");
+ emit log(LOGERR,tr("Could not show 'load objects' dialog. Missing file-plugins."));
}
}
@@ -488,22 +488,22 @@ void Core::loadSettings(){
QGroupBox* optionsBox = new QGroupBox( &fileDialog ) ;
optionsBox->setSizePolicy( QSizePolicy ( QSizePolicy::Expanding , QSizePolicy::Preferred ) );
- optionsBox->setTitle("Options");
+ optionsBox->setTitle(tr("Options"));
layout->addWidget( optionsBox, layout->rowCount() , 0 , 1,layout->columnCount() );
QCheckBox *loadProgramSettings = new QCheckBox(optionsBox);
- loadProgramSettings->setText("Load program settings");
- loadProgramSettings->setToolTip("Load all current program settings from the file ( This will include view settings, colors,...) ");
+ loadProgramSettings->setText(tr("Load program settings"));
+ loadProgramSettings->setToolTip(tr("Load all current program settings from the file ( This will include view settings, colors,...) "));
loadProgramSettings->setCheckState( Qt::Unchecked );
QCheckBox *loadPluginSettings = new QCheckBox(optionsBox);
- loadPluginSettings->setText("Load per Plugin Settings");
- loadPluginSettings->setToolTip("Plugins should load their current global settings from the file");
+ loadPluginSettings->setText(tr("Load per Plugin Settings"));
+ loadPluginSettings->setToolTip(tr("Plugins should load their current global settings from the file"));
loadPluginSettings->setCheckState( Qt::Checked );
QCheckBox *loadObjectInfo = new QCheckBox(optionsBox);
- loadObjectInfo->setText("Load all objects defined in the file");
- loadObjectInfo->setToolTip("Load all objects which are defined in the file");
+ loadObjectInfo->setText(tr("Load all objects defined in the file"));
+ loadObjectInfo->setToolTip(tr("Load all objects which are defined in the file"));
loadObjectInfo->setCheckState( Qt::Checked );
QBoxLayout* frameLayout = new QBoxLayout(QBoxLayout::TopToBottom,optionsBox);
diff --git a/Core/optionHandling.cc b/Core/optionHandling.cc
index e68315a6142e1acb89bc9b2966c7e84b4fd10f9d..b9f8a898694eefcdd3cada9bb88a6b11af300347 100644
--- a/Core/optionHandling.cc
+++ b/Core/optionHandling.cc
@@ -159,10 +159,10 @@ void Core::saveOptions(){
INIFile ini;
if ( ! ini.connect( inifile ,false) ) {
- emit log(LOGERR,"Failed to connect to users ini file");
+ emit log(LOGERR,tr("Failed to connect to users ini file"));
if ( ! ini.connect( inifile,true) ) {
- emit log(LOGERR,"Can not create user ini file");
+ emit log(LOGERR,tr("Can not create user ini file"));
} else {
writeApplicationOptions(ini);
ini.disconnect();
@@ -179,10 +179,10 @@ void Core::setupOptions() {
QDir configDir = QDir::home();
if ( ! configDir.cd(".OpenFlipper") ) {
- emit log(LOGOUT,"Creating config Dir ~/.OpenFlipper");
+ emit log(LOGOUT,tr("Creating config Dir ~/.OpenFlipper"));
configDir.mkdir(".OpenFlipper");
if ( ! configDir.cd(".OpenFlipper") ) {
- emit log(LOGERR,"Unable to create config dir ~/.OpenFlipper");
+ emit log(LOGERR,tr("Unable to create config dir ~/.OpenFlipper"));
return;
}
}
@@ -341,7 +341,7 @@ void Core::setupOptions() {
INIFile _ini;
if ( ! _ini.connect(optionFiles[i],false) ) {
- emit log(LOGERR,"Failed to connect to _ini file" + optionFiles[i]);
+ emit log(LOGERR,tr("Failed to connect to _ini file") + optionFiles[i]);
continue;
}
@@ -384,7 +384,7 @@ void Core::restoreKeyBindings(){
INIFile _ini;
if ( ! _ini.connect(optionFiles[i],false) ) {
- emit log(LOGERR,"Failed to connect to _ini file" + optionFiles[i]);
+ emit log(LOGERR,tr("Failed to connect to _ini file") + optionFiles[i]);
continue;
}
diff --git a/Core/saveFunctions.cc b/Core/saveFunctions.cc
index c09d5d3da1242a9591bc7eb5cb4056eebb154c6f..8e6636ee71023146214f855f37d84eafd1d1148a 100644
--- a/Core/saveFunctions.cc
+++ b/Core/saveFunctions.cc
@@ -64,7 +64,7 @@ bool Core::saveObject( int _id, QString _filename ) {
if (object->dataType() == supportedTypes_[i].type) {
if ( OpenFlipper::Options::gui() ) {
- coreWidget_->statusMessage( "Saving " + _filename + " ...");
+ coreWidget_->statusMessage( tr("Saving ") + _filename + " ...");
if ( !OpenFlipper::Options::savingSettings() )
coreWidget_->setStatus(ApplicationStatus::PROCESSING );
}
@@ -74,9 +74,9 @@ bool Core::saveObject( int _id, QString _filename ) {
if ( OpenFlipper::Options::gui() ) {
if (ok)
- coreWidget_->statusMessage( "Saving " + _filename + " ... done", 4000 );
+ coreWidget_->statusMessage( tr("Saving ") + _filename + tr(" ... done"), 4000 );
else
- coreWidget_->statusMessage( "Saving " + _filename + " ... failed!", 4000 );
+ coreWidget_->statusMessage( tr("Saving ") + _filename + tr(" ... failed!"), 4000 );
if ( !OpenFlipper::Options::savingSettings() )
coreWidget_->setStatus(ApplicationStatus::READY );
@@ -92,7 +92,7 @@ bool Core::saveObject( int _id, QString _filename ) {
// no plugin found
if ( OpenFlipper::Options::gui() )
- coreWidget_->statusMessage( "Saving " + _filename + " ... failed!", 4000 );
+ coreWidget_->statusMessage( tr("Saving ") + _filename + tr(" ... failed!"), 4000 );
return false;
}
@@ -120,7 +120,7 @@ bool Core::saveObjectTo( int _id, QString _filename ) {
if (supportedTypes_.size() != 0)
result = widget->showSave(_id,_filename);
else
- emit log(LOGERR,"Could not show 'save objects' dialog. Missing file-plugins.");
+ emit log(LOGERR,tr("Could not show 'save objects' dialog. Missing file-plugins."));
widget->disconnect();
delete widget;
@@ -168,7 +168,7 @@ void Core::saveAllObjectsTo(){
saveObjectTo(o_it->id(),filename);
}
}else
- emit log(LOGERR,"Could not show 'save objects' dialog. Missing file-plugins.");
+ emit log(LOGERR,tr("Could not show 'save objects' dialog. Missing file-plugins."));
}
}
diff --git a/Core/saveSettings.cc b/Core/saveSettings.cc
index a3cddff762f42eb1990cb4116fa0d4591334b4de..7b54a3e1b1ffd747a0b3a8604e80b3b6436d5807 100644
--- a/Core/saveSettings.cc
+++ b/Core/saveSettings.cc
@@ -75,37 +75,37 @@ void Core::saveSettings(){
QGroupBox* optionsBox = new QGroupBox( &fileDialog ) ;
optionsBox->setSizePolicy( QSizePolicy ( QSizePolicy::Expanding , QSizePolicy::Preferred ) );
- optionsBox->setTitle("Options");
+ optionsBox->setTitle(tr("Options"));
layout->addWidget( optionsBox, layout->rowCount() , 0 , 1,layout->columnCount() );
QCheckBox *saveProgramSettings = new QCheckBox(optionsBox);
- saveProgramSettings->setText("Save program settings");
- saveProgramSettings->setToolTip("Save all current program settings to the file ( This will include view settings, colors,...) ");
+ saveProgramSettings->setText(tr("Save program settings"));
+ saveProgramSettings->setToolTip(tr("Save all current program settings to the file ( This will include view settings, colors,...) "));
saveProgramSettings->setCheckState( Qt::Unchecked );
QCheckBox *savePluginSettings = new QCheckBox(optionsBox);
- savePluginSettings->setText("Save per Plugin Settings");
- savePluginSettings->setToolTip("Plugins should add their current global settings to the file");
+ savePluginSettings->setText(tr("Save per Plugin Settings"));
+ savePluginSettings->setToolTip(tr("Plugins should add their current global settings to the file"));
savePluginSettings->setCheckState( Qt::Checked );
QCheckBox *saveObjectInfo = new QCheckBox(optionsBox);
- saveObjectInfo->setText("Save open object information to the file");
- saveObjectInfo->setToolTip("Save all open Objects and add them to the settings file ( they will be loaded if opening the settings file");
+ saveObjectInfo->setText(tr("Save open object information to the file"));
+ saveObjectInfo->setToolTip(tr("Save all open Objects and add them to the settings file ( they will be loaded if opening the settings file"));
saveObjectInfo->setCheckState( Qt::Checked );
QCheckBox *saveAllBox = new QCheckBox(optionsBox);
- saveAllBox->setText("Save everything to same folder");
- saveAllBox->setToolTip("Save all open files to the same folder as the ini file");
+ saveAllBox->setText(tr("Save everything to same folder"));
+ saveAllBox->setToolTip(tr("Save all open files to the same folder as the ini file"));
saveAllBox->setCheckState( Qt::Checked );
QCheckBox *askOverwrite = new QCheckBox(optionsBox);
- askOverwrite->setText("Ask before overwriting files");
- askOverwrite->setToolTip("If a file exists you will get asked what to do");
+ askOverwrite->setText(tr("Ask before overwriting files"));
+ askOverwrite->setToolTip(tr("If a file exists you will get asked what to do"));
askOverwrite->setCheckState( Qt::Checked );
QCheckBox *targetOnly = new QCheckBox(optionsBox);
- targetOnly->setText("Save only target objects");
- targetOnly->setToolTip("Only objects with target flag will be handled");
+ targetOnly->setText(tr("Save only target objects"));
+ targetOnly->setToolTip(tr("Only objects with target flag will be handled"));
targetOnly->setCheckState( Qt::Unchecked );
QBoxLayout* frameLayout = new QBoxLayout(QBoxLayout::TopToBottom,optionsBox);
@@ -140,7 +140,7 @@ void Core::saveSettings(){
if ( !complete_name.endsWith(".ini", Qt::CaseInsensitive) && !complete_name.endsWith(".obj", Qt::CaseInsensitive) ){
// If its unknown, get the type from the currently selected filter and add this extension to the filename
- if ( fileDialog.selectedNameFilter().contains("INI files (*.ini)") )
+ if ( fileDialog.selectedNameFilter().contains(tr("INI files (*.ini)")) )
complete_name += ".ini";
else
complete_name += ".obj";
@@ -157,7 +157,7 @@ void Core::saveSettings(){
OpenFlipper::Options::savingSettings(true);
if ( OpenFlipper::Options::gui() ) {
- coreWidget_->statusMessage( "Saving Settings to " + complete_name + " ...");
+ coreWidget_->statusMessage( tr("Saving Settings to ") + complete_name + " ...");
coreWidget_->setStatus(ApplicationStatus::BLOCKED );
}
@@ -245,7 +245,7 @@ void Core::saveSettings(){
OpenFlipper::Options::savingSettings(false);
if ( OpenFlipper::Options::gui() ) {
- coreWidget_->statusMessage( "Saving Settings to " + complete_name + " ... Done", 4000);
+ coreWidget_->statusMessage( tr("Saving Settings to ") + complete_name + tr(" ... Done"), 4000);
coreWidget_->setStatus(ApplicationStatus::READY );
}
diff --git a/Core/scripting.cc b/Core/scripting.cc
index c7be48a3a4e3de0c1d06440b22ef1c64d4b7d387..46aff381a7bd2fc84ef64162344d63a8a888d1ff 100644
--- a/Core/scripting.cc
+++ b/Core/scripting.cc
@@ -86,7 +86,7 @@ void Core::createWidget(QString _objectName, QString _uiFilename) {
QFile uiFile(_uiFilename);
if ( !uiFile.exists() ) {
- emit log(LOGERR,"File does not exist : " + _uiFilename );
+ emit log(LOGERR,tr("File does not exist : ") + _uiFilename );
return;
}
@@ -95,14 +95,14 @@ void Core::createWidget(QString _objectName, QString _uiFilename) {
uiFile.close();
if ( ui == 0 ) {
- emit log(LOGERR,"Unable to create QWidget from ui file for " + _objectName );
+ emit log(LOGERR,tr("Unable to create QWidget from ui file for ") + _objectName );
return;
}
QScriptValue scriptUi = scriptEngine_.newQObject(ui, QScriptEngine::ScriptOwnership);
if ( !scriptUi.isValid() ) {
- emit log(LOGERR,"Unable to generate script interface for " + _objectName );
+ emit log(LOGERR,tr("Unable to generate script interface for ") + _objectName );
return;
}
diff --git a/LicenseManager/LicenseManager.cc b/LicenseManager/LicenseManager.cc
index 234e1c74dfba363eb983e08cfdd8449a2c49e5b5..a7c2e3d683ac7664b2ee818b8690e55894623f6f 100644
--- a/LicenseManager/LicenseManager.cc
+++ b/LicenseManager/LicenseManager.cc
@@ -268,7 +268,7 @@ bool LicenseManager::authenticate() {
if ( elements.size() != 6 ) {
QString sizeMismatchMessage = "The license file for plugin \"" + name() + "\" is invalid!";
- QMessageBox::critical(0,"License file size invalid",sizeMismatchMessage );
+ QMessageBox::critical(0,tr("License file size invalid"),sizeMismatchMessage );
} else {
// Check signature of license file
@@ -279,23 +279,23 @@ bool LicenseManager::authenticate() {
QDate expiryDate = QDate::fromString(elements[4],Qt::ISODate);
if ( licenseHash != elements[5] ) {
- QString signatureMismatchMessage = "The license file signature for plugin \"" + name() + "\" is invalid!";
- QMessageBox::critical(0,"License file signature invalid",signatureMismatchMessage );
+ QString signatureMismatchMessage = tr("The license file signature for plugin \"") + name() + tr("\" is invalid!");
+ QMessageBox::critical(0,tr("License file signature invalid"),signatureMismatchMessage );
} else if ( elements[0] != pluginFileName() ) {
- QString nameMismatchMessage = "The license file contains plugin name\"" + elements[0] + "\" but this is plugin \"" + name() + "\"!";
- QMessageBox::critical(0,"License invalid for this plugin",nameMismatchMessage );
+ QString nameMismatchMessage = tr("The license file contains plugin name\"") + elements[0] + tr("\" but this is plugin \"") + name() + "\"!";
+ QMessageBox::critical(0,tr("License invalid for this plugin"),nameMismatchMessage );
} else if ( elements[1] != coreHash ) {
- QString coreMismatchMessage = "The license file for plugin \"" + name() + "\" is invalid for the currently running OpenFlipper Core!";
- QMessageBox::critical(0,"License invalid for current core",coreMismatchMessage );
+ QString coreMismatchMessage = tr("The license file for plugin \"") + name() + tr("\" is invalid for the currently running OpenFlipper Core!");
+ QMessageBox::critical(0,tr("License invalid for current core"),coreMismatchMessage );
} else if ( elements[2] != pluginHash ) {
- QString pluginMismatchMessage = "The plugin \"" + name() + "\" is a different version than specified in license file!";
- QMessageBox::critical(0,"License invalid for this plugin",pluginMismatchMessage );
+ QString pluginMismatchMessage = tr("The plugin \"") + name() + tr("\" is a different version than specified in license file!");
+ QMessageBox::critical(0,tr("License invalid for this plugin"),pluginMismatchMessage );
} else if ( elements[3] != macHash ) {
QString hardwareMismatchMessage = "The plugin \"" + name() + "\" is not allowed to run on the current system (Changed Hardware?)!";
- QMessageBox::critical(0,"License invalid for current System",hardwareMismatchMessage );
+ QMessageBox::critical(0,tr("License invalid for current System"),hardwareMismatchMessage );
} else if ( currentDate > expiryDate ) {
- QString expiredMessage = "The license for plugin \"" + name() + "\" has expired on " + elements[1] + "!";
- QMessageBox::critical(0,"License expired",expiredMessage );
+ QString expiredMessage = tr("The license for plugin \"") + name() + tr("\" has expired on ") + elements[1] + "!";
+ QMessageBox::critical(0,tr("License expired"),expiredMessage );
} else {
authenticated_ = true;
}
@@ -305,9 +305,9 @@ bool LicenseManager::authenticate() {
if ( authenticated_ )
std::cerr << "Authentication succcessfull for Plugin " << name().toStdString() << std::endl;
else {
- QString text = "License check for plugin has failed.\n";
- text += "Please get a valid License!\n";
- text += "Send the following Information to " + CONTACTMAIL + "\n\n";
+ QString text = tr("License check for plugin has failed.\n");
+ text += tr("Please get a valid License!\n");
+ text += tr("Send the following Information to ") + CONTACTMAIL + "\n\n";
text += pluginFileName() +"\n";
text += coreHash +"\n";
text += pluginHash +"\n";
@@ -317,7 +317,7 @@ bool LicenseManager::authenticate() {
QString requestSig = QCryptographicHash::hash ( keyRequest.toAscii() , QCryptographicHash::Sha1 ).toHex();
text += requestSig + "\n";
- QMessageBox::warning ( 0, "Plugin License check failed", text );
+ QMessageBox::warning ( 0, tr("Plugin License check failed"), text );
std::cerr << "Authentication failed" << std::endl;
authenticated_ = false;
}
diff --git a/LicenseManager/keyGen/keygenWidget.cc b/LicenseManager/keyGen/keygenWidget.cc
index c0c85b5ea341bf5eaa28c5ac738a4596a3cd61db..bd3af1d0ff887387436944fc1344e2f869598e24 100644
--- a/LicenseManager/keyGen/keygenWidget.cc
+++ b/LicenseManager/keyGen/keygenWidget.cc
@@ -69,7 +69,7 @@ void KeyGenWidget::slotGenerateButton() {
QStringList data = inputData.split('\n',QString::SkipEmptyParts);
if ( data.size() != 5) {
- QMessageBox::critical(this,"Wrong request data","The request has to contain 5 lines of data");
+ QMessageBox::critical(this,tr("Wrong request data","The request has to contain 5 lines of data"));
} else {
// Clean strings
@@ -98,7 +98,7 @@ void KeyGenWidget::slotGenerateButton() {
QString requestSigCheck = QCryptographicHash::hash ( keyRequest.toAscii() , QCryptographicHash::Sha1 ).toHex();
if ( requestSig != requestSigCheck ) {
- QMessageBox::critical(this,"Signature of request invalid","The signature of the request is not valid");
+ QMessageBox::critical(this,tr("Signature of request invalid","The signature of the request is not valid"));
return;
}
@@ -106,7 +106,7 @@ void KeyGenWidget::slotGenerateButton() {
QFile outFile(name + ".lic");
if (!outFile.open(QIODevice::WriteOnly|QIODevice::Text)) {
- QMessageBox::critical(this,"Unable to open file","Unable to Open output File");
+ QMessageBox::critical(this,tr("Unable to open file","Unable to Open output File"));
return;
}
diff --git a/widgets/coreWidget/About.cc b/widgets/coreWidget/About.cc
index 90b33885b34324f12531f0292be4a5f1ae5e63ad..7dc2bf70856b6801ca40d808d69ff04ee1ecf4b7 100644
--- a/widgets/coreWidget/About.cc
+++ b/widgets/coreWidget/About.cc
@@ -69,10 +69,10 @@ void CoreWidget::showAboutWidget( ) {
if ( aboutWidget_ == 0 ) {
aboutWidget_ = new AboutWidget( this );
- aboutWidget_->OpenFlipperAbout->append("OpenFlipper Core Version: " + OpenFlipper::Options::coreVersion() );
+ aboutWidget_->OpenFlipperAbout->append(tr("OpenFlipper Core Version: ") + OpenFlipper::Options::coreVersion() ) ;
aboutWidget_->OpenFlipperAbout->append("\n");
- aboutWidget_->OpenFlipperAbout->append("OpenFlipper Directories:");
+ aboutWidget_->OpenFlipperAbout->append(tr("OpenFlipper Directories:"));
// Set the Path to the shaders
QDir tempDir = QDir(OpenFlipper::Options::applicationDir());
#ifdef OPENFLIPPER_DATADIR
@@ -87,38 +87,38 @@ void CoreWidget::showAboutWidget( ) {
aboutWidget_->OpenFlipperAbout->append("Help:\t" + OpenFlipper::Options::helpDirStr() );
aboutWidget_->OpenFlipperAbout->append("\n");
- aboutWidget_->OpenFlipperAbout->append("OpenGL Specific Info:");
+ aboutWidget_->OpenFlipperAbout->append(tr("OpenGL Specific Info:"));
QString vendor = QString((const char*)glGetString(GL_VENDOR));
- aboutWidget_->OpenFlipperAbout->append("Vendor:\t" + vendor);
+ aboutWidget_->OpenFlipperAbout->append(tr("Vendor:\t") + vendor);
QString renderer = QString((const char*)glGetString(GL_RENDERER));
- aboutWidget_->OpenFlipperAbout->append("Renderer:\t" + renderer);
+ aboutWidget_->OpenFlipperAbout->append(tr("Renderer:\t") + renderer);
QGLFormat::OpenGLVersionFlags flags = QGLFormat::openGLVersionFlags();
if ( flags.testFlag(QGLFormat::OpenGL_Version_3_0) )
- aboutWidget_->OpenFlipperAbout->append("Version:\t3.0 or higher" );
+ aboutWidget_->OpenFlipperAbout->append(tr("Version:\t3.0 or higher") );
else if (flags.testFlag(QGLFormat::OpenGL_Version_2_1))
- aboutWidget_->OpenFlipperAbout->append("Version:\t2.1 or higher" );
+ aboutWidget_->OpenFlipperAbout->append(tr("Version:\t2.1 or higher" ));
else if (flags.testFlag(QGLFormat::OpenGL_Version_2_0))
- aboutWidget_->OpenFlipperAbout->append("Version:\t2.0 or higher" );
+ aboutWidget_->OpenFlipperAbout->append(tr("Version:\t2.0 or higher" ));
else if (flags.testFlag(QGLFormat::OpenGL_Version_1_5))
- aboutWidget_->OpenFlipperAbout->append("Version:\t1.5 or higher" );
+ aboutWidget_->OpenFlipperAbout->append(tr("Version:\t1.5 or higher" ));
else if (flags.testFlag(QGLFormat::OpenGL_Version_1_4))
- aboutWidget_->OpenFlipperAbout->append("Version:\t1.4 or higher" );
+ aboutWidget_->OpenFlipperAbout->append(tr("Version:\t1.4 or higher" ));
else if (flags.testFlag(QGLFormat::OpenGL_Version_1_3))
- aboutWidget_->OpenFlipperAbout->append("Version:\t1.3 or higher" );
+ aboutWidget_->OpenFlipperAbout->append(tr("Version:\t1.3 or higher" ));
else if (flags.testFlag(QGLFormat::OpenGL_Version_1_2))
- aboutWidget_->OpenFlipperAbout->append("Version:\t1.2 or higher" );
+ aboutWidget_->OpenFlipperAbout->append(tr("Version:\t1.2 or higher" ));
else if (flags.testFlag(QGLFormat::OpenGL_Version_1_1))
- aboutWidget_->OpenFlipperAbout->append("Version:\t1.1 or higher" );
+ aboutWidget_->OpenFlipperAbout->append(tr("Version:\t1.1 or higher" ));
else
- aboutWidget_->OpenFlipperAbout->append("Version:\tUNKNOWN!" );
+ aboutWidget_->OpenFlipperAbout->append(tr("Version:\tUNKNOWN!" ));
- aboutWidget_->OpenFlipperAbout->append("Supported Extensions:");
+ aboutWidget_->OpenFlipperAbout->append(tr("Supported Extensions:"));
QString glExtensions = QString((const char*)glGetString(GL_EXTENSIONS));
aboutWidget_->OpenFlipperAbout->append(glExtensions);
diff --git a/widgets/coreWidget/ContextMenu.cc b/widgets/coreWidget/ContextMenu.cc
index 02d5d30a25ce6b9b8178dc2774a26ee6910b802c..22e31c527be39d99f022df83b1fb8ab88e493fc0 100644
--- a/widgets/coreWidget/ContextMenu.cc
+++ b/widgets/coreWidget/ContextMenu.cc
@@ -111,7 +111,7 @@ void CoreWidget::updatePopupMenuNode(QMenu* _menu , ACG::SceneGraph::BaseNode* _
*/
void CoreWidget::updatePopupMenuCoordsysNode(QMenu* _menu , const int /*_part*/) {
// std::cerr << "Coordsys part was : " << _part << std::endl;
- QAction* typeEntry = new QAction("Viewer Settings",_menu);
+ QAction* typeEntry = new QAction(tr("Viewer Settings"),_menu);
_menu->addAction( typeEntry );
_menu->addSeparator();
@@ -125,34 +125,34 @@ void CoreWidget::updatePopupMenuCoordsysNode(QMenu* _menu , const int /*_part*/
// RenderingOptions
//====================================================================================================
- QMenu* renderingOptionsMenu = new QMenu("Rendering Options",_menu);
+ QMenu* renderingOptionsMenu = new QMenu(tr("Rendering Options"),_menu);
renderingOptionsMenu->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"renderingOptions.png"));
_menu->addMenu(renderingOptionsMenu);
QAction* projectionAction = 0;
if ( examiner_widgets_[PluginFunctions::activeExaminer() ]->projectionMode() == glViewer::PERSPECTIVE_PROJECTION ) {
- projectionAction = new QAction( "Switch to Orthogonal Projection", renderingOptionsMenu );
+ projectionAction = new QAction( tr("Switch to Orthogonal Projection"), renderingOptionsMenu );
projectionAction->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"orthogonal.png") );
- projectionAction->setToolTip( "Switch to perspective orthogonal mode.");
+ projectionAction->setToolTip( tr("Switch to perspective orthogonal mode."));
} else {
- projectionAction = new QAction( "Switch to Perspective Projection", renderingOptionsMenu );
+ projectionAction = new QAction( tr("Switch to Perspective Projection"), renderingOptionsMenu );
projectionAction->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"perspective.png") );
- projectionAction->setToolTip( "Switch to perspective projection mode.");
+ projectionAction->setToolTip( tr("Switch to perspective projection mode."));
}
projectionAction->setCheckable( false );
- projectionAction->setToolTip( "Switch between perspective and "
- "parrallel projection mode.");
- projectionAction->setWhatsThis( "Switch projection modes
"
+ projectionAction->setToolTip( tr("Switch between perspective and "
+ "parrallel projection mode."));
+ projectionAction->setWhatsThis( tr("Switch projection modes
"
"Switch between perspective and "
- "parrallel projection mode.");
+ "parrallel projection mode."));
connect( projectionAction,SIGNAL( triggered() ), this, SLOT( slotContextSwitchProjection() ) );
renderingOptionsMenu->addAction( projectionAction );
- QAction* animation = renderingOptionsMenu->addAction("Animation");
+ QAction* animation = renderingOptionsMenu->addAction(tr("Animation"));
- animation->setToolTip("Animate rotation of objects");
+ animation->setToolTip(tr("Animate rotation of objects"));
animation->setCheckable( true );
animation->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"animation.png") );
animation->setChecked( PluginFunctions::viewerProperties(PluginFunctions::activeExaminer()).animation() );
@@ -161,8 +161,8 @@ void CoreWidget::updatePopupMenuCoordsysNode(QMenu* _menu , const int /*_part*/
//====================================================================================================
- QAction* backfaceCulling = renderingOptionsMenu->addAction("Backface Culling");
- backfaceCulling->setToolTip("Enable backface culling");
+ QAction* backfaceCulling = renderingOptionsMenu->addAction(tr("Backface Culling"));
+ backfaceCulling->setToolTip(tr("Enable backface culling"));
backfaceCulling->setCheckable( true );
backfaceCulling->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"backFaceCulling.png") );
backfaceCulling->setChecked( PluginFunctions::viewerProperties().backFaceCulling() );
@@ -170,8 +170,8 @@ void CoreWidget::updatePopupMenuCoordsysNode(QMenu* _menu , const int /*_part*/
//====================================================================================================
- QAction* twoSidedLighting = renderingOptionsMenu->addAction("Two-sided Lighting");
- twoSidedLighting->setToolTip("Enable two-sided lighting");
+ QAction* twoSidedLighting = renderingOptionsMenu->addAction(tr("Two-sided Lighting"));
+ twoSidedLighting->setToolTip(tr("Enable two-sided lighting"));
twoSidedLighting->setCheckable( true );
twoSidedLighting->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"twosidedLighting.png") );
twoSidedLighting->setChecked( PluginFunctions::viewerProperties().twoSidedLighting() );
@@ -179,8 +179,8 @@ void CoreWidget::updatePopupMenuCoordsysNode(QMenu* _menu , const int /*_part*/
//====================================================================================================
- QAction* multisampling = renderingOptionsMenu->addAction("Multisampling");
- multisampling->setToolTip("Enable Multisampling");
+ QAction* multisampling = renderingOptionsMenu->addAction(tr("Multisampling"));
+ multisampling->setToolTip(tr("Enable Multisampling"));
multisampling->setCheckable( true );
// TODO:Add icon for multisampling
// twoSidedLighting->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"twosidedLighting.png") );
@@ -267,31 +267,31 @@ void CoreWidget::updatePopupMenuCoordsysNode(QMenu* _menu , const int /*_part*/
//====================================================================================================
- QAction* homeAction = new QAction("Restore home view",_menu);
+ QAction* homeAction = new QAction(tr("Restore home view"),_menu);
homeAction->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"go-home.png") );
homeAction->setCheckable( false );
- homeAction->setToolTip("Restore home view.");
- homeAction->setWhatsThis( "Restore home view
"
- "Resets the view to the home view");
+ homeAction->setToolTip(tr("Restore home view."));
+ homeAction->setWhatsThis( tr("Restore home view
"
+ "Resets the view to the home view"));
_menu->addAction( homeAction );
connect( homeAction,SIGNAL( triggered() ), this, SLOT( slotContextHomeView() ) );
- QAction* setHomeAction = new QAction( "Set Home View" , _menu );
+ QAction* setHomeAction = new QAction( tr("Set Home View") , _menu );
setHomeAction->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"set-home.png") );
setHomeAction->setCheckable( false );
- setHomeAction->setToolTip("Set home view");
- setHomeAction->setWhatsThis( "Store home view
"
- "Stores the current view as the home view");
+ setHomeAction->setToolTip(tr("Set home view"));
+ setHomeAction->setWhatsThis( tr("Store home view
"
+ "Stores the current view as the home view"));
_menu->addAction( setHomeAction);
connect( setHomeAction,SIGNAL( triggered() ), this, SLOT( slotContextSetHomeView() ) );
- QAction* viewAllAction = new QAction( "View all", _menu );
+ QAction* viewAllAction = new QAction( tr("View all"), _menu );
viewAllAction->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"viewall.png") );
viewAllAction->setCheckable( false );
- viewAllAction->setToolTip("View all.");
- viewAllAction->setWhatsThis( "View all
"
- "Move the objects in the scene so that"
- " the whole scene is visible.");
+ viewAllAction->setToolTip(tr("View all."));
+ viewAllAction->setWhatsThis( tr("View all
"
+ "Move the objects in the scene so that"
+ " the whole scene is visible."));
connect( viewAllAction,SIGNAL( triggered() ), this, SLOT( slotContextViewAll() ) );
_menu->addAction( viewAllAction);
@@ -300,22 +300,22 @@ void CoreWidget::updatePopupMenuCoordsysNode(QMenu* _menu , const int /*_part*/
//====================================================================================================
- QAction* copyView = _menu->addAction("Copy View");
- copyView->setToolTip("Copy current view to clipboard");
+ QAction* copyView = _menu->addAction(tr("Copy View"));
+ copyView->setToolTip(tr("Copy current view to clipboard"));
copyView->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"edit-copy.png") );
connect(copyView, SIGNAL(triggered()), this, SLOT(slotCopyView()) );
//====================================================================================================
- QAction* pasteView = _menu->addAction("Paste View");
- pasteView->setToolTip("Paste current view from clipboard");
+ QAction* pasteView = _menu->addAction(tr("Paste View"));
+ pasteView->setToolTip(tr("Paste current view from clipboard"));
pasteView->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"edit-paste.png") );
connect(pasteView, SIGNAL(triggered()), this , SLOT( slotPasteView( ) ) );
//====================================================================================================
- QAction* snapshot = _menu->addAction("Snapshot");
- snapshot->setToolTip("Make a snapshot");
+ QAction* snapshot = _menu->addAction(tr("Snapshot"));
+ snapshot->setToolTip(tr("Make a snapshot"));
snapshot->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"snapshot.png") );
connect(snapshot, SIGNAL(triggered()), this, SLOT( slotSnapshot() ) );
@@ -340,8 +340,8 @@ void CoreWidget::updatePopupMenuBackground(QMenu* _menu , const QPoint& /*_point
_menu->addSeparator();
- QAction* action = _menu->addAction("Set Background Color");
- action->setToolTip("Set the background color for the current viewer");
+ QAction* action = _menu->addAction(tr("Set Background Color"));
+ action->setToolTip(tr("Set the background color for the current viewer"));
action->setStatusTip(tr("Set the background color for the current viewer"));
action->setWhatsThis(tr("Set the background color for the current viewer"));
action->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"BackgroundColor.png") );
@@ -358,7 +358,7 @@ void CoreWidget::updatePopupMenuBackground(QMenu* _menu , const QPoint& /*_point
if(!coordSys->visible()) {
if(!coordSysMenu_) {
- coordSysMenu_ = new QMenu("Viewer Settings", _menu);
+ coordSysMenu_ = new QMenu(tr("Viewer Settings"), _menu);
updatePopupMenuCoordsysNode(coordSysMenu_, 0);
}
_menu->addSeparator();
@@ -396,7 +396,7 @@ void CoreWidget::updatePopupMenuObject(QMenu* _menu , BaseObjectData* _object )
// Add picking Menu
if (pickMenu_ != 0 && pickMenu_->actions().size() > 0) {
- pickMenu_->setTitle("&Picking");
+ pickMenu_->setTitle(tr("&Picking"));
contextMenu_->addMenu( pickMenu_ );
pickMenu_->setTearOffEnabled(true);
}
@@ -421,7 +421,7 @@ bool CoreWidget::addContextMenus( QMenu* _menu , ContextMenuType _type , int _id
case CONTEXTOBJECTMENU:
BaseObjectData* object;
if ( !PluginFunctions::getObject(_id, object) ) {
- emit log(LOGERR,"Cant get object for objectContextMenu");
+ emit log(LOGERR,tr("Cant get object for objectContextMenu"));
continue;
}
@@ -570,13 +570,13 @@ void CoreWidget::slotSnapshotName() {
QString fname = PluginFunctions::viewerProperties().snapshotName();
fname.replace('%', '$');
- fname = QFileDialog::getSaveFileName ( 0, "Save snapshot name" );
+ fname = QFileDialog::getSaveFileName ( 0, tr("Save snapshot name") );
if (!fname.isEmpty())
{
fname.replace('$', '%');
PluginFunctions::viewerProperties().snapshotBaseFileName(fname);
- QString msg="next snapshot: ";
+ QString msg=tr("next snapshot: ");
statusBar()->showMessage(msg);
}
@@ -620,7 +620,7 @@ void CoreWidget::slotUpdateViewerDrawMenu() {
QIcon icon;
icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"drawModes.png");
- viewerDrawMenu_ = new QMenu("Set Draw Mode");
+ viewerDrawMenu_ = new QMenu(tr("Set Draw Mode"));
viewerDrawMenu_->setTearOffEnabled(true);
viewerDrawMenu_->setIcon(icon);
diff --git a/widgets/coreWidget/CoreWidget.cc b/widgets/coreWidget/CoreWidget.cc
index 6d6d40cb6eca515128ff28e65996f30531ef4c36..a502286e88f965d3ee85c069278633bc32d3d12f 100644
--- a/widgets/coreWidget/CoreWidget.cc
+++ b/widgets/coreWidget/CoreWidget.cc
@@ -191,7 +191,7 @@ CoreWidget( QVector& _viewModes,
// Set up the logging window
// ======================================================================
- slidingLogger_ = new QtSlideWindow ("Log Viewer", centerWidget_);
+ slidingLogger_ = new QtSlideWindow (tr("Log Viewer"), centerWidget_);
tempLogWidget = new QWidget;
logWidget_ = new LoggerWidget(splitter_);
diff --git a/widgets/coreWidget/CoreWidgetToolbar.cc b/widgets/coreWidget/CoreWidgetToolbar.cc
index cbff7438babd70731384bc8b39bb6e161c5e0df6..5f5531e223873d8506c7c098239eb19e4fa958a6 100644
--- a/widgets/coreWidget/CoreWidgetToolbar.cc
+++ b/widgets/coreWidget/CoreWidgetToolbar.cc
@@ -64,7 +64,7 @@ void CoreWidget::slotAddToolbar(QToolBar* _toolbar) {
for ( uint i = 0 ; i < toolbars_.size(); ++i ) {
if ( toolbars_[i]->windowTitle() == _toolbar->windowTitle() ) {
- emit log(LOGERR,"slotAddToolbar: Toolbar already added to system: " + _toolbar->windowTitle() );
+ emit log(LOGERR,tr("slotAddToolbar: Toolbar already added to system: ") + _toolbar->windowTitle() );
return;
}
}
@@ -87,7 +87,7 @@ void CoreWidget::getToolBar( QString _name, QToolBar*& _toolbar) {
_toolbar = 0;
- emit log(LOGERR,"getToolBar: Toolbar not found." );
+ emit log(LOGERR,tr("getToolBar: Toolbar not found.") );
}
void CoreWidget::slotRemoveToolbar(QToolBar* _toolbar) {
@@ -101,7 +101,7 @@ void CoreWidget::slotRemoveToolbar(QToolBar* _toolbar) {
}
- emit log(LOGERR,"Remove Toolbar: Toolbar not found." );
+ emit log(LOGERR,tr("Remove Toolbar: Toolbar not found.") );
}
diff --git a/widgets/coreWidget/MenuBar.cc b/widgets/coreWidget/MenuBar.cc
index 62fa4e500b24f32f3b240e36faff110bc56aea70..36fdf7f53751ef7c96b431075c8081601a7a2564 100644
--- a/widgets/coreWidget/MenuBar.cc
+++ b/widgets/coreWidget/MenuBar.cc
@@ -128,7 +128,7 @@ void CoreWidget::setupMenuBar()
//Clear all
QAction* AC_clear_all = new QAction(tr("Clear All"), this);;
AC_clear_all->setStatusTip(tr("Clear all Objects"));
- AC_clear_all->setWhatsThis("Close all open Objects");
+ AC_clear_all->setWhatsThis(tr("Close all open Objects"));
AC_clear_all->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"edit-clear.png"));
connect(AC_clear_all, SIGNAL(triggered()), this, SIGNAL(clearAll()));
fileMenu_->addAction(AC_clear_all);
@@ -138,7 +138,7 @@ void CoreWidget::setupMenuBar()
//Load object
QAction* AC_Load = new QAction(tr("Load Object"), this);
AC_Load->setStatusTip(tr("Load an object"));
- AC_Load->setWhatsThis("Load a new object");
+ AC_Load->setWhatsThis(tr("Load a new object"));
AC_Load->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"document-open.png"));
connect(AC_Load, SIGNAL(triggered()), this, SIGNAL(loadMenu()));
@@ -147,7 +147,7 @@ void CoreWidget::setupMenuBar()
//Add empty object
QAction* AC_AddEmpty = new QAction(tr("Add Empty Object"), this);
AC_AddEmpty->setStatusTip(tr("Add an empty object"));
- AC_AddEmpty->setWhatsThis("Creates a new empty object of a given type");
+ AC_AddEmpty->setWhatsThis(tr("Creates a new empty object of a given type"));
AC_AddEmpty->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"add-empty-object.png"));
connect(AC_AddEmpty, SIGNAL(triggered()), this, SIGNAL(addEmptyObjectMenu()));
fileMenu_->addAction(AC_AddEmpty);
@@ -158,7 +158,7 @@ void CoreWidget::setupMenuBar()
QAction* AC_Save = new QAction(tr("Save Object"), this);
// AC_Save->setShortcut (Qt::CTRL + Qt::Key_S);
AC_Save->setStatusTip(tr("Save currently selected objects"));
- AC_Save->setWhatsThis("Saves all currently selected objects");
+ AC_Save->setWhatsThis(tr("Saves all currently selected objects"));
AC_Save->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"document-save.png"));
connect(AC_Save, SIGNAL(triggered()), this, SIGNAL(saveMenu()));
fileMenu_->addAction(AC_Save);
@@ -166,7 +166,7 @@ void CoreWidget::setupMenuBar()
//Save object to
QAction* AC_Save_to = new QAction(tr("Save Object To"), this);
AC_Save_to->setStatusTip(tr("Save current Object(s) To"));
- AC_Save_to->setWhatsThis("Saves all currently selected objects under a new name");
+ AC_Save_to->setWhatsThis(tr("Saves all currently selected objects under a new name"));
AC_Save_to->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"document-save-as.png"));
connect(AC_Save_to, SIGNAL(triggered()), this, SIGNAL(saveToMenu()));
fileMenu_->addAction(AC_Save_to);
@@ -176,7 +176,7 @@ void CoreWidget::setupMenuBar()
//Load ini
QAction* AC_load_ini = new QAction(tr("Load Settings"), this);
AC_load_ini->setStatusTip(tr("Load Settings from INI file"));
- AC_load_ini->setWhatsThis("Load a previous settings from file (objects,colors,...)");
+ AC_load_ini->setWhatsThis(tr("Load a previous settings from file (objects,colors,...)"));
AC_load_ini->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"load-settings.png"));
connect(AC_load_ini, SIGNAL(triggered()), this, SIGNAL(loadIniMenu()));
fileMenu_->addAction(AC_load_ini);
@@ -184,7 +184,7 @@ void CoreWidget::setupMenuBar()
//Save ini
QAction* AC_save_ini = new QAction(tr("Save Settings"), this);
AC_save_ini->setStatusTip(tr("Save current settings to INI file"));
- AC_save_ini->setWhatsThis("Save settings to file (objects,colors,...)");
+ AC_save_ini->setWhatsThis(tr("Save settings to file (objects,colors,...)"));
AC_save_ini->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"save-settings.png"));
connect(AC_save_ini, SIGNAL(triggered()), this, SIGNAL(saveIniMenu()));
fileMenu_->addAction(AC_save_ini);
@@ -194,7 +194,7 @@ void CoreWidget::setupMenuBar()
//Options
QAction* AC_Options = new QAction(tr("Options"), this);
AC_Options->setStatusTip(tr("Edit OpenFlipper Options"));
- AC_Options->setWhatsThis("Edit OpenFlipper Options");
+ AC_Options->setWhatsThis(tr("Edit OpenFlipper Options"));
AC_Options->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"options.png"));
connect(AC_Options, SIGNAL(triggered()), this, SLOT(showOptionsWidget()));
fileMenu_->addAction(AC_Options);
@@ -205,7 +205,7 @@ void CoreWidget::setupMenuBar()
//Recent files
recentFilesMenu_ = new QMenu(tr("Recent Files"));
recentFilesMenu_->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"document-open-recent.png"));
- recentFilesMenu_->setWhatsThis("Open recent files");
+ recentFilesMenu_->setWhatsThis(tr("Open recent files"));
connect(recentFilesMenu_,SIGNAL(triggered(QAction*)),this,SIGNAL(recentOpen(QAction*)));
fileMenu_->addMenu(recentFilesMenu_);
@@ -215,7 +215,7 @@ void CoreWidget::setupMenuBar()
QAction* AC_exit = new QAction(tr("Exit"), this);;
AC_exit->setShortcut (Qt::CTRL + Qt::Key_Q);
AC_exit->setStatusTip(tr("Exit Application"));
- recentFilesMenu_->setWhatsThis("Close OpenFlipper");
+ recentFilesMenu_->setWhatsThis(tr("Close OpenFlipper"));
AC_exit->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"application-exit.png"));
connect(AC_exit, SIGNAL(triggered()), this, SIGNAL(exit()));
fileMenu_->addAction(AC_exit);
@@ -235,43 +235,43 @@ void CoreWidget::setupMenuBar()
// Rendering options Menu
//============================================================================================================
- QMenu* renderingOptionsMenu = new QMenu("Rendering Options",viewMenu_);
+ QMenu* renderingOptionsMenu = new QMenu(tr("Rendering Options"),viewMenu_);
renderingOptionsMenu->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"renderingOptions.png"));
viewMenu_->addMenu(renderingOptionsMenu);
- orthogonalProjectionAction_ = new QAction( "Switch Viewers to Orthogonal Projection", renderingOptionsMenu );;
+ orthogonalProjectionAction_ = new QAction( tr("Switch Viewers to Orthogonal Projection"), renderingOptionsMenu );;
orthogonalProjectionAction_->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"orthogonal.png") );
orthogonalProjectionAction_->setCheckable( false );
- orthogonalProjectionAction_->setToolTip( "Switch to orthogonal projection mode.");
- orthogonalProjectionAction_->setWhatsThis( "Switch projection mode
"
- "Switch to orthogonal projection mode.");
+ orthogonalProjectionAction_->setToolTip( tr("Switch to orthogonal projection mode."));
+ orthogonalProjectionAction_->setWhatsThis( tr("Switch projection mode
"
+ "Switch to orthogonal projection mode."));
connect( orthogonalProjectionAction_,SIGNAL( triggered() ), this, SLOT( slotGlobalOrthographicProjection() ) );
renderingOptionsMenu->addAction( orthogonalProjectionAction_);
// =====================
- globalAnimationAction_ = renderingOptionsMenu->addAction("Animation");
+ globalAnimationAction_ = renderingOptionsMenu->addAction(tr("Animation"));
globalAnimationAction_->setCheckable( true );
globalAnimationAction_->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"animation.png") );
connect(globalAnimationAction_, SIGNAL(triggered(bool)), this , SLOT( slotGlobalChangeAnimation(bool) ) );
//======================
- globalBackfaceCullingAction_ = renderingOptionsMenu->addAction("Backface Culling");
+ globalBackfaceCullingAction_ = renderingOptionsMenu->addAction(tr("Backface Culling"));
globalBackfaceCullingAction_->setCheckable( true );
globalBackfaceCullingAction_->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"backFaceCulling.png") );
connect(globalBackfaceCullingAction_, SIGNAL(triggered(bool)), this , SLOT( slotGlobalChangeBackFaceCulling(bool) ) );
//======================
- globalTwosidedLightingAction_ = renderingOptionsMenu->addAction("Two-sided Lighting");
+ globalTwosidedLightingAction_ = renderingOptionsMenu->addAction(tr("Two-sided Lighting"));
globalTwosidedLightingAction_->setCheckable( true );
globalTwosidedLightingAction_->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"twosidedLighting.png") );
connect(globalTwosidedLightingAction_, SIGNAL(triggered(bool)), this , SLOT( slotGlobalChangeTwoSidedLighting(bool) ) );
//======================
- globalMultisamplingAction_ = renderingOptionsMenu->addAction("Multisampling");
+ globalMultisamplingAction_ = renderingOptionsMenu->addAction(tr("Multisampling"));
globalMultisamplingAction_->setCheckable( true );
// TODO:Icon for multisampling
// globalMultisamplingAction_->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"twosidedLighting.png") );
@@ -285,82 +285,82 @@ void CoreWidget::setupMenuBar()
connect( viewMenu_,SIGNAL( aboutToShow() ), this, SLOT( slotViewMenuAboutToShow() ) );
- QAction* homeAction = new QAction("Restore Home View",viewMenu_);
+ QAction* homeAction = new QAction(tr("Restore Home View"),viewMenu_);
homeAction->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"go-home.png") );
homeAction->setCheckable( false );
- homeAction->setStatusTip("Restore home view.");
- homeAction->setWhatsThis( "Restore home view
"
- "Resets the view to the home view");
+ homeAction->setStatusTip( tr("Restore home view."));
+ homeAction->setWhatsThis( tr("Restore home view
"
+ "Resets the view to the home view"));
viewMenu_->addAction( homeAction );
connect( homeAction,SIGNAL( triggered() ), this, SLOT( slotGlobalHomeView() ) );
- QAction* setHomeAction = new QAction( "Set Home View" , viewMenu_ );
+ QAction* setHomeAction = new QAction( tr("Set Home View") , viewMenu_ );
setHomeAction->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"set-home.png") );
setHomeAction->setCheckable( false );
- setHomeAction->setStatusTip("Set home view");
- setHomeAction->setWhatsThis( "Store home view
"
- "Stores the current view as the home view");
+ setHomeAction->setStatusTip( tr("Set home view"));
+ setHomeAction->setWhatsThis( tr("Store home view
"
+ "Stores the current view as the home view"));
viewMenu_->addAction( setHomeAction);
connect( setHomeAction,SIGNAL( triggered() ), this, SLOT( slotGlobalSetHomeView() ) );
- QAction* viewAllAction = new QAction( "View all", viewMenu_ );
+ QAction* viewAllAction = new QAction( tr("View all"), viewMenu_ );
viewAllAction->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"viewall.png") );
viewAllAction->setCheckable( false );
- viewAllAction->setStatusTip("View all.");
- viewAllAction->setWhatsThis( "View all
"
- "Move the objects in the scene so that"
- " the whole scene is visible.");
+ viewAllAction->setStatusTip( tr("View all.") );
+ viewAllAction->setWhatsThis( tr("View all
"
+ "Move the objects in the scene so that"
+ " the whole scene is visible."));
connect( viewAllAction,SIGNAL( triggered() ), this, SLOT( slotGlobalViewAll() ) );
viewMenu_->addAction( viewAllAction);
viewMenu_->addSeparator();
- QAction* snapShotAction = new QAction( "Viewer Snapshot", viewMenu_ );
+ QAction* snapShotAction = new QAction( tr("Viewer Snapshot"), viewMenu_ );
snapShotAction->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"viewerSnapshot.png") );
snapShotAction->setCheckable( false );
- snapShotAction->setStatusTip("Take a snapshot from all viewers.");
- snapShotAction->setWhatsThis( "Viewer Snapshot
"
- "Take a snapshot of all viewers at once.");
+ snapShotAction->setStatusTip( tr("Take a snapshot from all viewers."));
+ snapShotAction->setWhatsThis( tr("Viewer Snapshot
"
+ "Take a snapshot of all viewers at once."));
connect( snapShotAction,SIGNAL( triggered() ), this, SLOT( viewerSnapshotDialog() ) );
viewMenu_->addAction( snapShotAction);
- QAction* appSnapShotAction = new QAction( "Application Snapshot", viewMenu_ );
+ QAction* appSnapShotAction = new QAction( tr("Application Snapshot"), viewMenu_ );
appSnapShotAction->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"snapshot.png") );
appSnapShotAction->setCheckable( false );
- appSnapShotAction->setStatusTip("Take a snapshot from OpenFlipper.");
- appSnapShotAction->setWhatsThis( "Snapshot
"
- "Take a snapshot from OpenFlipper.");
+ appSnapShotAction->setStatusTip( tr("Take a snapshot from OpenFlipper."));
+ appSnapShotAction->setWhatsThis( tr("Snapshot
"
+ "Take a snapshot from OpenFlipper."));
connect( appSnapShotAction,SIGNAL( triggered() ), this, SLOT( applicationSnapshotDialog() ) );
viewMenu_->addAction( appSnapShotAction);
- perspectiveProjectionAction_ = new QAction( "Switch Viewers to Perspective Projection", viewMenu_ );;
+ perspectiveProjectionAction_ = new QAction( tr("Switch Viewers to Perspective Projection"), viewMenu_ );;
perspectiveProjectionAction_->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"perspective.png") );
perspectiveProjectionAction_->setCheckable( false );
- perspectiveProjectionAction_->setStatusTip( "Switch to perspective projection mode.");
- perspectiveProjectionAction_->setWhatsThis( "Switch projection mode
"
- "Switch to perspective projection mode.");
+ perspectiveProjectionAction_->setStatusTip( tr("Switch to perspective projection mode."));
+ perspectiveProjectionAction_->setWhatsThis( tr("Switch projection mode
"
+ "Switch to perspective projection mode."));
connect( perspectiveProjectionAction_,SIGNAL( triggered() ), this, SLOT( slotGlobalPerspectiveProjection() ) );
viewMenu_->addAction( perspectiveProjectionAction_);
viewMenu_->addSeparator();
- QAction* wheelSwitchAction = new QAction( "Show / hide wheels", viewMenu_ );
+ QAction* wheelSwitchAction = new QAction( tr("Show / hide wheels"), viewMenu_ );
wheelSwitchAction->setCheckable( true );
- wheelSwitchAction->setStatusTip("Show / hide navigation wheels in viewer widget.");
- wheelSwitchAction->setWhatsThis( "Show / hide navigation wheels in viewer widget.
"
- " These wheels appear in the corners of the viewports. "
- " Use wheels to rotate and scale scene.");
+ wheelSwitchAction->setStatusTip( tr("Show / hide navigation wheels in viewer widget."));
+ wheelSwitchAction->setWhatsThis( tr("Show / hide navigation wheels in viewer widget.
"
+ " These wheels appear in the corners of the viewports. "
+ " Use wheels to rotate and scale scene."));
if(OpenFlipper::Options::showWheelsAtStartup()) {
wheelSwitchAction->setChecked(true);
}
connect( wheelSwitchAction,SIGNAL( toggled(bool) ), this, SLOT( slotSwitchWheels(bool) ) );
viewMenu_->addAction( wheelSwitchAction);
- QAction* coordSys = viewMenu_->addAction("Coordinate Systems");
+ QAction* coordSys = viewMenu_->addAction(tr("Coordinate Systems"));
coordSys->setCheckable(true);
coordSys->setChecked(true);
- coordSys->setStatusTip("Toggle visibility of the coordinate systems");
+ coordSys->setStatusTip(tr("Toggle visibility of the coordinate systems"));
coordSys->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"coordsys.png") );
connect(coordSys, SIGNAL(triggered(bool)), this, SLOT( slotCoordSysVisibility(bool) ) );
@@ -369,7 +369,7 @@ void CoreWidget::setupMenuBar()
QAction* setGlobalBackgroundColor = new QAction(tr("Set Background Color"), this);;
setGlobalBackgroundColor->setToolTip(tr("Set Background Color for all viewers"));
setGlobalBackgroundColor->setStatusTip(tr("Set Background Color for all viewers"));
- setGlobalBackgroundColor->setWhatsThis("Set Background Color for all viewers");
+ setGlobalBackgroundColor->setWhatsThis(tr("Set Background Color for all viewers"));
setGlobalBackgroundColor->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"BackgroundColor.png") );
connect(setGlobalBackgroundColor, SIGNAL(triggered()), this, SLOT(slotSetGlobalBackgroundColor()));
viewMenu_->addAction(setGlobalBackgroundColor);
@@ -382,32 +382,32 @@ void CoreWidget::setupMenuBar()
menuBar()->addMenu(toolsMenu_ );
menus_[tr("Tools")] = toolsMenu_;
- QAction* sceneGraphAction = new QAction( "Show SceneGraph " ,toolsMenu_ );
+ QAction* sceneGraphAction = new QAction( tr("Show SceneGraph ") ,toolsMenu_ );
sceneGraphAction->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"scenegraph.png") );
sceneGraphAction->setCheckable( false );
- sceneGraphAction->setToolTip("Show scene graph viewer.");
- sceneGraphAction->setWhatsThis( "Toggle scene graph viewer
"
- "The scene graph viewer enables you to examine the "
- "displayed scene graph and to modify certain nodes.
" );
+ sceneGraphAction->setToolTip( tr("Show scene graph viewer.") );
+ sceneGraphAction->setWhatsThis( tr("Toggle scene graph viewer
"
+ "The scene graph viewer enables you to examine the "
+ "displayed scene graph and to modify certain nodes.
" ) );
QObject::connect( sceneGraphAction, SIGNAL( triggered() ),
this, SLOT( slotShowSceneGraphDialog() ) );
toolsMenu_->addAction( sceneGraphAction);
toolsMenu_->addSeparator();
- QAction* startVideoCaptureAction = new QAction( "Start Video Capture " ,toolsMenu_ );
+ QAction* startVideoCaptureAction = new QAction( tr("Start Video Capture ") ,toolsMenu_ );
startVideoCaptureAction->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"recordVideo.png") );
startVideoCaptureAction->setCheckable( false );
- startVideoCaptureAction->setToolTip( "Start video capturing." );
- startVideoCaptureAction->setWhatsThis( "Start to capture a video sequence of the user actions");
+ startVideoCaptureAction->setToolTip( tr("Start video capturing.") );
+ startVideoCaptureAction->setWhatsThis( tr("Start to capture a video sequence of the user actions")) ;
toolsMenu_->addAction( startVideoCaptureAction );
connect(startVideoCaptureAction, SIGNAL(triggered()), this, SLOT(startVideoCaptureDialog()) );
- QAction* stopVideoCaptureAction = new QAction( "Stop Video Capture " ,toolsMenu_ );
+ QAction* stopVideoCaptureAction = new QAction( tr("Stop Video Capture ") ,toolsMenu_ );
stopVideoCaptureAction->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"stopVideoCapture.png") );
stopVideoCaptureAction->setCheckable( false );
- stopVideoCaptureAction->setToolTip( "Stop video capturing." );
- stopVideoCaptureAction->setWhatsThis( "Stop Video capturing");
+ stopVideoCaptureAction->setToolTip( tr("Stop video capturing." ));
+ stopVideoCaptureAction->setWhatsThis( tr("Stop Video capturing" ));
toolsMenu_->addAction( stopVideoCaptureAction);
connect(stopVideoCaptureAction, SIGNAL(triggered()), this, SIGNAL(stopVideoCapture()) );
@@ -423,14 +423,14 @@ void CoreWidget::setupMenuBar()
QAction* AC_HelpBrowser = new QAction(tr("Help"), this);
AC_HelpBrowser->setStatusTip(tr("Open Help Browser with Documentation"));
AC_HelpBrowser->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"help-browser.png"));
- AC_HelpBrowser->setWhatsThis("Open the Help Browser");
+ AC_HelpBrowser->setWhatsThis(tr("Open the Help Browser"));
connect(AC_HelpBrowser, SIGNAL(triggered()), this, SLOT(showHelpBrowser()));
helpMenu_->addAction(AC_HelpBrowser);
//Switch to whats this mode
QAction* AC_Whats_this = QWhatsThis::createAction ( this );
AC_Whats_this->setStatusTip(tr("Enter What's this Mode"));
- AC_Whats_this->setWhatsThis("Get information about a specific Button/Widget/...");
+ AC_Whats_this->setWhatsThis(tr("Get information about a specific Button/Widget/..."));
helpMenu_->addAction(AC_Whats_this);
helpMenu_->addSeparator();
@@ -438,7 +438,7 @@ void CoreWidget::setupMenuBar()
//show plugins
QAction* AC_Plugins = new QAction(tr("Plugins"), this);
AC_Plugins->setStatusTip(tr("Show loaded plugins"));
- AC_Plugins->setWhatsThis("Show loaded plugins");
+ AC_Plugins->setWhatsThis(tr("Show loaded plugins"));
AC_Plugins->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"network-connect.png"));
connect(AC_Plugins, SIGNAL(triggered()), this, SIGNAL(showPlugins()));
helpMenu_->addAction(AC_Plugins);
@@ -449,7 +449,7 @@ void CoreWidget::setupMenuBar()
QAction* AC_About = new QAction(tr("About"), this);
AC_About->setStatusTip(tr("About OpenFlipper"));
AC_About->setIcon(QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"help-about.png"));
- AC_About->setWhatsThis("This entry shows information about OpenFlipper");
+ AC_About->setWhatsThis(tr("This entry shows information about OpenFlipper"));
connect(AC_About, SIGNAL(triggered()), this, SLOT(showAboutWidget()));
helpMenu_->addAction(AC_About);
@@ -625,7 +625,7 @@ void CoreWidget::slotUpdateGlobalDrawMenu() {
QIcon icon;
icon.addFile(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"drawModes.png");
- globalDrawMenu_ = new QMenu("Set Global DrawMode");
+ globalDrawMenu_ = new QMenu(tr("Set Global DrawMode"));
globalDrawMenu_->setTearOffEnabled(true);
globalDrawMenu_->setIcon(icon);
diff --git a/widgets/coreWidget/SideElement.cc b/widgets/coreWidget/SideElement.cc
index 48689944d524f94c50db52326656e965e1b95993..9185fa19aeea62b47a8c3f2d4390191034d27d55 100644
--- a/widgets/coreWidget/SideElement.cc
+++ b/widgets/coreWidget/SideElement.cc
@@ -72,7 +72,7 @@ SideElement::SideElement (SideArea *_parent, QWidget *_w, QString _name) :
QHBoxLayout *hl = new QHBoxLayout;
- SideElement::TopArea *tr = new SideElement::TopArea (this);
+ SideElement::TopArea *tra = new SideElement::TopArea (this);
label_ = new QLabel (_name);
label_->setFont (font);
@@ -83,13 +83,13 @@ SideElement::SideElement (SideArea *_parent, QWidget *_w, QString _name) :
hl->addWidget (detachButton_);
detachAction_ = new QAction (QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"button-detach.png"), "", this);
- detachAction_->setToolTip ("Show as separate window.");
+ detachAction_->setToolTip( tr("Show as separate window.") );
detachAction_->setCheckable (true);
detachButton_->setDefaultAction (detachAction_);
connect (detachAction_, SIGNAL (triggered (bool)), this, SLOT (detachPressed (bool)));
- tr->setLayout (hl);
+ tra->setLayout (hl);
QFrame *f = new QFrame ();
f->setFrameShape (QFrame::HLine);
@@ -97,7 +97,7 @@ SideElement::SideElement (SideArea *_parent, QWidget *_w, QString _name) :
mainLayout_ = new QVBoxLayout;
mainLayout_->addWidget (f);
- mainLayout_->addWidget (tr);
+ mainLayout_->addWidget (tra);
mainLayout_->addWidget (_w);
mainLayout_->setSpacing (0);
mainLayout_->setContentsMargins (1,1,1,1);
diff --git a/widgets/coreWidget/StackWidget.cc b/widgets/coreWidget/StackWidget.cc
index 21062504c66017c3d43daa6297b2f543889108bc..8ee04bbf261630d880e7fec5621a23b08a1c2edc 100644
--- a/widgets/coreWidget/StackWidget.cc
+++ b/widgets/coreWidget/StackWidget.cc
@@ -84,7 +84,7 @@ void CoreWidget::slotAddStackWidget( QString _name, QWidget* _widget ) {
slotGetStackWidget( _name, widget );
if ( widget ) {
- std::cerr << "Name already existing" << std::endl;
+ emit log(LOGERR,tr("Name already existing"));
return;
}
@@ -108,7 +108,7 @@ void CoreWidget::slotUpdateStackWidget( QString _name, QWidget* _widget ) {
}
if ( oldWidget == 0 ) {
- std::cerr << "Did not find widget to update stackwidget" << std::endl;
+ emit log(LOGERR,tr("Did not find widget to update stackwidget"));
return;
}
@@ -135,7 +135,7 @@ void CoreWidget::slotViewMenuAction( QAction * _action) {
}
if ( widget == 0 ) {
- std::cerr << "Cannot set Widget" << std::endl;
+ emit log(LOGERR,tr("Cannot set Widget"));
return;
}
diff --git a/widgets/coreWidget/dragAndDrop.cc b/widgets/coreWidget/dragAndDrop.cc
index b312a6036d3e8b04e44b0eee9fce312f30f47fa0..389b9c6c0f1eb36bd31b98bc50a8272ab8386d06 100644
--- a/widgets/coreWidget/dragAndDrop.cc
+++ b/widgets/coreWidget/dragAndDrop.cc
@@ -82,7 +82,7 @@ void CoreWidget::startDrag ( QMouseEvent* _event )
}
if ( examinerId == -1 ) {
- std::cerr << "startDrag in Core called by non examiner, stopping here" << std::endl;
+ emit log(LOGERR , tr("startDrag in Core called by non examiner, stopping here"));
return;
}
@@ -109,7 +109,7 @@ void CoreWidget::startDrag ( QMouseEvent* _event )
}
if ( objectId != -1 ) {
- std::cerr << "dragEvent Picked Object" << std::endl;
+ emit log(LOGERR , tr("dragEvent Picked Object"));
}
@@ -155,7 +155,7 @@ void CoreWidget::dropEvent ( QDropEvent* _event ) {
}
if ( examinerId == -1 ) {
- std::cerr << "dropEvent in Core called by non examiner, stopping here" << std::endl;
+ emit log(LOGERR , tr("startDrag in Core called by non examiner, stopping here"));
return;
}
diff --git a/widgets/coreWidget/keyHandling.cc b/widgets/coreWidget/keyHandling.cc
index 38a3d8ca99939bab7c97cbb6ffe7702bb34c2086..6ab8ae10db59f7c3382d7aa2d61d0e8bdd12aa7f 100644
--- a/widgets/coreWidget/keyHandling.cc
+++ b/widgets/coreWidget/keyHandling.cc
@@ -60,7 +60,7 @@ KeyBinding CoreWidget::getKeyBinding(QObject* _plugin, int _keyIndex ){
return plugins_[i].keys[_keyIndex];
}
- std::cerr << "ERROR: could not get KeyBinding\n";
+ emit log(LOGERR,tr("ERROR: could not get KeyBinding"));
return KeyBinding();
}
@@ -73,7 +73,7 @@ QString CoreWidget::getRPCName(QObject* _plugin ){
return plugins_[i].rpcName;
}
- std::cerr << "ERROR: could not get rpcName\n";
+ emit log(LOGERR,tr("ERROR: could not get rpcname"));
return "";
}
@@ -243,7 +243,7 @@ void CoreWidget::slotRegisterKey(int _key, Qt::KeyboardModifiers _modifiers, QSt
}
if (found && !multi)
- emit log(LOGERR, "Key already registered by '" + name + "'");
+ emit log(LOGERR, tr("Key already registered by '") + name + "'");
//check if its a key for the core
if (sender() == this){
@@ -255,7 +255,7 @@ void CoreWidget::slotRegisterKey(int _key, Qt::KeyboardModifiers _modifiers, QSt
kb.slot = false;
if (multi && !_multiUse)
- emit log(LOGERR, "Key already registered by '" + name + "'. Forced registration as multiUse key.");
+ emit log(LOGERR, tr("Key already registered by '") + name + tr("'. Forced registration as multiUse key."));
coreKeys_.push_back( kb );
@@ -272,7 +272,7 @@ void CoreWidget::slotRegisterKey(int _key, Qt::KeyboardModifiers _modifiers, QSt
pluginInfo = &plugins_[i];
if (pluginInfo == 0){
- emit log(LOGERR, "Unable to register key. Plugin not found!");
+ emit log(LOGERR, tr("Unable to register key. Plugin not found!"));
return;
}
@@ -284,7 +284,7 @@ void CoreWidget::slotRegisterKey(int _key, Qt::KeyboardModifiers _modifiers, QSt
kb.slot = false;
if (multi && !_multiUse)
- emit log(LOGERR, "Key already registered by '" + name + "'. Forced registration as multiUse key.");
+ emit log(LOGERR, tr("Key already registered by '") + name + tr("'. Forced registration as multiUse key."));
pluginInfo->keys.append( kb );
@@ -371,14 +371,14 @@ void CoreWidget::slotAddKeyMapping(int _key, Qt::KeyboardModifiers _modifiers, Q
if (!binding.multiUse){
if (plugin == 0)
- emit log(LOGERR, "Could not add key mapping. Key already assigned to the core.");
+ emit log(LOGERR, tr("Could not add key mapping. Key already assigned to the core."));
else{
BaseInterface* basePlugin = qobject_cast< BaseInterface * >(plugin);
if (basePlugin)
- emit log(LOGERR, "Could not add key mapping. Key already assigned to " + basePlugin->name() );
+ emit log(LOGERR, tr("Could not add key mapping. Key already assigned to ") + basePlugin->name() );
else
- emit log(LOGERR, "Could not add key mapping. Key already assigned to an unknown plugin.");
+ emit log(LOGERR, tr("Could not add key mapping. Key already assigned to an unknown plugin."));
}
return;
}
@@ -390,7 +390,7 @@ void CoreWidget::slotAddKeyMapping(int _key, Qt::KeyboardModifiers _modifiers, Q
//check if new binding doesn't allow multiUse but other assignments for the key exist
if (!keyBinding.multiUse)
if ( (replace && keys_.count(keyCombi) > 1) || (!replace && keys_.count(keyCombi) > 0) ){
- emit log(LOGERR, "Could not add (single usage) key mapping. Key already assigned.");
+ emit log(LOGERR, tr("Could not add (single usage) key mapping. Key already assigned."));
return;
}
diff --git a/widgets/coreWidget/viewerControl.cc b/widgets/coreWidget/viewerControl.cc
index 7bb8be94fa502ea7810bd91a257e15fcdd5901b9..72059911d7c64fed66fa0a1c48791e0211274054 100644
--- a/widgets/coreWidget/viewerControl.cc
+++ b/widgets/coreWidget/viewerControl.cc
@@ -67,10 +67,10 @@ void CoreWidget::slotToggleStereoMode()
stereoActive_ = !stereoActive_;
if ( stereoActive_ ) {
- statusBar_->showMessage("Stereo enabled");
+ statusBar_->showMessage(tr("Stereo enabled"));
stereoButton_->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"stereo.png") );
} else {
- statusBar_->showMessage("Stereo disabled");
+ statusBar_->showMessage(tr("Stereo disabled"));
stereoButton_->setIcon( QIcon(OpenFlipper::Options::iconDirStr()+OpenFlipper::Options::dirSeparator()+"mono.png") );
}
@@ -185,8 +185,6 @@ void CoreWidget::slotGlobalChangeBackFaceCulling(bool _backFaceCulling){
for ( uint i = 0 ; i < OpenFlipper::Options::examinerWidgets() ; ++i )
PluginFunctions::viewerProperties(i).backFaceCulling(_backFaceCulling);
- std::cerr << " Backface Culling " << std::endl;
-
}
/// Set Backface culling for active viewer
@@ -243,13 +241,13 @@ void CoreWidget::slotSnapshot() {
QFileDialog dialog(this);
dialog.setFileMode(QFileDialog::AnyFile);
dialog.setDefaultSuffix("png");
- dialog.setNameFilter("Images (*.png *.ppm *.jpg)");
+ dialog.setNameFilter(tr("Images (*.png *.ppm *.jpg)"));
dialog.setFileMode(QFileDialog::AnyFile);
dialog.setConfirmOverwrite(true);
dialog.setDirectory( fi.path() );
dialog.selectFile( suggest );
dialog.setAcceptMode(QFileDialog::AcceptSave);
- dialog.setWindowTitle("Save Snapshot");
+ dialog.setWindowTitle(tr("Save Snapshot"));
if (dialog.exec()){
QString newName = dialog.selectedFiles()[0];
@@ -578,7 +576,7 @@ void CoreWidget::slotCoordSysVisibility(bool _visible){
ACG::SceneGraph::BaseNode* coordSys = root->find("Core Coordsys Node");
if (coordSys == 0){
- std::cerr << "CoordSys Node not found!" << std::endl;
+ emit log( LOGERR, tr("CoordSys Node not found"));
return;
}
diff --git a/widgets/glWidget/QtBaseViewer.cc b/widgets/glWidget/QtBaseViewer.cc
index d859d6bd4165f562bbb8d8009a296b0dd8dfbe0d..7b8af7dca46bbaa5786239b63e656bad92700d58 100644
--- a/widgets/glWidget/QtBaseViewer.cc
+++ b/widgets/glWidget/QtBaseViewer.cc
@@ -1243,24 +1243,24 @@ glViewer::createWidgets()
wheelZ_->setMaximumSize(wheelZ_->sizeHint());
connect(wheelZ_,SIGNAL(angleChangedBy(double)),
this,SLOT(slotWheelZ(double)));
- wheelZ_->setToolTip( "Translate along z-axis.");
- wheelZ_->setWhatsThis( "Translate along z-axis.");
+ wheelZ_->setToolTip( tr("Translate along z-axis."));
+ wheelZ_->setWhatsThis( tr("Translate along z-axis."));
wheelY_=new ACG::QtWidgets::QtWheel( 0,"wheel-y",ACG::QtWidgets::QtWheel::Horizontal);
wheelY_->setMinimumSize(wheelY_->sizeHint());
wheelY_->setMaximumSize(wheelY_->sizeHint());
connect(wheelY_,SIGNAL(angleChangedBy(double)),
this,SLOT(slotWheelY(double)));
- wheelY_->setToolTip("Rotate around y-axis.");
- wheelY_->setWhatsThis( "Rotate around y-axis.");
+ wheelY_->setToolTip(tr("Rotate around y-axis."));
+ wheelY_->setWhatsThis( tr("Rotate around y-axis."));
- wheelX_=new ACG::QtWidgets::QtWheel( 0,"wheel-x",ACG::QtWidgets::QtWheel::Vertical);
+ wheelX_=new ACG::QtWidgets::QtWheel( 0,"wheel-x" ,ACG::QtWidgets::QtWheel::Vertical);
wheelX_->setMinimumSize(wheelX_->sizeHint());
wheelX_->setMaximumSize(wheelX_->sizeHint());
connect(wheelX_,SIGNAL(angleChangedBy(double)),
this,SLOT(slotWheelX(double)));
- wheelX_->setToolTip("Rotate around x-axis.");
- wheelX_->setWhatsThis( "Rotate around x-axis.");
+ wheelX_->setToolTip(tr("Rotate around x-axis."));
+ wheelX_->setWhatsThis( tr("Rotate around x-axis."));
// Hide or show wheels (depending on ini option)
if(!OpenFlipper::Options::showWheelsAtStartup()) {
@@ -2042,11 +2042,11 @@ void glViewer::snapshot()
if (rval)
{
- emit statusMessage (QString("snapshot: ")+fname,5000);
+ emit statusMessage (QString(tr("snapshot: "))+fname,5000);
}
else
{
- emit statusMessage (QString("could not save snapshot to ")+fname);
+ emit statusMessage (QString(tr("could not save snapshot to "))+fname);
}
}
diff --git a/widgets/helpWidget/helpWidget.cc b/widgets/helpWidget/helpWidget.cc
index a79ce912090fbf6f3282c2734139dcdc8c35f4a8..0d1c849644d36d33ff22a8125d82def430e96f8d 100644
--- a/widgets/helpWidget/helpWidget.cc
+++ b/widgets/helpWidget/helpWidget.cc
@@ -95,7 +95,7 @@ HelpWidget::HelpWidget(QWidget* parent, const QString& _homeSite)
textWindow_ = new HelpBrowser(helpEngine_, this);
- homeIndex_ = tabWidget_->addTab(textWindow_, "Home");
+ homeIndex_ = tabWidget_->addTab(textWindow_, tr("Home"));
gridLayout_->addWidget(helpEngine_->contentWidget(), 1, 0);
gridLayout_->addWidget(tabWidget_, 1, 1);
@@ -231,7 +231,7 @@ void HelpWidget::showResults(int /*_hits*/) {
searchWidget_->hide();
- int resultsTabIndex_ = tabWidget_->addTab(searchEngine_->resultWidget(), "Results");
+ int resultsTabIndex_ = tabWidget_->addTab(searchEngine_->resultWidget(), tr("Results") );
tabWidget_->setCurrentIndex(resultsTabIndex_);
}
diff --git a/widgets/loadWidget/loadWidget.cc b/widgets/loadWidget/loadWidget.cc
index f80071443b67152b6edae4e7cadc70275cd08b83..979fb0ed810648a5bb01005dffb5deb2dfbf9287 100644
--- a/widgets/loadWidget/loadWidget.cc
+++ b/widgets/loadWidget/loadWidget.cc
@@ -76,7 +76,7 @@ LoadWidget::LoadWidget(std::vector& _supportedTypes , QWidget *parent
gridLayout->addWidget( typeBox_, gridLayout->rowCount() , 1 );
// Add a nice label for it
- QLabel* typeLabel = new QLabel("Object type:" , this);
+ QLabel* typeLabel = new QLabel(tr("Object type:") , this);
gridLayout->addWidget( typeLabel, gridLayout->rowCount() -1 , 0 );
// Add a frame to the right of the dialog
@@ -162,7 +162,7 @@ void LoadWidget::currentFilterChanged(QString _currentFilter){
/// adjust load-filters to current datatype
void LoadWidget::slotSetLoadFilters(int _typeIndex){
- box_->setTitle("Load Options");
+ box_->setTitle(tr("Load Options"));
for (int i=0; i < boxWidgets_.size(); i++){
boxLayout_->removeWidget( boxWidgets_[i] );
@@ -196,7 +196,7 @@ void LoadWidget::slotSetLoadFilters(int _typeIndex){
/// adjust save-filters to current datatype
void LoadWidget::slotSetSaveFilters(int _typeIndex){
- box_->setTitle("Save Options");
+ box_->setTitle(tr("Save Options"));
for (int i=0; i < boxWidgets_.size(); i++){
boxLayout_->removeWidget( boxWidgets_[i] );
@@ -305,7 +305,7 @@ void LoadWidget::saveFile(){
/// show Widget for loading Files
int LoadWidget::showLoad(){
setAcceptMode ( QFileDialog::AcceptOpen );
- setWindowTitle("Load Object");
+ setWindowTitle(tr("Load Object"));
typeBox_->setEnabled(true);
loadMode_ = true;
@@ -322,7 +322,7 @@ int LoadWidget::showLoad(){
int LoadWidget::showSave(int _id, QString _filename){
setAcceptMode ( QFileDialog::AcceptSave );
setFileMode( QFileDialog::AnyFile );
- setWindowTitle("Save Object");
+ setWindowTitle(tr("Save Object"));
typeBox_->setEnabled(false);
loadMode_ = false;
diff --git a/widgets/optionsWidget/ShortcutButton.cc b/widgets/optionsWidget/ShortcutButton.cc
index 0092e9ec332c33c532e7c3e280b4ce154e158abd..b0b410465786c2393383f6a8e15184c19a12c57c 100644
--- a/widgets/optionsWidget/ShortcutButton.cc
+++ b/widgets/optionsWidget/ShortcutButton.cc
@@ -103,7 +103,7 @@ void ShortcutButton::showCurrentShortcut()
QString keyString;
if (key_ == -1){
- keyString = "unassigned";
+ keyString = tr("unassigned");
}else if (key_ == Qt::Key_AltGr || key_ == Qt::Key_Alt || key_ == Qt::Key_Control || key_ == Qt::Key_Shift || key_ == Qt::Key_Meta){
keyString = QKeySequence( modifiers_ ).toString();
keyString = keyString.left(keyString.size()-1);
diff --git a/widgets/optionsWidget/downloader.cc b/widgets/optionsWidget/downloader.cc
index 6b1c86de30b34c4325b56186311ea727bc1dd0b8..5000b6838fe1b138eb2ee85b15f234d7bd97eb44 100644
--- a/widgets/optionsWidget/downloader.cc
+++ b/widgets/optionsWidget/downloader.cc
@@ -88,7 +88,7 @@ void OptionsWidget::startDownload( QString _url ) {
if (path.isEmpty())
path = "/";
- statusLabel->setText("Getting Versions file from Server");
+ statusLabel->setText(tr("Getting Versions file from Server"));
progressDialog->setWindowTitle(tr("HTTP"));
progressDialog->setLabelText(tr("Downloading %1.").arg(fileName));
@@ -162,7 +162,7 @@ void OptionsWidget::readResponseHeader(const QHttpResponseHeader &responseHeader
QMessageBox::information(this, tr("HTTP"),
tr("Download failed: %1.")
.arg(responseHeader.reasonPhrase()));
- statusLabel->setText("Download failed: " + responseHeader.reasonPhrase());
+ statusLabel->setText(tr("Download failed: ") + responseHeader.reasonPhrase());
httpRequestAborted = true;
progressDialog->hide();
http->abort();
diff --git a/widgets/optionsWidget/keyBindings.cc b/widgets/optionsWidget/keyBindings.cc
index 3e044f75c55ab192397a54adaf2fae06d7aa5a21..0d636912a51f44695291bf9d06ab08c58450f94b 100644
--- a/widgets/optionsWidget/keyBindings.cc
+++ b/widgets/optionsWidget/keyBindings.cc
@@ -107,7 +107,7 @@ void OptionsWidget::updateShortcut(){
continue;
if (key == myNewKey && ( !multiUse || !myMultiUse ) ){
- QMessageBox::warning(this, "OpenFlipper", "Could not add Shortcut. Shortcut already assigned.", QMessageBox::Ok);
+ QMessageBox::warning(this, tr("OpenFlipper"), tr("Could not add Shortcut. Shortcut already assigned."), QMessageBox::Ok);
return;
}
}
diff --git a/widgets/optionsWidget/optionsWidget.cc b/widgets/optionsWidget/optionsWidget.cc
index d84a0a01eafedbc5d2665fe6c9f33f312e366a29..2f44a1130517ab7e85d880426f4a1659bbd2b463 100644
--- a/widgets/optionsWidget/optionsWidget.cc
+++ b/widgets/optionsWidget/optionsWidget.cc
@@ -628,17 +628,17 @@ void OptionsWidget::updateComponent() {
std::cerr << targetName.toStdString() << std::endl;
if ( ! sourceFileInfo.exists() ) {
- statusLabel->setText("Download failed!");
+ statusLabel->setText(tr("Download failed!"));
slotGetUpdates();
return;
} else {
if ( ! targetFileInfo.exists() ) {
- statusLabel->setText("plugin target does not exist");
+ statusLabel->setText(tr("plugin target does not exist"));
slotGetUpdates();
return;
}
- statusLabel->setText("Installing new file");
+ statusLabel->setText(tr("Installing new file"));
// Remove the old plugin
QFile targetFile(targetName);
@@ -651,7 +651,7 @@ void OptionsWidget::updateComponent() {
QFile sourceFile(sourceName);
sourceFile.remove();
- statusLabel->setText("updated " + currentUpdateName_);
+ statusLabel->setText(tr("updated ") + currentUpdateName_);
}
slotGetUpdates();
@@ -700,7 +700,7 @@ void OptionsWidget::compareVersions() {
return;
}
- statusLabel->setText("Checking for new versions");
+ statusLabel->setText(tr("Checking for new versions"));
bool newerVersionsAvailable = false;
@@ -731,9 +731,9 @@ void OptionsWidget::compareVersions() {
}
if ( newerVersionsAvailable ) {
- statusLabel->setText("Updates found");
+ statusLabel->setText(tr("Updates found"));
} else {
- statusLabel->setText("No updates found");
+ statusLabel->setText(tr("No updates found"));
}
ini.disconnect();
diff --git a/widgets/snapshotDialog/SnapshotDialog.cc b/widgets/snapshotDialog/SnapshotDialog.cc
index e80dd610e1d9d48f8e290cd7b459d5693432859b..366f573b73153b5a7b16790f9b26b39f479ecc80 100644
--- a/widgets/snapshotDialog/SnapshotDialog.cc
+++ b/widgets/snapshotDialog/SnapshotDialog.cc
@@ -75,7 +75,7 @@ void SnapshotDialog::slotOk()
if (filename->text() == ""){
QMessageBox msgBox;
- msgBox.setText("The Filename is empty!");
+ msgBox.setText(tr("The Filename is empty!"));
msgBox.exec();
return;
}
@@ -96,13 +96,13 @@ void SnapshotDialog::findFile()
QFileDialog dialog(this);
dialog.setFileMode(QFileDialog::AnyFile);
dialog.setDefaultSuffix("png");
- dialog.setNameFilter("Images (*.png *.ppm *.jpg)");
+ dialog.setNameFilter(tr("Images (*.png *.ppm *.jpg)"));
dialog.setFileMode(QFileDialog::AnyFile);
dialog.setConfirmOverwrite(true);
dialog.setDirectory( fi.path() );
dialog.selectFile( filename->text() );
dialog.setAcceptMode(QFileDialog::AcceptSave);
- dialog.setWindowTitle("Save Snapshot");
+ dialog.setWindowTitle(tr("Save Snapshot"));
bool ok = dialog.exec();
diff --git a/widgets/videoCaptureDialog/VideoCaptureDialog.cc b/widgets/videoCaptureDialog/VideoCaptureDialog.cc
index 6123095797490fb4302c47104de36f9f30902013..06937c7b0edf11d715c37ec95ca9709fee6a5371 100644
--- a/widgets/videoCaptureDialog/VideoCaptureDialog.cc
+++ b/widgets/videoCaptureDialog/VideoCaptureDialog.cc
@@ -70,7 +70,7 @@ void VideoCaptureDialog::slotStartVideoCapture()
if (filename->text() == ""){
QMessageBox msgBox;
- msgBox.setText("The Filename is empty!");
+ msgBox.setText(tr("The Filename is empty!"));
msgBox.exec();
return;
}