Merge pull request #8955 from wwmayer/issue_8556
Move image loading to core
@@ -94,6 +94,7 @@
|
||||
#include "FeaturePython.h"
|
||||
#include "GeoFeature.h"
|
||||
#include "GeoFeatureGroupExtension.h"
|
||||
#include "ImagePlane.h"
|
||||
#include "InventorObject.h"
|
||||
#include "Link.h"
|
||||
#include "LinkBaseExtensionPy.h"
|
||||
@@ -2053,12 +2054,13 @@ void Application::initTypes()
|
||||
App::DocumentObjectGroup ::init();
|
||||
App::DocumentObjectGroupPython ::init();
|
||||
App::DocumentObjectFileIncluded::init();
|
||||
App::ImagePlane ::init();
|
||||
App::InventorObject ::init();
|
||||
App::VRMLObject ::init();
|
||||
App::Annotation ::init();
|
||||
App::AnnotationLabel ::init();
|
||||
App::MeasureDistance ::init();
|
||||
App ::MaterialObject ::init();
|
||||
App::MaterialObject ::init();
|
||||
App::MaterialObjectPython ::init();
|
||||
App::TextDocument ::init();
|
||||
App::Placement ::init();
|
||||
|
||||
@@ -147,6 +147,7 @@ SET(Document_CPP_SRCS
|
||||
GeoFeature.cpp
|
||||
GeoFeatureGroupExtensionPyImp.cpp
|
||||
GeoFeatureGroupExtension.cpp
|
||||
ImagePlane.cpp
|
||||
OriginGroupExtensionPyImp.cpp
|
||||
OriginGroupExtension.cpp
|
||||
PartPyImp.cpp
|
||||
@@ -192,6 +193,7 @@ SET(Document_HPP_SRCS
|
||||
FeatureTest.h
|
||||
GeoFeature.h
|
||||
GeoFeatureGroupExtension.h
|
||||
ImagePlane.h
|
||||
OriginGroupExtension.h
|
||||
Part.h
|
||||
Origin.h
|
||||
|
||||
@@ -25,19 +25,36 @@
|
||||
#include "ImagePlane.h"
|
||||
|
||||
|
||||
using namespace Image;
|
||||
using namespace App;
|
||||
|
||||
PROPERTY_SOURCE(Image::ImagePlane, App::GeoFeature)
|
||||
PROPERTY_SOURCE(App::ImagePlane, App::GeoFeature)
|
||||
|
||||
|
||||
ImagePlane::ImagePlane()
|
||||
: XPixelsPerMeter{1000.0}
|
||||
, YPixelsPerMeter{1000.0}
|
||||
{
|
||||
ADD_PROPERTY_TYPE( ImageFile,(nullptr) , "ImagePlane",Prop_None,"File of the image");
|
||||
ADD_PROPERTY_TYPE( XSize, (100), "ImagePlane",Prop_None,"Size of a pixel in X");
|
||||
ADD_PROPERTY_TYPE( YSize, (100), "ImagePlane",Prop_None,"Size of a pixel in Y");
|
||||
}
|
||||
|
||||
ImagePlane::~ImagePlane()
|
||||
int ImagePlane::getXSizeInPixel()
|
||||
{
|
||||
return int(XSize.getValue() * XPixelsPerMeter / 1000);
|
||||
}
|
||||
|
||||
int ImagePlane::getYSizeInPixel()
|
||||
{
|
||||
return int(YSize.getValue() * YPixelsPerMeter / 1000);
|
||||
}
|
||||
|
||||
void ImagePlane::setXSizeInPixel(int value)
|
||||
{
|
||||
XSize.setValue(double(value) * 1000.0 / XPixelsPerMeter);
|
||||
}
|
||||
|
||||
void ImagePlane::setYSizeInPixel(int value)
|
||||
{
|
||||
YSize.setValue(double(value) * 1000.0 / YPixelsPerMeter);
|
||||
}
|
||||
@@ -20,37 +20,44 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef Image_ImagePlane_H
|
||||
#define Image_ImagePlane_H
|
||||
#ifndef App_ImagePlane_H
|
||||
#define App_ImagePlane_H
|
||||
|
||||
#include <App/GeoFeature.h>
|
||||
#include <App/PropertyFile.h>
|
||||
#include <App/PropertyUnits.h>
|
||||
#include <Mod/Image/ImageGlobal.h>
|
||||
|
||||
namespace Image
|
||||
namespace App
|
||||
{
|
||||
|
||||
class ImageExport ImagePlane : public App::GeoFeature
|
||||
class AppExport ImagePlane : public App::GeoFeature
|
||||
{
|
||||
PROPERTY_HEADER_WITH_OVERRIDE(Image::ImagePlane);
|
||||
PROPERTY_HEADER_WITH_OVERRIDE(App::ImagePlane);
|
||||
|
||||
public:
|
||||
/// Constructor
|
||||
ImagePlane();
|
||||
~ImagePlane() override;
|
||||
~ImagePlane() override = default;
|
||||
|
||||
App::PropertyFileIncluded ImageFile;
|
||||
App::PropertyLength XSize;
|
||||
App::PropertyLength YSize;
|
||||
|
||||
int getXSizeInPixel();
|
||||
int getYSizeInPixel();
|
||||
void setXSizeInPixel(int);
|
||||
void setYSizeInPixel(int);
|
||||
|
||||
double XPixelsPerMeter;
|
||||
double YPixelsPerMeter;
|
||||
|
||||
/// returns the type name of the ViewProvider
|
||||
const char* getViewProviderName() const override {
|
||||
return "ImageGui::ViewProviderImagePlane";
|
||||
return "Gui::ViewProviderImagePlane";
|
||||
}
|
||||
};
|
||||
|
||||
} //namespace Image
|
||||
} //namespace App
|
||||
|
||||
|
||||
#endif // Image_ImagePlane_H
|
||||
#endif // App_ImagePlane_H
|
||||
@@ -29,6 +29,7 @@
|
||||
# include <QCloseEvent>
|
||||
# include <QDir>
|
||||
# include <QFileInfo>
|
||||
# include <QImageReader>
|
||||
# include <QLocale>
|
||||
# include <QMessageBox>
|
||||
# include <QMessageLogContext>
|
||||
@@ -101,6 +102,7 @@
|
||||
#include "ViewProviderGeoFeatureGroup.h"
|
||||
#include "ViewProviderGeometryObject.h"
|
||||
#include "ViewProviderGroupExtension.h"
|
||||
#include "ViewProviderImagePlane.h"
|
||||
#include "ViewProviderInventorObject.h"
|
||||
#include "ViewProviderLine.h"
|
||||
#include "ViewProviderLink.h"
|
||||
@@ -328,6 +330,22 @@ struct PyMethodDef FreeCADGui_methods[] = {
|
||||
|
||||
} // namespace Gui
|
||||
|
||||
namespace {
|
||||
void setImportImageFormats()
|
||||
{
|
||||
QList<QByteArray> supportedFormats = QImageReader::supportedImageFormats();
|
||||
std::stringstream str;
|
||||
str << "Image formats (";
|
||||
for (const auto& ext : supportedFormats) {
|
||||
str << "*." << ext.constData() << " ";
|
||||
}
|
||||
str << ")";
|
||||
|
||||
std::string filter = str.str();
|
||||
App::GetApplication().addImportType(filter.c_str(), "FreeCADGui");
|
||||
}
|
||||
}
|
||||
|
||||
Application::Application(bool GUIenabled)
|
||||
{
|
||||
//App::GetApplication().Attach(this);
|
||||
@@ -1808,6 +1826,7 @@ void Application::initTypes()
|
||||
Gui::ViewProviderDocumentObjectGroupPython ::init();
|
||||
Gui::ViewProviderDragger ::init();
|
||||
Gui::ViewProviderGeometryObject ::init();
|
||||
Gui::ViewProviderImagePlane ::init();
|
||||
Gui::ViewProviderInventorObject ::init();
|
||||
Gui::ViewProviderVRMLObject ::init();
|
||||
Gui::ViewProviderAnnotation ::init();
|
||||
@@ -2156,6 +2175,7 @@ void Application::runApplication()
|
||||
try {
|
||||
Base::Console().Log("Run Gui init script\n");
|
||||
runInitGuiScript();
|
||||
setImportImageFormats();
|
||||
}
|
||||
catch (const Base::Exception& e) {
|
||||
Base::Console().Error("Error in FreeCADGuiInit.py: %s\n", e.what());
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
#include "DocumentObserverPython.h"
|
||||
#include "DownloadManager.h"
|
||||
#include "EditorView.h"
|
||||
#include "FileHandler.h"
|
||||
#include "Macro.h"
|
||||
#include "MainWindow.h"
|
||||
#include "MainWindowPy.h"
|
||||
@@ -599,60 +600,9 @@ PyObject* Application::sOpen(PyObject * /*self*/, PyObject *args)
|
||||
PyMem_Free(Name);
|
||||
PY_TRY {
|
||||
QString fileName = QString::fromUtf8(Utf8Name.c_str());
|
||||
QFileInfo fi;
|
||||
fi.setFile(fileName);
|
||||
QString ext = fi.suffix().toLower();
|
||||
QList<EditorView*> views = getMainWindow()->findChildren<EditorView*>();
|
||||
for (QList<EditorView*>::Iterator it = views.begin(); it != views.end(); ++it) {
|
||||
if ((*it)->fileName() == fileName) {
|
||||
(*it)->setFocus();
|
||||
Py_Return;
|
||||
}
|
||||
}
|
||||
|
||||
if (ext == QLatin1String("iv")) {
|
||||
if (!Application::Instance->activeDocument())
|
||||
App::GetApplication().newDocument();
|
||||
//QString cmd = QString("Gui.activeDocument().addAnnotation(\"%1\",\"%2\")").arg(fi.baseName()).arg(fi.absoluteFilePath());
|
||||
QString cmd = QString::fromLatin1(
|
||||
"App.ActiveDocument.addObject(\"App::InventorObject\",\"%1\")."
|
||||
"FileName=\"%2\"\n"
|
||||
"App.ActiveDocument.ActiveObject.Label=\"%1\"\n"
|
||||
"App.ActiveDocument.recompute()")
|
||||
.arg(fi.baseName(), fi.absoluteFilePath());
|
||||
Base::Interpreter().runString(cmd.toUtf8());
|
||||
}
|
||||
else if (ext == QLatin1String("wrl") ||
|
||||
ext == QLatin1String("vrml") ||
|
||||
ext == QLatin1String("wrz")) {
|
||||
if (!Application::Instance->activeDocument())
|
||||
App::GetApplication().newDocument();
|
||||
|
||||
// Add this to the search path in order to read inline files (#0002029)
|
||||
QByteArray path = fi.absolutePath().toUtf8();
|
||||
SoInput::addDirectoryFirst(path.constData());
|
||||
|
||||
//QString cmd = QString("Gui.activeDocument().addAnnotation(\"%1\",\"%2\")").arg(fi.baseName()).arg(fi.absoluteFilePath());
|
||||
QString cmd = QString::fromLatin1(
|
||||
"App.ActiveDocument.addObject(\"App::VRMLObject\",\"%1\")."
|
||||
"VrmlFile=\"%2\"\n"
|
||||
"App.ActiveDocument.ActiveObject.Label=\"%1\"\n"
|
||||
"App.ActiveDocument.recompute()")
|
||||
.arg(fi.baseName(), fi.absoluteFilePath());
|
||||
Base::Interpreter().runString(cmd.toUtf8());
|
||||
SoInput::removeDirectory(path.constData());
|
||||
}
|
||||
else if (ext == QLatin1String("py") ||
|
||||
ext == QLatin1String("fcmacro") ||
|
||||
ext == QLatin1String("fcscript")) {
|
||||
auto editor = new PythonEditor();
|
||||
editor->setWindowIcon(Gui::BitmapFactory().iconFromTheme("applications-python"));
|
||||
auto edit = new PythonEditorView(editor, getMainWindow());
|
||||
edit->open(fileName);
|
||||
edit->resize(400, 300);
|
||||
getMainWindow()->addWindow( edit );
|
||||
}
|
||||
else {
|
||||
FileHandler handler(fileName);
|
||||
if (!handler.openFile()) {
|
||||
QString ext = handler.extension();
|
||||
Base::Console().Error("File type '%s' not supported\n", ext.toLatin1().constData());
|
||||
}
|
||||
}
|
||||
@@ -673,60 +623,9 @@ PyObject* Application::sInsert(PyObject * /*self*/, PyObject *args)
|
||||
|
||||
PY_TRY {
|
||||
QString fileName = QString::fromUtf8(Utf8Name.c_str());
|
||||
QFileInfo fi;
|
||||
fi.setFile(fileName);
|
||||
QString ext = fi.suffix().toLower();
|
||||
if (ext == QLatin1String("iv")) {
|
||||
App::Document *doc = nullptr;
|
||||
if (DocName)
|
||||
doc = App::GetApplication().getDocument(DocName);
|
||||
else
|
||||
doc = App::GetApplication().getActiveDocument();
|
||||
if (!doc)
|
||||
doc = App::GetApplication().newDocument(DocName);
|
||||
|
||||
App::DocumentObject* obj = doc->addObject("App::InventorObject",
|
||||
(const char*)fi.baseName().toUtf8());
|
||||
obj->Label.setValue((const char*)fi.baseName().toUtf8());
|
||||
static_cast<App::PropertyString*>(obj->getPropertyByName("FileName"))
|
||||
->setValue((const char*)fi.absoluteFilePath().toUtf8());
|
||||
doc->recompute();
|
||||
}
|
||||
else if (ext == QLatin1String("wrl") ||
|
||||
ext == QLatin1String("vrml") ||
|
||||
ext == QLatin1String("wrz")) {
|
||||
App::Document *doc = nullptr;
|
||||
if (DocName)
|
||||
doc = App::GetApplication().getDocument(DocName);
|
||||
else
|
||||
doc = App::GetApplication().getActiveDocument();
|
||||
if (!doc)
|
||||
doc = App::GetApplication().newDocument(DocName);
|
||||
|
||||
// Add this to the search path in order to read inline files (#0002029)
|
||||
QByteArray path = fi.absolutePath().toUtf8();
|
||||
SoInput::addDirectoryFirst(path.constData());
|
||||
|
||||
App::DocumentObject* obj = doc->addObject("App::VRMLObject",
|
||||
(const char*)fi.baseName().toUtf8());
|
||||
obj->Label.setValue((const char*)fi.baseName().toUtf8());
|
||||
static_cast<App::PropertyFileIncluded*>(obj->getPropertyByName("VrmlFile"))
|
||||
->setValue((const char*)fi.absoluteFilePath().toUtf8());
|
||||
doc->recompute();
|
||||
|
||||
SoInput::removeDirectory(path.constData());
|
||||
}
|
||||
else if (ext == QLatin1String("py") ||
|
||||
ext == QLatin1String("fcmacro") ||
|
||||
ext == QLatin1String("fcscript")) {
|
||||
auto editor = new PythonEditor();
|
||||
editor->setWindowIcon(Gui::BitmapFactory().iconFromTheme("applications-python"));
|
||||
auto edit = new PythonEditorView(editor, getMainWindow());
|
||||
edit->open(fileName);
|
||||
edit->resize(400, 300);
|
||||
getMainWindow()->addWindow( edit );
|
||||
}
|
||||
else {
|
||||
FileHandler handler(fileName);
|
||||
if (!handler.importFile(std::string(DocName ? DocName : ""))) {
|
||||
QString ext = handler.extension();
|
||||
Base::Console().Error("File type '%s' not supported\n", ext.toLatin1().constData());
|
||||
}
|
||||
} PY_CATCH;
|
||||
|
||||
@@ -345,6 +345,8 @@ SET(Gui_UIC_SRCS
|
||||
Placement.ui
|
||||
TextureMapping.ui
|
||||
TaskView/TaskAppearance.ui
|
||||
TaskView/TaskImageScale.ui
|
||||
TaskView/TaskOrientation.ui
|
||||
TaskView/TaskSelectLinkProperty.ui
|
||||
TaskElementColors.ui
|
||||
DlgObjectSelection.ui
|
||||
@@ -726,6 +728,12 @@ SET(Task_View_SRCS
|
||||
TaskView/TaskAppearance.cpp
|
||||
TaskView/TaskAppearance.h
|
||||
TaskView/TaskAppearance.ui
|
||||
TaskView/TaskImageScale.cpp
|
||||
TaskView/TaskImageScale.h
|
||||
TaskView/TaskImageScale.ui
|
||||
TaskView/TaskOrientation.cpp
|
||||
TaskView/TaskOrientation.h
|
||||
TaskView/TaskOrientation.ui
|
||||
TaskView/TaskSelectLinkProperty.cpp
|
||||
TaskView/TaskSelectLinkProperty.h
|
||||
TaskView/TaskSelectLinkProperty.ui
|
||||
@@ -794,6 +802,7 @@ SOURCE_GROUP("Widget\\QSintActionPanel\\Mocs" FILES ${qsint_MOC_SRCS})
|
||||
|
||||
# The 3d view
|
||||
SET(View3D_CPP_SRCS
|
||||
Camera.cpp
|
||||
Flag.cpp
|
||||
GLBuffer.cpp
|
||||
GLPainter.cpp
|
||||
@@ -824,6 +833,7 @@ SET(View3D_CPP_SRCS
|
||||
)
|
||||
SET(View3D_SRCS
|
||||
${View3D_CPP_SRCS}
|
||||
Camera.h
|
||||
Flag.h
|
||||
GLBuffer.h
|
||||
GLPainter.h
|
||||
@@ -885,6 +895,7 @@ SET(Viewprovider_CPP_SRCS
|
||||
ViewProviderExtern.cpp
|
||||
ViewProviderFeature.cpp
|
||||
ViewProviderGeometryObject.cpp
|
||||
ViewProviderImagePlane.cpp
|
||||
ViewProviderInventorObject.cpp
|
||||
ViewProviderMeasureDistance.cpp
|
||||
ViewProviderPyImp.cpp
|
||||
@@ -921,6 +932,7 @@ SET(Viewprovider_SRCS
|
||||
ViewProviderExtern.h
|
||||
ViewProviderFeature.h
|
||||
ViewProviderGeometryObject.h
|
||||
ViewProviderImagePlane.h
|
||||
ViewProviderInventorObject.h
|
||||
ViewProviderMeasureDistance.h
|
||||
ViewProviderPythonFeature.h
|
||||
@@ -1064,6 +1076,7 @@ SET(View_CPP_SRCS
|
||||
MDIViewPy.cpp
|
||||
MDIViewPyWrap.cpp
|
||||
GraphvizView.cpp
|
||||
ImageView.cpp
|
||||
ActiveObjectList.cpp
|
||||
)
|
||||
SET(View_HPP_SRCS
|
||||
@@ -1071,6 +1084,7 @@ SET(View_HPP_SRCS
|
||||
MDIViewPy.h
|
||||
MDIViewPyWrap.h
|
||||
GraphvizView.h
|
||||
ImageView.h
|
||||
ActiveObjectList.h
|
||||
)
|
||||
SET(View_SRCS
|
||||
@@ -1133,6 +1147,8 @@ SET(FreeCADGui_CPP_SRCS
|
||||
ExpressionBindingPy.cpp
|
||||
GraphicsViewZoom.cpp
|
||||
ExpressionCompleter.cpp
|
||||
FileHandler.cpp
|
||||
FileHandler.h
|
||||
GuiApplication.cpp
|
||||
GuiApplicationNativeEventAware.cpp
|
||||
GuiConsole.cpp
|
||||
@@ -1227,6 +1243,8 @@ if(MSVC)
|
||||
propertyeditor/PropertyItemDelegate.cpp
|
||||
propertyeditor/PropertyModel.cpp
|
||||
TaskView/TaskAppearance.cpp
|
||||
TaskView/TaskImageScale.cpp
|
||||
TaskView/TaskOrientation.cpp
|
||||
TaskView/TaskSelectLinkProperty.cpp
|
||||
TaskView/TaskEditControl.cpp
|
||||
TaskView/TaskView.cpp
|
||||
|
||||
201
src/Gui/Camera.cpp
Normal file
@@ -0,0 +1,201 @@
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2023 Werner Mayer <wmayer[at]users.sourceforge.net> *
|
||||
* *
|
||||
* This file is part of FreeCAD. *
|
||||
* *
|
||||
* FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
* under the terms of the GNU Lesser General Public License as *
|
||||
* published by the Free Software Foundation, either version 2.1 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* *
|
||||
* FreeCAD is distributed in the hope that it will be useful, but *
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with FreeCAD. If not, see *
|
||||
* <https://www.gnu.org/licenses/>. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#include "Camera.h"
|
||||
#include "Utilities.h"
|
||||
|
||||
using namespace Gui;
|
||||
|
||||
|
||||
/**
|
||||
Formulas to get quaternion for axonometric views:
|
||||
|
||||
\code
|
||||
from math import sqrt, degrees, asin, atan
|
||||
p1=App.Rotation(App.Vector(1,0,0),90)
|
||||
p2=App.Rotation(App.Vector(0,0,1),alpha)
|
||||
p3=App.Rotation(p2.multVec(App.Vector(1,0,0)),beta)
|
||||
p4=p3.multiply(p2).multiply(p1)
|
||||
|
||||
from pivy import coin
|
||||
c=Gui.ActiveDocument.ActiveView.getCameraNode()
|
||||
c.orientation.setValue(*p4.Q)
|
||||
\endcode
|
||||
|
||||
The angles alpha and beta depend on the type of axonometry
|
||||
Isometric:
|
||||
\code
|
||||
alpha=45
|
||||
beta=degrees(asin(-sqrt(1.0/3.0)))
|
||||
\endcode
|
||||
|
||||
Dimetric:
|
||||
\code
|
||||
alpha=degrees(asin(sqrt(1.0/8.0)))
|
||||
beta=degrees(-asin(1.0/3.0))
|
||||
\endcode
|
||||
|
||||
Trimetric:
|
||||
\code
|
||||
alpha=30.0
|
||||
beta=-35.0
|
||||
\endcode
|
||||
|
||||
Verification code that the axonomtries are correct:
|
||||
|
||||
\code
|
||||
from pivy import coin
|
||||
c=Gui.ActiveDocument.ActiveView.getCameraNode()
|
||||
vo=App.Vector(c.getViewVolume().getMatrix().multVecMatrix(coin.SbVec3f(0,0,0)).getValue())
|
||||
vx=App.Vector(c.getViewVolume().getMatrix().multVecMatrix(coin.SbVec3f(10,0,0)).getValue())
|
||||
vy=App.Vector(c.getViewVolume().getMatrix().multVecMatrix(coin.SbVec3f(0,10,0)).getValue())
|
||||
vz=App.Vector(c.getViewVolume().getMatrix().multVecMatrix(coin.SbVec3f(0,0,10)).getValue())
|
||||
(vx-vo).Length
|
||||
(vy-vo).Length
|
||||
(vz-vo).Length
|
||||
|
||||
# Projection
|
||||
vo.z=0
|
||||
vx.z=0
|
||||
vy.z=0
|
||||
vz.z=0
|
||||
|
||||
(vx-vo).Length
|
||||
(vy-vo).Length
|
||||
(vz-vo).Length
|
||||
\endcode
|
||||
|
||||
See also:
|
||||
http://www.mathematik.uni-marburg.de/~thormae/lectures/graphics1/graphics_6_2_ger_web.html#1
|
||||
http://www.mathematik.uni-marburg.de/~thormae/lectures/graphics1/code_v2/Axonometric/qt/Axonometric.cpp
|
||||
https://de.wikipedia.org/wiki/Arkussinus_und_Arkuskosinus
|
||||
*/
|
||||
|
||||
SbRotation Camera::top()
|
||||
{
|
||||
return SbRotation(0, 0, 0, 1);
|
||||
}
|
||||
|
||||
SbRotation Camera::bottom()
|
||||
{
|
||||
return SbRotation(1, 0, 0, 0);
|
||||
}
|
||||
|
||||
SbRotation Camera::front()
|
||||
{
|
||||
auto root = (float)(sqrt(2.0)/2.0);
|
||||
return SbRotation(root, 0, 0, root);
|
||||
}
|
||||
|
||||
SbRotation Camera::rear()
|
||||
{
|
||||
auto root = (float)(sqrt(2.0)/2.0);
|
||||
return SbRotation(0, root, root, 0);
|
||||
}
|
||||
|
||||
SbRotation Camera::right()
|
||||
{
|
||||
return SbRotation(0.5, 0.5, 0.5, 0.5);
|
||||
}
|
||||
|
||||
SbRotation Camera::left()
|
||||
{
|
||||
return SbRotation(-0.5, 0.5, 0.5, -0.5);
|
||||
}
|
||||
|
||||
SbRotation Camera::isometric()
|
||||
{
|
||||
//from math import sqrt, degrees, asin
|
||||
//p1=App.Rotation(App.Vector(1,0,0),45)
|
||||
//p2=App.Rotation(App.Vector(0,0,1),-45)
|
||||
//p3=p2.multiply(p1)
|
||||
//return SbRotation(0.353553f, -0.146447f, -0.353553f, 0.853553f);
|
||||
|
||||
//from math import sqrt, degrees, asin
|
||||
//p1=App.Rotation(App.Vector(1,0,0),90)
|
||||
//p2=App.Rotation(App.Vector(0,0,1),135)
|
||||
//p3=App.Rotation(App.Vector(-1,1,0),degrees(asin(-sqrt(1.0/3.0))))
|
||||
//p4=p3.multiply(p2).multiply(p1)
|
||||
//return SbRotation(0.17592, 0.424708, 0.820473, 0.339851);
|
||||
|
||||
//from math import sqrt, degrees, asin
|
||||
//p1=App.Rotation(App.Vector(1,0,0),90)
|
||||
//p2=App.Rotation(App.Vector(0,0,1),45)
|
||||
//#p3=App.Rotation(App.Vector(1,1,0),45)
|
||||
//p3=App.Rotation(App.Vector(1,1,0),degrees(asin(-sqrt(1.0/3.0))))
|
||||
//p4=p3.multiply(p2).multiply(p1)
|
||||
return SbRotation(0.424708f, 0.17592f, 0.339851f, 0.820473f);
|
||||
}
|
||||
|
||||
SbRotation Camera::dimetric()
|
||||
{
|
||||
return SbRotation(0.567952f, 0.103751f, 0.146726f, 0.803205f);
|
||||
}
|
||||
|
||||
SbRotation Camera::trimetric()
|
||||
{
|
||||
return SbRotation(0.446015f, 0.119509f, 0.229575f, 0.856787f);
|
||||
}
|
||||
|
||||
SbRotation Camera::rotation(Camera::Orientation view)
|
||||
{
|
||||
switch (view) {
|
||||
case Top:
|
||||
return top();
|
||||
case Bottom:
|
||||
return bottom();
|
||||
case Front:
|
||||
return front();
|
||||
case Rear:
|
||||
return rear();
|
||||
case Right:
|
||||
return right();
|
||||
case Left:
|
||||
return left();
|
||||
case Isometric:
|
||||
return isometric();
|
||||
case Dimetric:
|
||||
return dimetric();
|
||||
case Trimetric:
|
||||
return trimetric();
|
||||
default:
|
||||
return top();
|
||||
}
|
||||
}
|
||||
|
||||
Base::Rotation Camera::convert(Camera::Orientation view)
|
||||
{
|
||||
return convert(Camera::rotation(view));
|
||||
}
|
||||
|
||||
Base::Rotation Camera::convert(const SbRotation& rot)
|
||||
{
|
||||
return Base::convertTo<Base::Rotation>(rot);
|
||||
}
|
||||
|
||||
SbRotation Camera::convert(const Base::Rotation& rot)
|
||||
{
|
||||
return Base::convertTo<SbRotation>(rot);
|
||||
}
|
||||
66
src/Gui/Camera.h
Normal file
@@ -0,0 +1,66 @@
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2023 Werner Mayer <wmayer[at]users.sourceforge.net> *
|
||||
* *
|
||||
* This file is part of FreeCAD. *
|
||||
* *
|
||||
* FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
* under the terms of the GNU Lesser General Public License as *
|
||||
* published by the Free Software Foundation, either version 2.1 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* *
|
||||
* FreeCAD is distributed in the hope that it will be useful, but *
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with FreeCAD. If not, see *
|
||||
* <https://www.gnu.org/licenses/>. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef GUI_CAMERA_H
|
||||
#define GUI_CAMERA_H
|
||||
|
||||
#include <Inventor/SbRotation.h>
|
||||
#include <Base/Rotation.h>
|
||||
#include <FCGlobal.h>
|
||||
|
||||
namespace Gui {
|
||||
|
||||
class GuiExport Camera
|
||||
{
|
||||
public:
|
||||
enum Orientation {
|
||||
Top,
|
||||
Bottom,
|
||||
Front,
|
||||
Rear,
|
||||
Right,
|
||||
Left,
|
||||
Isometric,
|
||||
Dimetric,
|
||||
Trimetric,
|
||||
};
|
||||
|
||||
static SbRotation top();
|
||||
static SbRotation bottom();
|
||||
static SbRotation front();
|
||||
static SbRotation rear();
|
||||
static SbRotation right();
|
||||
static SbRotation left();
|
||||
static SbRotation isometric();
|
||||
static SbRotation dimetric();
|
||||
static SbRotation trimetric();
|
||||
|
||||
static SbRotation rotation(Orientation view);
|
||||
static Base::Rotation convert(Orientation view);
|
||||
static Base::Rotation convert(const SbRotation&);
|
||||
static SbRotation convert(const Base::Rotation&);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // GUI_CAMERA_H
|
||||
@@ -36,6 +36,7 @@
|
||||
# include <QFileInfo>
|
||||
# include <QFont>
|
||||
# include <QFontMetrics>
|
||||
# include <QImageReader>
|
||||
# include <QMessageBox>
|
||||
# include <QPainter>
|
||||
# include <QPointer>
|
||||
@@ -62,6 +63,7 @@
|
||||
#include "DlgSettingsImageImp.h"
|
||||
#include "Document.h"
|
||||
#include "FileDialog.h"
|
||||
#include "ImageView.h"
|
||||
#include "Macro.h"
|
||||
#include "MainWindow.h"
|
||||
#include "NavigationStyle.h"
|
||||
@@ -1807,12 +1809,12 @@ StdViewScreenShot::StdViewScreenShot()
|
||||
: Command("Std_ViewScreenShot")
|
||||
{
|
||||
sGroup = "Standard-View";
|
||||
sMenuText = QT_TR_NOOP("Save picture...");
|
||||
sMenuText = QT_TR_NOOP("Save image...");
|
||||
sToolTipText= QT_TR_NOOP("Creates a screenshot of the active view");
|
||||
sWhatsThis = "Std_ViewScreenShot";
|
||||
sStatusTip = QT_TR_NOOP("Creates a screenshot of the active view");
|
||||
sPixmap = "camera-photo";
|
||||
eType = Alter3DView;
|
||||
eType = Alter3DView;
|
||||
}
|
||||
|
||||
void StdViewScreenShot::activated(int iMsg)
|
||||
@@ -1969,6 +1971,51 @@ bool StdViewScreenShot::isActive()
|
||||
return isViewOfType(Gui::View3DInventor::getClassTypeId());
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
// Std_ViewLoadImage
|
||||
//===========================================================================
|
||||
DEF_STD_CMD(StdViewLoadImage)
|
||||
|
||||
StdViewLoadImage::StdViewLoadImage()
|
||||
: Command("Std_ViewLoadImage")
|
||||
{
|
||||
sGroup = "Standard-View";
|
||||
sMenuText = QT_TR_NOOP("Load image...");
|
||||
sToolTipText= QT_TR_NOOP("Loads a image");
|
||||
sWhatsThis = "Std_ViewLoadImage";
|
||||
sStatusTip = QT_TR_NOOP("Loads a image");
|
||||
sPixmap = "image-open";
|
||||
eType = 0;
|
||||
}
|
||||
|
||||
void StdViewLoadImage::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
|
||||
// add all supported QImage formats
|
||||
QStringList mimeTypeFilters;
|
||||
QList<QByteArray> supportedMimeTypes = QImageReader::supportedMimeTypes();
|
||||
for (const auto& mimeTypeName : supportedMimeTypes) {
|
||||
mimeTypeFilters.append(QString::fromLatin1(mimeTypeName));
|
||||
}
|
||||
|
||||
// Reading an image
|
||||
QFileDialog dialog(Gui::getMainWindow());
|
||||
dialog.setWindowTitle(QObject::tr("Choose an image file to open"));
|
||||
dialog.setMimeTypeFilters(mimeTypeFilters);
|
||||
dialog.selectMimeTypeFilter(QString::fromLatin1("image/png"));
|
||||
dialog.setDefaultSuffix(QString::fromLatin1("png"));
|
||||
dialog.setAcceptMode(QFileDialog::AcceptOpen);
|
||||
dialog.setOption(QFileDialog::DontUseNativeDialog);
|
||||
|
||||
if (dialog.exec()) {
|
||||
QString fileName = dialog.selectedFiles().constFirst();
|
||||
ImageView* view = new ImageView(Gui::getMainWindow());
|
||||
view->loadFile(fileName);
|
||||
view->resize(400, 300);
|
||||
Gui::getMainWindow()->addWindow(view);
|
||||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
// Std_ViewCreate
|
||||
@@ -2392,16 +2439,12 @@ StdViewZoomIn::StdViewZoomIn()
|
||||
void StdViewZoomIn::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
auto view = qobject_cast<View3DInventor*>(getMainWindow()->activeWindow());
|
||||
if ( view ) {
|
||||
View3DInventorViewer* viewer = view->getViewer();
|
||||
viewer->navigationStyle()->zoomIn();
|
||||
}
|
||||
getGuiApplication()->sendMsgToFocusView("ZoomIn");
|
||||
}
|
||||
|
||||
bool StdViewZoomIn::isActive()
|
||||
{
|
||||
return (qobject_cast<View3DInventor*>(getMainWindow()->activeWindow()));
|
||||
return getGuiApplication()->sendHasMsgToActiveView("ZoomIn");
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
@@ -2425,16 +2468,12 @@ StdViewZoomOut::StdViewZoomOut()
|
||||
void StdViewZoomOut::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
auto view = qobject_cast<View3DInventor*>(getMainWindow()->activeWindow());
|
||||
if (view) {
|
||||
View3DInventorViewer* viewer = view->getViewer();
|
||||
viewer->navigationStyle()->zoomOut();
|
||||
}
|
||||
getGuiApplication()->sendMsgToFocusView("ZoomOut");
|
||||
}
|
||||
|
||||
bool StdViewZoomOut::isActive()
|
||||
{
|
||||
return (qobject_cast<View3DInventor*>(getMainWindow()->activeWindow()));
|
||||
return getGuiApplication()->sendHasMsgToActiveView("ZoomOut");
|
||||
}
|
||||
|
||||
namespace {
|
||||
@@ -3775,6 +3814,7 @@ void CreateViewStdCommands()
|
||||
|
||||
rcCmdMgr.addCommand(new StdCmdViewCreate());
|
||||
rcCmdMgr.addCommand(new StdViewScreenShot());
|
||||
rcCmdMgr.addCommand(new StdViewLoadImage());
|
||||
rcCmdMgr.addCommand(new StdMainFullscreen());
|
||||
rcCmdMgr.addCommand(new StdViewDockUndockFullscreen());
|
||||
rcCmdMgr.addCommand(new StdCmdSetAppearance());
|
||||
|
||||
218
src/Gui/FileHandler.cpp
Normal file
@@ -0,0 +1,218 @@
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2023 Werner Mayer <wmayer[at]users.sourceforge.net> *
|
||||
* *
|
||||
* This file is part of FreeCAD. *
|
||||
* *
|
||||
* FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
* under the terms of the GNU Lesser General Public License as *
|
||||
* published by the Free Software Foundation, either version 2.1 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* *
|
||||
* FreeCAD is distributed in the hope that it will be useful, but *
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with FreeCAD. If not, see *
|
||||
* <https://www.gnu.org/licenses/>. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
#ifndef _PreComp_
|
||||
# include <QFileInfo>
|
||||
# include <QImageReader>
|
||||
# include <QStringList>
|
||||
# include <Inventor/SoInput.h>
|
||||
#endif
|
||||
|
||||
#include "FileHandler.h"
|
||||
#include "Application.h"
|
||||
#include "BitmapFactory.h"
|
||||
#include "CommandT.h"
|
||||
#include "EditorView.h"
|
||||
#include "PythonEditor.h"
|
||||
#include "MainWindow.h"
|
||||
#include <App/Application.h>
|
||||
|
||||
using namespace Gui;
|
||||
|
||||
FileHandler::FileHandler(const QString& filename)
|
||||
: filename(filename)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool FileHandler::openFile()
|
||||
{
|
||||
docname.clear();
|
||||
return openInternal();
|
||||
}
|
||||
|
||||
bool FileHandler::importFile(const std::string& document)
|
||||
{
|
||||
docname = document;
|
||||
return openInternal();
|
||||
}
|
||||
|
||||
QString FileHandler::extension() const
|
||||
{
|
||||
QFileInfo fi;
|
||||
fi.setFile(filename);
|
||||
return fi.suffix().toLower();
|
||||
}
|
||||
|
||||
App::Document* FileHandler::getOrCreateDocument()
|
||||
{
|
||||
App::Document* doc = App::GetApplication().getActiveDocument();
|
||||
if (!doc) {
|
||||
doc = App::GetApplication().newDocument();
|
||||
}
|
||||
|
||||
return doc;
|
||||
}
|
||||
|
||||
App::Document* FileHandler::getOrCreateDocument(const std::string& document)
|
||||
{
|
||||
App::Document *doc = nullptr;
|
||||
if (!document.empty()) {
|
||||
doc = App::GetApplication().getDocument(document.c_str());
|
||||
}
|
||||
else {
|
||||
doc = App::GetApplication().getActiveDocument();
|
||||
}
|
||||
|
||||
if (!doc) {
|
||||
doc = App::GetApplication().newDocument(document.c_str());
|
||||
}
|
||||
|
||||
return doc;
|
||||
}
|
||||
|
||||
App::Document* FileHandler::createDocumentIfNeeded()
|
||||
{
|
||||
if (docname.empty()) {
|
||||
return getOrCreateDocument();
|
||||
}
|
||||
|
||||
return getOrCreateDocument(docname);
|
||||
}
|
||||
|
||||
bool FileHandler::activateEditor()
|
||||
{
|
||||
QList<EditorView*> views = getMainWindow()->findChildren<EditorView*>();
|
||||
for (const auto& it : views) {
|
||||
if (it->fileName() == filename) {
|
||||
it->setFocus();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool FileHandler::openInternal()
|
||||
{
|
||||
if (activateEditor()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
QFileInfo fi;
|
||||
fi.setFile(filename);
|
||||
QString ext = fi.suffix().toLower();
|
||||
|
||||
auto hasExtension = [ext](const QStringList& suffixes) {
|
||||
return suffixes.contains(ext);
|
||||
};
|
||||
|
||||
if (hasExtension(QStringList() << QLatin1String("iv"))) {
|
||||
openInventor();
|
||||
return true;
|
||||
}
|
||||
|
||||
if (hasExtension(QStringList() << QLatin1String("wrl")
|
||||
<< QLatin1String("wrz")
|
||||
<< QLatin1String("vrml"))) {
|
||||
openVRML();
|
||||
return true;
|
||||
}
|
||||
|
||||
if (hasExtension(QStringList() << QLatin1String("py")
|
||||
<< QLatin1String("fcmacro")
|
||||
<< QLatin1String("fcscript"))) {
|
||||
openPython();
|
||||
return true;
|
||||
}
|
||||
|
||||
QStringList supportedFormats;
|
||||
auto imageFormats = QImageReader::supportedImageFormats();
|
||||
std::transform(imageFormats.cbegin(), imageFormats.cend(),
|
||||
std::back_inserter(supportedFormats), [](const QByteArray& format) {
|
||||
return QString::fromLatin1(format);
|
||||
});
|
||||
|
||||
if (hasExtension(supportedFormats)) {
|
||||
openImage();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void FileHandler::openInventor()
|
||||
{
|
||||
App::Document* doc = createDocumentIfNeeded();
|
||||
|
||||
QFileInfo fi;
|
||||
fi.setFile(filename);
|
||||
|
||||
Gui::cmdAppDocumentArgs(doc, "addObject('%s', '%s')", "App::InventorObject", fi.baseName().toStdString());
|
||||
Gui::cmdAppDocumentArgs(doc, "ActiveObject.FileName = '%s'", fi.absoluteFilePath().toStdString());
|
||||
Gui::cmdAppDocumentArgs(doc, "ActiveObject.Label = '%s'", fi.baseName().toStdString());
|
||||
Gui::cmdAppDocument(doc, "recompute()");
|
||||
}
|
||||
|
||||
void FileHandler::openVRML()
|
||||
{
|
||||
App::Document* doc = createDocumentIfNeeded();
|
||||
|
||||
QFileInfo fi;
|
||||
fi.setFile(filename);
|
||||
|
||||
// Add this to the search path in order to read inline files (#0002029)
|
||||
QByteArray path = fi.absolutePath().toUtf8();
|
||||
SoInput::addDirectoryFirst(path.constData());
|
||||
|
||||
Gui::cmdAppDocumentArgs(doc, "addObject('%s', '%s')", "App::VRMLObject", fi.baseName().toStdString());
|
||||
Gui::cmdAppDocumentArgs(doc, "ActiveObject.VrmlFile = '%s'", fi.absoluteFilePath().toStdString());
|
||||
Gui::cmdAppDocumentArgs(doc, "ActiveObject.Label = '%s'", fi.baseName().toStdString());
|
||||
Gui::cmdAppDocument(doc, "recompute()");
|
||||
|
||||
SoInput::removeDirectory(path.constData());
|
||||
}
|
||||
|
||||
void FileHandler::openImage()
|
||||
{
|
||||
App::Document* doc = createDocumentIfNeeded();
|
||||
|
||||
QFileInfo fi;
|
||||
fi.setFile(filename);
|
||||
|
||||
Gui::cmdAppDocumentArgs(doc, "addObject('%s', '%s')", "App::ImagePlane", fi.baseName().toStdString());
|
||||
Gui::cmdAppDocumentArgs(doc, "ActiveObject.ImageFile = '%s'", fi.absoluteFilePath().toStdString());
|
||||
Gui::cmdAppDocumentArgs(doc, "ActiveObject.Label = '%s'", fi.baseName().toStdString());
|
||||
Gui::cmdAppDocument(doc, "recompute()");
|
||||
}
|
||||
|
||||
void FileHandler::openPython()
|
||||
{
|
||||
auto editor = new PythonEditor();
|
||||
editor->setWindowIcon(Gui::BitmapFactory().iconFromTheme("applications-python"));
|
||||
auto edit = new PythonEditorView(editor, getMainWindow());
|
||||
edit->open(filename);
|
||||
edit->resize(400, 300);
|
||||
getMainWindow()->addWindow( edit );
|
||||
}
|
||||
62
src/Gui/FileHandler.h
Normal file
@@ -0,0 +1,62 @@
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2023 Werner Mayer <wmayer[at]users.sourceforge.net> *
|
||||
* *
|
||||
* This file is part of FreeCAD. *
|
||||
* *
|
||||
* FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
* under the terms of the GNU Lesser General Public License as *
|
||||
* published by the Free Software Foundation, either version 2.1 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* *
|
||||
* FreeCAD is distributed in the hope that it will be useful, but *
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with FreeCAD. If not, see *
|
||||
* <https://www.gnu.org/licenses/>. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef GUI_FILE_HANDLER_H
|
||||
#define GUI_FILE_HANDLER_H
|
||||
|
||||
#include <QString>
|
||||
#include <string>
|
||||
|
||||
namespace App {
|
||||
class Document;
|
||||
}
|
||||
|
||||
namespace Gui {
|
||||
|
||||
class FileHandler
|
||||
{
|
||||
public:
|
||||
explicit FileHandler(const QString& filename);
|
||||
bool openFile();
|
||||
bool importFile(const std::string& document);
|
||||
QString extension() const;
|
||||
|
||||
private:
|
||||
bool activateEditor();
|
||||
App::Document* createDocumentIfNeeded();
|
||||
App::Document* getOrCreateDocument();
|
||||
App::Document* getOrCreateDocument(const std::string& document);
|
||||
bool openInternal();
|
||||
void openInventor();
|
||||
void openVRML();
|
||||
void openImage();
|
||||
void openPython();
|
||||
|
||||
private:
|
||||
QString filename;
|
||||
std::string docname;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif //GUI_FILE_HANDLER_H
|
||||
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
@@ -2,20 +2,20 @@
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="64px"
|
||||
height="64px"
|
||||
id="svg3612"
|
||||
version="1.1"
|
||||
inkscape:version="0.92.0 r15299"
|
||||
sodipodi:docname="Image_Load_to_Plane_3.svg">
|
||||
inkscape:version="1.1.2 (0a00cf5339, 2022-02-04)"
|
||||
sodipodi:docname="Image_CreateImagePlane.svg"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<defs
|
||||
id="defs3614">
|
||||
<inkscape:perspective
|
||||
@@ -339,16 +339,6 @@
|
||||
offset="1"
|
||||
id="stop3899" />
|
||||
</linearGradient>
|
||||
<linearGradient
|
||||
gradientTransform="translate(-27,-6)"
|
||||
y2="44"
|
||||
x2="48"
|
||||
y1="22"
|
||||
x1="43"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="linearGradient3023"
|
||||
xlink:href="#linearGradient3895"
|
||||
inkscape:collect="always" />
|
||||
<linearGradient
|
||||
inkscape:collect="always"
|
||||
xlink:href="#linearGradient5048"
|
||||
@@ -411,18 +401,19 @@
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:zoom="4.84375"
|
||||
inkscape:cx="27.348761"
|
||||
inkscape:cy="15.173265"
|
||||
inkscape:cx="27.354839"
|
||||
inkscape:cy="15.070968"
|
||||
inkscape:current-layer="layer1"
|
||||
showgrid="true"
|
||||
inkscape:document-units="px"
|
||||
inkscape:grid-bbox="true"
|
||||
inkscape:window-width="1536"
|
||||
inkscape:window-height="801"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-width="2560"
|
||||
inkscape:window-height="1330"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="25"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:snap-bbox="true">
|
||||
inkscape:snap-bbox="true"
|
||||
inkscape:pagecheckerboard="0">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid3071"
|
||||
@@ -517,29 +508,6 @@
|
||||
inkscape:connector-curvature="0"
|
||||
inkscape:export-xdpi="104.58349"
|
||||
inkscape:export-ydpi="104.58349" />
|
||||
<g
|
||||
id="g4566"
|
||||
inkscape:export-xdpi="104.58349"
|
||||
inkscape:export-ydpi="104.58349">
|
||||
<path
|
||||
inkscape:export-ydpi="109.17643"
|
||||
inkscape:export-xdpi="109.17643"
|
||||
inkscape:export-filename="/home/yorik/Documents/Lab/Draft/icons/changeprop.png"
|
||||
sodipodi:nodetypes="cccccccc"
|
||||
id="path3343"
|
||||
d="M 20,9 V 19 H 3 V 33 H 20 V 43 L 38,26 Z"
|
||||
style="fill:url(#linearGradient3023);fill-opacity:1;fill-rule:evenodd;stroke:#0b1521;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
inkscape:export-ydpi="109.17643"
|
||||
inkscape:export-xdpi="109.17643"
|
||||
inkscape:export-filename="/home/yorik/Documents/Lab/Draft/icons/changeprop.png"
|
||||
sodipodi:nodetypes="cccccccc"
|
||||
id="path3343-2"
|
||||
d="M 22.006611,13.642998 22,21 H 5 V 31 H 22 L 21.9934,38.357002 35,26 Z"
|
||||
style="fill:none;stroke:#729fcf;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
<metadata
|
||||
id="metadata4251">
|
||||
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
@@ -256,6 +256,9 @@
|
||||
<file>Std_UserEditModeCutting.svg</file>
|
||||
<file>Std_UserEditModeColor.svg</file>
|
||||
<file>Warning.svg</file>
|
||||
<file>image-open.svg</file>
|
||||
<file>image-plane.svg</file>
|
||||
<file>image-scaling.svg</file>
|
||||
</qresource>
|
||||
<!-- Demonstrating support for an embedded icon theme -->
|
||||
<!-- See also http://permalink.gmane.org/gmane.comp.lib.qt.general/26374 -->
|
||||
|
||||
377
src/Gui/ImageView.cpp
Normal file
@@ -0,0 +1,377 @@
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2023 Werner Mayer <wmayer[at]users.sourceforge.net> *
|
||||
* *
|
||||
* This file is part of FreeCAD. *
|
||||
* *
|
||||
* FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
* under the terms of the GNU Lesser General Public License as *
|
||||
* published by the Free Software Foundation, either version 2.1 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* *
|
||||
* FreeCAD is distributed in the hope that it will be useful, but *
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with FreeCAD. If not, see *
|
||||
* <https://www.gnu.org/licenses/>. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
#ifndef _PreComp_
|
||||
# include <QAction>
|
||||
# include <QApplication>
|
||||
# include <QContextMenuEvent>
|
||||
# include <QClipboard>
|
||||
# include <QCursor>
|
||||
# include <QFileInfo>
|
||||
# include <QImageReader>
|
||||
# include <QLabel>
|
||||
# include <QMenu>
|
||||
# include <QMessageBox>
|
||||
# include <QMimeData>
|
||||
# include <QPainter>
|
||||
# include <QPixmap>
|
||||
# include <QPrintDialog>
|
||||
# include <QPrinter>
|
||||
# include <QScrollArea>
|
||||
# include <QScrollBar>
|
||||
#endif
|
||||
|
||||
#include "ImageView.h"
|
||||
#include "BitmapFactory.h"
|
||||
|
||||
using namespace Gui;
|
||||
|
||||
ImageView::ImageView(QWidget* parent)
|
||||
: MDIView(nullptr, parent)
|
||||
, imageLabel(new QLabel)
|
||||
, scrollArea(new QScrollArea)
|
||||
, scaleFactor{1.0}
|
||||
, dragging{false}
|
||||
{
|
||||
imageLabel->setBackgroundRole(QPalette::Base);
|
||||
imageLabel->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
|
||||
imageLabel->setScaledContents(true);
|
||||
|
||||
scrollArea->setBackgroundRole(QPalette::Dark);
|
||||
scrollArea->setWidget(imageLabel);
|
||||
scrollArea->setVisible(false);
|
||||
setCentralWidget(scrollArea);
|
||||
setAcceptDrops(true);
|
||||
setWindowIcon(Gui::BitmapFactory().pixmap("colors"));
|
||||
}
|
||||
|
||||
bool ImageView::loadFile(const QString& fileName)
|
||||
{
|
||||
QImageReader reader(fileName);
|
||||
reader.setAutoTransform(true);
|
||||
QImage image = reader.read();
|
||||
if (image.isNull()) {
|
||||
QMessageBox::information(this, tr("Failed to load image file"),
|
||||
tr("Cannot load file %1: %2")
|
||||
.arg(fileName, reader.errorString()));
|
||||
return false;
|
||||
}
|
||||
|
||||
setImage(image);
|
||||
setWindowFilePath(fileName);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void ImageView::setImage(const QImage& image)
|
||||
{
|
||||
rawImage = image;
|
||||
imageLabel->setPixmap(QPixmap::fromImage(image));
|
||||
imageLabel->adjustSize();
|
||||
scrollArea->setVisible(true);
|
||||
scaleFactor = 1.0;
|
||||
}
|
||||
|
||||
void ImageView::scaleImage(double factor)
|
||||
{
|
||||
scaleFactor *= factor;
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5,15,0)
|
||||
imageLabel->resize(scaleFactor * imageLabel->pixmap(Qt::ReturnByValue).size());
|
||||
#else
|
||||
imageLabel->resize(scaleFactor * imageLabel->pixmap()->size());
|
||||
#endif
|
||||
|
||||
adjustScrollBar(scrollArea->horizontalScrollBar(), factor);
|
||||
adjustScrollBar(scrollArea->verticalScrollBar(), factor);
|
||||
}
|
||||
|
||||
void ImageView::adjustScrollBar(QScrollBar *scrollBar, double factor)
|
||||
{
|
||||
scrollBar->setValue(int(factor * scrollBar->value()
|
||||
+ ((factor - 1) * scrollBar->pageStep()/2)));
|
||||
}
|
||||
|
||||
bool ImageView::canZoomIn() const
|
||||
{
|
||||
int maxWidth{10000};
|
||||
return !isFitToWindow() && imageLabel->width() < maxWidth;
|
||||
}
|
||||
|
||||
bool ImageView::canZoomOut() const
|
||||
{
|
||||
int minWidth{200};
|
||||
return !isFitToWindow() && imageLabel->width() > minWidth;
|
||||
}
|
||||
|
||||
void ImageView::zoomIn()
|
||||
{
|
||||
double scale{1.25};
|
||||
scaleImage(scale);
|
||||
}
|
||||
|
||||
void ImageView::zoomOut()
|
||||
{
|
||||
double scale{0.8};
|
||||
scaleImage(scale);
|
||||
}
|
||||
|
||||
void ImageView::normalSize()
|
||||
{
|
||||
imageLabel->adjustSize();
|
||||
scaleFactor = 1.0;
|
||||
}
|
||||
|
||||
void ImageView::fitToWindow(bool fitView)
|
||||
{
|
||||
scrollArea->setWidgetResizable(fitView);
|
||||
if (!fitView) {
|
||||
normalSize();
|
||||
}
|
||||
}
|
||||
|
||||
bool ImageView::isFitToWindow() const
|
||||
{
|
||||
return scrollArea->widgetResizable();
|
||||
}
|
||||
|
||||
bool ImageView::canDrag() const
|
||||
{
|
||||
return scrollArea->verticalScrollBar()->isVisible() ||
|
||||
scrollArea->horizontalScrollBar()->isVisible();
|
||||
}
|
||||
|
||||
void ImageView::startDrag()
|
||||
{
|
||||
dragging = true;
|
||||
}
|
||||
|
||||
void ImageView::stopDrag()
|
||||
{
|
||||
dragging = false;
|
||||
}
|
||||
|
||||
bool ImageView::isDragging() const
|
||||
{
|
||||
return dragging;
|
||||
}
|
||||
|
||||
void ImageView::contextMenuEvent(QContextMenuEvent* event)
|
||||
{
|
||||
QMenu menu;
|
||||
QAction* fitToWindowAct = menu.addAction(tr("Fit to window"));
|
||||
fitToWindowAct->setCheckable(true);
|
||||
fitToWindowAct->setChecked(isFitToWindow());
|
||||
connect(fitToWindowAct, &QAction::toggled, this, &ImageView::fitToWindow);
|
||||
|
||||
QAction* zoomInAct = menu.addAction(tr("Zoom in"), this, &ImageView::zoomIn);
|
||||
zoomInAct->setEnabled(canZoomIn());
|
||||
|
||||
QAction* zoomOutAct = menu.addAction(tr("Zoom out"), this, &ImageView::zoomOut);
|
||||
zoomOutAct->setEnabled(canZoomOut());
|
||||
|
||||
menu.exec(event->globalPos());
|
||||
}
|
||||
|
||||
void ImageView::mousePressEvent(QMouseEvent* event)
|
||||
{
|
||||
if (event->buttons().testFlag(Qt::MiddleButton)) {
|
||||
if (canDrag()) {
|
||||
setCursor(QCursor(Qt::ClosedHandCursor));
|
||||
startDrag();
|
||||
dragPos = event->pos();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ImageView::mouseReleaseEvent(QMouseEvent* event)
|
||||
{
|
||||
if (!event->buttons().testFlag(Qt::MiddleButton)) {
|
||||
if (isDragging()) {
|
||||
stopDrag();
|
||||
unsetCursor();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ImageView::mouseMoveEvent(QMouseEvent* event)
|
||||
{
|
||||
if (isDragging()) {
|
||||
QScrollBar* hBar = scrollArea->horizontalScrollBar();
|
||||
QScrollBar* vBar = scrollArea->verticalScrollBar();
|
||||
QPoint delta = event->pos() - dragPos;
|
||||
hBar->setValue(hBar->value() + (isRightToLeft() ? delta.x() : -delta.x()));
|
||||
vBar->setValue(vBar->value() - delta.y());
|
||||
dragPos = event->pos();
|
||||
}
|
||||
}
|
||||
|
||||
void ImageView::dropEvent(QDropEvent* event)
|
||||
{
|
||||
const QMimeData* data = event->mimeData();
|
||||
if (data->hasUrls()) {
|
||||
loadImageFromUrl(data->urls());
|
||||
}
|
||||
else {
|
||||
MDIView::dropEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
void ImageView::dragEnterEvent(QDragEnterEvent* event)
|
||||
{
|
||||
const QMimeData* data = event->mimeData();
|
||||
if (data->hasUrls()) {
|
||||
event->accept();
|
||||
}
|
||||
else {
|
||||
event->ignore();
|
||||
}
|
||||
}
|
||||
|
||||
bool ImageView::isImageFormat(const QFileInfo& fileInfo)
|
||||
{
|
||||
QString ext = fileInfo.suffix().toLower();
|
||||
QByteArray suffix = ext.toLatin1();
|
||||
QList<QByteArray> supportedFormats = QImageReader::supportedImageFormats();
|
||||
auto it = std::find_if(supportedFormats.begin(), supportedFormats.end(), [suffix](const QByteArray& image) {
|
||||
return (image == suffix);
|
||||
});
|
||||
|
||||
return (it != supportedFormats.end());
|
||||
}
|
||||
|
||||
void ImageView::loadImageFromUrl(const QList<QUrl>& urls)
|
||||
{
|
||||
if (urls.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
const QUrl& url = urls.first();
|
||||
const QFileInfo info(url.toLocalFile());
|
||||
if (info.exists() && info.isFile()) {
|
||||
if (isImageFormat(info)) {
|
||||
loadFile(info.absoluteFilePath());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ImageView::pasteImage()
|
||||
{
|
||||
QImage image = imageFromClipboard();
|
||||
if (!image.isNull()) {
|
||||
setImage(image);
|
||||
}
|
||||
}
|
||||
|
||||
bool ImageView::canPasteImage() const
|
||||
{
|
||||
return !imageFromClipboard().isNull();
|
||||
}
|
||||
|
||||
QImage ImageView::imageFromClipboard()
|
||||
{
|
||||
QImage image;
|
||||
if (const QMimeData *mimeData = QApplication::clipboard()->mimeData()) {
|
||||
if (mimeData->hasImage()) {
|
||||
image = qvariant_cast<QImage>(mimeData->imageData());
|
||||
}
|
||||
}
|
||||
|
||||
return image;
|
||||
}
|
||||
|
||||
void ImageView::print(QPrinter* printer)
|
||||
{
|
||||
QPainter painter(printer);
|
||||
QPixmap pixmap = QPixmap::fromImage(rawImage);
|
||||
QRect rect = painter.viewport();
|
||||
QSize size = pixmap.size();
|
||||
size.scale(rect.size(), Qt::KeepAspectRatio);
|
||||
painter.setViewport(rect.x(), rect.y(), size.width(), size.height());
|
||||
painter.setWindow(pixmap.rect());
|
||||
painter.drawPixmap(0, 0, pixmap);
|
||||
}
|
||||
|
||||
bool ImageView::onMsg(const char* pMsg,const char** ppReturn)
|
||||
{
|
||||
Q_UNUSED(ppReturn)
|
||||
if (strcmp("ViewFit", pMsg) == 0) {
|
||||
fitToWindow(true);
|
||||
return true;
|
||||
}
|
||||
if (strcmp("ZoomIn", pMsg) == 0) {
|
||||
zoomIn();
|
||||
return true;
|
||||
}
|
||||
if (strcmp("ZoomOut", pMsg) == 0) {
|
||||
zoomOut();
|
||||
return true;
|
||||
}
|
||||
if (strcmp("Paste", pMsg) == 0) {
|
||||
pasteImage();
|
||||
return true;
|
||||
}
|
||||
if (strcmp("Print", pMsg) == 0) {
|
||||
print();
|
||||
return true;
|
||||
}
|
||||
if (strcmp("PrintPreview", pMsg) == 0) {
|
||||
printPreview();
|
||||
return true;
|
||||
}
|
||||
if (strcmp("PrintPdf", pMsg) == 0) {
|
||||
printPdf();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool ImageView::onHasMsg(const char* pMsg) const
|
||||
{
|
||||
if (strcmp("ViewFit", pMsg) == 0) {
|
||||
return true;
|
||||
}
|
||||
if (strcmp("ZoomIn", pMsg) == 0) {
|
||||
return canZoomIn();
|
||||
}
|
||||
if (strcmp("ZoomOut", pMsg) == 0) {
|
||||
return canZoomOut();
|
||||
}
|
||||
if (strcmp("Paste", pMsg) == 0) {
|
||||
return canPasteImage();
|
||||
}
|
||||
if (strcmp("Print", pMsg) == 0) {
|
||||
return true;
|
||||
}
|
||||
if (strcmp("PrintPreview", pMsg) == 0) {
|
||||
return true;
|
||||
}
|
||||
if (strcmp("PrintPdf", pMsg) == 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
#include "moc_ImageView.cpp"
|
||||
100
src/Gui/ImageView.h
Normal file
@@ -0,0 +1,100 @@
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2023 Werner Mayer <wmayer[at]users.sourceforge.net> *
|
||||
* *
|
||||
* This file is part of FreeCAD. *
|
||||
* *
|
||||
* FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
* under the terms of the GNU Lesser General Public License as *
|
||||
* published by the Free Software Foundation, either version 2.1 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* *
|
||||
* FreeCAD is distributed in the hope that it will be useful, but *
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with FreeCAD. If not, see *
|
||||
* <https://www.gnu.org/licenses/>. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef GUI_IMAGE_VIEW_H
|
||||
#define GUI_IMAGE_VIEW_H
|
||||
|
||||
#include <Gui/MDIView.h>
|
||||
|
||||
class QFileInfo;
|
||||
class QLabel;
|
||||
class QScrollArea;
|
||||
class QScrollBar;
|
||||
class QUrl;
|
||||
|
||||
namespace Gui {
|
||||
|
||||
class GuiExport ImageView : public MDIView
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit ImageView(QWidget* parent);
|
||||
bool loadFile(const QString &);
|
||||
|
||||
const char *getName() const override {
|
||||
return "ImageView";
|
||||
}
|
||||
|
||||
/// Message handler
|
||||
bool onMsg(const char* pMsg, const char** ppReturn) override;
|
||||
/// Message handler test
|
||||
bool onHasMsg(const char* pMsg) const override;
|
||||
|
||||
/** @name Printing */
|
||||
//@{
|
||||
using MDIView::print;
|
||||
void print(QPrinter* printer) override;
|
||||
//@}
|
||||
|
||||
protected:
|
||||
void contextMenuEvent(QContextMenuEvent* event) override;
|
||||
void mousePressEvent(QMouseEvent* event) override;
|
||||
void mouseReleaseEvent(QMouseEvent* event) override;
|
||||
void mouseMoveEvent(QMouseEvent* event) override;
|
||||
void dropEvent(QDropEvent* event) override;
|
||||
void dragEnterEvent(QDragEnterEvent* event) override;
|
||||
|
||||
private:
|
||||
void setImage(const QImage& image);
|
||||
void scaleImage(double factor);
|
||||
static void adjustScrollBar(QScrollBar *scrollBar, double factor);
|
||||
bool canZoomIn() const;
|
||||
bool canZoomOut() const;
|
||||
void zoomIn();
|
||||
void zoomOut();
|
||||
void normalSize();
|
||||
void fitToWindow(bool fitView);
|
||||
bool isFitToWindow() const;
|
||||
bool canDrag() const;
|
||||
void startDrag();
|
||||
void stopDrag();
|
||||
bool isDragging() const;
|
||||
void pasteImage();
|
||||
bool canPasteImage() const;
|
||||
static QImage imageFromClipboard();
|
||||
static bool isImageFormat(const QFileInfo&);
|
||||
void loadImageFromUrl(const QList<QUrl>&);
|
||||
|
||||
private:
|
||||
QImage rawImage;
|
||||
QLabel *imageLabel;
|
||||
QScrollArea *scrollArea;
|
||||
double scaleFactor;
|
||||
bool dragging;
|
||||
QPoint dragPos;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif //GUI_IMAGE_VIEW_H
|
||||
@@ -224,6 +224,7 @@
|
||||
#include <Inventor/nodes/SoText2.h>
|
||||
#include <Inventor/nodes/SoTexture2.h>
|
||||
#include <Inventor/nodes/SoTexture3.h>
|
||||
#include <Inventor/nodes/SoTextureCoordinate2.h>
|
||||
#include <Inventor/nodes/SoTextureCoordinate3.h>
|
||||
#include <Inventor/nodes/SoTransform.h>
|
||||
#include <Inventor/nodes/SoTransformation.h>
|
||||
|
||||
@@ -272,7 +272,13 @@ void MDIView::printPreview()
|
||||
void MDIView::savePrinterSettings(QPrinter* printer)
|
||||
{
|
||||
auto hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Printer");
|
||||
hGrp = hGrp->GetGroup(printer->printerName().toUtf8());
|
||||
QString printerName = printer->printerName();
|
||||
if (printerName.isEmpty()) {
|
||||
// no printer defined
|
||||
return;
|
||||
}
|
||||
|
||||
hGrp = hGrp->GetGroup(printerName.toUtf8());
|
||||
|
||||
hGrp->SetInt("DefaultPageSize", printer->pageLayout().pageSize().id());
|
||||
hGrp->SetInt("DefaultPageOrientation", static_cast<int>(printer->pageLayout().orientation()));
|
||||
@@ -282,7 +288,13 @@ void MDIView::savePrinterSettings(QPrinter* printer)
|
||||
void MDIView::restorePrinterSettings(QPrinter* printer)
|
||||
{
|
||||
auto hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Printer");
|
||||
hGrp = hGrp->GetGroup(printer->printerName().toUtf8());
|
||||
QString printerName = printer->printerName();
|
||||
if (printerName.isEmpty()) {
|
||||
// no printer defined
|
||||
return;
|
||||
}
|
||||
|
||||
hGrp = hGrp->GetGroup(printerName.toUtf8());
|
||||
|
||||
QPrinterInfo info = QPrinterInfo::defaultPrinter();
|
||||
int initialDefaultPageSize = info.isNull() ? QPageSize::A4 : info.defaultPageSize().id();
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
#include <zipios++/gzipoutputstream.h>
|
||||
|
||||
#include "SoFCDB.h"
|
||||
#include "Camera.h"
|
||||
#include "Flag.h"
|
||||
#include "GestureNavigationStyle.h"
|
||||
#include "NavigationStyle.h"
|
||||
@@ -68,7 +69,6 @@
|
||||
#include "SoMouseWheelEvent.h"
|
||||
#include "SoNavigationDragger.h"
|
||||
#include "SoTextLabel.h"
|
||||
#include "View3DPy.h"
|
||||
#include "Inventor/MarkerBitmaps.h"
|
||||
#include "Inventor/SmSwitchboard.h"
|
||||
#include "Inventor/SoAutoZoomTranslation.h"
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
|
||||
#include "SplitView3DInventor.h"
|
||||
#include "Application.h"
|
||||
#include "Camera.h"
|
||||
#include "Document.h"
|
||||
#include "NavigationStyle.h"
|
||||
#include "SoFCSelectionAction.h"
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#endif
|
||||
|
||||
#include "TaskDialog.h"
|
||||
#include "TaskView.h"
|
||||
|
||||
using namespace Gui::TaskView;
|
||||
|
||||
@@ -55,6 +56,14 @@ TaskDialog::~TaskDialog()
|
||||
|
||||
//==== Slots ===============================================================
|
||||
|
||||
void TaskDialog::addTaskBox(QWidget* widget)
|
||||
{
|
||||
Gui::TaskView::TaskBox* taskbox = new Gui::TaskView::TaskBox(
|
||||
QPixmap(), widget->windowTitle(), true, nullptr);
|
||||
taskbox->groupLayout()->addWidget(widget);
|
||||
Content.push_back(taskbox);
|
||||
}
|
||||
|
||||
const std::vector<QWidget*> &TaskDialog::getDialogContent() const
|
||||
{
|
||||
return Content;
|
||||
|
||||
@@ -57,6 +57,8 @@ public:
|
||||
TaskDialog();
|
||||
~TaskDialog() override;
|
||||
|
||||
void addTaskBox(QWidget*);
|
||||
|
||||
void setButtonPosition(ButtonPosition p)
|
||||
{ pos = p; }
|
||||
ButtonPosition buttonPosition() const
|
||||
|
||||
88
src/Gui/TaskView/TaskImageScale.cpp
Normal file
@@ -0,0 +1,88 @@
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2023 Werner Mayer <wmayer[at]users.sourceforge.net> *
|
||||
* *
|
||||
* This file is part of FreeCAD. *
|
||||
* *
|
||||
* FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
* under the terms of the GNU Lesser General Public License as *
|
||||
* published by the Free Software Foundation, either version 2.1 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* *
|
||||
* FreeCAD is distributed in the hope that it will be useful, but *
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with FreeCAD. If not, see *
|
||||
* <https://www.gnu.org/licenses/>. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
#ifndef _PreComp_
|
||||
# include <QDialog>
|
||||
# include <map>
|
||||
#endif
|
||||
|
||||
#include <Base/Tools.h>
|
||||
#include <App/Document.h>
|
||||
#include <Gui/BitmapFactory.h>
|
||||
#include <Gui/Camera.h>
|
||||
#include <Gui/TaskView/TaskView.h>
|
||||
|
||||
#include "TaskImageScale.h"
|
||||
#include "ui_TaskImageScale.h"
|
||||
|
||||
|
||||
using namespace Gui;
|
||||
|
||||
TaskImageScale::TaskImageScale(App::ImagePlane* obj, QWidget* parent)
|
||||
: QWidget(parent)
|
||||
, ui(new Ui_TaskImageScale)
|
||||
, feature(obj)
|
||||
, aspectRatio{1.0}
|
||||
{
|
||||
ui->setupUi(this);
|
||||
ui->spinBoxWidth->setValue(obj->getXSizeInPixel());
|
||||
ui->spinBoxHeight->setValue(obj->getYSizeInPixel());
|
||||
|
||||
aspectRatio = obj->XSize.getValue() / obj->YSize.getValue();
|
||||
|
||||
connect(ui->spinBoxWidth, qOverload<int>(&QSpinBox::valueChanged), this, &TaskImageScale::changeWidth);
|
||||
connect(ui->spinBoxHeight, qOverload<int>(&QSpinBox::valueChanged), this, &TaskImageScale::changeHeight);
|
||||
}
|
||||
|
||||
TaskImageScale::~TaskImageScale()
|
||||
{
|
||||
}
|
||||
|
||||
void TaskImageScale::changeWidth()
|
||||
{
|
||||
if (!feature.expired()) {
|
||||
int value = ui->spinBoxWidth->value();
|
||||
feature->setXSizeInPixel(value);
|
||||
|
||||
if (ui->checkBoxRatio->isChecked()) {
|
||||
QSignalBlocker block(ui->spinBoxWidth);
|
||||
ui->spinBoxHeight->setValue(int(double(value) / aspectRatio));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void TaskImageScale::changeHeight()
|
||||
{
|
||||
if (!feature.expired()) {
|
||||
int value = ui->spinBoxHeight->value();
|
||||
feature->setYSizeInPixel(value);
|
||||
|
||||
if (ui->checkBoxRatio->isChecked()) {
|
||||
QSignalBlocker block(ui->spinBoxHeight);
|
||||
ui->spinBoxWidth->setValue(int(double(value) * aspectRatio));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#include "moc_TaskImageScale.cpp"
|
||||
55
src/Gui/TaskView/TaskImageScale.h
Normal file
@@ -0,0 +1,55 @@
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2023 Werner Mayer <wmayer[at]users.sourceforge.net> *
|
||||
* *
|
||||
* This file is part of FreeCAD. *
|
||||
* *
|
||||
* FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
* under the terms of the GNU Lesser General Public License as *
|
||||
* published by the Free Software Foundation, either version 2.1 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* *
|
||||
* FreeCAD is distributed in the hope that it will be useful, but *
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with FreeCAD. If not, see *
|
||||
* <https://www.gnu.org/licenses/>. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef GUI_TASKIMAGESCALE_H
|
||||
#define GUI_TASKIMAGESCALE_H
|
||||
|
||||
#include <Gui/TaskView/TaskDialog.h>
|
||||
#include <App/DocumentObserver.h>
|
||||
#include <App/ImagePlane.h>
|
||||
#include <memory>
|
||||
|
||||
namespace Gui {
|
||||
|
||||
class Ui_TaskImageScale;
|
||||
class TaskImageScale : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit TaskImageScale(App::ImagePlane* obj, QWidget* parent = nullptr);
|
||||
~TaskImageScale() override;
|
||||
|
||||
private:
|
||||
void changeWidth();
|
||||
void changeHeight();
|
||||
|
||||
private:
|
||||
std::unique_ptr<Ui_TaskImageScale> ui;
|
||||
App::WeakPtrT<App::ImagePlane> feature;
|
||||
double aspectRatio;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // GUI_TASKIMAGESCALE_H
|
||||
97
src/Gui/TaskView/TaskImageScale.ui
Normal file
@@ -0,0 +1,97 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>Gui::TaskImageScale</class>
|
||||
<widget class="QWidget" name="Gui::TaskImageScale">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>277</width>
|
||||
<height>178</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Scale image</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_3">
|
||||
<item row="0" column="0">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Image size</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<item row="0" column="0">
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Width:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QSpinBox" name="spinBoxWidth">
|
||||
<property name="suffix">
|
||||
<string notr="true"> px</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100000000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Height:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QSpinBox" name="spinBoxHeight">
|
||||
<property name="suffix">
|
||||
<string notr="true"> px</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>100000000</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QCheckBox" name="checkBoxRatio">
|
||||
<property name="text">
|
||||
<string>Keep aspect ratio</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>18</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
229
src/Gui/TaskView/TaskOrientation.cpp
Normal file
@@ -0,0 +1,229 @@
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2023 Werner Mayer <wmayer[at]users.sourceforge.net> *
|
||||
* *
|
||||
* This file is part of FreeCAD. *
|
||||
* *
|
||||
* FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
* under the terms of the GNU Lesser General Public License as *
|
||||
* published by the Free Software Foundation, either version 2.1 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* *
|
||||
* FreeCAD is distributed in the hope that it will be useful, but *
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with FreeCAD. If not, see *
|
||||
* <https://www.gnu.org/licenses/>. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
#ifndef _PreComp_
|
||||
# include <QDialog>
|
||||
# include <map>
|
||||
#endif
|
||||
|
||||
#include <Base/Tools.h>
|
||||
#include <App/Document.h>
|
||||
#include <Gui/BitmapFactory.h>
|
||||
#include <Gui/Camera.h>
|
||||
#include <Gui/TaskView/TaskView.h>
|
||||
|
||||
#include "TaskOrientation.h"
|
||||
#include "ui_TaskOrientation.h"
|
||||
|
||||
|
||||
using namespace Gui;
|
||||
|
||||
TaskOrientation::TaskOrientation(App::GeoFeature* obj, QWidget* parent)
|
||||
: QWidget(parent)
|
||||
, ui(new Ui_TaskOrientation)
|
||||
, feature(obj)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
connect(ui->Reverse_checkBox, &QCheckBox::clicked, this, &TaskOrientation::onPreview);
|
||||
connect(ui->XY_radioButton , &QRadioButton::clicked, this, &TaskOrientation::onPreview);
|
||||
connect(ui->XZ_radioButton , &QRadioButton::clicked, this, &TaskOrientation::onPreview);
|
||||
connect(ui->YZ_radioButton , &QRadioButton::clicked, this, &TaskOrientation::onPreview);
|
||||
connect(ui->Offset_doubleSpinBox, qOverload<double>(&QuantitySpinBox::valueChanged),
|
||||
this, &TaskOrientation::onPreview);
|
||||
}
|
||||
|
||||
TaskOrientation::~TaskOrientation()
|
||||
{
|
||||
}
|
||||
|
||||
void TaskOrientation::open()
|
||||
{
|
||||
if (!feature.expired()) {
|
||||
App::Document* doc = feature->getDocument();
|
||||
doc->openTransaction(QT_TRANSLATE_NOOP("Command", "Change orientation"));
|
||||
restore(feature->Placement.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
void TaskOrientation::accept()
|
||||
{
|
||||
if (!feature.expired()) {
|
||||
App::Document* doc = feature->getDocument();
|
||||
doc->commitTransaction();
|
||||
doc->recompute();
|
||||
}
|
||||
}
|
||||
|
||||
void TaskOrientation::reject()
|
||||
{
|
||||
if (!feature.expired()) {
|
||||
App::Document* doc = feature->getDocument();
|
||||
doc->abortTransaction();
|
||||
feature->purgeTouched();
|
||||
}
|
||||
}
|
||||
|
||||
void TaskOrientation::onPreview()
|
||||
{
|
||||
updateIcon();
|
||||
updatePlacement();
|
||||
}
|
||||
|
||||
void TaskOrientation::restore(const Base::Placement& plm)
|
||||
{
|
||||
auto isReversed = [](Camera::Orientation type) {
|
||||
return (type == Camera::Bottom) ||
|
||||
(type == Camera::Rear) ||
|
||||
(type == Camera::Left);
|
||||
};
|
||||
std::map<Camera::Orientation, Base::Rotation> rotations {
|
||||
{Camera::Top, Camera::convert(Camera::Top)},
|
||||
{Camera::Bottom, Camera::convert(Camera::Bottom)},
|
||||
{Camera::Front, Camera::convert(Camera::Front)},
|
||||
{Camera::Rear, Camera::convert(Camera::Rear)},
|
||||
{Camera::Right, Camera::convert(Camera::Right)},
|
||||
{Camera::Left, Camera::convert(Camera::Left)}
|
||||
};
|
||||
|
||||
Base::Rotation rot = plm.getRotation();
|
||||
Base::Vector3d pos = plm.getPosition();
|
||||
|
||||
double prec = 1.0e-5;
|
||||
for (const auto& it : rotations) {
|
||||
if (rot.isSame(it.second, prec)) {
|
||||
if (it.first == Camera::Top ||
|
||||
it.first == Camera::Bottom) {
|
||||
ui->XY_radioButton->setChecked(true);
|
||||
ui->Offset_doubleSpinBox->setValue(pos.z);
|
||||
}
|
||||
else if (it.first == Camera::Front ||
|
||||
it.first == Camera::Rear) {
|
||||
ui->XZ_radioButton->setChecked(true);
|
||||
ui->Offset_doubleSpinBox->setValue(pos.y);
|
||||
}
|
||||
else if (it.first == Camera::Right ||
|
||||
it.first == Camera::Left) {
|
||||
ui->YZ_radioButton->setChecked(true);
|
||||
ui->Offset_doubleSpinBox->setValue(pos.x);
|
||||
}
|
||||
|
||||
if (isReversed(it.first)) {
|
||||
ui->Reverse_checkBox->setChecked(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onPreview();
|
||||
}
|
||||
|
||||
void TaskOrientation::updatePlacement()
|
||||
{
|
||||
Base::Placement Pos;
|
||||
double offset = ui->Offset_doubleSpinBox->value().getValue();
|
||||
bool reverse = ui->Reverse_checkBox->isChecked();
|
||||
if (ui->XY_radioButton->isChecked()) {
|
||||
if (!reverse) {
|
||||
Pos = Base::Placement(Base::Vector3d(0, 0, offset),
|
||||
Camera::convert(Camera::Top));
|
||||
}
|
||||
else {
|
||||
Pos = Base::Placement(Base::Vector3d(0, 0, offset),
|
||||
Camera::convert(Camera::Bottom));
|
||||
}
|
||||
}
|
||||
else if (ui->XZ_radioButton->isChecked()) {
|
||||
if (!reverse) {
|
||||
Pos = Base::Placement(Base::Vector3d(0, offset, 0),
|
||||
Camera::convert(Camera::Front));
|
||||
}
|
||||
else {
|
||||
Pos = Base::Placement(Base::Vector3d(0, offset, 0),
|
||||
Camera::convert(Camera::Rear));
|
||||
}
|
||||
}
|
||||
else if (ui->YZ_radioButton->isChecked()) {
|
||||
if (!reverse) {
|
||||
Pos = Base::Placement(Base::Vector3d(offset, 0, 0),
|
||||
Camera::convert(Camera::Right));
|
||||
}
|
||||
else {
|
||||
Pos = Base::Placement(Base::Vector3d(offset, 0, 0),
|
||||
Camera::convert(Camera::Left));
|
||||
}
|
||||
}
|
||||
|
||||
if (!feature.expired()) {
|
||||
feature->Placement.setValue(Pos);
|
||||
}
|
||||
}
|
||||
|
||||
void TaskOrientation::updateIcon()
|
||||
{
|
||||
std::string icon;
|
||||
bool reverse = ui->Reverse_checkBox->isChecked();
|
||||
if (ui->XY_radioButton->isChecked()) {
|
||||
icon = reverse ? "view-bottom" : "view-top";
|
||||
}
|
||||
else if (ui->XZ_radioButton->isChecked()) {
|
||||
icon = reverse ? "view-rear" : "view-front";
|
||||
}
|
||||
else if (ui->YZ_radioButton->isChecked()) {
|
||||
icon = reverse ? "view-left" : "view-right";
|
||||
}
|
||||
|
||||
ui->previewLabel->setPixmap(
|
||||
Gui::BitmapFactory().pixmapFromSvg(icon.c_str(),
|
||||
ui->previewLabel->size()));
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
TaskOrientationDialog::TaskOrientationDialog(App::GeoFeature* obj)
|
||||
{
|
||||
widget = new TaskOrientation(obj);
|
||||
Gui::TaskView::TaskBox* taskbox = new Gui::TaskView::TaskBox(
|
||||
QPixmap(), widget->windowTitle(), true, nullptr);
|
||||
taskbox->groupLayout()->addWidget(widget);
|
||||
Content.push_back(taskbox);
|
||||
}
|
||||
|
||||
void TaskOrientationDialog::open()
|
||||
{
|
||||
widget->open();
|
||||
}
|
||||
|
||||
bool TaskOrientationDialog::accept()
|
||||
{
|
||||
widget->accept();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool TaskOrientationDialog::reject()
|
||||
{
|
||||
widget->reject();
|
||||
return true;
|
||||
}
|
||||
|
||||
#include "moc_TaskOrientation.cpp"
|
||||
80
src/Gui/TaskView/TaskOrientation.h
Normal file
@@ -0,0 +1,80 @@
|
||||
// SPDX-License-Identifier: LGPL-2.1-or-later
|
||||
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2023 Werner Mayer <wmayer[at]users.sourceforge.net> *
|
||||
* *
|
||||
* This file is part of FreeCAD. *
|
||||
* *
|
||||
* FreeCAD is free software: you can redistribute it and/or modify it *
|
||||
* under the terms of the GNU Lesser General Public License as *
|
||||
* published by the Free Software Foundation, either version 2.1 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* *
|
||||
* FreeCAD is distributed in the hope that it will be useful, but *
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
|
||||
* Lesser General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Lesser General Public *
|
||||
* License along with FreeCAD. If not, see *
|
||||
* <https://www.gnu.org/licenses/>. *
|
||||
* *
|
||||
**************************************************************************/
|
||||
|
||||
#ifndef GUI_TASKORIENTATION_H
|
||||
#define GUI_TASKORIENTATION_H
|
||||
|
||||
#include <Gui/TaskView/TaskDialog.h>
|
||||
#include <App/DocumentObserver.h>
|
||||
#include <App/GeoFeature.h>
|
||||
#include <memory>
|
||||
|
||||
namespace Gui {
|
||||
|
||||
class Ui_TaskOrientation;
|
||||
class TaskOrientation : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit TaskOrientation(App::GeoFeature* obj, QWidget* parent = nullptr);
|
||||
~TaskOrientation() override;
|
||||
|
||||
void open();
|
||||
void accept();
|
||||
void reject();
|
||||
|
||||
private:
|
||||
void restore(const Base::Placement&);
|
||||
void onPreview();
|
||||
void updateIcon();
|
||||
void updatePlacement();
|
||||
|
||||
private:
|
||||
std::unique_ptr<Ui_TaskOrientation> ui;
|
||||
App::WeakPtrT<App::GeoFeature> feature;
|
||||
};
|
||||
|
||||
class TaskOrientationDialog : public Gui::TaskView::TaskDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit TaskOrientationDialog(App::GeoFeature* obj);
|
||||
|
||||
public:
|
||||
void open() override;
|
||||
bool accept() override;
|
||||
bool reject() override;
|
||||
|
||||
QDialogButtonBox::StandardButtons getStandardButtons() const override {
|
||||
return QDialogButtonBox::Ok | QDialogButtonBox::Cancel;
|
||||
}
|
||||
|
||||
private:
|
||||
TaskOrientation* widget;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // GUI_TASKORIENTATION_H
|
||||
@@ -1,13 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>ImageGui::ImageOrientationDialog</class>
|
||||
<widget class="QDialog" name="ImageGui::ImageOrientationDialog">
|
||||
<class>Gui::TaskOrientation</class>
|
||||
<widget class="QWidget" name="Gui::TaskOrientation">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>178</width>
|
||||
<height>201</height>
|
||||
<width>194</width>
|
||||
<height>200</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -17,7 +17,7 @@
|
||||
<item row="0" column="0">
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>Image plane</string>
|
||||
<string>Planes</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
@@ -47,6 +47,13 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="Reverse_checkBox">
|
||||
<property name="text">
|
||||
<string>Reverse direction</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLabel" name="previewLabel">
|
||||
<property name="minimumSize">
|
||||
@@ -66,13 +73,6 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="Reverse_checkBox">
|
||||
<property name="text">
|
||||
<string>Reverse direction</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
@@ -83,33 +83,23 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Gui::QuantitySpinBox" name="Offset_doubleSpinBox">
|
||||
<widget class="Gui::QuantitySpinBox" name="Offset_doubleSpinBox" native="true">
|
||||
<property name="unit" stdset="0">
|
||||
<string notr="true">mm</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<property name="minimum" stdset="0">
|
||||
<double>-999999999.000000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<property name="maximum" stdset="0">
|
||||
<double>999999999.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>10.000000000000000</double>
|
||||
<property name="singleStep" stdset="0">
|
||||
<double>1.000000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="0" colspan="2">
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
@@ -120,38 +110,5 @@
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>ImageGui::ImageOrientationDialog</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>ImageGui::ImageOrientationDialog</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -57,6 +57,7 @@
|
||||
#include "View3DInventor.h"
|
||||
#include "View3DSettings.h"
|
||||
#include "Application.h"
|
||||
#include "Camera.h"
|
||||
#include "Document.h"
|
||||
#include "FileDialog.h"
|
||||
#include "MainWindow.h"
|
||||
@@ -422,18 +423,31 @@ bool View3DInventor::onMsg(const char* pMsg, const char** ppReturn)
|
||||
getGuiDocument()->saveCopy();
|
||||
return true;
|
||||
}
|
||||
else if (strcmp("ZoomIn", pMsg) == 0) {
|
||||
View3DInventorViewer* viewer = getViewer();
|
||||
viewer->navigationStyle()->zoomIn();
|
||||
return true;
|
||||
}
|
||||
else if (strcmp("ZoomOut", pMsg) == 0) {
|
||||
View3DInventorViewer* viewer = getViewer();
|
||||
viewer->navigationStyle()->zoomOut();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool View3DInventor::onHasMsg(const char* pMsg) const
|
||||
{
|
||||
if (strcmp("Save",pMsg) == 0)
|
||||
if (strcmp("Save",pMsg) == 0) {
|
||||
return true;
|
||||
else if (strcmp("SaveAs",pMsg) == 0)
|
||||
}
|
||||
else if (strcmp("SaveAs",pMsg) == 0) {
|
||||
return true;
|
||||
else if (strcmp("SaveCopy",pMsg) == 0)
|
||||
}
|
||||
else if (strcmp("SaveCopy",pMsg) == 0) {
|
||||
return true;
|
||||
}
|
||||
else if (strcmp("Undo",pMsg) == 0) {
|
||||
App::Document* doc = getAppDocument();
|
||||
return doc && doc->getAvailableUndos() > 0;
|
||||
@@ -442,58 +456,89 @@ bool View3DInventor::onHasMsg(const char* pMsg) const
|
||||
App::Document* doc = getAppDocument();
|
||||
return doc && doc->getAvailableRedos() > 0;
|
||||
}
|
||||
else if (strcmp("Print",pMsg) == 0)
|
||||
else if (strcmp("Print",pMsg) == 0) {
|
||||
return true;
|
||||
else if (strcmp("PrintPreview",pMsg) == 0)
|
||||
}
|
||||
else if (strcmp("PrintPreview",pMsg) == 0) {
|
||||
return true;
|
||||
else if (strcmp("PrintPdf",pMsg) == 0)
|
||||
}
|
||||
else if (strcmp("PrintPdf",pMsg) == 0) {
|
||||
return true;
|
||||
else if(strcmp("SetStereoRedGreen",pMsg) == 0)
|
||||
}
|
||||
else if(strcmp("SetStereoRedGreen",pMsg) == 0) {
|
||||
return true;
|
||||
else if(strcmp("SetStereoQuadBuff",pMsg) == 0)
|
||||
}
|
||||
else if(strcmp("SetStereoQuadBuff",pMsg) == 0) {
|
||||
return true;
|
||||
else if(strcmp("SetStereoInterleavedRows",pMsg) == 0)
|
||||
}
|
||||
else if(strcmp("SetStereoInterleavedRows",pMsg) == 0) {
|
||||
return true;
|
||||
else if(strcmp("SetStereoInterleavedColumns",pMsg) == 0)
|
||||
}
|
||||
else if(strcmp("SetStereoInterleavedColumns",pMsg) == 0) {
|
||||
return true;
|
||||
else if(strcmp("SetStereoOff",pMsg) == 0)
|
||||
}
|
||||
else if(strcmp("SetStereoOff",pMsg) == 0) {
|
||||
return true;
|
||||
else if(strcmp("Example1",pMsg) == 0)
|
||||
}
|
||||
else if(strcmp("Example1",pMsg) == 0) {
|
||||
return true;
|
||||
else if(strcmp("Example2",pMsg) == 0)
|
||||
}
|
||||
else if(strcmp("Example2",pMsg) == 0) {
|
||||
return true;
|
||||
else if(strcmp("Example3",pMsg) == 0)
|
||||
}
|
||||
else if(strcmp("Example3",pMsg) == 0) {
|
||||
return true;
|
||||
else if(strcmp("ViewFit",pMsg) == 0)
|
||||
}
|
||||
else if(strcmp("ViewFit",pMsg) == 0) {
|
||||
return true;
|
||||
else if(strcmp("ViewVR",pMsg) == 0)
|
||||
}
|
||||
else if(strcmp("ViewVR",pMsg) == 0) {
|
||||
#ifdef BUILD_VR
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
else if(strcmp("ViewSelection",pMsg) == 0)
|
||||
}
|
||||
else if(strcmp("ViewSelection",pMsg) == 0) {
|
||||
return true;
|
||||
else if(strcmp("ViewBottom",pMsg) == 0)
|
||||
}
|
||||
else if(strcmp("ViewBottom",pMsg) == 0) {
|
||||
return true;
|
||||
else if(strcmp("ViewFront",pMsg) == 0)
|
||||
}
|
||||
else if(strcmp("ViewFront",pMsg) == 0) {
|
||||
return true;
|
||||
else if(strcmp("ViewLeft",pMsg) == 0)
|
||||
}
|
||||
else if(strcmp("ViewLeft",pMsg) == 0) {
|
||||
return true;
|
||||
else if(strcmp("ViewRear",pMsg) == 0)
|
||||
}
|
||||
else if(strcmp("ViewRear",pMsg) == 0) {
|
||||
return true;
|
||||
else if(strcmp("ViewRight",pMsg) == 0)
|
||||
}
|
||||
else if(strcmp("ViewRight",pMsg) == 0) {
|
||||
return true;
|
||||
else if(strcmp("ViewTop",pMsg) == 0)
|
||||
}
|
||||
else if(strcmp("ViewTop",pMsg) == 0) {
|
||||
return true;
|
||||
else if(strcmp("ViewAxo",pMsg) == 0)
|
||||
}
|
||||
else if(strcmp("ViewAxo",pMsg) == 0) {
|
||||
return true;
|
||||
else if(strcmp("GetCamera",pMsg) == 0)
|
||||
}
|
||||
else if(strcmp("GetCamera",pMsg) == 0) {
|
||||
return true;
|
||||
else if(strncmp("SetCamera",pMsg,9) == 0)
|
||||
}
|
||||
else if(strncmp("SetCamera",pMsg,9) == 0) {
|
||||
return true;
|
||||
else if(strncmp("Dump",pMsg,4) == 0)
|
||||
}
|
||||
else if(strncmp("Dump",pMsg,4) == 0) {
|
||||
return true;
|
||||
}
|
||||
if (strcmp("ZoomIn", pMsg) == 0) {
|
||||
return true;
|
||||
}
|
||||
if (strcmp("ZoomOut", pMsg) == 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -52,6 +52,7 @@
|
||||
|
||||
#include "View3DPy.h"
|
||||
|
||||
#include "Camera.h"
|
||||
#include "Document.h"
|
||||
#include "NavigationStyle.h"
|
||||
#include "PythonWrapper.h"
|
||||
@@ -373,119 +374,6 @@ Py::Object View3DInventorPy::boxZoom(const Py::Tuple& args, const Py::Dict& kwds
|
||||
return Py::None();
|
||||
}
|
||||
|
||||
/**
|
||||
Formulas to get quaternion for axonometric views:
|
||||
|
||||
\code
|
||||
from math import sqrt, degrees, asin, atan
|
||||
p1=App.Rotation(App.Vector(1,0,0),90)
|
||||
p2=App.Rotation(App.Vector(0,0,1),alpha)
|
||||
p3=App.Rotation(p2.multVec(App.Vector(1,0,0)),beta)
|
||||
p4=p3.multiply(p2).multiply(p1)
|
||||
|
||||
from pivy import coin
|
||||
c=Gui.ActiveDocument.ActiveView.getCameraNode()
|
||||
c.orientation.setValue(*p4.Q)
|
||||
\endcode
|
||||
|
||||
The angles alpha and beta depend on the type of axonometry
|
||||
Isometric:
|
||||
\code
|
||||
alpha=45
|
||||
beta=degrees(asin(-sqrt(1.0/3.0)))
|
||||
\endcode
|
||||
|
||||
Dimetric:
|
||||
\code
|
||||
alpha=degrees(asin(sqrt(1.0/8.0)))
|
||||
beta=degrees(-asin(1.0/3.0))
|
||||
\endcode
|
||||
|
||||
Trimetric:
|
||||
\code
|
||||
alpha=30.0
|
||||
beta=-35.0
|
||||
\endcode
|
||||
|
||||
Verification code that the axonomtries are correct:
|
||||
|
||||
\code
|
||||
from pivy import coin
|
||||
c=Gui.ActiveDocument.ActiveView.getCameraNode()
|
||||
vo=App.Vector(c.getViewVolume().getMatrix().multVecMatrix(coin.SbVec3f(0,0,0)).getValue())
|
||||
vx=App.Vector(c.getViewVolume().getMatrix().multVecMatrix(coin.SbVec3f(10,0,0)).getValue())
|
||||
vy=App.Vector(c.getViewVolume().getMatrix().multVecMatrix(coin.SbVec3f(0,10,0)).getValue())
|
||||
vz=App.Vector(c.getViewVolume().getMatrix().multVecMatrix(coin.SbVec3f(0,0,10)).getValue())
|
||||
(vx-vo).Length
|
||||
(vy-vo).Length
|
||||
(vz-vo).Length
|
||||
|
||||
# Projection
|
||||
vo.z=0
|
||||
vx.z=0
|
||||
vy.z=0
|
||||
vz.z=0
|
||||
|
||||
(vx-vo).Length
|
||||
(vy-vo).Length
|
||||
(vz-vo).Length
|
||||
\endcode
|
||||
|
||||
See also:
|
||||
http://www.mathematik.uni-marburg.de/~thormae/lectures/graphics1/graphics_6_2_ger_web.html#1
|
||||
http://www.mathematik.uni-marburg.de/~thormae/lectures/graphics1/code_v2/Axonometric/qt/Axonometric.cpp
|
||||
https://de.wikipedia.org/wiki/Arkussinus_und_Arkuskosinus
|
||||
*/
|
||||
|
||||
SbRotation Camera::rotation(Camera::Orientation view)
|
||||
{
|
||||
switch (view) {
|
||||
case Top:
|
||||
return SbRotation(0, 0, 0, 1);
|
||||
case Bottom:
|
||||
return SbRotation(1, 0, 0, 0);
|
||||
case Front: {
|
||||
auto root = (float)(sqrt(2.0)/2.0);
|
||||
return SbRotation(root, 0, 0, root);
|
||||
}
|
||||
case Rear: {
|
||||
auto root = (float)(sqrt(2.0)/2.0);
|
||||
return SbRotation(0, root, root, 0);
|
||||
}
|
||||
case Left:
|
||||
return SbRotation(-0.5, 0.5, 0.5, -0.5);
|
||||
case Right:
|
||||
return SbRotation(0.5, 0.5, 0.5, 0.5);
|
||||
case Isometric:
|
||||
//from math import sqrt, degrees, asin
|
||||
//p1=App.Rotation(App.Vector(1,0,0),45)
|
||||
//p2=App.Rotation(App.Vector(0,0,1),-45)
|
||||
//p3=p2.multiply(p1)
|
||||
//return SbRotation(0.353553f, -0.146447f, -0.353553f, 0.853553f);
|
||||
|
||||
//from math import sqrt, degrees, asin
|
||||
//p1=App.Rotation(App.Vector(1,0,0),90)
|
||||
//p2=App.Rotation(App.Vector(0,0,1),135)
|
||||
//p3=App.Rotation(App.Vector(-1,1,0),degrees(asin(-sqrt(1.0/3.0))))
|
||||
//p4=p3.multiply(p2).multiply(p1)
|
||||
//return SbRotation(0.17592, 0.424708, 0.820473, 0.339851);
|
||||
|
||||
//from math import sqrt, degrees, asin
|
||||
//p1=App.Rotation(App.Vector(1,0,0),90)
|
||||
//p2=App.Rotation(App.Vector(0,0,1),45)
|
||||
//#p3=App.Rotation(App.Vector(1,1,0),45)
|
||||
//p3=App.Rotation(App.Vector(1,1,0),degrees(asin(-sqrt(1.0/3.0))))
|
||||
//p4=p3.multiply(p2).multiply(p1)
|
||||
return SbRotation(0.424708f, 0.17592f, 0.339851f, 0.820473f);
|
||||
case Dimetric:
|
||||
return SbRotation(0.567952f, 0.103751f, 0.146726f, 0.803205f);
|
||||
case Trimetric:
|
||||
return SbRotation(0.446015f, 0.119509f, 0.229575f, 0.856787f);
|
||||
default:
|
||||
return SbRotation(0, 0, 0, 1);
|
||||
}
|
||||
}
|
||||
|
||||
Py::Object View3DInventorPy::viewBottom(const Py::Tuple& args)
|
||||
{
|
||||
if (!PyArg_ParseTuple(args.ptr(), ""))
|
||||
|
||||
@@ -35,24 +35,6 @@ namespace Gui {
|
||||
|
||||
class View3DInventor;
|
||||
|
||||
class Camera
|
||||
{
|
||||
public:
|
||||
enum Orientation {
|
||||
Top,
|
||||
Bottom,
|
||||
Front,
|
||||
Rear,
|
||||
Left,
|
||||
Right,
|
||||
Isometric,
|
||||
Dimetric,
|
||||
Trimetric,
|
||||
};
|
||||
|
||||
static SbRotation rotation(Orientation view);
|
||||
};
|
||||
|
||||
class View3DInventorPy : public Py::PythonExtension<View3DInventorPy>
|
||||
{
|
||||
public:
|
||||
|
||||
283
src/Gui/ViewProviderImagePlane.cpp
Normal file
@@ -0,0 +1,283 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2011 Jürgen Riegel (juergen.riegel@web.de) *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
#ifndef _PreComp_
|
||||
# include <sstream>
|
||||
# include <QAction>
|
||||
# include <QFileInfo>
|
||||
# include <QImage>
|
||||
# include <QMenu>
|
||||
# include <QString>
|
||||
# include <Inventor/nodes/SoCoordinate3.h>
|
||||
# include <Inventor/nodes/SoFaceSet.h>
|
||||
# include <Inventor/nodes/SoMaterial.h>
|
||||
# include <Inventor/nodes/SoSeparator.h>
|
||||
# include <Inventor/nodes/SoShapeHints.h>
|
||||
# include <Inventor/nodes/SoTexture2.h>
|
||||
# include <Inventor/nodes/SoTextureCoordinate2.h>
|
||||
#endif
|
||||
|
||||
#include <App/Document.h>
|
||||
#include <Gui/ActionFunction.h>
|
||||
#include <Gui/BitmapFactory.h>
|
||||
#include <Gui/Control.h>
|
||||
#include <Gui/TaskView/TaskOrientation.h>
|
||||
#include <Gui/TaskView/TaskImageScale.h>
|
||||
#include <App/ImagePlane.h>
|
||||
|
||||
#include "ViewProviderImagePlane.h"
|
||||
|
||||
|
||||
using namespace Gui;
|
||||
|
||||
|
||||
PROPERTY_SOURCE(Gui::ViewProviderImagePlane, Gui::ViewProviderGeometryObject)
|
||||
const char* ViewProviderImagePlane::LightingEnums[]= {"One side", "Two side", nullptr};
|
||||
|
||||
ViewProviderImagePlane::ViewProviderImagePlane()
|
||||
{
|
||||
ADD_PROPERTY_TYPE(Lighting,(1L), "Object Style", App::Prop_None, "Set object lighting.");
|
||||
Lighting.setEnums(LightingEnums);
|
||||
|
||||
texture = new SoTexture2;
|
||||
texture->ref();
|
||||
|
||||
pcCoords = new SoCoordinate3();
|
||||
pcCoords->ref();
|
||||
|
||||
shapeHints = new SoShapeHints;
|
||||
shapeHints->shapeType = SoShapeHints::UNKNOWN_SHAPE_TYPE;
|
||||
shapeHints->vertexOrdering = SoShapeHints::COUNTERCLOCKWISE;
|
||||
shapeHints->ref();
|
||||
|
||||
sPixmap = "image-plane";
|
||||
}
|
||||
|
||||
ViewProviderImagePlane::~ViewProviderImagePlane()
|
||||
{
|
||||
pcCoords->unref();
|
||||
texture->unref();
|
||||
shapeHints->unref();
|
||||
}
|
||||
|
||||
void ViewProviderImagePlane::attach(App::DocumentObject *pcObj)
|
||||
{
|
||||
ViewProviderGeometryObject::attach(pcObj);
|
||||
|
||||
// NOTE: SoFCSelection node has beem removed because it led to
|
||||
// problems using the image as a construction plane with the
|
||||
// draft commands
|
||||
SoSeparator* planesep = new SoSeparator;
|
||||
planesep->addChild(pcCoords);
|
||||
|
||||
SoTextureCoordinate2 *textCoord = new SoTextureCoordinate2;
|
||||
textCoord->point.set1Value(0,0,0);
|
||||
textCoord->point.set1Value(1,1,0);
|
||||
textCoord->point.set1Value(2,1,1);
|
||||
textCoord->point.set1Value(3,0,1);
|
||||
planesep->addChild(textCoord);
|
||||
|
||||
// texture
|
||||
texture->model = SoTexture2::MODULATE;
|
||||
planesep->addChild(texture);
|
||||
|
||||
planesep->addChild(shapeHints);
|
||||
planesep->addChild(pcShapeMaterial);
|
||||
|
||||
// plane
|
||||
pcCoords->point.set1Value(0,0,0,0);
|
||||
pcCoords->point.set1Value(1,1,0,0);
|
||||
pcCoords->point.set1Value(2,1,1,0);
|
||||
pcCoords->point.set1Value(3,0,1,0);
|
||||
SoFaceSet *faceset = new SoFaceSet;
|
||||
faceset->numVertices.set1Value(0,4);
|
||||
planesep->addChild(faceset);
|
||||
|
||||
addDisplayMaskMode(planesep, "ImagePlane");
|
||||
}
|
||||
|
||||
void ViewProviderImagePlane::setDisplayMode(const char* ModeName)
|
||||
{
|
||||
if (strcmp("ImagePlane",ModeName) == 0)
|
||||
setDisplayMaskMode("ImagePlane");
|
||||
ViewProviderGeometryObject::setDisplayMode(ModeName);
|
||||
}
|
||||
|
||||
std::vector<std::string> ViewProviderImagePlane::getDisplayModes() const
|
||||
{
|
||||
std::vector<std::string> StrList;
|
||||
StrList.emplace_back("ImagePlane");
|
||||
return StrList;
|
||||
}
|
||||
|
||||
void ViewProviderImagePlane::onChanged(const App::Property* prop)
|
||||
{
|
||||
if (prop == &Lighting) {
|
||||
if (Lighting.getValue() == 0)
|
||||
shapeHints->vertexOrdering = SoShapeHints::UNKNOWN_ORDERING;
|
||||
else
|
||||
shapeHints->vertexOrdering = SoShapeHints::COUNTERCLOCKWISE;
|
||||
}
|
||||
ViewProviderGeometryObject::onChanged(prop);
|
||||
}
|
||||
|
||||
void ViewProviderImagePlane::setupContextMenu(QMenu* menu, QObject* receiver, const char* member)
|
||||
{
|
||||
Gui::ActionFunction* func = new Gui::ActionFunction(menu);
|
||||
QAction* action = menu->addAction(QObject::tr("Change image..."));
|
||||
action->setIcon(QIcon(QLatin1String("images:image-scaling.svg")));
|
||||
func->trigger(action, std::bind(&ViewProviderImagePlane::manipulateImage, this));
|
||||
|
||||
ViewProviderGeometryObject::setupContextMenu(menu, receiver, member);
|
||||
}
|
||||
|
||||
bool ViewProviderImagePlane::doubleClicked()
|
||||
{
|
||||
manipulateImage();
|
||||
return true;
|
||||
}
|
||||
|
||||
void ViewProviderImagePlane::manipulateImage()
|
||||
{
|
||||
auto dialog = new TaskOrientationDialog(
|
||||
dynamic_cast<App::GeoFeature*>(getObject())
|
||||
);
|
||||
dialog->addTaskBox(new TaskImageScale(
|
||||
dynamic_cast<App::ImagePlane*>(getObject())
|
||||
));
|
||||
|
||||
Gui::Control().showDialog(dialog);
|
||||
}
|
||||
|
||||
void ViewProviderImagePlane::resizePlane(float xsize, float ysize)
|
||||
{
|
||||
pcCoords->point.set1Value(0,-(xsize/2),-(ysize/2),0.0);
|
||||
pcCoords->point.set1Value(1,+(xsize/2),-(ysize/2),0.0);
|
||||
pcCoords->point.set1Value(2,+(xsize/2),+(ysize/2),0.0);
|
||||
pcCoords->point.set1Value(3,-(xsize/2),+(ysize/2),0.0);
|
||||
}
|
||||
|
||||
void ViewProviderImagePlane::loadImage()
|
||||
{
|
||||
App::ImagePlane* imagePlane = static_cast<App::ImagePlane*>(pcObject);
|
||||
std::string fileName = imagePlane->ImageFile.getValue();
|
||||
|
||||
if (!fileName.empty()) {
|
||||
double xsize = imagePlane->XSize.getValue();
|
||||
double ysize = imagePlane->YSize.getValue();
|
||||
|
||||
QImage impQ;
|
||||
if (!loadSvg(fileName.c_str(), xsize, ysize, impQ)) {
|
||||
QSizeF size = loadRaster(fileName.c_str(), impQ);
|
||||
if (!impQ.isNull()) {
|
||||
imagePlane->XSize.setValue(size.width());
|
||||
imagePlane->YSize.setValue(size.height());
|
||||
|
||||
imagePlane->XPixelsPerMeter = impQ.dotsPerMeterX();
|
||||
imagePlane->YPixelsPerMeter = impQ.dotsPerMeterY();
|
||||
}
|
||||
}
|
||||
|
||||
convertToSFImage(impQ);
|
||||
}
|
||||
}
|
||||
|
||||
QSizeF ViewProviderImagePlane::loadRaster(const char* fileName, QImage& img)
|
||||
{
|
||||
QSizeF sizef;
|
||||
if (img.load(QString::fromUtf8(fileName))) {
|
||||
double xPixelsPerM = img.dotsPerMeterX();
|
||||
double width = img.width();
|
||||
width = width * 1000 / xPixelsPerM;
|
||||
|
||||
double yPixelsPerM = img.dotsPerMeterY();
|
||||
double height = img.height();
|
||||
height = height * 1000 / yPixelsPerM;
|
||||
|
||||
sizef.setWidth(width);
|
||||
sizef.setHeight(height);
|
||||
}
|
||||
|
||||
return sizef;
|
||||
}
|
||||
|
||||
void ViewProviderImagePlane::reloadIfSvg()
|
||||
{
|
||||
App::ImagePlane* imagePlane = static_cast<App::ImagePlane*>(pcObject);
|
||||
std::string fileName = imagePlane->ImageFile.getValue();
|
||||
|
||||
double xsize = imagePlane->XSize.getValue();
|
||||
double ysize = imagePlane->YSize.getValue();
|
||||
|
||||
QImage impQ;
|
||||
loadSvg(fileName.c_str(), xsize, ysize, impQ);
|
||||
convertToSFImage(impQ);
|
||||
}
|
||||
|
||||
bool ViewProviderImagePlane::loadSvg(const char* filename, double width, double height, QImage& img)
|
||||
{
|
||||
QFileInfo fi(QString::fromUtf8(filename));
|
||||
if (fi.suffix().toLower() == QLatin1String("svg")) {
|
||||
QImage tmp;
|
||||
if (tmp.load(QString::fromUtf8(filename))) {
|
||||
double xPixelsPerM = tmp.dotsPerMeterX();
|
||||
double yPixelsPerM = tmp.dotsPerMeterY();
|
||||
width = width * xPixelsPerM / 1000;
|
||||
height = height * yPixelsPerM / 1000;
|
||||
}
|
||||
|
||||
QPixmap px = BitmapFactory().pixmapFromSvg(filename, QSizeF(width, height));
|
||||
img = px.toImage();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void ViewProviderImagePlane::convertToSFImage(const QImage& img)
|
||||
{
|
||||
if (!img.isNull()) {
|
||||
SoSFImage sfimg;
|
||||
// convert to Coin bitmap
|
||||
BitmapFactory().convert(img, sfimg);
|
||||
texture->image = sfimg;
|
||||
}
|
||||
}
|
||||
|
||||
void ViewProviderImagePlane::updateData(const App::Property* prop)
|
||||
{
|
||||
App::ImagePlane* pcPlaneObj = static_cast<App::ImagePlane*>(pcObject);
|
||||
if (prop == &pcPlaneObj->XSize || prop == &pcPlaneObj->YSize) {
|
||||
float xsize = pcPlaneObj->XSize.getValue();
|
||||
float ysize = pcPlaneObj->YSize.getValue();
|
||||
|
||||
resizePlane(xsize, ysize);
|
||||
reloadIfSvg();
|
||||
}
|
||||
else if (prop == &pcPlaneObj->ImageFile) {
|
||||
loadImage();
|
||||
}
|
||||
else {
|
||||
Gui::ViewProviderGeometryObject::updateData(prop);
|
||||
}
|
||||
}
|
||||
@@ -20,46 +20,56 @@
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef IMAGE_ViewProviderImagePlane_H
|
||||
#define IMAGE_ViewProviderImagePlane_H
|
||||
#ifndef GUI_ViewProviderImagePlane_H
|
||||
#define GUI_ViewProviderImagePlane_H
|
||||
|
||||
#include <Gui/ViewProviderGeometryObject.h>
|
||||
#include <Mod/Image/ImageGlobal.h>
|
||||
|
||||
|
||||
class SoCoordinate3;
|
||||
class SoDrawStyle;
|
||||
class SoShapeHints;
|
||||
class SoTexture2;
|
||||
class QImage;
|
||||
|
||||
namespace ImageGui
|
||||
namespace Gui
|
||||
{
|
||||
|
||||
class ImageGuiExport ViewProviderImagePlane : public Gui::ViewProviderGeometryObject
|
||||
class GuiExport ViewProviderImagePlane : public Gui::ViewProviderGeometryObject
|
||||
{
|
||||
PROPERTY_HEADER_WITH_OVERRIDE(RobotGui::ViewProviderImagePlane);
|
||||
PROPERTY_HEADER_WITH_OVERRIDE(Gui::ViewProviderImagePlane);
|
||||
|
||||
public:
|
||||
/// constructor.
|
||||
ViewProviderImagePlane();
|
||||
|
||||
/// destructor.
|
||||
~ViewProviderImagePlane() override;
|
||||
|
||||
App::PropertyEnumeration Lighting;
|
||||
|
||||
void attach(App::DocumentObject *pcObject) override;
|
||||
void setDisplayMode(const char* ModeName) override;
|
||||
std::vector<std::string> getDisplayModes() const override;
|
||||
void updateData(const App::Property*) override;
|
||||
void setupContextMenu(QMenu*, QObject*, const char*) override;
|
||||
bool doubleClicked() override;
|
||||
void onChanged(const App::Property* prop) override;
|
||||
|
||||
private:
|
||||
bool loadSvg(const char*, float x, float y, QImage& img);
|
||||
void resizePlane(float xsize, float ysize);
|
||||
void loadImage();
|
||||
void reloadIfSvg();
|
||||
bool loadSvg(const char*, double x, double y, QImage& img);
|
||||
QSizeF loadRaster(const char*, QImage& img);
|
||||
void convertToSFImage(const QImage& img);
|
||||
void manipulateImage();
|
||||
|
||||
protected:
|
||||
private:
|
||||
SoCoordinate3 * pcCoords;
|
||||
SoTexture2 * texture;
|
||||
};
|
||||
SoShapeHints * shapeHints;
|
||||
static const char * LightingEnums[];
|
||||
};
|
||||
|
||||
} //namespace RobotGui
|
||||
} //namespace Gui
|
||||
|
||||
|
||||
#endif // IMAGE_ViewProviderImagePlane_H
|
||||
#endif // GUI_ViewProviderImagePlane_H
|
||||
@@ -697,6 +697,7 @@ MenuItem* StdWorkbench::setupMenuBar() const
|
||||
*tool << "Std_DlgParameter"
|
||||
<< "Separator"
|
||||
<< "Std_ViewScreenShot"
|
||||
<< "Std_ViewLoadImage"
|
||||
<< "Std_SceneInspector"
|
||||
<< "Std_DependencyGraph"
|
||||
<< "Std_ProjectUtil"
|
||||
|
||||
@@ -30,10 +30,6 @@ if(BUILD_IDF)
|
||||
add_subdirectory(Idf)
|
||||
endif(BUILD_IDF)
|
||||
|
||||
if(BUILD_IMAGE)
|
||||
add_subdirectory(Image)
|
||||
endif(BUILD_IMAGE)
|
||||
|
||||
if(BUILD_IMPORT)
|
||||
add_subdirectory(Import)
|
||||
endif(BUILD_IMPORT)
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Library General Public License as *
|
||||
* published by the Free Software Foundation; either version 2 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* for detail see the LICENCE text file. *
|
||||
* Jürgen Riegel 2002 *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#include <Base/Console.h>
|
||||
#include <Base/Interpreter.h>
|
||||
#include <Base/PyObjectBase.h>
|
||||
|
||||
#include "ImagePlane.h"
|
||||
|
||||
|
||||
namespace Image {
|
||||
class Module : public Py::ExtensionModule<Module>
|
||||
{
|
||||
public:
|
||||
Module() : Py::ExtensionModule<Module>("Image")
|
||||
{
|
||||
initialize("This module is the Image module."); // register with Python
|
||||
}
|
||||
|
||||
~Module() override {}
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
PyObject* initModule()
|
||||
{
|
||||
return Base::Interpreter().addModule(new Module);
|
||||
}
|
||||
|
||||
} // namespace Image
|
||||
|
||||
/* Python entry */
|
||||
PyMOD_INIT_FUNC(Image)
|
||||
{
|
||||
PyObject* mod = Image::initModule();
|
||||
Base::Console().Log("Loading Image module... done\n");
|
||||
|
||||
Image::ImagePlane::init();
|
||||
|
||||
PyMOD_Return(mod);
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
if(WIN32)
|
||||
add_definitions(-DFCAppImage)
|
||||
endif(WIN32)
|
||||
|
||||
if(OPENCV2_FOUND)
|
||||
add_definitions(-DHAVE_OPENCV2)
|
||||
endif(OPENCV2_FOUND)
|
||||
|
||||
include_directories(
|
||||
${OPENCV_INCLUDE2_DIR}
|
||||
${PYTHON_INCLUDE_DIRS}
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${ZLIB_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
set(Image_LIBS
|
||||
${OPENCV2_LIBRARIES}
|
||||
FreeCADApp
|
||||
)
|
||||
|
||||
set(Image_SRCS
|
||||
ImageBase.cpp
|
||||
ImageBase.h
|
||||
ImagePlane.cpp
|
||||
ImagePlane.h
|
||||
PreCompiled.cpp
|
||||
PreCompiled.h
|
||||
AppImage.cpp
|
||||
)
|
||||
|
||||
if(FREECAD_USE_PCH)
|
||||
add_definitions(-D_PreComp_)
|
||||
GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" PCH_SRCS ${Image_SRCS})
|
||||
ADD_MSVC_PRECOMPILED_HEADER(Image PreCompiled.h PreCompiled.cpp PCH_SRCS)
|
||||
endif(FREECAD_USE_PCH)
|
||||
|
||||
add_library(Image SHARED ${Image_SRCS})
|
||||
target_link_libraries(Image ${Image_LIBS})
|
||||
|
||||
|
||||
SET_BIN_DIR(Image Image /Mod/Image)
|
||||
SET_PYTHON_PREFIX_SUFFIX(Image)
|
||||
|
||||
INSTALL(TARGETS Image DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
@@ -1,343 +0,0 @@
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This is a class for holding and handling basic image data *
|
||||
* *
|
||||
* Author: Graeme van der Vlugt *
|
||||
* Copyright: Imetric 3D GmbH *
|
||||
* Year: 2004 *
|
||||
* *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Library General Public License as *
|
||||
* published by the Free Software Foundation; either version 2 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* for detail see the LICENCE text file. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#include <Base/Exception.h>
|
||||
#include "ImageBase.h"
|
||||
|
||||
|
||||
using namespace Image;
|
||||
|
||||
// Constructor (constructs an empty image)
|
||||
ImageBase::ImageBase()
|
||||
{
|
||||
_pPixelData = nullptr;
|
||||
_owner = true;
|
||||
_width = 0;
|
||||
_height = 0;
|
||||
_setColorFormat(IB_CF_GREY8, 8);
|
||||
}
|
||||
|
||||
// Destructor
|
||||
ImageBase::~ImageBase()
|
||||
{
|
||||
try
|
||||
{
|
||||
clear();
|
||||
}
|
||||
catch(...) {}
|
||||
}
|
||||
|
||||
// Copy constructor
|
||||
ImageBase::ImageBase(const ImageBase &rhs)
|
||||
{
|
||||
// Do the copy
|
||||
if (rhs._owner)
|
||||
{
|
||||
// rhs is the owner - do a deep copy
|
||||
_pPixelData = nullptr;
|
||||
_owner = false; // avoids a superfluous delete
|
||||
if (createCopy((void *)(rhs._pPixelData), rhs._width, rhs._height, rhs._format, rhs._numSigBitsPerSample) != 0)
|
||||
throw Base::RuntimeError("ImageBase::ImageBase. Error creating copy of image");
|
||||
}
|
||||
else
|
||||
{
|
||||
// rhs is not the owner - do a shallow copy
|
||||
_pPixelData = rhs._pPixelData;
|
||||
_owner = rhs._owner;
|
||||
_width = rhs._width;
|
||||
_height = rhs._height;
|
||||
_setColorFormat(rhs._format, rhs._numSigBitsPerSample);
|
||||
}
|
||||
}
|
||||
|
||||
// = operator
|
||||
ImageBase & ImageBase::operator=(const ImageBase &rhs)
|
||||
{
|
||||
if (this == &rhs)
|
||||
return *this;
|
||||
|
||||
// Implement any deletion necessary
|
||||
clear();
|
||||
|
||||
// Do the copy
|
||||
if (rhs._owner)
|
||||
{
|
||||
// rhs is the owner - do a deep copy
|
||||
_owner = false; // avoids a superfluous delete
|
||||
if (createCopy((void *)(rhs._pPixelData), rhs._width, rhs._height, rhs._format, rhs._numSigBitsPerSample) != 0)
|
||||
throw Base::RuntimeError("ImageBase::operator=. Error creating copy of image");
|
||||
}
|
||||
else
|
||||
{
|
||||
// rhs is not the owner - do a shallow copy
|
||||
_pPixelData = rhs._pPixelData;
|
||||
_owner = rhs._owner;
|
||||
_width = rhs._width;
|
||||
_height = rhs._height;
|
||||
_setColorFormat(rhs._format, rhs._numSigBitsPerSample);
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
// Clears the image data
|
||||
// It only deletes the pixel data if this object is the owner of the data
|
||||
void ImageBase::clear()
|
||||
{
|
||||
// If object is the owner of the data then delete the allocated memory
|
||||
if (_owner)
|
||||
{
|
||||
delete [] _pPixelData;
|
||||
_pPixelData = nullptr;
|
||||
}
|
||||
// Else just reset the pointer (the owner of the pixel data must be responsible for deleting it)
|
||||
else
|
||||
{
|
||||
_pPixelData = nullptr;
|
||||
}
|
||||
|
||||
// Re-initialise the other variables
|
||||
_owner = true;
|
||||
_width = 0;
|
||||
_height = 0;
|
||||
_setColorFormat(IB_CF_GREY8, 8);
|
||||
}
|
||||
|
||||
// Sets the color format and the dependent parameters
|
||||
// Returns 0 for OK, -1 for invalid color format
|
||||
int ImageBase::_setColorFormat(int format, unsigned short numSigBitsPerSample)
|
||||
{
|
||||
switch (format)
|
||||
{
|
||||
case IB_CF_GREY8:
|
||||
_numSamples = 1;
|
||||
_numBitsPerSample = 8;
|
||||
_numBytesPerPixel = 1;
|
||||
break;
|
||||
case IB_CF_GREY16:
|
||||
_numSamples = 1;
|
||||
_numBitsPerSample = 16;
|
||||
_numBytesPerPixel = 2;
|
||||
break;
|
||||
case IB_CF_GREY32:
|
||||
_numSamples = 1;
|
||||
_numBitsPerSample = 32;
|
||||
_numBytesPerPixel = 4;
|
||||
break;
|
||||
case IB_CF_RGB24:
|
||||
_numSamples = 3;
|
||||
_numBitsPerSample = 8;
|
||||
_numBytesPerPixel = 3;
|
||||
break;
|
||||
case IB_CF_RGB48:
|
||||
_numSamples = 3;
|
||||
_numBitsPerSample = 16;
|
||||
_numBytesPerPixel = 6;
|
||||
break;
|
||||
case IB_CF_BGR24:
|
||||
_numSamples = 3;
|
||||
_numBitsPerSample = 8;
|
||||
_numBytesPerPixel = 3;
|
||||
break;
|
||||
case IB_CF_BGR48:
|
||||
_numSamples = 3;
|
||||
_numBitsPerSample = 16;
|
||||
_numBytesPerPixel = 6;
|
||||
break;
|
||||
case IB_CF_RGBA32:
|
||||
_numSamples = 4;
|
||||
_numBitsPerSample = 8;
|
||||
_numBytesPerPixel = 4;
|
||||
break;
|
||||
case IB_CF_RGBA64:
|
||||
_numSamples = 4;
|
||||
_numBitsPerSample = 16;
|
||||
_numBytesPerPixel = 8;
|
||||
break;
|
||||
case IB_CF_BGRA32:
|
||||
_numSamples = 4;
|
||||
_numBitsPerSample = 8;
|
||||
_numBytesPerPixel = 4;
|
||||
break;
|
||||
case IB_CF_BGRA64:
|
||||
_numSamples = 4;
|
||||
_numBitsPerSample = 16;
|
||||
_numBytesPerPixel = 8;
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
||||
if ((numSigBitsPerSample == 0) || (numSigBitsPerSample > _numBitsPerSample))
|
||||
_numSigBitsPerSample = _numBitsPerSample;
|
||||
else
|
||||
_numSigBitsPerSample = numSigBitsPerSample;
|
||||
|
||||
_format = format;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Allocate own space for an image based on the current color space and image size parameters
|
||||
// Returns:
|
||||
// 0 for OK
|
||||
// -1 for error
|
||||
int ImageBase::_allocate()
|
||||
{
|
||||
// Check that pixel data pointer is null
|
||||
if (_pPixelData)
|
||||
return -1;
|
||||
|
||||
// Allocate the space needed to store the pixel data
|
||||
_owner = true;
|
||||
try
|
||||
{
|
||||
_pPixelData = new unsigned char [_width * _height * _numBytesPerPixel];
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
// memory allocation error
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Load an image by copying the pixel data
|
||||
// This object will take ownership of the copied pixel data
|
||||
// (the source image is still controlled by the caller)
|
||||
// If numSigBitsPerSample = 0 then the full range is assumed to be significant
|
||||
// Returns:
|
||||
// 0 for OK
|
||||
// -1 for invalid color format
|
||||
// -2 for memory allocation error
|
||||
int ImageBase::createCopy(void* pSrcPixelData, unsigned long width, unsigned long height, int format, unsigned short numSigBitsPerSample)
|
||||
{
|
||||
// Clear any existing data
|
||||
clear();
|
||||
|
||||
// Set the color format and the dependent parameters
|
||||
if (_setColorFormat(format, numSigBitsPerSample) != 0)
|
||||
return -1;
|
||||
|
||||
// Set the image size
|
||||
_width = width;
|
||||
_height = height;
|
||||
|
||||
// Allocate our own memory for the pixel data
|
||||
if (_allocate() != 0)
|
||||
{
|
||||
clear();
|
||||
return -2;
|
||||
}
|
||||
|
||||
// Copy the pixel data
|
||||
memcpy((void *)_pPixelData, pSrcPixelData, _width * _height * _numBytesPerPixel);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Make this object point to another image source
|
||||
// If takeOwnership is false then:
|
||||
// This object will not own (control) or copy the pixel data
|
||||
// (the source image is still controlled by the caller)
|
||||
// Else if takeOwnership is true then:
|
||||
// This object will take ownership (control) of the pixel data
|
||||
// (the source image is not (should not be) controlled by the caller anymore)
|
||||
// In this case the memory must have been allocated with the new operator (because this class will use the delete operator)
|
||||
// If numSigBitsPerSample = 0 then the full range is assumed to be significant
|
||||
// Returns:
|
||||
// 0 for OK
|
||||
// -1 for invalid color format
|
||||
int ImageBase::pointTo(void* pSrcPixelData, unsigned long width, unsigned long height, int format, unsigned short numSigBitsPerSample, bool takeOwnership)
|
||||
{
|
||||
// Clear any existing data
|
||||
clear();
|
||||
|
||||
// Set the color format and the dependent parameters
|
||||
if (_setColorFormat(format, numSigBitsPerSample) != 0)
|
||||
return -1;
|
||||
|
||||
// Set the image size
|
||||
_width = width;
|
||||
_height = height;
|
||||
|
||||
// Point to the source pixel data
|
||||
_owner = false;
|
||||
_pPixelData = (unsigned char *)pSrcPixelData;
|
||||
|
||||
// Flag ownership
|
||||
if (takeOwnership)
|
||||
_owner = true;
|
||||
else
|
||||
_owner = false;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Gets the value of a sample at the given pixel position
|
||||
// Returns 0 for valid value or -1 if coordinates or sample index are out of range or
|
||||
// if there is no image data
|
||||
int ImageBase::getSample(int x, int y, unsigned short sampleIndex, double &value)
|
||||
{
|
||||
if ((!_pPixelData) ||
|
||||
(sampleIndex >= _numSamples) ||
|
||||
(x < 0) || (x >= (int)_width) ||
|
||||
(y < 0) || (y >= (int)_height))
|
||||
return -1;
|
||||
|
||||
// Get pointer to sample
|
||||
switch (_format)
|
||||
{
|
||||
case IB_CF_GREY8:
|
||||
case IB_CF_RGB24:
|
||||
case IB_CF_BGR24:
|
||||
case IB_CF_RGBA32:
|
||||
case IB_CF_BGRA32:
|
||||
{
|
||||
unsigned char* pSample = _pPixelData + _numSamples * (y * _width + x) + sampleIndex;
|
||||
value = (double)(*pSample);
|
||||
}
|
||||
break;
|
||||
case IB_CF_GREY16:
|
||||
case IB_CF_RGB48:
|
||||
case IB_CF_BGR48:
|
||||
case IB_CF_RGBA64:
|
||||
case IB_CF_BGRA64:
|
||||
{
|
||||
uint16_t* pPix16 = (uint16_t *)_pPixelData;
|
||||
uint16_t* pSample = pPix16 + _numSamples * (y * _width + x) + sampleIndex;
|
||||
value = (double)(*pSample);
|
||||
}
|
||||
break;
|
||||
case IB_CF_GREY32:
|
||||
{
|
||||
uint32_t* pPix32 = (uint32_t *)_pPixelData;
|
||||
uint32_t* pSample = pPix32 + y * _width + x;
|
||||
value = (double)(*pSample);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This is a class for holding and handling basic image data *
|
||||
* *
|
||||
* Author: Graeme van der Vlugt *
|
||||
* Copyright: Imetric 3D GmbH *
|
||||
* Year: 2004 *
|
||||
* *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Library General Public License as *
|
||||
* published by the Free Software Foundation; either version 2 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* for detail see the LICENCE text file. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef IMAGEBASE_H
|
||||
#define IMAGEBASE_H
|
||||
|
||||
#include <Mod/Image/ImageGlobal.h>
|
||||
|
||||
namespace Image
|
||||
{
|
||||
|
||||
#define IB_CF_GREY8 1 // 8-bit grey level images
|
||||
#define IB_CF_GREY16 2 // 16-bit grey level images
|
||||
#define IB_CF_GREY32 3 // 32-bit grey level images
|
||||
#define IB_CF_RGB24 4 // 24-bit (8,8,8) RGB color images
|
||||
#define IB_CF_RGB48 5 // 48-bit (16,16,16) RGB color images
|
||||
#define IB_CF_BGR24 6 // 24-bit (8,8,8) BGR color images
|
||||
#define IB_CF_BGR48 7 // 48-bit (16,16,16) BGR color images
|
||||
#define IB_CF_RGBA32 8 // 32-bit (8,8,8,8) RGBA color images (A = alpha)
|
||||
#define IB_CF_RGBA64 9 // 64-bit (16,16,16,16) RGBA color images (A = alpha)
|
||||
#define IB_CF_BGRA32 10 // 32-bit (8,8,8,8) BGRA color images (A = alpha)
|
||||
#define IB_CF_BGRA64 11 // 64-bit (16,16,16,16) BGRA color images (A = alpha)
|
||||
|
||||
class ImageExport ImageBase
|
||||
{
|
||||
public:
|
||||
|
||||
ImageBase();
|
||||
virtual ~ImageBase();
|
||||
ImageBase(const ImageBase &rhs);
|
||||
ImageBase & operator=(const ImageBase &rhs);
|
||||
|
||||
bool hasValidData() const { return (_pPixelData != nullptr); }
|
||||
void* getPixelDataPtr() { return (void *)_pPixelData; }
|
||||
bool isOwner() const { return _owner; }
|
||||
unsigned long getWidth() const { return _width; }
|
||||
unsigned long getHeight() const { return _height; }
|
||||
int getFormat() const { return _format; }
|
||||
unsigned short getNumSigBitsPerSample() const { return _numSigBitsPerSample; }
|
||||
unsigned short getNumSamples() const { return _numSamples; }
|
||||
unsigned short getNumBitsPerSample() const { return _numBitsPerSample; }
|
||||
unsigned short getNumBytesPerPixel() const { return _numBytesPerPixel; }
|
||||
|
||||
virtual void clear();
|
||||
virtual int createCopy(void* pSrcPixelData, unsigned long width, unsigned long height, int format, unsigned short numSigBitsPerSample);
|
||||
virtual int pointTo(void* pSrcPixelData, unsigned long width, unsigned long height, int format, unsigned short numSigBitsPerSample, bool takeOwnership);
|
||||
|
||||
virtual int getSample(int x, int y, unsigned short sampleIndex, double &value);
|
||||
|
||||
protected:
|
||||
|
||||
int _setColorFormat(int format, unsigned short numSigBitsPerSample);
|
||||
int _allocate();
|
||||
|
||||
unsigned char* _pPixelData; // pointer to the pixel data
|
||||
bool _owner; // flag defining if the object owns the pixel data or not
|
||||
unsigned long _width; // width of image (number of pixels in horizontal direction)
|
||||
unsigned long _height; // height of image (number of pixels in vertical direction)
|
||||
int _format; // colour format of the pixel data
|
||||
unsigned short _numSigBitsPerSample;// number of significant bits per sample (always <= _numBitsPerSample)
|
||||
|
||||
// Dependent parameters
|
||||
unsigned short _numSamples; // number of samples per pixel (e.g. 1 for grey, 3 for rgb, 4 for rgba)
|
||||
unsigned short _numBitsPerSample; // number of bits per sample (e.g. 8 for Grey8)
|
||||
unsigned short _numBytesPerPixel; // number of bytes per pixel (e.g. 1 for Grey8)
|
||||
};
|
||||
|
||||
} // namespace ImageApp
|
||||
|
||||
#endif // IMAGEBASE_H
|
||||
@@ -1,23 +0,0 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2002 Jürgen Riegel <juergen.riegel@web.de> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
@@ -1,38 +0,0 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2002 Jürgen Riegel <juergen.riegel@web.de> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef __PRECOMPILED__
|
||||
#define __PRECOMPILED__
|
||||
|
||||
#include <FCConfig.h>
|
||||
|
||||
#ifdef _PreComp_
|
||||
/// point at which warnings of overly long specifiers disabled (needed for VC6)
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(disable : 4005)
|
||||
# pragma warning(disable : 4251)
|
||||
# pragma warning(disable : 4503)
|
||||
# pragma warning(disable : 4786)// specifier longer then 255 chars
|
||||
#endif
|
||||
|
||||
#endif // _PreComp_
|
||||
#endif
|
||||
@@ -1,42 +0,0 @@
|
||||
|
||||
add_subdirectory(App)
|
||||
if(BUILD_GUI)
|
||||
add_subdirectory(Gui)
|
||||
endif(BUILD_GUI)
|
||||
|
||||
set(Image_Scripts
|
||||
Init.py
|
||||
)
|
||||
|
||||
if(BUILD_GUI)
|
||||
list (APPEND Image_Scripts InitGui.py)
|
||||
set(Image_ToolsScripts
|
||||
ImageTools/__init__.py
|
||||
ImageTools/_CommandImageScaling.py
|
||||
)
|
||||
endif(BUILD_GUI)
|
||||
|
||||
add_custom_target(ImageScripts ALL
|
||||
SOURCES ${Image_Scripts} ${Image_ToolsScripts}
|
||||
)
|
||||
|
||||
fc_target_copy_resource(ImageScripts
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_BINARY_DIR}/Mod/Image
|
||||
${Image_Scripts}
|
||||
${Image_ToolsScripts}
|
||||
)
|
||||
|
||||
INSTALL(
|
||||
FILES
|
||||
${Image_Scripts}
|
||||
DESTINATION
|
||||
Mod/Image
|
||||
)
|
||||
|
||||
INSTALL(
|
||||
FILES
|
||||
${Image_ToolsScripts}
|
||||
DESTINATION
|
||||
Mod/Image/ImageTools
|
||||
)
|
||||
@@ -1,61 +0,0 @@
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Library General Public License as *
|
||||
* published by the Free Software Foundation; either version 2 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* for detail see the LICENCE text file. *
|
||||
* Jürgen Riegel 2002 *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#include <Base/Console.h>
|
||||
#include <Base/PyObjectBase.h>
|
||||
#include <Gui/Application.h>
|
||||
#include <Gui/Language/Translator.h>
|
||||
|
||||
#include "ImageView.h"
|
||||
#include "ViewProviderImagePlane.h"
|
||||
#include "Workbench.h"
|
||||
|
||||
|
||||
// use a different name to CreateCommand()
|
||||
void CreateImageCommands();
|
||||
|
||||
void loadImageResource()
|
||||
{
|
||||
// add resources and reloads the translators
|
||||
Q_INIT_RESOURCE(Image);
|
||||
Gui::Translator::instance()->refresh();
|
||||
}
|
||||
|
||||
namespace ImageGui {
|
||||
extern PyObject* initModule();
|
||||
}
|
||||
|
||||
|
||||
/* Python entry */
|
||||
PyMOD_INIT_FUNC(ImageGui)
|
||||
{
|
||||
if (!Gui::Application::Instance) {
|
||||
PyErr_SetString(PyExc_ImportError, "Cannot load Gui module in console application.");
|
||||
PyMOD_Return(nullptr);
|
||||
}
|
||||
|
||||
PyObject* mod = ImageGui::initModule();
|
||||
Base::Console().Log("Loading GUI of Image module... done\n");
|
||||
|
||||
// instantiating the commands
|
||||
CreateImageCommands();
|
||||
|
||||
ImageGui::ImageView::init();
|
||||
ImageGui::ViewProviderImagePlane::init();
|
||||
ImageGui::Workbench::init();
|
||||
|
||||
// add resources and reloads the translators
|
||||
loadImageResource();
|
||||
|
||||
PyMOD_Return(mod);
|
||||
}
|
||||
@@ -1,107 +0,0 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2006 Werner Mayer <wmayer[at]users.sourceforge.net> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
#ifndef _PreComp_
|
||||
# include <QImage>
|
||||
# include <QFileInfo>
|
||||
#endif
|
||||
|
||||
#include <Base/Exception.h>
|
||||
#include <Base/Interpreter.h>
|
||||
#include <Gui/BitmapFactory.h>
|
||||
#include <Gui/MainWindow.h>
|
||||
|
||||
#include "ImageView.h"
|
||||
|
||||
|
||||
namespace ImageGui {
|
||||
class Module : public Py::ExtensionModule<Module>
|
||||
{
|
||||
public:
|
||||
Module() : Py::ExtensionModule<Module>("ImageGui")
|
||||
{
|
||||
add_varargs_method("open",&Module::open
|
||||
);
|
||||
add_varargs_method("insert",&Module::open
|
||||
);
|
||||
initialize("This module is the ImageGui module."); // register with Python
|
||||
}
|
||||
|
||||
~Module() override {}
|
||||
|
||||
private:
|
||||
Py::Object open(const Py::Tuple& args)
|
||||
{
|
||||
char* Name;
|
||||
const char* DocName=nullptr;
|
||||
if (!PyArg_ParseTuple(args.ptr(), "et|s","utf-8",&Name,&DocName))
|
||||
throw Py::Exception();
|
||||
|
||||
std::string EncodedName = std::string(Name);
|
||||
PyMem_Free(Name);
|
||||
|
||||
QString fileName = QString::fromUtf8(EncodedName.c_str());
|
||||
QFileInfo file(fileName);
|
||||
|
||||
// Load image from file into a QImage object
|
||||
QImage imageq(fileName);
|
||||
|
||||
// Extract image into a general RGB format recognised by the ImageView class
|
||||
int format = IB_CF_RGB24;
|
||||
unsigned char *pPixelData = nullptr;
|
||||
if (!imageq.isNull()) {
|
||||
pPixelData = new unsigned char[3 * (unsigned long)imageq.width() * (unsigned long)imageq.height()];
|
||||
unsigned char *pPix = pPixelData;
|
||||
for (int r = 0; r < imageq.height(); r++) {
|
||||
for (int c = 0; c < imageq.width(); c++) {
|
||||
QRgb rgb = imageq.pixel(c,r);
|
||||
*pPix = (unsigned char)qRed(rgb);
|
||||
*(pPix + 1) = (unsigned char)qGreen(rgb);
|
||||
*(pPix + 2) = (unsigned char)qBlue(rgb);
|
||||
pPix += 3;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
throw Py::Exception(PyExc_IOError, "Could not load image file");
|
||||
}
|
||||
|
||||
// Displaying the image in a view.
|
||||
// This ImageView object takes ownership of the pixel data (in 'pointImageTo') so we don't need to delete it here
|
||||
ImageView* iView = new ImageView(Gui::getMainWindow());
|
||||
iView->setWindowIcon( Gui::BitmapFactory().pixmap("colors") );
|
||||
iView->setWindowTitle(file.fileName());
|
||||
iView->resize( 400, 300 );
|
||||
Gui::getMainWindow()->addWindow( iView );
|
||||
iView->pointImageTo((void *)pPixelData, (unsigned long)imageq.width(), (unsigned long)imageq.height(), format, 0, true);
|
||||
|
||||
return Py::None();
|
||||
}
|
||||
};
|
||||
|
||||
PyObject* initModule()
|
||||
{
|
||||
return Base::Interpreter().addModule(new Module);
|
||||
}
|
||||
|
||||
} // namespace ImageGui
|
||||
@@ -1,82 +0,0 @@
|
||||
|
||||
if(OPENCV2_FOUND)
|
||||
add_definitions(-DHAVE_OPENCV2)
|
||||
endif(OPENCV2_FOUND)
|
||||
|
||||
|
||||
include_directories(
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${COIN3D_INCLUDE_DIRS}
|
||||
${OPENCV2_INCLUDE_DIR}
|
||||
${ZLIB_INCLUDE_DIR}
|
||||
${PYTHON_INCLUDE_DIRS}
|
||||
${XercesC_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
if(MSVC)
|
||||
include_directories(
|
||||
${CMAKE_SOURCE_DIR}/src/3rdParty/OpenGL/api
|
||||
)
|
||||
endif(MSVC)
|
||||
|
||||
set(ImageGui_LIBS
|
||||
Image
|
||||
FreeCADGui
|
||||
${OpenCV2_LIBRARIES}
|
||||
${OPENGL_glu_LIBRARY}
|
||||
)
|
||||
|
||||
SET(ImageGui_RES_SRCS
|
||||
Resources/Image.qrc
|
||||
)
|
||||
|
||||
set(ImageGui_UIC_SRCS
|
||||
ImageOrientationDialog.ui
|
||||
)
|
||||
|
||||
qt_add_resources(ImageGui_QRC_SRCS ${ImageGui_RES_SRCS})
|
||||
|
||||
SET(ImageGui_SRCS
|
||||
${ImageGui_QRC_SRCS}
|
||||
${ImageGui_UIC_HDRS}
|
||||
AppImageGui.cpp
|
||||
AppImageGuiPy.cpp
|
||||
Command.cpp
|
||||
ImageOrientationDialog.cpp
|
||||
ImageOrientationDialog.h
|
||||
OpenGLImageBox.cpp
|
||||
OpenGLImageBox.h
|
||||
ViewProviderImagePlane.cpp
|
||||
ViewProviderImagePlane.h
|
||||
Resources/Image.qrc
|
||||
ImageView.cpp
|
||||
ImageView.h
|
||||
PreCompiled.cpp
|
||||
PreCompiled.h
|
||||
Workbench.cpp
|
||||
Workbench.h
|
||||
XpmImages.h
|
||||
)
|
||||
|
||||
if(FREECAD_USE_PCH)
|
||||
add_definitions(-D_PreComp_)
|
||||
GET_MSVC_PRECOMPILED_SOURCE("PreCompiled.cpp" PCH_SRCS ${ImageGui_SRCS})
|
||||
ADD_MSVC_PRECOMPILED_HEADER(ImageGui PreCompiled.h PreCompiled.cpp PCH_SRCS)
|
||||
endif(FREECAD_USE_PCH)
|
||||
|
||||
SET(ImageGuiIcon_SVG
|
||||
Resources/icons/ImageWorkbench.svg
|
||||
)
|
||||
|
||||
add_library(ImageGui SHARED ${ImageGui_SRCS} ${ImageGuiIcon_SVG})
|
||||
target_link_libraries(ImageGui ${ImageGui_LIBS})
|
||||
|
||||
|
||||
SET_BIN_DIR(ImageGui ImageGui /Mod/Image)
|
||||
SET_PYTHON_PREFIX_SUFFIX(ImageGui)
|
||||
|
||||
fc_copy_sources(ImageGui "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Image" ${ImageGuiIcon_SVG})
|
||||
|
||||
INSTALL(TARGETS ImageGui DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
INSTALL(FILES ${ImageGuiIcon_SVG} DESTINATION "${CMAKE_INSTALL_DATADIR}/Mod/Image/Resources/icons")
|
||||
@@ -1,240 +0,0 @@
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Library General Public License as *
|
||||
* published by the Free Software Foundation; either version 2 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* for detail see the LICENCE text file. *
|
||||
* Jürgen Riegel 2002 *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
#ifndef _PreComp_
|
||||
# include <QFileDialog>
|
||||
# include <QImage>
|
||||
# include <QImageReader>
|
||||
# include <QMessageBox>
|
||||
# include <QTextStream>
|
||||
#endif
|
||||
|
||||
#include <ctime>
|
||||
#if defined(FC_OS_WIN32)
|
||||
#include <sys/timeb.h>
|
||||
#endif
|
||||
|
||||
#include <App/Document.h>
|
||||
#include <Base/Exception.h>
|
||||
#include <Base/Interpreter.h>
|
||||
#include <Base/Tools.h>
|
||||
|
||||
#include <Gui/Application.h>
|
||||
#include <Gui/Command.h>
|
||||
#include <Gui/MainWindow.h>
|
||||
|
||||
#include "ImageOrientationDialog.h"
|
||||
|
||||
|
||||
#if HAVE_OPENCV2
|
||||
# include "opencv2/opencv.hpp"
|
||||
#endif
|
||||
|
||||
|
||||
#include "ImageView.h"
|
||||
|
||||
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
|
||||
using namespace ImageGui;
|
||||
|
||||
DEF_STD_CMD(CmdImageOpen)
|
||||
|
||||
CmdImageOpen::CmdImageOpen()
|
||||
: Command("Image_Open")
|
||||
{
|
||||
sAppModule = "Image";
|
||||
sGroup = QT_TR_NOOP("Image");
|
||||
sMenuText = QT_TR_NOOP("Open...");
|
||||
sToolTipText = QT_TR_NOOP("Open image view");
|
||||
sWhatsThis = "Image_Open";
|
||||
sStatusTip = sToolTipText;
|
||||
sPixmap = "Image_Open";
|
||||
}
|
||||
|
||||
void CmdImageOpen::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
|
||||
// add all supported QImage formats
|
||||
QString formats;
|
||||
QTextStream str(&formats);
|
||||
str << QObject::tr("Images") << " (";
|
||||
QList<QByteArray> qtformats = QImageReader::supportedImageFormats();
|
||||
for (QList<QByteArray>::Iterator it = qtformats.begin(); it != qtformats.end(); ++it) {
|
||||
str << "*." << it->toLower() << " ";
|
||||
}
|
||||
str << ");;" << QObject::tr("All files") << " (*.*)";
|
||||
// Reading an image
|
||||
QString s = QFileDialog::getOpenFileName(Gui::getMainWindow(), QObject::tr("Choose an image file to open"),
|
||||
QString(), formats);
|
||||
if (!s.isEmpty()) {
|
||||
try {
|
||||
s = Base::Tools::escapeEncodeFilename(s);
|
||||
// load the file with the module
|
||||
Command::doCommand(Command::Gui, "import Image, ImageGui");
|
||||
Command::doCommand(Command::Gui, "ImageGui.open(\"%s\",\"utf-8\")", (const char*)s.toUtf8());
|
||||
}
|
||||
catch (const Base::PyException& e) {
|
||||
// Usually thrown if the file is invalid somehow
|
||||
e.ReportException();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
DEF_STD_CMD_A(CmdCreateImagePlane)
|
||||
|
||||
CmdCreateImagePlane::CmdCreateImagePlane()
|
||||
:Command("Image_CreateImagePlane")
|
||||
{
|
||||
sAppModule = "Image";
|
||||
sGroup = QT_TR_NOOP("Image");
|
||||
sMenuText = QT_TR_NOOP("Create image plane...");
|
||||
sToolTipText = QT_TR_NOOP("Create a planar image in the 3D space");
|
||||
sWhatsThis = "Image_CreateImagePlane";
|
||||
sStatusTip = sToolTipText;
|
||||
sPixmap = "Image_CreateImagePlane";
|
||||
}
|
||||
|
||||
void CmdCreateImagePlane::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
|
||||
QString formats;
|
||||
QTextStream str(&formats);
|
||||
str << QObject::tr("Images") << " (";
|
||||
QList<QByteArray> qtformats = QImageReader::supportedImageFormats();
|
||||
for (QList<QByteArray>::Iterator it = qtformats.begin(); it != qtformats.end(); ++it) {
|
||||
str << "*." << it->toLower() << " ";
|
||||
}
|
||||
str << ");;" << QObject::tr("All files") << " (*.*)";
|
||||
// Reading an image
|
||||
QString s = QFileDialog::getOpenFileName(Gui::getMainWindow(), QObject::tr("Choose an image file to open"),
|
||||
QString(), formats);
|
||||
if (!s.isEmpty()) {
|
||||
|
||||
QImage impQ(s);
|
||||
if (impQ.isNull()) {
|
||||
QMessageBox::warning(Gui::getMainWindow(), QObject::tr("Error opening image"),
|
||||
QObject::tr("Could not load the chosen image"));
|
||||
return;
|
||||
}
|
||||
|
||||
// ask user for orientation
|
||||
ImageOrientationDialog Dlg;
|
||||
|
||||
if (Dlg.exec() != QDialog::Accepted)
|
||||
return; // canceled
|
||||
Base::Vector3d p = Dlg.Pos.getPosition();
|
||||
Base::Rotation r = Dlg.Pos.getRotation();
|
||||
|
||||
std::string FeatName = getUniqueObjectName("ImagePlane");
|
||||
double xPixelsPerM = impQ.dotsPerMeterX();
|
||||
double width = impQ.width();
|
||||
width = width * 1000 / xPixelsPerM;
|
||||
double yPixelsPerM = impQ.dotsPerMeterY();
|
||||
double height = impQ.height();
|
||||
height = height * 1000 / yPixelsPerM;
|
||||
|
||||
QString pyfile = Base::Tools::escapeEncodeFilename(s);
|
||||
|
||||
openCommand(QT_TRANSLATE_NOOP("Command", "Create ImagePlane"));
|
||||
doCommand(Doc, "App.activeDocument().addObject('Image::ImagePlane','%s\')", FeatName.c_str());
|
||||
doCommand(Doc, "App.activeDocument().%s.ImageFile = '%s'", FeatName.c_str(), (const char*)pyfile.toUtf8());
|
||||
doCommand(Doc, "App.activeDocument().%s.XSize = %f", FeatName.c_str(), width);
|
||||
doCommand(Doc, "App.activeDocument().%s.YSize = %f", FeatName.c_str(), height);
|
||||
doCommand(Doc, "App.activeDocument().%s.Placement = App.Placement(App.Vector(%f,%f,%f),App.Rotation(%f,%f,%f,%f))"
|
||||
, FeatName.c_str(), p.x, p.y, p.z, r[0], r[1], r[2], r[3]);
|
||||
doCommand(Doc, "App.activeDocument().%s.ViewObject.ShapeColor=(1.,1.,1.)", FeatName.c_str());
|
||||
doCommand(Doc, "Gui.SendMsgToActiveView('ViewFit')");
|
||||
commitCommand();
|
||||
}
|
||||
}
|
||||
|
||||
bool CmdCreateImagePlane::isActive()
|
||||
{
|
||||
return App::GetApplication().getActiveDocument();
|
||||
}
|
||||
|
||||
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
DEF_STD_CMD(CmdImageScaling)
|
||||
|
||||
CmdImageScaling::CmdImageScaling()
|
||||
: Command("Image_Scaling")
|
||||
{
|
||||
sAppModule = "Image";
|
||||
sGroup = QT_TR_NOOP("Image");
|
||||
sMenuText = QT_TR_NOOP("Scale...");
|
||||
sToolTipText = QT_TR_NOOP("Image Scaling");
|
||||
sWhatsThis = "Image_Scaling";
|
||||
sStatusTip = sToolTipText;
|
||||
sPixmap = "Image_Scaling";
|
||||
}
|
||||
|
||||
void CmdImageScaling::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
// To Be Defined
|
||||
|
||||
}
|
||||
|
||||
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
#if HAVE_OPENCV2
|
||||
DEF_STD_CMD(CmdImageCapturerTest)
|
||||
|
||||
CmdImageCapturerTest::CmdImageCapturerTest()
|
||||
: Command("Image_CapturerTest")
|
||||
{
|
||||
sAppModule = "Image";
|
||||
sGroup = ("Image");
|
||||
sMenuText = ("CapturerTest");
|
||||
sToolTipText = ("test camara capturing");
|
||||
sWhatsThis = "Image_CapturerTest";
|
||||
sStatusTip = sToolTipText;
|
||||
sPixmap = "camera-photo";
|
||||
}
|
||||
|
||||
void CmdImageCapturerTest::activated(int iMsg)
|
||||
{
|
||||
using namespace cv;
|
||||
|
||||
VideoCapture cap(0); // open the default camera
|
||||
if(!cap.isOpened()) // check if we succeeded
|
||||
return;
|
||||
|
||||
Mat edges;
|
||||
namedWindow("edges",1);
|
||||
for(;;)
|
||||
{
|
||||
Mat frame;
|
||||
cap >> frame; // get a new frame from camera
|
||||
cvtColor(frame, edges, CV_BGR2GRAY);
|
||||
GaussianBlur(edges, edges, Size(7,7), 1.5, 1.5);
|
||||
Canny(edges, edges, 0, 30, 3);
|
||||
imshow("edges", edges);
|
||||
if(waitKey(30) >= 0) break;
|
||||
}
|
||||
// the camera will be deinitialized automatically in VideoCapture destructor
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
void CreateImageCommands()
|
||||
{
|
||||
Gui::CommandManager& rcCmdMgr = Gui::Application::Instance->commandManager();
|
||||
|
||||
rcCmdMgr.addCommand(new CmdImageOpen());
|
||||
rcCmdMgr.addCommand(new CmdCreateImagePlane());
|
||||
#if HAVE_OPENCV2
|
||||
rcCmdMgr.addCommand(new CmdImageCapturerTest());
|
||||
#endif
|
||||
}
|
||||
@@ -1,122 +0,0 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2013 Werner Mayer <wmayer[at]users.sourceforge.net> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
#ifndef _PreComp_
|
||||
# include <QDialog>
|
||||
#endif
|
||||
|
||||
#include <Base/Tools.h>
|
||||
#include <Gui/BitmapFactory.h>
|
||||
#include <Gui/MainWindow.h>
|
||||
|
||||
#include "ImageOrientationDialog.h"
|
||||
#include "ui_ImageOrientationDialog.h"
|
||||
|
||||
|
||||
using namespace ImageGui;
|
||||
|
||||
ImageOrientationDialog::ImageOrientationDialog()
|
||||
: QDialog(Gui::getMainWindow()), ui(new Ui_ImageOrientationDialog)
|
||||
{
|
||||
DirType = 0;
|
||||
ui->setupUi(this);
|
||||
onPreview();
|
||||
|
||||
connect(ui->Reverse_checkBox, &QCheckBox::clicked, this, &ImageOrientationDialog::onPreview);
|
||||
connect(ui->XY_radioButton , &QRadioButton::clicked, this, &ImageOrientationDialog::onPreview);
|
||||
connect(ui->XZ_radioButton , &QRadioButton::clicked, this, &ImageOrientationDialog::onPreview);
|
||||
connect(ui->YZ_radioButton , &QRadioButton::clicked, this, &ImageOrientationDialog::onPreview);
|
||||
}
|
||||
|
||||
ImageOrientationDialog::~ImageOrientationDialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void ImageOrientationDialog::accept()
|
||||
{
|
||||
double offset = ui->Offset_doubleSpinBox->value().getValue();
|
||||
bool reverse = ui->Reverse_checkBox->isChecked();
|
||||
if (ui->XY_radioButton->isChecked()) {
|
||||
if (reverse) {
|
||||
Pos = Base::Placement(Base::Vector3d(0,0,offset),Base::Rotation(-1.0,0.0,0.0,0.0));
|
||||
DirType = 1;
|
||||
}
|
||||
else {
|
||||
Pos = Base::Placement(Base::Vector3d(0,0,offset),Base::Rotation());
|
||||
DirType = 0;
|
||||
}
|
||||
}
|
||||
else if (ui->XZ_radioButton->isChecked()) {
|
||||
if (reverse) {
|
||||
Pos = Base::Placement(Base::Vector3d(0,offset,0),Base::Rotation(Base::Vector3d(0,sqrt(2.0)/2.0,sqrt(2.0)/2.0),M_PI));
|
||||
DirType = 3;
|
||||
}
|
||||
else {
|
||||
Pos = Base::Placement(Base::Vector3d(0,offset,0),Base::Rotation(Base::Vector3d(-1,0,0),1.5*M_PI));
|
||||
DirType = 2;
|
||||
}
|
||||
}
|
||||
else if (ui->YZ_radioButton->isChecked()) {
|
||||
if (reverse) {
|
||||
Pos = Base::Placement(Base::Vector3d(offset,0,0),Base::Rotation(-0.5,0.5,0.5,-0.5));
|
||||
DirType = 5;
|
||||
}
|
||||
else {
|
||||
Pos = Base::Placement(Base::Vector3d(offset,0,0),Base::Rotation(0.5,0.5,0.5,0.5));
|
||||
DirType = 4;
|
||||
}
|
||||
}
|
||||
|
||||
QDialog::accept();
|
||||
}
|
||||
|
||||
void ImageOrientationDialog::onPreview()
|
||||
{
|
||||
std::string icon;
|
||||
bool reverse = ui->Reverse_checkBox->isChecked();
|
||||
if (ui->XY_radioButton->isChecked()) {
|
||||
if (reverse)
|
||||
icon = "view-bottom";
|
||||
else
|
||||
icon = "view-top";
|
||||
}
|
||||
else if (ui->XZ_radioButton->isChecked()) {
|
||||
if (reverse)
|
||||
icon = "view-rear";
|
||||
else
|
||||
icon = "view-front";
|
||||
}
|
||||
else if (ui->YZ_radioButton->isChecked()) {
|
||||
if (reverse)
|
||||
icon = "view-left";
|
||||
else
|
||||
icon = "view-right";
|
||||
}
|
||||
|
||||
ui->previewLabel->setPixmap(
|
||||
Gui::BitmapFactory().pixmapFromSvg(icon.c_str(),
|
||||
ui->previewLabel->size()));
|
||||
}
|
||||
|
||||
#include "moc_ImageOrientationDialog.cpp"
|
||||
@@ -1,54 +0,0 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2013 Werner Mayer <wmayer[at]users.sourceforge.net> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef IMAGEGUI_IMAGEORIENTATIONDIALOG_H
|
||||
#define IMAGEGUI_IMAGEORIENTATIONDIALOG_H
|
||||
|
||||
#include <Base/Placement.h>
|
||||
#include <QDialog>
|
||||
|
||||
namespace ImageGui {
|
||||
|
||||
class Ui_ImageOrientationDialog;
|
||||
class ImageOrientationDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ImageOrientationDialog();
|
||||
~ImageOrientationDialog() override;
|
||||
|
||||
Base::Placement Pos;
|
||||
int DirType;
|
||||
|
||||
void accept() override;
|
||||
|
||||
protected Q_SLOTS:
|
||||
void onPreview();
|
||||
|
||||
private:
|
||||
Ui_ImageOrientationDialog* ui;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // IMAGEGUI_IMAGEORIENTATIONDIALOG_H
|
||||
@@ -1,709 +0,0 @@
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This is a view displaying an image or portion of an image in a box. *
|
||||
* *
|
||||
* Author: Graeme van der Vlugt *
|
||||
* Copyright: Imetric 3D GmbH *
|
||||
* Year: 2004 *
|
||||
* *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Library General Public License as *
|
||||
* published by the Free Software Foundation; either version 2 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* for detail see the LICENCE text file. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
#ifndef _PreComp_
|
||||
# include <cmath>
|
||||
|
||||
# include <QAction>
|
||||
# include <QApplication>
|
||||
# include <QMenu>
|
||||
# include <QMouseEvent>
|
||||
# include <QStatusBar>
|
||||
# include <QToolBar>
|
||||
#endif
|
||||
|
||||
#include <App/Application.h>
|
||||
#include <Base/Parameter.h>
|
||||
|
||||
#include "ImageView.h"
|
||||
#include "XpmImages.h"
|
||||
|
||||
|
||||
using namespace ImageGui;
|
||||
|
||||
|
||||
/* TRANSLATOR ImageGui::ImageView */
|
||||
|
||||
TYPESYSTEM_SOURCE_ABSTRACT(ImageGui::ImageView, Gui::MDIView)
|
||||
|
||||
ImageView::ImageView(QWidget* parent)
|
||||
: MDIView(nullptr, parent), _ignoreCloseEvent(false)
|
||||
{
|
||||
// Create an OpenGL widget for displaying images
|
||||
// Since Qt5 there is a weird behaviour when creating a GLImageBox.
|
||||
// It works correctly for the first time when creating an image view
|
||||
// but only when no 3d view is created. For the second time or if a
|
||||
// 3d view is created it fails with an assert() inside the function
|
||||
// QWindowPrivate::create because QWindowsIntegration::createPlatformWindow
|
||||
// fails to create an instance of QPlatformWindow.
|
||||
// The reason for the failure is that for the passed parent widget
|
||||
// i.e. this ImageView the QPlatformWindow is also null.
|
||||
// As said above it works the very first time because at construction time
|
||||
// of GLImageBox it doesn't set the ImageView as parent but the parent of
|
||||
// the ImageView, i.e. the main window. This mafic happens inside the
|
||||
// function QWidgetPrivate::setParent_sys at this line:
|
||||
// QWidget *parentWithWindow =
|
||||
// newparent ? (newparent->windowHandle() ? newparent : newparent->nativeParentWidget()) : 0;
|
||||
// where newparent->nativeParentWidget() returns the main window.
|
||||
// For the second time this magic fails. Interesting in this context is
|
||||
// that for the 3d view this magic always works.
|
||||
// In order to fix this problem we directly pass the pointer of the parent
|
||||
// of this ImageView, i.e. the main window.
|
||||
// Note:
|
||||
// Since Qt5 the class QGLWidget is marked as deprecated and should be
|
||||
// replaced by QOpenGLWidget.
|
||||
|
||||
_pGLImageBox = new GLImageBox(this);
|
||||
setCentralWidget(_pGLImageBox);
|
||||
|
||||
// enable mouse tracking when moving even if no buttons are pressed
|
||||
setMouseTracking(true);
|
||||
|
||||
// enable the mouse events
|
||||
_mouseEventsEnabled = true;
|
||||
|
||||
// Create the default status bar for displaying messages
|
||||
enableStatusBar(true);
|
||||
|
||||
_currMode = nothing;
|
||||
_currX = 0;
|
||||
_currY = 0;
|
||||
|
||||
// Create the actions, menus and toolbars
|
||||
createActions();
|
||||
|
||||
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath
|
||||
("User parameter:BaseApp/Preferences/View");
|
||||
_invertZoom = hGrp->GetBool("InvertZoom", true);
|
||||
|
||||
// connect other slots
|
||||
connect(_pGLImageBox, &GLImageBox::drawGraphics, this, &ImageView::drawGraphics);
|
||||
}
|
||||
|
||||
ImageView::~ImageView()
|
||||
{
|
||||
// No need to delete _pGLImageBox or other widgets as this gets done automatically by QT
|
||||
}
|
||||
|
||||
// Create the action groups, actions, menus and toolbars
|
||||
void ImageView::createActions()
|
||||
{
|
||||
// Create actions
|
||||
_pFitAct = new QAction(this);
|
||||
_pFitAct->setText(tr("&Fit image"));
|
||||
_pFitAct->setIcon(QPixmap(image_stretch));
|
||||
_pFitAct->setStatusTip(tr("Stretch the image to fit the view"));
|
||||
connect(_pFitAct, &QAction::triggered, this, &ImageView::fitImage);
|
||||
|
||||
_pOneToOneAct = new QAction(this);
|
||||
_pOneToOneAct->setText(tr("&1:1 scale"));
|
||||
_pOneToOneAct->setIcon(QPixmap(image_oneToOne));
|
||||
_pOneToOneAct->setStatusTip(tr("Display the image at a 1:1 scale"));
|
||||
connect(_pOneToOneAct, &QAction::triggered, this, &ImageView::oneToOneImage);
|
||||
|
||||
// Create the menus and add the actions
|
||||
_pContextMenu = new QMenu(this);
|
||||
_pContextMenu->addAction(_pFitAct);
|
||||
_pContextMenu->addAction(_pOneToOneAct);
|
||||
|
||||
// Create the toolbars and add the actions
|
||||
_pStdToolBar = this->addToolBar(tr("Standard"));
|
||||
_pStdToolBar->addAction(_pFitAct);
|
||||
_pStdToolBar->addAction(_pOneToOneAct);
|
||||
}
|
||||
|
||||
QSize ImageView::minimumSizeHint () const
|
||||
{
|
||||
return QSize(40, 40);
|
||||
}
|
||||
|
||||
// Enable or disable the status bar
|
||||
void ImageView::enableStatusBar(bool Enable)
|
||||
{
|
||||
if (Enable)
|
||||
{
|
||||
// Create the default status bar for displaying messages and disable the gripper
|
||||
_statusBarEnabled = true;
|
||||
statusBar()->setSizeGripEnabled( false );
|
||||
statusBar()->showMessage(tr("Ready..."));
|
||||
}
|
||||
else
|
||||
{
|
||||
// Delete the status bar
|
||||
_statusBarEnabled = false;
|
||||
QStatusBar *pStatusBar = statusBar();
|
||||
delete pStatusBar;
|
||||
}
|
||||
}
|
||||
|
||||
// Enable or disable the toolbar
|
||||
void ImageView::enableToolBar(bool Enable)
|
||||
{
|
||||
_pStdToolBar->setVisible(Enable);
|
||||
}
|
||||
|
||||
// Enable or disable the mouse events
|
||||
void ImageView::enableMouseEvents(bool Enable)
|
||||
{
|
||||
_mouseEventsEnabled = Enable;
|
||||
}
|
||||
|
||||
// Enable (show) or disable (hide) the '1:1' action
|
||||
// Current state (zoom, position) is left unchanged
|
||||
void ImageView::enableOneToOneAction(bool Enable)
|
||||
{
|
||||
_pOneToOneAct->setVisible(Enable);
|
||||
}
|
||||
|
||||
// Enable (show) or disable (hide) the 'fit image' action
|
||||
// Current state (zoom, position) is left unchanged
|
||||
void ImageView::enableFitImageAction(bool Enable)
|
||||
{
|
||||
_pFitAct->setVisible(Enable);
|
||||
}
|
||||
|
||||
// Slot function to fit (stretch/shrink) the image to the view size
|
||||
void ImageView::fitImage()
|
||||
{
|
||||
_pGLImageBox->stretchToFit();
|
||||
}
|
||||
|
||||
|
||||
// Slot function to display the image at a 1:1 scale"
|
||||
void ImageView::oneToOneImage()
|
||||
{
|
||||
_pGLImageBox->setNormal();
|
||||
_pGLImageBox->redraw();
|
||||
updateStatusBar();
|
||||
}
|
||||
|
||||
// Show the original colors (no enhancement)
|
||||
// but image will be scaled for the number of significant bits
|
||||
// (i.e if 12 significant bits (in 16-bit image) a value of 4095 will be shown as white)
|
||||
void ImageView::showOriginalColors()
|
||||
{
|
||||
_pGLImageBox->clearColorMap();
|
||||
_pGLImageBox->redraw();
|
||||
}
|
||||
|
||||
// Create a color map
|
||||
// (All red entries come first, then green, then blue, then alpha)
|
||||
// returns 0 for OK, -1 for memory allocation error
|
||||
// numRequestedEntries ... requested number of map entries (used if not greater than system maximum or
|
||||
// if not greater than the maximum number of intensity values in the current image).
|
||||
// Pass zero to use the maximum possible. Always check the actual number of entries
|
||||
// created using getNumColorMapEntries() after a call to this method.
|
||||
// Initialise ... flag to initialise the map to a linear scale or not
|
||||
int ImageView::createColorMap(int numEntriesReq, bool Initialise)
|
||||
{
|
||||
return (_pGLImageBox->createColorMap(numEntriesReq, Initialise));
|
||||
}
|
||||
|
||||
// Gets the number of entries in the color map (number of entries for each color)
|
||||
int ImageView::getNumColorMapEntries() const
|
||||
{
|
||||
return (_pGLImageBox->getNumColorMapEntries());
|
||||
}
|
||||
|
||||
// Clears the color map
|
||||
void ImageView::clearColorMap()
|
||||
{
|
||||
_pGLImageBox->clearColorMap();
|
||||
}
|
||||
|
||||
// Sets a color map RGBA value
|
||||
// (All red entries come first, then green, then blue, then alpha)
|
||||
// index ... index of color map RGBA entry
|
||||
// red ... intensity value for this red entry (range 0 to 1)
|
||||
// green ... intensity value for this green entry (range 0 to 1)
|
||||
// blue ... intensity value for this blue entry (range 0 to 1)
|
||||
// alpha ... intensity value for this alpha entry (range 0 to 1)
|
||||
int ImageView::setColorMapRGBAValue(int index, float red, float green, float blue, float alpha)
|
||||
{
|
||||
return (_pGLImageBox->setColorMapRGBAValue(index, red, green, blue, alpha));
|
||||
}
|
||||
|
||||
// Sets a color map red value
|
||||
// (All red entries come first, then green, then blue, then alpha)
|
||||
// index ... index of color map red entry
|
||||
// value ... intensity value for this red entry (range 0 to 1)
|
||||
int ImageView::setColorMapRedValue(int index, float value)
|
||||
{
|
||||
return (_pGLImageBox->setColorMapRedValue(index, value));
|
||||
}
|
||||
|
||||
// Sets a color map green value
|
||||
// (All red entries come first, then green, then blue, then alpha)
|
||||
// index ... index of color map green entry
|
||||
// value ... intensity value for this green entry (range 0 to 1)
|
||||
int ImageView::setColorMapGreenValue(int index, float value)
|
||||
{
|
||||
return (_pGLImageBox->setColorMapGreenValue(index, value));
|
||||
}
|
||||
|
||||
// Sets a color map blue value
|
||||
// (All red entries come first, then green, then blue, then alpha)
|
||||
// index ... index of color map blue entry
|
||||
// value ... intensity value for this blue entry (range 0 to 1)
|
||||
int ImageView::setColorMapBlueValue(int index, float value)
|
||||
{
|
||||
return (_pGLImageBox->setColorMapBlueValue(index, value));
|
||||
}
|
||||
|
||||
// Sets a color map alpha value
|
||||
// (All red entries come first, then green, then blue, then alpha)
|
||||
// index ... index of color map alpha entry
|
||||
// value ... intensity value for this alpha entry (range 0 to 1)
|
||||
int ImageView::setColorMapAlphaValue(int index, float value)
|
||||
{
|
||||
return (_pGLImageBox->setColorMapAlphaValue(index, value));
|
||||
}
|
||||
|
||||
// Clears the image data
|
||||
void ImageView::clearImage()
|
||||
{
|
||||
_pGLImageBox->clearImage();
|
||||
_pGLImageBox->redraw(); // clears view
|
||||
updateStatusBar();
|
||||
}
|
||||
|
||||
// Load image by copying the pixel data
|
||||
// The image object inside this view object will take ownership of the copied pixel data
|
||||
// (the source image is still controlled by the caller)
|
||||
// If numSigBitsPerSample = 0 then the full range is assumed to be significant
|
||||
// displayMode ... controls the initial display of the image, one of:
|
||||
// IV_DISPLAY_NOCHANGE ... no change to view settings when displaying a new image
|
||||
// IV_DISPLAY_FITIMAGE ... fit-image when displaying a new image (other settings remain the same)
|
||||
// IV_DISPLAY_RESET ... reset settings when displaying a new image (image will be displayed at 1:1 scale with no color map)
|
||||
// Returns:
|
||||
// 0 for OK
|
||||
// -1 for invalid color format
|
||||
// -2 for memory allocation error
|
||||
int ImageView::createImageCopy(void* pSrcPixelData, unsigned long width, unsigned long height, int format, unsigned short numSigBitsPerSample, int displayMode)
|
||||
{
|
||||
int ret = _pGLImageBox->createImageCopy(pSrcPixelData, width, height, format, numSigBitsPerSample, displayMode);
|
||||
showOriginalColors();
|
||||
updateStatusBar();
|
||||
return ret;
|
||||
}
|
||||
|
||||
// Make the image object inside this view object point to another image source
|
||||
// If takeOwnership is false then:
|
||||
// This object will not own (control) or copy the pixel data
|
||||
// (the source image is still controlled by the caller)
|
||||
// Else if takeOwnership is true then:
|
||||
// This object will take ownership (control) of the pixel data
|
||||
// (the source image is not (should not be) controlled by the caller anymore)
|
||||
// In this case the memory must have been allocated with the new operator (because this class will use the delete operator)
|
||||
// If numSigBitsPerSample = 0 then the full range is assumed to be significant
|
||||
// displayMode ... controls the initial display of the image, one of:
|
||||
// IV_DISPLAY_NOCHANGE ... no change to view settings when displaying a new image
|
||||
// IV_DISPLAY_FITIMAGE ... fit-image when displaying a new image (other settings remain the same)
|
||||
// IV_DISPLAY_RESET ... reset settings when displaying a new image (image will be displayed at 1:1 scale with no color map)
|
||||
// Returns:
|
||||
// 0 for OK
|
||||
// -1 for invalid color format
|
||||
int ImageView::pointImageTo(void* pSrcPixelData, unsigned long width, unsigned long height, int format, unsigned short numSigBitsPerSample, bool takeOwnership, int displayMode)
|
||||
{
|
||||
int ret = _pGLImageBox->pointImageTo(pSrcPixelData, width, height, format, numSigBitsPerSample, takeOwnership, displayMode);
|
||||
showOriginalColors();
|
||||
updateStatusBar();
|
||||
return ret;
|
||||
}
|
||||
|
||||
// called when user presses X
|
||||
void ImageView::closeEvent(QCloseEvent *e)
|
||||
{
|
||||
if (_ignoreCloseEvent)
|
||||
{
|
||||
// ignore the close event
|
||||
e->ignore();
|
||||
Q_EMIT closeEventIgnored(); // and emit a signal that we ignored it
|
||||
}
|
||||
else
|
||||
{
|
||||
Gui::MDIView::closeEvent(e); // if called the window will be closed anyway
|
||||
}
|
||||
}
|
||||
|
||||
// Mouse press event
|
||||
void ImageView::mousePressEvent(QMouseEvent* cEvent)
|
||||
{
|
||||
if (_mouseEventsEnabled)
|
||||
{
|
||||
// Mouse event coordinates are relative to top-left of image view (including toolbar!)
|
||||
// Get current cursor position relative to top-left of image box
|
||||
QPoint offset = _pGLImageBox->pos();
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
|
||||
int box_x = cEvent->x() - offset.x();
|
||||
int box_y = cEvent->y() - offset.y();
|
||||
#else
|
||||
int box_x = cEvent->position().x() - offset.x();
|
||||
int box_y = cEvent->position().y() - offset.y();
|
||||
#endif
|
||||
_currX = box_x;
|
||||
_currY = box_y;
|
||||
switch(cEvent->buttons())
|
||||
{
|
||||
case Qt::MiddleButton:
|
||||
_currMode = panning;
|
||||
this->setCursor(QCursor(Qt::ClosedHandCursor));
|
||||
startDrag();
|
||||
break;
|
||||
//case Qt::LeftButton | Qt::MiddleButton:
|
||||
// _currMode = zooming;
|
||||
// break;
|
||||
case Qt::LeftButton:
|
||||
if (cEvent->modifiers() & Qt::ShiftModifier)
|
||||
_currMode = addselection;
|
||||
else
|
||||
_currMode = selection;
|
||||
break;
|
||||
case Qt::RightButton:
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
|
||||
_pContextMenu->exec(cEvent->globalPos());
|
||||
#else
|
||||
_pContextMenu->exec(cEvent->globalPosition().toPoint());
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
_currMode = nothing;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ImageView::mouseDoubleClickEvent(QMouseEvent* cEvent)
|
||||
{
|
||||
if (_mouseEventsEnabled)
|
||||
{
|
||||
// Mouse event coordinates are relative to top-left of image view (including toolbar!)
|
||||
// Get current cursor position relative to top-left of image box
|
||||
QPoint offset = _pGLImageBox->pos();
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
|
||||
int box_x = cEvent->x() - offset.x();
|
||||
int box_y = cEvent->y() - offset.y();
|
||||
#else
|
||||
int box_x = cEvent->position().x() - offset.x();
|
||||
int box_y = cEvent->position().y() - offset.y();
|
||||
#endif
|
||||
_currX = box_x;
|
||||
_currY = box_y;
|
||||
if(cEvent->button() == Qt::MiddleButton)
|
||||
{
|
||||
double icX = _pGLImageBox->WCToIC_X(_currX);
|
||||
double icY = _pGLImageBox->WCToIC_Y(_currY);
|
||||
//int pixX = (int)floor(icX + 0.5);
|
||||
//int pixY = (int)floor(icY + 0.5);
|
||||
_pGLImageBox->setZoomFactor(_pGLImageBox->getZoomFactor(), true, (int)floor(icX + 0.5), (int)floor(icY + 0.5));
|
||||
_pGLImageBox->redraw();
|
||||
updateStatusBar();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Mouse move event
|
||||
void ImageView::mouseMoveEvent(QMouseEvent* cEvent)
|
||||
{
|
||||
#if QT_VERSION < 0x050900
|
||||
QApplication::flush();
|
||||
#endif
|
||||
|
||||
// Mouse event coordinates are relative to top-left of image view (including toolbar!)
|
||||
// Get current cursor position relative to top-left of image box
|
||||
QPoint offset = _pGLImageBox->pos();
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
|
||||
int box_x = cEvent->x() - offset.x();
|
||||
int box_y = cEvent->y() - offset.y();
|
||||
#else
|
||||
int box_x = cEvent->position().x() - offset.x();
|
||||
int box_y = cEvent->position().y() - offset.y();
|
||||
#endif
|
||||
if (_mouseEventsEnabled)
|
||||
{
|
||||
switch(_currMode)
|
||||
{
|
||||
case nothing:
|
||||
break;
|
||||
case panning:
|
||||
_pGLImageBox->relMoveWC(box_x - dragStartWCx, box_y - dragStartWCy);
|
||||
break;
|
||||
case zooming:
|
||||
zoom(_currX, _currY, box_x, box_y);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
_currX = box_x;
|
||||
_currY = box_y;
|
||||
|
||||
// Update the status bar
|
||||
updateStatusBar();
|
||||
}
|
||||
|
||||
// Mouse release event
|
||||
void ImageView::mouseReleaseEvent(QMouseEvent* cEvent)
|
||||
{
|
||||
if (_mouseEventsEnabled)
|
||||
{
|
||||
// Mouse event coordinates are relative to top-left of image view (including toolbar!)
|
||||
// Get current cursor position relative to top-left of image box
|
||||
QPoint offset = _pGLImageBox->pos();
|
||||
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
|
||||
int box_x = cEvent->x() - offset.x();
|
||||
int box_y = cEvent->y() - offset.y();
|
||||
#else
|
||||
int box_x = cEvent->position().x() - offset.x();
|
||||
int box_y = cEvent->position().y() - offset.y();
|
||||
#endif
|
||||
switch(_currMode)
|
||||
{
|
||||
case selection:
|
||||
select(box_x, box_y);
|
||||
break;
|
||||
case addselection:
|
||||
addSelect(box_x, box_y);
|
||||
break;
|
||||
case panning:
|
||||
this->unsetCursor();
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
_currMode = nothing;
|
||||
}
|
||||
}
|
||||
|
||||
// Mouse wheel event
|
||||
void ImageView::wheelEvent(QWheelEvent * cEvent)
|
||||
{
|
||||
if (_mouseEventsEnabled)
|
||||
{
|
||||
// Mouse event coordinates are relative to top-left of image view (including toolbar!)
|
||||
// Get current cursor position relative to top-left of image box
|
||||
QPoint offset = _pGLImageBox->pos();
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5,15,0)
|
||||
QPoint pos = cEvent->position().toPoint();
|
||||
int box_x = pos.x() - offset.x();
|
||||
int box_y = pos.y() - offset.y();
|
||||
#else
|
||||
int box_x = cEvent->x() - offset.x();
|
||||
int box_y = cEvent->y() - offset.y();
|
||||
#endif
|
||||
|
||||
// Zoom around centrally displayed image point
|
||||
int numTicks = cEvent->angleDelta().y() / 120;
|
||||
if (_invertZoom)
|
||||
numTicks = -numTicks;
|
||||
|
||||
int ICx, ICy;
|
||||
_pGLImageBox->getCentrePoint(ICx, ICy);
|
||||
_pGLImageBox->setZoomFactor(_pGLImageBox->getZoomFactor() / pow(2.0, (double)numTicks), true, ICx, ICy);
|
||||
_pGLImageBox->redraw();
|
||||
_currX = box_x;
|
||||
_currY = box_y;
|
||||
|
||||
// Update the status bar
|
||||
updateStatusBar();
|
||||
}
|
||||
}
|
||||
|
||||
void ImageView::showEvent (QShowEvent *)
|
||||
{
|
||||
_pGLImageBox->setFocus();
|
||||
}
|
||||
|
||||
// Update the status bar with the image parameters for the current mouse position
|
||||
void ImageView::updateStatusBar()
|
||||
{
|
||||
if (_statusBarEnabled)
|
||||
{
|
||||
// Create the text string to display in the status bar
|
||||
QString txt = createStatusBarText();
|
||||
|
||||
// Update status bar with new text
|
||||
statusBar()->showMessage(txt);
|
||||
}
|
||||
}
|
||||
|
||||
// Create the text to display in the status bar.
|
||||
// Gets called by updateStatusBar()
|
||||
// Override this function in a derived class to add your own text
|
||||
QString ImageView::createStatusBarText()
|
||||
{
|
||||
// Get some image parameters
|
||||
//unsigned short numImageSamples = _pGLImageBox->getImageNumSamplesPerPix();
|
||||
double zoomFactor = _pGLImageBox->getZoomFactor();
|
||||
double icX = _pGLImageBox->WCToIC_X(_currX);
|
||||
double icY = _pGLImageBox->WCToIC_Y(_currY);
|
||||
int pixX = (int)floor(icX + 0.5);
|
||||
int pixY = (int)floor(icY + 0.5);
|
||||
int colorFormat = _pGLImageBox->getImageFormat();
|
||||
|
||||
// Create text for status bar
|
||||
QString txt;
|
||||
if ((colorFormat == IB_CF_GREY8) ||
|
||||
(colorFormat == IB_CF_GREY16) ||
|
||||
(colorFormat == IB_CF_GREY32))
|
||||
{
|
||||
double grey_value;
|
||||
if (_pGLImageBox->getImageSample(pixX, pixY, 0, grey_value) == 0)
|
||||
txt = QString::fromLatin1("x,y = %1,%2 | %3 = %4 | %5 = %6")
|
||||
.arg(icX,0,'f',2).arg(icY,0,'f',2)
|
||||
.arg(tr("grey")).arg((int)grey_value)
|
||||
.arg(tr("zoom")).arg(zoomFactor,0,'f',1);
|
||||
else
|
||||
txt = QString::fromLatin1("x,y = %1 | %2 = %3")
|
||||
.arg(tr("outside image"), tr("zoom")).arg(zoomFactor,0,'f',1);
|
||||
}
|
||||
else if ((colorFormat == IB_CF_RGB24) ||
|
||||
(colorFormat == IB_CF_RGB48))
|
||||
{
|
||||
double red, green, blue;
|
||||
if ((_pGLImageBox->getImageSample(pixX, pixY, 0, red) != 0) ||
|
||||
(_pGLImageBox->getImageSample(pixX, pixY, 1, green) != 0) ||
|
||||
(_pGLImageBox->getImageSample(pixX, pixY, 2, blue) != 0))
|
||||
txt = QString::fromLatin1("x,y = %1 | %2 = %3")
|
||||
.arg(tr("outside image"), tr("zoom")).arg(zoomFactor,0,'f',1);
|
||||
else
|
||||
txt = QString::fromLatin1("x,y = %1,%2 | rgb = %3,%4,%5 | %6 = %7")
|
||||
.arg(icX,0,'f',2).arg(icY,0,'f',2)
|
||||
.arg((int)red).arg((int)green).arg((int)blue)
|
||||
.arg(tr("zoom")).arg(zoomFactor,0,'f',1);
|
||||
}
|
||||
else if ((colorFormat == IB_CF_BGR24) ||
|
||||
(colorFormat == IB_CF_BGR48))
|
||||
{
|
||||
double red, green, blue;
|
||||
if ((_pGLImageBox->getImageSample(pixX, pixY, 0, blue) != 0) ||
|
||||
(_pGLImageBox->getImageSample(pixX, pixY, 1, green) != 0) ||
|
||||
(_pGLImageBox->getImageSample(pixX, pixY, 2, red) != 0))
|
||||
txt = QString::fromLatin1("x,y = %1 | %2 = %3")
|
||||
.arg(tr("outside image"), tr("zoom")).arg(zoomFactor,0,'f',1);
|
||||
else
|
||||
txt = QString::fromLatin1("x,y = %1,%2 | rgb = %3,%4,%5 | %6 = %7")
|
||||
.arg(icX,0,'f',2).arg(icY,0,'f',2)
|
||||
.arg((int)red).arg((int)green).arg((int)blue)
|
||||
.arg(tr("zoom")).arg(zoomFactor,0,'f',1);
|
||||
}
|
||||
else if ((colorFormat == IB_CF_RGBA32) ||
|
||||
(colorFormat == IB_CF_RGBA64))
|
||||
{
|
||||
double red, green, blue, alpha;
|
||||
if ((_pGLImageBox->getImageSample(pixX, pixY, 0, red) != 0) ||
|
||||
(_pGLImageBox->getImageSample(pixX, pixY, 1, green) != 0) ||
|
||||
(_pGLImageBox->getImageSample(pixX, pixY, 2, blue) != 0) ||
|
||||
(_pGLImageBox->getImageSample(pixX, pixY, 3, alpha) != 0))
|
||||
txt = QString::fromLatin1("x,y = %1 | %2 = %3")
|
||||
.arg(tr("outside image"), tr("zoom")).arg(zoomFactor,0,'f',1);
|
||||
else
|
||||
txt = QString::fromLatin1("x,y = %1,%2 | rgba = %3,%4,%5,%6 | %7 = %8")
|
||||
.arg(icX,0,'f',2).arg(icY,0,'f',2)
|
||||
.arg((int)red).arg((int)green).arg((int)blue).arg((int)alpha)
|
||||
.arg(tr("zoom")).arg(zoomFactor,0,'f',1);
|
||||
}
|
||||
else if ((colorFormat == IB_CF_BGRA32) ||
|
||||
(colorFormat == IB_CF_BGRA64))
|
||||
{
|
||||
double red, green, blue, alpha;
|
||||
if ((_pGLImageBox->getImageSample(pixX, pixY, 0, blue) != 0) ||
|
||||
(_pGLImageBox->getImageSample(pixX, pixY, 1, green) != 0) ||
|
||||
(_pGLImageBox->getImageSample(pixX, pixY, 2, red) != 0) ||
|
||||
(_pGLImageBox->getImageSample(pixX, pixY, 3, alpha) != 0))
|
||||
txt = QString::fromLatin1("x,y = %1 | %2 = %3")
|
||||
.arg(tr("outside image"), tr("zoom")).arg(zoomFactor,0,'f',1);
|
||||
else
|
||||
txt = QString::fromLatin1("x,y = %1,%2 | rgba = %3,%4,%5,%6 | %7 = %8")
|
||||
.arg(icX,0,'f',2).arg(icY,0,'f',2)
|
||||
.arg((int)red).arg((int)green).arg((int)blue).arg((int)alpha)
|
||||
.arg(tr("zoom")).arg(zoomFactor,0,'f',1);
|
||||
}
|
||||
|
||||
return txt;
|
||||
}
|
||||
|
||||
// Starts a mouse drag in the image - stores some initial positions
|
||||
void ImageView::startDrag()
|
||||
{
|
||||
_pGLImageBox->fixBasePosCurr(); // fixes current image position as base position
|
||||
dragStartWCx = _currX;
|
||||
dragStartWCy = _currY;
|
||||
}
|
||||
|
||||
// Zoom the image using vertical mouse movement to define a zoom factor
|
||||
void ImageView::zoom(int prevX, int prevY, int currX, int currY)
|
||||
{
|
||||
// Check we have more of a vertical shift than a hz one
|
||||
int dx = currX - prevX;
|
||||
int dy = currY - prevY;
|
||||
if (abs(dy) > abs(dx))
|
||||
{
|
||||
// Get centrally displayed image point
|
||||
int ICx, ICy;
|
||||
_pGLImageBox->getCentrePoint(ICx, ICy);
|
||||
|
||||
// Compute zoom factor multiplier
|
||||
double zoomFactorMultiplier = 1.05;
|
||||
if (currY > prevY)
|
||||
zoomFactorMultiplier = 0.95;
|
||||
|
||||
// Zoom around centrally displayed image point
|
||||
_pGLImageBox->setZoomFactor(_pGLImageBox->getZoomFactor() * zoomFactorMultiplier, true, ICx, ICy);
|
||||
_pGLImageBox->redraw();
|
||||
}
|
||||
}
|
||||
|
||||
// Select at the given position
|
||||
void ImageView::select(int currX, int currY)
|
||||
{
|
||||
// base class implementation does nothing
|
||||
// override this method and implement selection capability if required
|
||||
Q_UNUSED(currX);
|
||||
Q_UNUSED(currY);
|
||||
}
|
||||
|
||||
// Add selection at the given position
|
||||
void ImageView::addSelect(int currX, int currY)
|
||||
{
|
||||
// base class implementation does nothing
|
||||
// override this method and implement selection capability if required
|
||||
Q_UNUSED(currX);
|
||||
Q_UNUSED(currY);
|
||||
}
|
||||
|
||||
// Draw any 2D graphics necessary
|
||||
// Use GLImageBox::ICToWC_X and ICToWC_Y methods to transform image coordinates into widget coordinates (which
|
||||
// must be used by the OpenGL vertex commands).
|
||||
void ImageView::drawGraphics()
|
||||
{
|
||||
// base class implementation does nothing
|
||||
|
||||
// override this method and implement OpenGL drawing commands to draw any needed graphics on top of the image
|
||||
|
||||
/* Example: draw a red line from image coordinates (100,100) to (120,120)
|
||||
glColor3ub((GLubyte)255, (GLubyte)0, (GLubyte)0);
|
||||
glBegin(GL_LINES);
|
||||
glVertex2d(_pGLImageBox->ICToWC_X(100.0), _pGLImageBox->ICToWC_Y(100.0));
|
||||
glVertex2d(_pGLImageBox->ICToWC_X(120.0), _pGLImageBox->ICToWC_Y(120.0));
|
||||
glEnd();
|
||||
*/
|
||||
}
|
||||
|
||||
#include "moc_ImageView.cpp"
|
||||
|
||||
|
||||
@@ -1,139 +0,0 @@
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This is a view displaying an image or portion of an image in a box. *
|
||||
* *
|
||||
* Author: Graeme van der Vlugt *
|
||||
* Copyright: Imetric 3D GmbH *
|
||||
* Year: 2004 *
|
||||
* *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Library General Public License as *
|
||||
* published by the Free Software Foundation; either version 2 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* for detail see the LICENCE text file. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef ImageView_H
|
||||
#define ImageView_H
|
||||
|
||||
#include <QMouseEvent>
|
||||
#include <Gui/MDIView.h>
|
||||
#include <Mod/Image/ImageGlobal.h>
|
||||
|
||||
#include "OpenGLImageBox.h"
|
||||
|
||||
|
||||
class QSlider;
|
||||
class QAction;
|
||||
class QActionGroup;
|
||||
class QPopupMenu;
|
||||
class QToolBar;
|
||||
|
||||
namespace ImageGui
|
||||
{
|
||||
|
||||
class GLImageBox;
|
||||
|
||||
class ImageGuiExport ImageView : public Gui::MDIView
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
TYPESYSTEM_HEADER();
|
||||
|
||||
public:
|
||||
ImageView(QWidget* parent);
|
||||
virtual ~ImageView();
|
||||
|
||||
const char *getName(void) const {return "ImageView";}
|
||||
void onUpdate(void){}
|
||||
|
||||
bool onMsg(const char* ,const char** ){ return true; }
|
||||
bool onHasMsg(const char* ) const { return false; }
|
||||
|
||||
virtual void clearImage();
|
||||
virtual int createImageCopy(void* pSrcPixelData, unsigned long width, unsigned long height, int format, unsigned short numSigBitsPerSample, int displayMode = IV_DISPLAY_RESET);
|
||||
virtual int pointImageTo(void* pSrcPixelData, unsigned long width, unsigned long height, int format, unsigned short numSigBitsPerSample, bool takeOwnership, int displayMode = IV_DISPLAY_RESET);
|
||||
|
||||
virtual void enableStatusBar(bool Enable);
|
||||
virtual void enableToolBar(bool Enable);
|
||||
virtual void enableMouseEvents(bool Enable);
|
||||
virtual void enableOneToOneAction(bool Enable);
|
||||
virtual void enableFitImageAction(bool Enable);
|
||||
virtual void ignoreCloseEvent(bool ignoreCloseEvent) { _ignoreCloseEvent = ignoreCloseEvent; }
|
||||
virtual int createColorMap(int numEntriesReq = 0, bool Initialise = true);
|
||||
virtual void clearColorMap();
|
||||
virtual int getNumColorMapEntries() const;
|
||||
virtual int setColorMapRGBAValue(int index, float red, float green, float blue, float alpha = 1.0);
|
||||
virtual int setColorMapRedValue(int index, float value);
|
||||
virtual int setColorMapGreenValue(int index, float value);
|
||||
virtual int setColorMapBlueValue(int index, float value);
|
||||
virtual int setColorMapAlphaValue(int index, float value);
|
||||
|
||||
public Q_SLOTS:
|
||||
virtual void fitImage();
|
||||
virtual void oneToOneImage();
|
||||
|
||||
protected Q_SLOTS:
|
||||
virtual void drawGraphics();
|
||||
|
||||
Q_SIGNALS:
|
||||
void closeEventIgnored();
|
||||
|
||||
protected:
|
||||
virtual void createActions();
|
||||
virtual QSize minimumSizeHint () const;
|
||||
virtual void showOriginalColors();
|
||||
virtual void closeEvent(QCloseEvent *e);
|
||||
virtual void mousePressEvent(QMouseEvent* cEvent);
|
||||
virtual void mouseDoubleClickEvent(QMouseEvent* cEvent);
|
||||
virtual void mouseMoveEvent(QMouseEvent* cEvent);
|
||||
virtual void mouseReleaseEvent(QMouseEvent* cEvent);
|
||||
virtual void wheelEvent(QWheelEvent * cEvent);
|
||||
virtual void showEvent (QShowEvent * e);
|
||||
|
||||
virtual void updateStatusBar();
|
||||
virtual QString createStatusBarText();
|
||||
|
||||
virtual void startDrag();
|
||||
virtual void zoom(int prevX, int prevY, int currX, int currY);
|
||||
virtual void select(int currX, int currY);
|
||||
virtual void addSelect(int currX, int currY);
|
||||
|
||||
|
||||
enum {
|
||||
nothing = 0,
|
||||
panning,
|
||||
zooming,
|
||||
selection,
|
||||
addselection
|
||||
} _currMode;
|
||||
|
||||
GLImageBox* _pGLImageBox;
|
||||
|
||||
int _currX;
|
||||
int _currY;
|
||||
int dragStartWCx;
|
||||
int dragStartWCy;
|
||||
|
||||
// Actions
|
||||
QAction* _pFitAct;
|
||||
QAction* _pOneToOneAct;
|
||||
|
||||
// Menus
|
||||
QMenu* _pContextMenu;
|
||||
|
||||
// Toolbars
|
||||
QToolBar* _pStdToolBar;
|
||||
|
||||
// Flags
|
||||
bool _statusBarEnabled;
|
||||
bool _mouseEventsEnabled;
|
||||
bool _ignoreCloseEvent;
|
||||
bool _invertZoom;
|
||||
};
|
||||
|
||||
} // namespace ImageViewGui
|
||||
|
||||
#endif // ImageView_H
|
||||
@@ -1,926 +0,0 @@
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This is a QGLWidget displaying an image or portion of an image in a *
|
||||
* box. *
|
||||
* *
|
||||
* Author: Graeme van der Vlugt *
|
||||
* Copyright: Imetric 3D GmbH *
|
||||
* Year: 2004 *
|
||||
* *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Library General Public License as *
|
||||
* published by the Free Software Foundation; either version 2 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* for detail see the LICENCE text file. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
#ifndef _PreComp_
|
||||
# include <cmath>
|
||||
|
||||
# include <QDebug>
|
||||
# include <QMessageBox>
|
||||
# include <QOpenGLContext>
|
||||
# include <QOpenGLDebugMessage>
|
||||
# include <QOpenGLFunctions>
|
||||
# include <QPainter>
|
||||
# include <QPainterPath>
|
||||
# include <QSurfaceFormat>
|
||||
#endif
|
||||
|
||||
#if defined(__MINGW32__)
|
||||
# include <GL/gl.h>
|
||||
# include <GL/glu.h>
|
||||
# include <GL/glext.h>
|
||||
#elif defined (FC_OS_MACOSX)
|
||||
# include <OpenGL/gl.h>
|
||||
# include <OpenGL/glu.h>
|
||||
# include <GLKit/GLKMatrix4.h>
|
||||
#elif defined (FC_OS_WIN32)
|
||||
# include <Windows.h>
|
||||
# include <GL/gl.h>
|
||||
# include <GL/glu.h>
|
||||
# if defined(_MSC_VER) && _MSC_VER >= 1910
|
||||
# include <GL/glext.h>
|
||||
# endif
|
||||
#else
|
||||
# include <GL/gl.h>
|
||||
# include <GL/glu.h>
|
||||
# include <GL/glext.h>
|
||||
#endif
|
||||
|
||||
#include "OpenGLImageBox.h"
|
||||
|
||||
using namespace ImageGui;
|
||||
|
||||
#if defined(Q_CC_MSVC)
|
||||
#pragma warning(disable:4305) // init: truncation from const double to float
|
||||
#endif
|
||||
|
||||
bool GLImageBox::haveMesa = false;
|
||||
|
||||
/*
|
||||
Notes:
|
||||
+ Using QGLWidget with Qt5 still works fine
|
||||
+ But QGLWidget is marked as deprecated and should be replaced with QOpenGLWidget
|
||||
+ When opening one or more image views (based on QOpenGLWidget) everything works fine
|
||||
but as soon as a 3d view based on QGLWidget is opened the content becomes black and
|
||||
from then on will never render normally again.
|
||||
+ This problem is caused by QuarterWidget::paintEvent!!!
|
||||
+ https://groups.google.com/forum/?_escaped_fragment_=topic/coin3d-discuss/2SVG6ZxOWy4#!topic/coin3d-discuss/2SVG6ZxOWy4
|
||||
|
||||
+ Using a QSurfaceFormat to switch on double buffering doesn't seem to have any effect
|
||||
QSurfaceFormat format;
|
||||
format.setSwapBehavior(QSurfaceFormat::DoubleBuffer);
|
||||
setFormat(format);
|
||||
+ Directly swapping in paintGL doesn't work either
|
||||
QOpenGLContext::currentContext()->swapBuffers(QOpenGLContext::currentContext()->surface());
|
||||
+ Check for OpenGL errors with: GLenum err = glGetError(); // GL_NO_ERROR
|
||||
+ http://retokoradi.com/2014/04/21/opengl-why-is-your-code-producing-a-black-window/
|
||||
+ http://forum.openscenegraph.org/viewtopic.php?t=15177
|
||||
+ implement GLImageBox::renderText
|
||||
+ See http://doc.qt.io/qt-5/qtquick-scenegraph-openglunderqml-example.html
|
||||
*/
|
||||
|
||||
/* TRANSLATOR ImageGui::GLImageBox */
|
||||
|
||||
// Constructor
|
||||
GLImageBox::GLImageBox(QWidget * parent, Qt::WindowFlags f)
|
||||
: QOpenGLWidget(parent, f)
|
||||
{
|
||||
// uses default display format for the OpenGL rendering context
|
||||
// (double buffering is enabled)
|
||||
|
||||
// enable mouse tracking when moving even if no buttons are pressed
|
||||
setMouseTracking(true);
|
||||
|
||||
// initialise variables
|
||||
_x0 = 0;
|
||||
_y0 = 0;
|
||||
_zoomFactor = 1.0;
|
||||
_base_x0 = 0;
|
||||
_base_y0 = 0;
|
||||
_pColorMap = nullptr;
|
||||
_numMapEntries = 0;
|
||||
|
||||
#if defined(_DEBUG) && 0
|
||||
QSurfaceFormat format;
|
||||
format.setOption(QSurfaceFormat::DebugContext);
|
||||
this->setFormat(format);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
// Destructor
|
||||
GLImageBox::~GLImageBox()
|
||||
{
|
||||
delete [] _pColorMap;
|
||||
}
|
||||
|
||||
void GLImageBox::handleLoggedMessage(const QOpenGLDebugMessage &message)
|
||||
{
|
||||
qDebug() << message;
|
||||
}
|
||||
|
||||
// Set up the OpenGL rendering state
|
||||
void GLImageBox::initializeGL()
|
||||
{
|
||||
QOpenGLFunctions *f = QOpenGLContext::currentContext()->functions();
|
||||
//QColor c(Qt::black);
|
||||
QPalette p = this->palette();
|
||||
QColor c(p.color(this->backgroundRole())); // Let OpenGL clear to black
|
||||
f->glClearColor(c.redF(), c.greenF(), c.blueF(), c.alphaF()); // Let OpenGL clear to black
|
||||
static bool init = false;
|
||||
if (!init) {
|
||||
init = true;
|
||||
std::string ver = (const char*)(glGetString(GL_VERSION));
|
||||
haveMesa = (ver.find("Mesa") != std::string::npos);
|
||||
}
|
||||
|
||||
#if defined(_DEBUG) && 0
|
||||
QOpenGLContext *context = QOpenGLContext::currentContext();
|
||||
if (context->hasExtension(QByteArrayLiteral("GL_KHR_debug"))) {
|
||||
QOpenGLDebugLogger *logger = new QOpenGLDebugLogger(this);
|
||||
connect(logger, &QOpenGLDebugLogger::messageLogged, this, &GLImageBox::handleLoggedMessage);
|
||||
|
||||
if (logger->initialize())
|
||||
logger->startLogging(QOpenGLDebugLogger::SynchronousLogging);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
// Update the viewport
|
||||
void GLImageBox::resizeGL( int w, int h )
|
||||
{
|
||||
glViewport( 0, 0, (GLint)w, (GLint)h );
|
||||
glMatrixMode( GL_PROJECTION );
|
||||
glLoadIdentity();
|
||||
#if defined (FC_OS_MACOSX)
|
||||
GLKMatrix4 orthoMat = GLKMatrix4MakeOrtho(0, width() - 1, height() - 1, 0, -1, 1);
|
||||
glLoadMatrixf(orthoMat.m);
|
||||
#else
|
||||
gluOrtho2D(0, width() - 1, height() - 1, 0);
|
||||
#endif
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
}
|
||||
|
||||
// Redraw (current image)
|
||||
void GLImageBox::redraw()
|
||||
{
|
||||
update();
|
||||
}
|
||||
|
||||
|
||||
// Paint the box
|
||||
void GLImageBox::paintGL()
|
||||
{
|
||||
glPushAttrib(GL_COLOR_BUFFER_BIT | GL_DEPTH_TEST);
|
||||
|
||||
// clear background (in back buffer)
|
||||
//glDrawBuffer(GL_BACK); // this is an invalid call!
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
|
||||
// Draw the image
|
||||
drawImage();
|
||||
|
||||
// Emit a signal for owners to draw any graphics that is needed.
|
||||
if (_image.hasValidData())
|
||||
Q_EMIT drawGraphics();
|
||||
|
||||
// flush the OpenGL graphical pipeline
|
||||
glFinish();
|
||||
glPopAttrib();
|
||||
|
||||
// Double buffering is used so we need to swap the buffers
|
||||
// There is no need to explicitly call this function because it is
|
||||
// done automatically after each widget repaint, i.e. each time after paintGL() has been executed
|
||||
// swapBuffers();
|
||||
}
|
||||
|
||||
// Draw the image
|
||||
void GLImageBox::drawImage()
|
||||
{
|
||||
if (!_image.hasValidData())
|
||||
return;
|
||||
|
||||
// Gets the size of the displayed image area using the current display settings
|
||||
// (in units of image pixels)
|
||||
int dx, dy;
|
||||
getDisplayedImageAreaSize(dx, dy);
|
||||
|
||||
// Draw the visible image region with the correct position and zoom
|
||||
if ((dx > 0) && (dy > 0))
|
||||
{
|
||||
// Get top left image pixel to display
|
||||
int tlx = std::max<int>(0, _x0);
|
||||
int tly = std::max<int>(0, _y0);
|
||||
|
||||
// Get pointer to first pixel in source image rectangle
|
||||
unsigned char* pPix = (unsigned char *)(_image.getPixelDataPtr());
|
||||
pPix += (unsigned long)(_image.getNumBytesPerPixel()) * (tly * _image.getWidth() + tlx);
|
||||
|
||||
// Draw in the back buffer, using the following parameters
|
||||
//glDrawBuffer(GL_BACK); // this is an invalid call!
|
||||
glPixelStorei(GL_UNPACK_ROW_LENGTH, _image.getWidth()); // defines number of pixels in a row
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT, 1); // defines byte alignment of rows
|
||||
glPixelZoom(_zoomFactor, -_zoomFactor); // defines the zoom factors to draw at
|
||||
|
||||
// set current raster position to coincide with top left image pixel to display
|
||||
// the first pixel is always displayed in full when zoomed in
|
||||
// round to nearest widget pixel that coincides with top left corner of top left image pixel to display
|
||||
int xx = (int)floor(ICToWC_X(tlx - 0.5) + 0.5);
|
||||
int yy = (int)floor(ICToWC_Y(tly - 0.5) + 0.5);
|
||||
glRasterPos2f(xx, yy);
|
||||
|
||||
// Compute scale to stretch number of significant bits to full range
|
||||
// e.g. stretch 12 significant bits to 16-bit range: 0-4095 -> 0-65535, therefore scale = 65535/4095
|
||||
double scale = (pow(2.0, _image.getNumBitsPerSample()) - 1.0) / (pow(2.0, _image.getNumSigBitsPerSample()) - 1.0);
|
||||
glPixelTransferf(GL_RED_SCALE, (float)scale);
|
||||
glPixelTransferf(GL_GREEN_SCALE, (float)scale);
|
||||
glPixelTransferf(GL_BLUE_SCALE, (float)scale);
|
||||
|
||||
// Load the color map if present
|
||||
if (_pColorMap)
|
||||
{
|
||||
if (!haveMesa) glPixelTransferf(GL_MAP_COLOR, 1.0);
|
||||
glPixelMapfv(GL_PIXEL_MAP_R_TO_R, _numMapEntries, _pColorMap);
|
||||
glPixelMapfv(GL_PIXEL_MAP_G_TO_G, _numMapEntries, _pColorMap + _numMapEntries);
|
||||
glPixelMapfv(GL_PIXEL_MAP_B_TO_B, _numMapEntries, _pColorMap + _numMapEntries * 2);
|
||||
glPixelMapfv(GL_PIXEL_MAP_A_TO_A, _numMapEntries, _pColorMap + _numMapEntries * 3);
|
||||
}
|
||||
else
|
||||
{
|
||||
glPixelTransferf(GL_MAP_COLOR, 0.0);
|
||||
glPixelMapfv(GL_PIXEL_MAP_R_TO_R, 0, nullptr);
|
||||
glPixelMapfv(GL_PIXEL_MAP_G_TO_G, 0, nullptr);
|
||||
glPixelMapfv(GL_PIXEL_MAP_B_TO_B, 0, nullptr);
|
||||
glPixelMapfv(GL_PIXEL_MAP_A_TO_A, 0, nullptr);
|
||||
}
|
||||
|
||||
// Get the pixel format
|
||||
GLenum pixFormat;
|
||||
GLenum pixType;
|
||||
getPixFormat(pixFormat, pixType);
|
||||
|
||||
// Draw the defined source rectangle
|
||||
glDrawPixels(dx, dy, pixFormat, pixType, (GLvoid *)pPix);
|
||||
glFlush();
|
||||
}
|
||||
}
|
||||
|
||||
// Gets the size of the displayed image area using the current display settings
|
||||
// (in units of image pixels)
|
||||
void GLImageBox::getDisplayedImageAreaSize(int &dx, int &dy)
|
||||
{
|
||||
if (!_image.hasValidData())
|
||||
{
|
||||
dx = 0;
|
||||
dy = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
// Make sure drawing position and zoom factor are valid
|
||||
limitCurrPos();
|
||||
limitZoomFactor();
|
||||
|
||||
// Image coordinates of top left widget pixel = (_x0, _y0)
|
||||
// Get image coordinates of bottom right widget pixel
|
||||
int brx = (int)ceil(WCToIC_X(width() - 1));
|
||||
int bry = (int)ceil(WCToIC_Y(height() - 1));
|
||||
|
||||
// Find the outer coordinates of the displayed image area
|
||||
int itlx = std::max<int>(_x0, 0);
|
||||
int itly = std::max<int>(_y0, 0);
|
||||
int ibrx = std::min<int>(brx, (int)(_image.getWidth()) - 1);
|
||||
int ibry = std::min<int>(bry, (int)(_image.getHeight()) - 1);
|
||||
if ((itlx >= (int)(_image.getWidth())) ||
|
||||
(itly >= (int)(_image.getHeight())) ||
|
||||
(ibrx < 0) ||
|
||||
(ibry < 0))
|
||||
{
|
||||
dx = 0;
|
||||
dy = 0;
|
||||
}
|
||||
else {
|
||||
dx = ibrx - itlx + 1;
|
||||
dy = ibry - itly + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Gets the value of an image sample at the given image pixel position
|
||||
// Returns 0 for valid value or -1 if coordinates or sample index are out of range or
|
||||
// if there is no image data
|
||||
int GLImageBox::getImageSample(int x, int y, unsigned short sampleIndex, double &value)
|
||||
{
|
||||
return (_image.getSample(x, y, sampleIndex, value));
|
||||
}
|
||||
|
||||
// Gets the number of samples per pixel for the image
|
||||
unsigned short GLImageBox::getImageNumSamplesPerPix()
|
||||
{
|
||||
return (_image.getNumSamples());
|
||||
}
|
||||
|
||||
// Gets the format (color space format) of the image
|
||||
int GLImageBox::getImageFormat()
|
||||
{
|
||||
return (_image.getFormat());
|
||||
}
|
||||
|
||||
|
||||
// Get the OpenGL pixel format and pixel type from the image properties
|
||||
void GLImageBox::getPixFormat(GLenum &pixFormat, GLenum &pixType)
|
||||
{
|
||||
switch(_image.getFormat())
|
||||
{
|
||||
case IB_CF_GREY8:
|
||||
pixFormat = GL_LUMINANCE;
|
||||
pixType = GL_UNSIGNED_BYTE;
|
||||
break;
|
||||
case IB_CF_GREY16:
|
||||
pixFormat = GL_LUMINANCE;
|
||||
pixType = GL_UNSIGNED_SHORT;
|
||||
break;
|
||||
case IB_CF_GREY32:
|
||||
pixFormat = GL_LUMINANCE;
|
||||
pixType = GL_UNSIGNED_INT;
|
||||
break;
|
||||
case IB_CF_RGB24:
|
||||
pixFormat = GL_RGB;
|
||||
pixType = GL_UNSIGNED_BYTE;
|
||||
break;
|
||||
#ifndef FC_OS_CYGWIN
|
||||
case IB_CF_BGR24:
|
||||
pixFormat = GL_BGR_EXT;
|
||||
pixType = GL_UNSIGNED_BYTE;
|
||||
break;
|
||||
case IB_CF_RGB48:
|
||||
pixFormat = GL_RGB;
|
||||
pixType = GL_UNSIGNED_SHORT;
|
||||
break;
|
||||
case IB_CF_BGR48:
|
||||
pixFormat = GL_BGR_EXT;
|
||||
pixType = GL_UNSIGNED_SHORT;
|
||||
break;
|
||||
#endif
|
||||
case IB_CF_RGBA32:
|
||||
pixFormat = GL_RGBA;
|
||||
pixType = GL_UNSIGNED_BYTE;
|
||||
break;
|
||||
case IB_CF_RGBA64:
|
||||
pixFormat = GL_RGBA;
|
||||
pixType = GL_UNSIGNED_SHORT;
|
||||
break;
|
||||
#ifndef FC_OS_CYGWIN
|
||||
case IB_CF_BGRA32:
|
||||
pixFormat = GL_BGRA_EXT;
|
||||
pixType = GL_UNSIGNED_BYTE;
|
||||
break;
|
||||
case IB_CF_BGRA64:
|
||||
pixFormat = GL_BGRA_EXT;
|
||||
pixType = GL_UNSIGNED_SHORT;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
// Should never happen
|
||||
pixFormat = GL_LUMINANCE;
|
||||
pixType = GL_UNSIGNED_BYTE;
|
||||
QMessageBox::warning((QWidget *)this, tr("Image pixel format"),
|
||||
tr("Undefined type of colour space for image viewing"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Limits the current position (centre of top left image pixel)
|
||||
// Currently we don't limit it!
|
||||
void GLImageBox::limitCurrPos()
|
||||
{
|
||||
if (!_image.hasValidData())
|
||||
return;
|
||||
|
||||
/*
|
||||
if (_x0 < 0)
|
||||
_x0 = 0;
|
||||
else if (_x0 >= (int)(_image.getWidth()))
|
||||
_x0 = _image.getWidth() - 1;
|
||||
if (_y0 < 0)
|
||||
_y0 = 0;
|
||||
else if (_y0 >= (int)(_image.getHeight()))
|
||||
_y0 = _image.getHeight() - 1;
|
||||
*/
|
||||
}
|
||||
|
||||
// Limits the current zoom factor from 1:64 to 64:1
|
||||
void GLImageBox::limitZoomFactor()
|
||||
{
|
||||
if (_zoomFactor > 64.0)
|
||||
_zoomFactor = 64.0;
|
||||
else if (_zoomFactor < (1.0 / 64.0))
|
||||
_zoomFactor = 1.0 / 64.0;
|
||||
}
|
||||
|
||||
// Set the current position (centre of top left image pixel coordinates)
|
||||
// This function does not redraw (call redraw afterwards)
|
||||
void GLImageBox::setCurrPos(int x0, int y0)
|
||||
{
|
||||
_x0 = x0;
|
||||
_y0 = y0;
|
||||
limitCurrPos();
|
||||
}
|
||||
|
||||
// Fixes a base position at the current position
|
||||
void GLImageBox::fixBasePosCurr()
|
||||
{
|
||||
if (!_image.hasValidData())
|
||||
{
|
||||
_base_x0 = 0;
|
||||
_base_y0 = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
_base_x0 = _x0;
|
||||
_base_y0 = _y0;
|
||||
}
|
||||
}
|
||||
|
||||
// Set the current zoom factor
|
||||
// Option to centre the zoom at a given image point or not
|
||||
// This function does not redraw (call redraw afterwards)
|
||||
void GLImageBox::setZoomFactor(double zoomFactor, bool useCentrePt, int ICx, int ICy)
|
||||
{
|
||||
if (!useCentrePt || !_image.hasValidData())
|
||||
{
|
||||
_zoomFactor = zoomFactor;
|
||||
limitZoomFactor();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set new zoom factor
|
||||
_zoomFactor = zoomFactor;
|
||||
limitZoomFactor();
|
||||
|
||||
// get centre position of widget in image coordinates
|
||||
int ix, iy;
|
||||
getCentrePoint(ix, iy);
|
||||
|
||||
// try to shift the current position so that defined centre point is in the middle of the widget
|
||||
// (this can be modified by the limitCurrPos function)
|
||||
setCurrPos(_x0 - ix + ICx, _y0 - iy + ICy);
|
||||
}
|
||||
}
|
||||
|
||||
// Stretch or shrink the image to fit the view (although the zoom factor is limited so a
|
||||
// very small or very big image may not fit completely (depending on the size of the view)
|
||||
// This function redraws
|
||||
void GLImageBox::stretchToFit()
|
||||
{
|
||||
if (!_image.hasValidData())
|
||||
return;
|
||||
|
||||
setToFit();
|
||||
update();
|
||||
}
|
||||
|
||||
// Sets the settings needed to fit the image into the view (although the zoom factor is limited so a
|
||||
// very small or very big image may not fit completely (depending on the size of the view)
|
||||
// This function does not redraw (call redraw afterwards)
|
||||
void GLImageBox::setToFit()
|
||||
{
|
||||
if (!_image.hasValidData())
|
||||
return;
|
||||
|
||||
// Compute ideal zoom factor to fit the image
|
||||
double zoomX = (double)width() / (double)(_image.getWidth());
|
||||
double zoomY = (double)height() / (double)(_image.getHeight());
|
||||
if (zoomX > zoomY)
|
||||
_zoomFactor = zoomY;
|
||||
else
|
||||
_zoomFactor = zoomX;
|
||||
limitZoomFactor();
|
||||
|
||||
// set current position to top left image pixel
|
||||
setCurrPos(0, 0);
|
||||
}
|
||||
|
||||
// Sets the normal viewing position and zoom = 1
|
||||
// If the image is smaller than the widget then the image is centred
|
||||
// otherwise we view the top left part of the image
|
||||
// This function does not redraw (call redraw afterwards)
|
||||
void GLImageBox::setNormal()
|
||||
{
|
||||
if (!_image.hasValidData())
|
||||
return;
|
||||
|
||||
if (((int)(_image.getWidth()) < width()) && ((int)(_image.getHeight()) < height()))
|
||||
{
|
||||
setZoomFactor(1.0, true, _image.getWidth() / 2, _image.getHeight() / 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
_zoomFactor = 1;
|
||||
setCurrPos(0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
// Gets the image coordinates of the centre point of the widget
|
||||
void GLImageBox::getCentrePoint(int &ICx, int &ICy)
|
||||
{
|
||||
ICx = (int)floor(WCToIC_X((double)(width() - 1) / 2.0) + 0.5);
|
||||
ICy = (int)floor(WCToIC_Y((double)(height() - 1) / 2.0) + 0.5);
|
||||
}
|
||||
|
||||
// Moves the image by a relative amount (in widget pixel units) from the base position
|
||||
// First use fixBasePosCurr() to fix the base position at a position
|
||||
void GLImageBox::relMoveWC(int WCdx, int WCdy)
|
||||
{
|
||||
double ICdx = WCdx / _zoomFactor;
|
||||
double ICdy = WCdy / _zoomFactor;
|
||||
setCurrPos(_base_x0 - (int)floor(ICdx + 0.5), _base_y0 - (int)floor(ICdy + 0.5));
|
||||
update();
|
||||
}
|
||||
|
||||
// Computes an image x-coordinate from the widget x-coordinate
|
||||
// Note: (_x0,_y0) is the centre of the image pixel displayed at the top left of the widget
|
||||
// therefore (_x0 - 0.5, _y0 - 0.5) is the top left coordinate of this pixel which will
|
||||
// theoretically coincide with widget coordinate (-0.5,-0.5)
|
||||
// Zoom = 4: Widget(0,0) = Image(_x0 - 0.375,_y0 - 0.375)
|
||||
// Zoom = 2: Widget(0,0) = Image(_x0 - 0.250,_y0 - 0.250)
|
||||
// Zoom = 1: Widget(0,0) = Image(_x0,_y0)
|
||||
// Zoom = 0.5: Widget(0,0) = Image(_x0 + 0.500,_y0 + 0.500)
|
||||
// Zoom = 0.25: Widget(0,0) = Image(_x0 + 1.500,_y0 + 1.500)
|
||||
double GLImageBox::WCToIC_X(double WidgetX)
|
||||
{
|
||||
return ((double)_x0 - 0.5 + (WidgetX + 0.5) / _zoomFactor);
|
||||
}
|
||||
|
||||
// Computes an image y-coordinate from the widget y-coordinate
|
||||
// Note: (_x0,_y0) is the centre of the image pixel displayed at the top left of the widget
|
||||
// therefore (_x0 - 0.5, _y0 - 0.5) is the top left coordinate of this pixel which will
|
||||
// theoretically coincide with widget coordinate (-0.5,-0.5)
|
||||
// Zoom = 4: Widget(0,0) = Image(_x0 - 0.375,_y0 - 0.375)
|
||||
// Zoom = 2: Widget(0,0) = Image(_x0 - 0.250,_y0 - 0.250)
|
||||
// Zoom = 1: Widget(0,0) = Image(_x0,_y0)
|
||||
// Zoom = 0.5: Widget(0,0) = Image(_x0 + 0.500,_y0 + 0.500)
|
||||
// Zoom = 0.25: Widget(0,0) = Image(_x0 + 1.500,_y0 + 1.500)
|
||||
double GLImageBox::WCToIC_Y(double WidgetY)
|
||||
{
|
||||
return ((double)_y0 - 0.5 + (WidgetY + 0.5) / _zoomFactor);
|
||||
}
|
||||
|
||||
// Computes a widget x-coordinate from an image x-coordinate
|
||||
// Note: (_x0,_y0) is the centre of the image pixel displayed at the top left of the widget
|
||||
// therefore (_x0 - 0.5, _y0 - 0.5) is the top left coordinate of this pixel which will
|
||||
// theoretically coincide with widget coordinate (-0.5,-0.5)
|
||||
// Zoom = 4: Widget(0,0) = Image(_x0 - 0.375,_y0 - 0.375)
|
||||
// Zoom = 2: Widget(0,0) = Image(_x0 - 0.250,_y0 - 0.250)
|
||||
// Zoom = 1: Widget(0,0) = Image(_x0,_y0)
|
||||
// Zoom = 0.5: Widget(0,0) = Image(_x0 + 0.500,_y0 + 0.500)
|
||||
// Zoom = 0.25: Widget(0,0) = Image(_x0 + 1.500,_y0 + 1.500)
|
||||
double GLImageBox::ICToWC_X(double ImageX)
|
||||
{
|
||||
return ((ImageX - (double)_x0 + 0.5) * _zoomFactor - 0.5);
|
||||
}
|
||||
|
||||
// Computes a widget y-coordinate from an image y-coordinate
|
||||
// Note: (_x0,_y0) is the centre of the image pixel displayed at the top left of the widget
|
||||
// therefore (_x0 - 0.5, _y0 - 0.5) is the top left coordinate of this pixel which will
|
||||
// theoretically coincide with widget coordinate (-0.5,-0.5)
|
||||
// Zoom = 4: Widget(0,0) = Image(_x0 - 0.375,_y0 - 0.375)
|
||||
// Zoom = 2: Widget(0,0) = Image(_x0 - 0.250,_y0 - 0.250)
|
||||
// Zoom = 1: Widget(0,0) = Image(_x0,_y0)
|
||||
// Zoom = 0.5: Widget(0,0) = Image(_x0 + 0.500,_y0 + 0.500)
|
||||
// Zoom = 0.25: Widget(0,0) = Image(_x0 + 1.500,_y0 + 1.500)
|
||||
double GLImageBox::ICToWC_Y(double ImageY)
|
||||
{
|
||||
return ((ImageY - (double)_y0 + 0.5) * _zoomFactor - 0.5);
|
||||
}
|
||||
|
||||
|
||||
// Clears the image data
|
||||
void GLImageBox::clearImage()
|
||||
{
|
||||
_image.clear();
|
||||
resetDisplay();
|
||||
}
|
||||
|
||||
// Load image by copying the pixel data
|
||||
// The image object will take ownership of the copied pixel data
|
||||
// (the source image is still controlled by the caller)
|
||||
// If numSigBitsPerSample = 0 then the full range is assumed to be significant
|
||||
// displayMode ... controls the initial display of the image, one of:
|
||||
// IV_DISPLAY_NOCHANGE ... no change to view settings when displaying a new image
|
||||
// IV_DISPLAY_FITIMAGE ... fit-image when displaying a new image (other settings remain the same)
|
||||
// IV_DISPLAY_RESET ... reset settings when displaying a new image (image will be displayed at 1:1 scale with no color map)
|
||||
// This function does not redraw (call redraw afterwards)
|
||||
// Returns:
|
||||
// 0 for OK
|
||||
// -1 for invalid color format
|
||||
// -2 for memory allocation error
|
||||
int GLImageBox::createImageCopy(void* pSrcPixelData, unsigned long width, unsigned long height, int format, unsigned short numSigBitsPerSample, int displayMode)
|
||||
{
|
||||
// Copy image
|
||||
int ret = _image.createCopy(pSrcPixelData, width, height, format, numSigBitsPerSample);
|
||||
|
||||
// Set display settings depending on mode
|
||||
if (displayMode == IV_DISPLAY_RESET)
|
||||
{
|
||||
// reset drawing settings (position, scale, colour mapping) if requested
|
||||
resetDisplay();
|
||||
}
|
||||
else if (displayMode == IV_DISPLAY_FITIMAGE)
|
||||
{
|
||||
// compute stretch to fit settings
|
||||
setToFit();
|
||||
}
|
||||
else // if (displayMode == IV_DISPLAY_NOCHANGE)
|
||||
{
|
||||
// use same settings
|
||||
limitCurrPos();
|
||||
limitZoomFactor();
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
// Make the image object point to another image source
|
||||
// If takeOwnership is false then:
|
||||
// This object will not own (control) or copy the pixel data
|
||||
// (the source image is still controlled by the caller)
|
||||
// Else if takeOwnership is true then:
|
||||
// This object will take ownership (control) of the pixel data
|
||||
// (the source image is not (should not be) controlled by the caller anymore)
|
||||
// In this case the memory must have been allocated with the new operator (because this class will use the delete operator)
|
||||
// If numSigBitsPerSample = 0 then the full range is assumed to be significant
|
||||
// displayMode ... controls the initial display of the image, one of:
|
||||
// IV_DISPLAY_NOCHANGE ... no change to view settings when displaying a new image
|
||||
// IV_DISPLAY_FITIMAGE ... fit-image when displaying a new image (other settings remain the same)
|
||||
// IV_DISPLAY_RESET ... reset settings when displaying a new image (image will be displayed at 1:1 scale with no color map)
|
||||
// This function does not redraw (call redraw afterwards)
|
||||
// Returns:
|
||||
// 0 for OK
|
||||
// -1 for invalid color format
|
||||
int GLImageBox::pointImageTo(void* pSrcPixelData, unsigned long width, unsigned long height, int format, unsigned short numSigBitsPerSample, bool takeOwnership, int displayMode)
|
||||
{
|
||||
// Point to image
|
||||
int ret = _image.pointTo(pSrcPixelData, width, height, format, numSigBitsPerSample, takeOwnership);
|
||||
|
||||
// Set display settings depending on mode
|
||||
if (displayMode == IV_DISPLAY_RESET)
|
||||
{
|
||||
// reset drawing settings (position, scale, colour mapping) if requested
|
||||
resetDisplay();
|
||||
}
|
||||
else if (displayMode == IV_DISPLAY_FITIMAGE)
|
||||
{
|
||||
// compute stretch to fit settings
|
||||
setToFit();
|
||||
}
|
||||
else // if (displayMode == IV_DISPLAY_NOCHANGE)
|
||||
{
|
||||
// use same settings
|
||||
limitCurrPos();
|
||||
limitZoomFactor();
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
// Reset display settings
|
||||
void GLImageBox::resetDisplay()
|
||||
{
|
||||
clearColorMap();
|
||||
setNormal(); // re-draws as well
|
||||
}
|
||||
|
||||
// Clears the color map
|
||||
void GLImageBox::clearColorMap()
|
||||
{
|
||||
delete [] _pColorMap;
|
||||
_pColorMap = nullptr;
|
||||
_numMapEntries = 0;
|
||||
}
|
||||
|
||||
// Calculate the number of color map entries to use
|
||||
int GLImageBox::calcNumColorMapEntries()
|
||||
{
|
||||
// Get the maximum number of map entries that the system supports
|
||||
// Get the number of bits per sample for the image if it exists and compute the number of pixel values
|
||||
// Return the fewer amount of entries
|
||||
GLint maxMapEntries;
|
||||
glGetIntegerv(GL_MAX_PIXEL_MAP_TABLE, &maxMapEntries);
|
||||
int NumEntries = maxMapEntries;
|
||||
if (_image.hasValidData())
|
||||
NumEntries = (int)std::min<double>(pow(2.0, (double)(_image.getNumSigBitsPerSample())), (double)maxMapEntries);
|
||||
return NumEntries;
|
||||
}
|
||||
|
||||
// Creates a color map (All red entries come first, then green, then blue, then alpha)
|
||||
// returns 0 for OK, -1 for memory allocation error
|
||||
// numRequestedEntries ... requested number of map entries (used if not greater than maximum possible or number of intensity values)
|
||||
// Initialise ... flag to initialise the map to a linear scale or not
|
||||
int GLImageBox::createColorMap(int numEntriesReq, bool Initialise)
|
||||
{
|
||||
// Get the number of map entries to use
|
||||
int maxNumEntries = calcNumColorMapEntries();
|
||||
int numEntries;
|
||||
if (numEntriesReq <= 0)
|
||||
numEntries = maxNumEntries;
|
||||
else
|
||||
numEntries = std::min<int>(numEntriesReq, maxNumEntries);
|
||||
|
||||
// Clear and re-create the color map if it's not the desired size
|
||||
if (numEntries != _numMapEntries)
|
||||
{
|
||||
clearColorMap();
|
||||
_numMapEntries = numEntries;
|
||||
|
||||
// Create the color map (RGBA)
|
||||
try
|
||||
{
|
||||
_pColorMap = new float[4 * _numMapEntries];
|
||||
}
|
||||
catch(...)
|
||||
{
|
||||
clearColorMap();
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
// Initialise the color map if requested
|
||||
// (All red entries come first, then green, then blue, then alpha)
|
||||
if (Initialise)
|
||||
{
|
||||
// For each RGB channel
|
||||
int arrayIndex = 0;
|
||||
for (int chan = 0; chan < 3; chan++)
|
||||
{
|
||||
for (int in = 0; in < _numMapEntries; in++)
|
||||
{
|
||||
_pColorMap[arrayIndex] = (float)in / (float)(_numMapEntries - 1);
|
||||
arrayIndex++;
|
||||
}
|
||||
}
|
||||
// For alpha channel
|
||||
for (int in = 0; in < _numMapEntries; in++)
|
||||
{
|
||||
_pColorMap[arrayIndex] = 1.0;
|
||||
arrayIndex++;
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Sets a color map RGBA value
|
||||
// (All red entries come first, then green, then blue, then alpha)
|
||||
// index ... index of color map RGBA entry
|
||||
// red ... intensity value for this red entry (range 0 to 1)
|
||||
// green ... intensity value for this green entry (range 0 to 1)
|
||||
// blue ... intensity value for this blue entry (range 0 to 1)
|
||||
// alpha ... value for this alpha entry (range 0 to 1)
|
||||
int GLImageBox::setColorMapRGBAValue(int index, float red, float green, float blue, float alpha)
|
||||
{
|
||||
if ((index < 0) || (index >= _numMapEntries) ||
|
||||
(red < 0.0) || (red > 1.0) ||
|
||||
(green < 0.0) || (green > 1.0) ||
|
||||
(blue < 0.0) || (blue > 1.0) ||
|
||||
(alpha < 0.0) || (alpha > 1.0))
|
||||
return -1;
|
||||
|
||||
_pColorMap[index] = red;
|
||||
_pColorMap[_numMapEntries + index] = green;
|
||||
_pColorMap[_numMapEntries * 2 + index] = blue;
|
||||
_pColorMap[_numMapEntries * 3 + index] = alpha;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Sets a color map red value
|
||||
// (All red entries come first, then green, then blue, then alpha)
|
||||
// index ... index of color map red entry
|
||||
// value ... intensity value for this red entry (range 0 to 1)
|
||||
int GLImageBox::setColorMapRedValue(int index, float value)
|
||||
{
|
||||
if ((index < 0) || (index >= _numMapEntries) || (value < 0.0) || (value > 1.0))
|
||||
return -1;
|
||||
|
||||
_pColorMap[index] = value;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Sets a color map green value
|
||||
// (All red entries come first, then green, then blue, then alpha)
|
||||
// index ... index of color map green entry
|
||||
// value ... intensity value for this green entry (range 0 to 1)
|
||||
int GLImageBox::setColorMapGreenValue(int index, float value)
|
||||
{
|
||||
if ((index < 0) || (index >= _numMapEntries) || (value < 0.0) || (value > 1.0))
|
||||
return -1;
|
||||
|
||||
_pColorMap[_numMapEntries + index] = value;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Sets a color map blue value
|
||||
// (All red entries come first, then green, then blue, then alpha)
|
||||
// index ... index of color map blue entry
|
||||
// value ... intensity value for this blue entry (range 0 to 1)
|
||||
int GLImageBox::setColorMapBlueValue(int index, float value)
|
||||
{
|
||||
if ((index < 0) || (index >= _numMapEntries) || (value < 0.0) || (value > 1.0))
|
||||
return -1;
|
||||
|
||||
_pColorMap[_numMapEntries * 2 + index] = value;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Sets a color map alpha value
|
||||
// (All red entries come first, then green, then blue, then alpha)
|
||||
// index ... index of color map alpha entry
|
||||
// value ... value for this alpha entry (range 0 to 1)
|
||||
int GLImageBox::setColorMapAlphaValue(int index, float value)
|
||||
{
|
||||
if ((index < 0) || (index >= _numMapEntries) || (value < 0.0) || (value > 1.0))
|
||||
return -1;
|
||||
|
||||
_pColorMap[_numMapEntries * 3 + index] = value;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Helper function to convert a pixel's value (of a sample) to the color map index (i.e. the map index that will be used for that pixel value)
|
||||
unsigned int GLImageBox::pixValToMapIndex(double PixVal)
|
||||
{
|
||||
if (_pColorMap)
|
||||
{
|
||||
double MaxVal = pow(2.0, _image.getNumBitsPerSample()) - 1.0;
|
||||
double Scale = (pow(2.0, _image.getNumBitsPerSample()) - 1.0) / (pow(2.0, _image.getNumSigBitsPerSample()) - 1.0);
|
||||
double PixVal01 = Scale * PixVal / MaxVal;
|
||||
int numMapEntries = getNumColorMapEntries();
|
||||
unsigned int MapIndex = (unsigned int)floor(0.5 + PixVal01 * (double)(numMapEntries - 1));
|
||||
return MapIndex;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
// https://learnopengl.com/?_escaped_fragment_=In-Practice/Text-Rendering#!In-Practice/Text-Rendering
|
||||
void GLImageBox::renderText(int x, int y, const QString& str, const QFont& fnt)
|
||||
{
|
||||
if (str.isEmpty() || !isValid())
|
||||
return;
|
||||
|
||||
//glPushClientAttrib(GL_CLIENT_ALL_ATTRIB_BITS);
|
||||
//glPushAttrib(GL_ALL_ATTRIB_BITS);
|
||||
|
||||
#if 0
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
GLfloat color[4];
|
||||
glGetFloatv(GL_CURRENT_COLOR, &color[0]);
|
||||
QColor col;
|
||||
col.setRgbF(color[0], color[1], color[2],color[3]);
|
||||
|
||||
QFont font(fnt);
|
||||
font.setStyleHint(QFont::Times, QFont::PreferAntialias);
|
||||
|
||||
QPainter painter;
|
||||
painter.begin(this);
|
||||
painter.setRenderHint(QPainter::Antialiasing);
|
||||
painter.setRenderHint(QPainter::TextAntialiasing);
|
||||
|
||||
painter.setFont(font);
|
||||
painter.setPen(col);
|
||||
painter.drawText(x, y, str);
|
||||
painter.end();
|
||||
#else
|
||||
GLfloat color[4];
|
||||
glGetFloatv(GL_CURRENT_COLOR, &color[0]);
|
||||
QColor col;
|
||||
col.setRgbF(color[0], color[1], color[2],color[3]);
|
||||
|
||||
QFont font(fnt);
|
||||
font.setStyleHint(QFont::Times, QFont::PreferAntialias);
|
||||
|
||||
QPainterPath textPath;
|
||||
textPath.addText(x, y, font, str);
|
||||
|
||||
QPainter painter;
|
||||
painter.begin(this);
|
||||
painter.setRenderHint(QPainter::Antialiasing);
|
||||
painter.setRenderHint(QPainter::TextAntialiasing);
|
||||
|
||||
painter.setBrush(col);
|
||||
painter.setPen(Qt::NoPen);
|
||||
painter.drawPath(textPath);
|
||||
painter.end();
|
||||
#endif
|
||||
//glPopAttrib();
|
||||
//glPopClientAttrib();
|
||||
}
|
||||
|
||||
#include "moc_OpenGLImageBox.cpp"
|
||||
@@ -1,122 +0,0 @@
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This is a QOpenGLWidget displaying an image or portion of an image *
|
||||
* in a box. *
|
||||
* *
|
||||
* Author: Graeme van der Vlugt *
|
||||
* Copyright: Imetric 3D GmbH *
|
||||
* Year: 2004 *
|
||||
* *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU Library General Public License as *
|
||||
* published by the Free Software Foundation; either version 2 of the *
|
||||
* License, or (at your option) any later version. *
|
||||
* for detail see the LICENCE text file. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef OPENGLIMAGEBOX_H
|
||||
#define OPENGLIMAGEBOX_H
|
||||
|
||||
#include <Mod/Image/App/ImageBase.h>
|
||||
#include <QOpenGLWidget>
|
||||
|
||||
class QOpenGLDebugMessage;
|
||||
|
||||
namespace ImageGui
|
||||
{
|
||||
|
||||
#define IV_DISPLAY_NOCHANGE 0 // no change to view settings when displaying a new image
|
||||
#define IV_DISPLAY_FITIMAGE 1 // fit-image when displaying a new image (other settings remain the same)
|
||||
#define IV_DISPLAY_RESET 2 // reset settings when displaying a new image (image will be displayed at 1:1 scale with no color map)
|
||||
|
||||
class ImageGuiExport GLImageBox : public QOpenGLWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
GLImageBox(QWidget * parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
|
||||
~GLImageBox();
|
||||
|
||||
Image::ImageBase *getImageBasePtr() { return &_image; }
|
||||
|
||||
void redraw();
|
||||
|
||||
int getImageSample(int x, int y, unsigned short sampleIndex, double &value);
|
||||
unsigned short getImageNumSamplesPerPix();
|
||||
int getImageFormat();
|
||||
|
||||
void fixBasePosCurr();
|
||||
double getZoomFactor() { return _zoomFactor; }
|
||||
void setZoomFactor(double zoomFactor, bool useCentrePt = false, int ICx = 0, int ICy = 0);
|
||||
void zoom(int power, bool useCentrePt = false, int ICx = 0, int ICy = 0);
|
||||
void stretchToFit();
|
||||
void setNormal();
|
||||
void getCentrePoint(int &ICx, int &ICy);
|
||||
void relMoveWC(int WCdx, int WCdy);
|
||||
|
||||
double WCToIC_X(double WidgetX);
|
||||
double WCToIC_Y(double WidgetY);
|
||||
double ICToWC_X(double ImageX);
|
||||
double ICToWC_Y(double ImageY);
|
||||
|
||||
void clearImage();
|
||||
int createImageCopy(void* pSrcPixelData, unsigned long width, unsigned long height, int format, unsigned short numSigBitsPerSample, int displayMode = IV_DISPLAY_RESET);
|
||||
int pointImageTo(void* pSrcPixelData, unsigned long width, unsigned long height, int format, unsigned short numSigBitsPerSample, bool takeOwnership, int displayMode = IV_DISPLAY_RESET);
|
||||
|
||||
void clearColorMap();
|
||||
int createColorMap(int numEntriesReq = 0, bool Initialise = true);
|
||||
int getNumColorMapEntries() const { return _numMapEntries; }
|
||||
int setColorMapRGBAValue(int index, float red, float green, float blue, float alpha = 1.0);
|
||||
int setColorMapRedValue(int index, float value);
|
||||
int setColorMapGreenValue(int index, float value);
|
||||
int setColorMapBlueValue(int index, float value);
|
||||
int setColorMapAlphaValue(int index, float value);
|
||||
unsigned int pixValToMapIndex(double PixVal);
|
||||
|
||||
void renderText(int x, int y, const QString& str, const QFont& fnt = QFont());
|
||||
|
||||
public Q_SLOTS:
|
||||
void handleLoggedMessage(const QOpenGLDebugMessage &debugMessage);
|
||||
|
||||
Q_SIGNALS:
|
||||
void drawGraphics();
|
||||
|
||||
private:
|
||||
|
||||
void initializeGL();
|
||||
void paintGL();
|
||||
void resizeGL( int w, int h );
|
||||
|
||||
void drawImage();
|
||||
void getDisplayedImageAreaSize(int &dx, int &dy);
|
||||
|
||||
void getPixFormat(GLenum &pixFormat, GLenum &pixType);
|
||||
void limitCurrPos();
|
||||
void limitZoomFactor();
|
||||
void setCurrPos(int x0, int y0);
|
||||
void setToFit();
|
||||
void resetDisplay();
|
||||
int calcNumColorMapEntries();
|
||||
|
||||
Image::ImageBase _image; // the image data
|
||||
|
||||
int _x0; // image x-coordinate of top-left widget pixel
|
||||
int _y0; // image y-coordinate of top-left widget pixel
|
||||
double _zoomFactor; // zoom factor = (num_widget_pixels / num_image_pixels)
|
||||
|
||||
int _base_x0; // defines a fixed position of x0
|
||||
int _base_y0; // defines a fixed position of y0
|
||||
|
||||
float* _pColorMap; // a RGBA color map (to alter the intensity or colors)
|
||||
int _numMapEntries; // number of entries in color map
|
||||
static bool haveMesa;
|
||||
|
||||
};
|
||||
|
||||
|
||||
} // namespace ImageGui
|
||||
|
||||
#endif // OPENGLIMAGEBOX_H
|
||||
@@ -1,23 +0,0 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2002 Jürgen Riegel <juergen.riegel@web.de> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "PreCompiled.h"
|
||||
@@ -1,57 +0,0 @@
|
||||
/***************************************************************************
|
||||
* Copyright (c) 2002 Jürgen Riegel <juergen.riegel@web.de> *
|
||||
* *
|
||||
* This file is part of the FreeCAD CAx development system. *
|
||||
* *
|
||||
* This library is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU Library General Public *
|
||||
* License as published by the Free Software Foundation; either *
|
||||
* version 2 of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This library is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU Library General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU Library General Public *
|
||||
* License along with this library; see the file COPYING.LIB. If not, *
|
||||
* write to the Free Software Foundation, Inc., 59 Temple Place, *
|
||||
* Suite 330, Boston, MA 02111-1307, USA *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef __PRECOMPILED_GUI__
|
||||
#define __PRECOMPILED_GUI__
|
||||
|
||||
#include <FCConfig.h>
|
||||
|
||||
// point at which warnings of overly long specifiers disabled (needed for VC6)
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(disable : 4005)
|
||||
# pragma warning(disable : 4251)
|
||||
# pragma warning(disable : 4503)
|
||||
# pragma warning(disable : 4786) // specifier longer then 255 chars
|
||||
#endif
|
||||
|
||||
#ifdef _PreComp_
|
||||
|
||||
// STL
|
||||
#include <cmath>
|
||||
#include <sstream>
|
||||
|
||||
// Inventor
|
||||
#include <Inventor/nodes/SoCoordinate3.h>
|
||||
#include <Inventor/nodes/SoFaceSet.h>
|
||||
#include <Inventor/nodes/SoMaterial.h>
|
||||
#include <Inventor/nodes/SoSeparator.h>
|
||||
#include <Inventor/nodes/SoTexture2.h>
|
||||
#include <Inventor/nodes/SoTextureCoordinate2.h>
|
||||
|
||||
// Qt Toolkit
|
||||
#ifndef __QtAll__
|
||||
# include <Gui/QtAll.h>
|
||||
#endif
|
||||
|
||||
#endif //_PreComp_
|
||||
|
||||
#endif // __PRECOMPILED_GUI__
|
||||
@@ -1,50 +0,0 @@
|
||||
<RCC>
|
||||
<qresource>
|
||||
<file>icons/Image_Open.svg</file>
|
||||
<file>icons/Image_CreateImagePlane.svg</file>
|
||||
<file>icons/Image_Scaling.svg</file>
|
||||
<file>icons/ImageWorkbench.svg</file>
|
||||
<file>translations/Image_af.qm</file>
|
||||
<file>translations/Image_de.qm</file>
|
||||
<file>translations/Image_fi.qm</file>
|
||||
<file>translations/Image_fr.qm</file>
|
||||
<file>translations/Image_hr.qm</file>
|
||||
<file>translations/Image_it.qm</file>
|
||||
<file>translations/Image_nl.qm</file>
|
||||
<file>translations/Image_no.qm</file>
|
||||
<file>translations/Image_pl.qm</file>
|
||||
<file>translations/Image_ru.qm</file>
|
||||
<file>translations/Image_uk.qm</file>
|
||||
<file>translations/Image_tr.qm</file>
|
||||
<file>translations/Image_sv-SE.qm</file>
|
||||
<file>translations/Image_zh-TW.qm</file>
|
||||
<file>translations/Image_pt-BR.qm</file>
|
||||
<file>translations/Image_cs.qm</file>
|
||||
<file>translations/Image_sk.qm</file>
|
||||
<file>translations/Image_es-ES.qm</file>
|
||||
<file>translations/Image_zh-CN.qm</file>
|
||||
<file>translations/Image_ja.qm</file>
|
||||
<file>translations/Image_ro.qm</file>
|
||||
<file>translations/Image_hu.qm</file>
|
||||
<file>translations/Image_pt-PT.qm</file>
|
||||
<file>translations/Image_sr.qm</file>
|
||||
<file>translations/Image_el.qm</file>
|
||||
<file>translations/Image_sl.qm</file>
|
||||
<file>translations/Image_eu.qm</file>
|
||||
<file>translations/Image_ca.qm</file>
|
||||
<file>translations/Image_gl.qm</file>
|
||||
<file>translations/Image_kab.qm</file>
|
||||
<file>translations/Image_ko.qm</file>
|
||||
<file>translations/Image_fil.qm</file>
|
||||
<file>translations/Image_id.qm</file>
|
||||
<file>translations/Image_lt.qm</file>
|
||||
<file>translations/Image_val-ES.qm</file>
|
||||
<file>translations/Image_ar.qm</file>
|
||||
<file>translations/Image_vi.qm</file>
|
||||
<file>translations/Image_es-AR.qm</file>
|
||||
<file>translations/Image_bg.qm</file>
|
||||
<file>translations/Image_ka.qm</file>
|
||||
<file>translations/Image_sr-CS.qm</file>
|
||||
<file>translations/Image_be.qm</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
Before Width: | Height: | Size: 7.5 KiB |
@@ -1,268 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>CmdCreateImagePlane</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="100"/>
|
||||
<source>Image</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="101"/>
|
||||
<source>Create image plane...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="102"/>
|
||||
<source>Create a planar image in the 3D space</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageOpen</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="55"/>
|
||||
<source>Image</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="56"/>
|
||||
<source>Open...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="57"/>
|
||||
<source>Open image view</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageScaling</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="175"/>
|
||||
<source>Image</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="176"/>
|
||||
<source>Scale...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="177"/>
|
||||
<source>Image Scaling</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Command</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="150"/>
|
||||
<source>Create ImagePlane</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::GLImageBox</name>
|
||||
<message>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="393"/>
|
||||
<source>Image pixel format</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="394"/>
|
||||
<source>Undefined type of colour space for image viewing</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageOrientationDialog</name>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="14"/>
|
||||
<source>Choose orientation</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="20"/>
|
||||
<source>Image plane</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="26"/>
|
||||
<source>XY-Plane</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="36"/>
|
||||
<source>XZ-Plane</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="43"/>
|
||||
<source>YZ-Plane</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="72"/>
|
||||
<source>Reverse direction</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="81"/>
|
||||
<source>Offset:</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageView</name>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="108"/>
|
||||
<source>&Fit image</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="110"/>
|
||||
<source>Stretch the image to fit the view</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="114"/>
|
||||
<source>&1:1 scale</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="116"/>
|
||||
<source>Display the image at a 1:1 scale</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="125"/>
|
||||
<source>Standard</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="143"/>
|
||||
<source>Ready...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="568"/>
|
||||
<source>grey</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="569"/>
|
||||
<location filename="../../ImageView.cpp" line="572"/>
|
||||
<location filename="../../ImageView.cpp" line="582"/>
|
||||
<location filename="../../ImageView.cpp" line="587"/>
|
||||
<location filename="../../ImageView.cpp" line="597"/>
|
||||
<location filename="../../ImageView.cpp" line="602"/>
|
||||
<location filename="../../ImageView.cpp" line="613"/>
|
||||
<location filename="../../ImageView.cpp" line="618"/>
|
||||
<location filename="../../ImageView.cpp" line="629"/>
|
||||
<location filename="../../ImageView.cpp" line="634"/>
|
||||
<source>zoom</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="572"/>
|
||||
<location filename="../../ImageView.cpp" line="582"/>
|
||||
<location filename="../../ImageView.cpp" line="597"/>
|
||||
<location filename="../../ImageView.cpp" line="613"/>
|
||||
<location filename="../../ImageView.cpp" line="629"/>
|
||||
<source>outside image</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="70"/>
|
||||
<location filename="../../Command.cpp" line="114"/>
|
||||
<source>Images</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="75"/>
|
||||
<location filename="../../Command.cpp" line="119"/>
|
||||
<source>All files</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="77"/>
|
||||
<location filename="../../Command.cpp" line="121"/>
|
||||
<source>Choose an image file to open</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="127"/>
|
||||
<source>Error opening image</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="128"/>
|
||||
<source>Could not load the chosen image</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Workbench</name>
|
||||
<message>
|
||||
<location filename="../../Workbench.cpp" line="33"/>
|
||||
<source>Image</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Image_Scaling</name>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="55"/>
|
||||
<source>Scale image plane</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="59"/>
|
||||
<source>Scales an image plane by defining a distance between two points</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="139"/>
|
||||
<source>Scale image plane</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="140"/>
|
||||
<source>Distance</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="141"/>
|
||||
<source>Select first point</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="156"/>
|
||||
<source>Enter distance</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="159"/>
|
||||
<source>Select image plane</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="184"/>
|
||||
<source>Select second point</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="193"/>
|
||||
<source>Select Image Plane and type distance</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
@@ -1,262 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="af" sourcelanguage="en">
|
||||
<context>
|
||||
<name>Image_Scaling</name>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="63"/>
|
||||
<source>Scale image plane</source>
|
||||
<translation type="unfinished">Scale image plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="65"/>
|
||||
<source>Scales an image plane by defining a distance between two points</source>
|
||||
<translation type="unfinished">Scales an image plane by defining a distance between two points</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="134"/>
|
||||
<source>Scale image plane</source>
|
||||
<translation type="unfinished">Scale image plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="135"/>
|
||||
<source>Distance [mm]</source>
|
||||
<translation type="unfinished">Distance [mm]</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="136"/>
|
||||
<source>Select first point</source>
|
||||
<translation type="unfinished">Select first point</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="154"/>
|
||||
<source><font color='red'>Enter distance</font></source>
|
||||
<translation type="unfinished"><font color='red'>Enter distance</font></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="157"/>
|
||||
<source><font color='red'>Select ImagePlane</font></source>
|
||||
<translation type="unfinished"><font color='red'>Select ImagePlane</font></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="182"/>
|
||||
<source>Select second point</source>
|
||||
<translation type="unfinished">Select second point</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="191"/>
|
||||
<source>Select Image Plane and type distance</source>
|
||||
<translation type="unfinished">Select Image Plane and type distance</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdCreateImagePlane</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="101"/>
|
||||
<source>Image</source>
|
||||
<translation>Beeld</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="102"/>
|
||||
<source>Create image plane...</source>
|
||||
<translation>Skep beeldvlak...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="103"/>
|
||||
<source>Create a planar image in the 3D space</source>
|
||||
<translation>Skep 'n plat beeld in die 3D ruimte</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageOpen</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="53"/>
|
||||
<source>Image</source>
|
||||
<translation>Beeld</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="54"/>
|
||||
<source>Open...</source>
|
||||
<translation>Maak oop...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="55"/>
|
||||
<source>Open image view</source>
|
||||
<translation>Maak beeldaansig oop</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageScaling</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="175"/>
|
||||
<source>Image</source>
|
||||
<translation>Beeld</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="176"/>
|
||||
<source>Scale...</source>
|
||||
<translation type="unfinished">Scale...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="177"/>
|
||||
<source>Image Scaling</source>
|
||||
<translation type="unfinished">Image Scaling</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::GLImageBox</name>
|
||||
<message>
|
||||
<location filename="../../GLImageBox.cpp" line="332"/>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="384"/>
|
||||
<source>Image pixel format</source>
|
||||
<translation>Beeldelementformaat</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../GLImageBox.cpp" line="333"/>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="385"/>
|
||||
<source>Undefined type of colour space for image viewing</source>
|
||||
<translation>Ongedefinieerde kleurruimte vir beeldvertoning</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageOrientationDialog</name>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="14"/>
|
||||
<source>Choose orientation</source>
|
||||
<translation>Kies oriëntasie</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="20"/>
|
||||
<source>Image plane</source>
|
||||
<translation type="unfinished">Image plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="26"/>
|
||||
<source>XY-Plane</source>
|
||||
<translation>XY-vlak</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="36"/>
|
||||
<source>XZ-Plane</source>
|
||||
<translation>XZ-Vlak</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="43"/>
|
||||
<source>YZ-Plane</source>
|
||||
<translation>YZ-Vlak</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="72"/>
|
||||
<source>Reverse direction</source>
|
||||
<translation>Omgekeerde rigting</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="81"/>
|
||||
<source>Offset:</source>
|
||||
<translation>Verskuiwing:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageView</name>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="111"/>
|
||||
<source>&Fit image</source>
|
||||
<translation>&Pas beeld</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="113"/>
|
||||
<source>Stretch the image to fit the view</source>
|
||||
<translation>Rek die beeld om die aansig te pas</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="117"/>
|
||||
<source>&1:1 scale</source>
|
||||
<translation>&1:1 skaal</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="119"/>
|
||||
<source>Display the image at a 1:1 scale</source>
|
||||
<translation>Wys die beeld op 'n 1:1 skaal</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="128"/>
|
||||
<source>Standard</source>
|
||||
<translation>Standaard</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="146"/>
|
||||
<source>Ready...</source>
|
||||
<translation>Gereed...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="539"/>
|
||||
<source>grey</source>
|
||||
<translation>grys</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="540"/>
|
||||
<location filename="../../ImageView.cpp" line="543"/>
|
||||
<location filename="../../ImageView.cpp" line="553"/>
|
||||
<location filename="../../ImageView.cpp" line="558"/>
|
||||
<location filename="../../ImageView.cpp" line="568"/>
|
||||
<location filename="../../ImageView.cpp" line="573"/>
|
||||
<location filename="../../ImageView.cpp" line="584"/>
|
||||
<location filename="../../ImageView.cpp" line="589"/>
|
||||
<location filename="../../ImageView.cpp" line="600"/>
|
||||
<location filename="../../ImageView.cpp" line="605"/>
|
||||
<source>zoom</source>
|
||||
<translation>Zoem</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="543"/>
|
||||
<location filename="../../ImageView.cpp" line="553"/>
|
||||
<location filename="../../ImageView.cpp" line="568"/>
|
||||
<location filename="../../ImageView.cpp" line="584"/>
|
||||
<location filename="../../ImageView.cpp" line="600"/>
|
||||
<source>outside image</source>
|
||||
<translation>buite beeld</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="68"/>
|
||||
<location filename="../../Command.cpp" line="115"/>
|
||||
<source>Images</source>
|
||||
<translation>Beelde</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="73"/>
|
||||
<location filename="../../Command.cpp" line="120"/>
|
||||
<source>All files</source>
|
||||
<translation>Alle lêers</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="75"/>
|
||||
<location filename="../../Command.cpp" line="122"/>
|
||||
<source>Choose an image file to open</source>
|
||||
<translation>Kies 'n beeldlêer om oop te maak</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="128"/>
|
||||
<source>Error opening image</source>
|
||||
<translation type="unfinished">Error opening image</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="129"/>
|
||||
<source>Could not load the chosen image</source>
|
||||
<translation type="unfinished">Could not load the chosen image</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Workbench</name>
|
||||
<message>
|
||||
<location filename="../../Workbench.cpp" line="36"/>
|
||||
<source>Image</source>
|
||||
<translation>Beeld</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
@@ -1,262 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="ar" sourcelanguage="en">
|
||||
<context>
|
||||
<name>Image_Scaling</name>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="63"/>
|
||||
<source>Scale image plane</source>
|
||||
<translation type="unfinished">Scale image plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="65"/>
|
||||
<source>Scales an image plane by defining a distance between two points</source>
|
||||
<translation type="unfinished">Scales an image plane by defining a distance between two points</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="134"/>
|
||||
<source>Scale image plane</source>
|
||||
<translation type="unfinished">Scale image plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="135"/>
|
||||
<source>Distance [mm]</source>
|
||||
<translation type="unfinished">Distance [mm]</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="136"/>
|
||||
<source>Select first point</source>
|
||||
<translation type="unfinished">Select first point</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="154"/>
|
||||
<source><font color='red'>Enter distance</font></source>
|
||||
<translation type="unfinished"><font color='red'>Enter distance</font></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="157"/>
|
||||
<source><font color='red'>Select ImagePlane</font></source>
|
||||
<translation type="unfinished"><font color='red'>Select ImagePlane</font></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="182"/>
|
||||
<source>Select second point</source>
|
||||
<translation type="unfinished">Select second point</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="191"/>
|
||||
<source>Select Image Plane and type distance</source>
|
||||
<translation type="unfinished">Select Image Plane and type distance</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdCreateImagePlane</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="101"/>
|
||||
<source>Image</source>
|
||||
<translation>صورة</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="102"/>
|
||||
<source>Create image plane...</source>
|
||||
<translation>إنشاء سطح الصورة...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="103"/>
|
||||
<source>Create a planar image in the 3D space</source>
|
||||
<translation>إنشاء صورة مسطحة في مساحة ثلاثية الأبعاد</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageOpen</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="53"/>
|
||||
<source>Image</source>
|
||||
<translation>صورة</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="54"/>
|
||||
<source>Open...</source>
|
||||
<translation>فتح...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="55"/>
|
||||
<source>Open image view</source>
|
||||
<translation>فتح عرض الصورة</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageScaling</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="175"/>
|
||||
<source>Image</source>
|
||||
<translation>صورة</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="176"/>
|
||||
<source>Scale...</source>
|
||||
<translation>مقياس...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="177"/>
|
||||
<source>Image Scaling</source>
|
||||
<translation type="unfinished">Image Scaling</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::GLImageBox</name>
|
||||
<message>
|
||||
<location filename="../../GLImageBox.cpp" line="332"/>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="384"/>
|
||||
<source>Image pixel format</source>
|
||||
<translation>صيغة صورة بكسل</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../GLImageBox.cpp" line="333"/>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="385"/>
|
||||
<source>Undefined type of colour space for image viewing</source>
|
||||
<translation>نوع غير محدد من مساحة اللون لعرض الصور</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageOrientationDialog</name>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="14"/>
|
||||
<source>Choose orientation</source>
|
||||
<translation type="unfinished">Choose orientation</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="20"/>
|
||||
<source>Image plane</source>
|
||||
<translation>سطح الصورة</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="26"/>
|
||||
<source>XY-Plane</source>
|
||||
<translation type="unfinished">XY-Plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="36"/>
|
||||
<source>XZ-Plane</source>
|
||||
<translation type="unfinished">XZ-Plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="43"/>
|
||||
<source>YZ-Plane</source>
|
||||
<translation type="unfinished">YZ-Plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="72"/>
|
||||
<source>Reverse direction</source>
|
||||
<translation type="unfinished">Reverse direction</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="81"/>
|
||||
<source>Offset:</source>
|
||||
<translation type="unfinished">Offset:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageView</name>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="111"/>
|
||||
<source>&Fit image</source>
|
||||
<translation>&تناسب الصورة</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="113"/>
|
||||
<source>Stretch the image to fit the view</source>
|
||||
<translation>إمتد الصورة لتناسب العرض</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="117"/>
|
||||
<source>&1:1 scale</source>
|
||||
<translation>مقياس &1:1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="119"/>
|
||||
<source>Display the image at a 1:1 scale</source>
|
||||
<translation>عرض الصورة على مقياس 1:1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="128"/>
|
||||
<source>Standard</source>
|
||||
<translation>قياسي</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="146"/>
|
||||
<source>Ready...</source>
|
||||
<translation>جاهز...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="539"/>
|
||||
<source>grey</source>
|
||||
<translation>رمادي</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="540"/>
|
||||
<location filename="../../ImageView.cpp" line="543"/>
|
||||
<location filename="../../ImageView.cpp" line="553"/>
|
||||
<location filename="../../ImageView.cpp" line="558"/>
|
||||
<location filename="../../ImageView.cpp" line="568"/>
|
||||
<location filename="../../ImageView.cpp" line="573"/>
|
||||
<location filename="../../ImageView.cpp" line="584"/>
|
||||
<location filename="../../ImageView.cpp" line="589"/>
|
||||
<location filename="../../ImageView.cpp" line="600"/>
|
||||
<location filename="../../ImageView.cpp" line="605"/>
|
||||
<source>zoom</source>
|
||||
<translation>تكبير</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="543"/>
|
||||
<location filename="../../ImageView.cpp" line="553"/>
|
||||
<location filename="../../ImageView.cpp" line="568"/>
|
||||
<location filename="../../ImageView.cpp" line="584"/>
|
||||
<location filename="../../ImageView.cpp" line="600"/>
|
||||
<source>outside image</source>
|
||||
<translation>خارج الصورة</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="68"/>
|
||||
<location filename="../../Command.cpp" line="115"/>
|
||||
<source>Images</source>
|
||||
<translation>الصّور</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="73"/>
|
||||
<location filename="../../Command.cpp" line="120"/>
|
||||
<source>All files</source>
|
||||
<translation>كلّ الملفّات</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="75"/>
|
||||
<location filename="../../Command.cpp" line="122"/>
|
||||
<source>Choose an image file to open</source>
|
||||
<translation>اختر ملفّ صورة لفتحه</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="128"/>
|
||||
<source>Error opening image</source>
|
||||
<translation>خطأ في فتح الصّورة</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="129"/>
|
||||
<source>Could not load the chosen image</source>
|
||||
<translation>تعذّر فتح الصّورة المحدّدة</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Workbench</name>
|
||||
<message>
|
||||
<location filename="../../Workbench.cpp" line="36"/>
|
||||
<source>Image</source>
|
||||
<translation>صورة</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
@@ -1,268 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="be" sourcelanguage="en">
|
||||
<context>
|
||||
<name>CmdCreateImagePlane</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="100"/>
|
||||
<source>Image</source>
|
||||
<translation>Выява</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="101"/>
|
||||
<source>Create image plane...</source>
|
||||
<translation>Стварыць плоскасць выявы...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="102"/>
|
||||
<source>Create a planar image in the 3D space</source>
|
||||
<translation>Стварыць плоскую выяву ў трохмернай прасторы</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageOpen</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="55"/>
|
||||
<source>Image</source>
|
||||
<translation>Выява</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="56"/>
|
||||
<source>Open...</source>
|
||||
<translation>Адчыніць...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="57"/>
|
||||
<source>Open image view</source>
|
||||
<translation>Адчыніць выгляд выявы</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageScaling</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="175"/>
|
||||
<source>Image</source>
|
||||
<translation>Выява</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="176"/>
|
||||
<source>Scale...</source>
|
||||
<translation>Маштаб...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="177"/>
|
||||
<source>Image Scaling</source>
|
||||
<translation>Маштабаванне выявы</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Command</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="150"/>
|
||||
<source>Create ImagePlane</source>
|
||||
<translation>Стварыць Плоскасць Выявы</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::GLImageBox</name>
|
||||
<message>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="393"/>
|
||||
<source>Image pixel format</source>
|
||||
<translation>Фармат пікселя выявы</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="394"/>
|
||||
<source>Undefined type of colour space for image viewing</source>
|
||||
<translation>Нявызначаны тып каляровай прасторы для прагляду выявы</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageOrientationDialog</name>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="14"/>
|
||||
<source>Choose orientation</source>
|
||||
<translation type="unfinished">Choose orientation</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="20"/>
|
||||
<source>Image plane</source>
|
||||
<translation>Плоскасць выявы</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="26"/>
|
||||
<source>XY-Plane</source>
|
||||
<translation type="unfinished">XY-Plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="36"/>
|
||||
<source>XZ-Plane</source>
|
||||
<translation type="unfinished">XZ-Plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="43"/>
|
||||
<source>YZ-Plane</source>
|
||||
<translation type="unfinished">YZ-Plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="72"/>
|
||||
<source>Reverse direction</source>
|
||||
<translation type="unfinished">Reverse direction</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="81"/>
|
||||
<source>Offset:</source>
|
||||
<translation type="unfinished">Offset:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageView</name>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="108"/>
|
||||
<source>&Fit image</source>
|
||||
<translation>&Запоўніць выяву</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="110"/>
|
||||
<source>Stretch the image to fit the view</source>
|
||||
<translation>Расцягнуць выяву да памеру выгляду</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="114"/>
|
||||
<source>&1:1 scale</source>
|
||||
<translation>Маштаб &1:1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="116"/>
|
||||
<source>Display the image at a 1:1 scale</source>
|
||||
<translation>Адлюстраваць выяву ў маштабе 1:1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="125"/>
|
||||
<source>Standard</source>
|
||||
<translation>Стандартны</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="143"/>
|
||||
<source>Ready...</source>
|
||||
<translation>Гатова...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="568"/>
|
||||
<source>grey</source>
|
||||
<translation>шэры</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="569"/>
|
||||
<location filename="../../ImageView.cpp" line="572"/>
|
||||
<location filename="../../ImageView.cpp" line="582"/>
|
||||
<location filename="../../ImageView.cpp" line="587"/>
|
||||
<location filename="../../ImageView.cpp" line="597"/>
|
||||
<location filename="../../ImageView.cpp" line="602"/>
|
||||
<location filename="../../ImageView.cpp" line="613"/>
|
||||
<location filename="../../ImageView.cpp" line="618"/>
|
||||
<location filename="../../ImageView.cpp" line="629"/>
|
||||
<location filename="../../ImageView.cpp" line="634"/>
|
||||
<source>zoom</source>
|
||||
<translation>маштаб</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="572"/>
|
||||
<location filename="../../ImageView.cpp" line="582"/>
|
||||
<location filename="../../ImageView.cpp" line="597"/>
|
||||
<location filename="../../ImageView.cpp" line="613"/>
|
||||
<location filename="../../ImageView.cpp" line="629"/>
|
||||
<source>outside image</source>
|
||||
<translation>знешняя выява</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="70"/>
|
||||
<location filename="../../Command.cpp" line="114"/>
|
||||
<source>Images</source>
|
||||
<translation>Выявы</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="75"/>
|
||||
<location filename="../../Command.cpp" line="119"/>
|
||||
<source>All files</source>
|
||||
<translation>Усе файлы</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="77"/>
|
||||
<location filename="../../Command.cpp" line="121"/>
|
||||
<source>Choose an image file to open</source>
|
||||
<translation>Абраць файл выявы, каб адчыніць</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="127"/>
|
||||
<source>Error opening image</source>
|
||||
<translation>Памылка адкрыцця выявы</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="128"/>
|
||||
<source>Could not load the chosen image</source>
|
||||
<translation>Не атрымалася загрузіць абраную выяву</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Workbench</name>
|
||||
<message>
|
||||
<location filename="../../Workbench.cpp" line="33"/>
|
||||
<source>Image</source>
|
||||
<translation>Выява</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Image_Scaling</name>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="55"/>
|
||||
<source>Scale image plane</source>
|
||||
<translation>Маштаб плоскасці выявы</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="59"/>
|
||||
<source>Scales an image plane by defining a distance between two points</source>
|
||||
<translation>Маштабаваць плоскасць выявы па адлегласць паміж дзвюма кропкамі</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="139"/>
|
||||
<source>Scale image plane</source>
|
||||
<translation>Маштаб плоскасці выявы</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="140"/>
|
||||
<source>Distance</source>
|
||||
<translation type="unfinished">Distance</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="141"/>
|
||||
<source>Select first point</source>
|
||||
<translation>Абраць першую кропку</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="156"/>
|
||||
<source>Enter distance</source>
|
||||
<translation>Увод адлегласці</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="159"/>
|
||||
<source>Select image plane</source>
|
||||
<translation>Абраць плоскасць выявы</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="184"/>
|
||||
<source>Select second point</source>
|
||||
<translation>Абраць другую кропку</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="193"/>
|
||||
<source>Select Image Plane and type distance</source>
|
||||
<translation>Абраць плоскасць выявы і ўвесці адлегласць</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
@@ -1,262 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="bg" sourcelanguage="en">
|
||||
<context>
|
||||
<name>Image_Scaling</name>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="63"/>
|
||||
<source>Scale image plane</source>
|
||||
<translation>Мащабиране на равнинното изображение</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="65"/>
|
||||
<source>Scales an image plane by defining a distance between two points</source>
|
||||
<translation>Мащабира равнинното изображение, определяйки разстоянието между две точки</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="134"/>
|
||||
<source>Scale image plane</source>
|
||||
<translation>Мащабиране на равнинното изображение</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="135"/>
|
||||
<source>Distance [mm]</source>
|
||||
<translation>Разстояние [mm]</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="136"/>
|
||||
<source>Select first point</source>
|
||||
<translation>Изберете първата точка</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="154"/>
|
||||
<source><font color='red'>Enter distance</font></source>
|
||||
<translation><font color='red'>Въведете разстояние</font></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="157"/>
|
||||
<source><font color='red'>Select ImagePlane</font></source>
|
||||
<translation><font color='red'>Изберете равнинно изображение</font></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="182"/>
|
||||
<source>Select second point</source>
|
||||
<translation>Изберете втората точка</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="191"/>
|
||||
<source>Select Image Plane and type distance</source>
|
||||
<translation>Изберете равнинно изображението и въведете разстояние</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdCreateImagePlane</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="101"/>
|
||||
<source>Image</source>
|
||||
<translation>Изображение</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="102"/>
|
||||
<source>Create image plane...</source>
|
||||
<translation>Създаване на равнинно изображението...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="103"/>
|
||||
<source>Create a planar image in the 3D space</source>
|
||||
<translation>Създаване на равнинно изображение в тримерното пространство</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageOpen</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="53"/>
|
||||
<source>Image</source>
|
||||
<translation>Изображение</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="54"/>
|
||||
<source>Open...</source>
|
||||
<translation>Отваряне...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="55"/>
|
||||
<source>Open image view</source>
|
||||
<translation>Отворете изображение</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageScaling</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="175"/>
|
||||
<source>Image</source>
|
||||
<translation>Изображение</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="176"/>
|
||||
<source>Scale...</source>
|
||||
<translation type="unfinished">Scale...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="177"/>
|
||||
<source>Image Scaling</source>
|
||||
<translation>Мащабиране на изображението</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::GLImageBox</name>
|
||||
<message>
|
||||
<location filename="../../GLImageBox.cpp" line="332"/>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="384"/>
|
||||
<source>Image pixel format</source>
|
||||
<translation>Форматът на пикселите в изображението</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../GLImageBox.cpp" line="333"/>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="385"/>
|
||||
<source>Undefined type of colour space for image viewing</source>
|
||||
<translation>Неопределен тип цвят на пространството за преглед на изображението</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageOrientationDialog</name>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="14"/>
|
||||
<source>Choose orientation</source>
|
||||
<translation type="unfinished">Choose orientation</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="20"/>
|
||||
<source>Image plane</source>
|
||||
<translation>Равнина на изображението</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="26"/>
|
||||
<source>XY-Plane</source>
|
||||
<translation type="unfinished">XY-Plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="36"/>
|
||||
<source>XZ-Plane</source>
|
||||
<translation type="unfinished">XZ-Plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="43"/>
|
||||
<source>YZ-Plane</source>
|
||||
<translation type="unfinished">YZ-Plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="72"/>
|
||||
<source>Reverse direction</source>
|
||||
<translation type="unfinished">Reverse direction</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="81"/>
|
||||
<source>Offset:</source>
|
||||
<translation type="unfinished">Offset:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageView</name>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="111"/>
|
||||
<source>&Fit image</source>
|
||||
<translation>&Вместване на изображението</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="113"/>
|
||||
<source>Stretch the image to fit the view</source>
|
||||
<translation>Разтягане на изображението, за да побере изгледа</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="117"/>
|
||||
<source>&1:1 scale</source>
|
||||
<translation>&мащаб 1:1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="119"/>
|
||||
<source>Display the image at a 1:1 scale</source>
|
||||
<translation>Показва изображението в мащаб 1:1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="128"/>
|
||||
<source>Standard</source>
|
||||
<translation>Стандартен</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="146"/>
|
||||
<source>Ready...</source>
|
||||
<translation>Готово...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="539"/>
|
||||
<source>grey</source>
|
||||
<translation>Сиво</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="540"/>
|
||||
<location filename="../../ImageView.cpp" line="543"/>
|
||||
<location filename="../../ImageView.cpp" line="553"/>
|
||||
<location filename="../../ImageView.cpp" line="558"/>
|
||||
<location filename="../../ImageView.cpp" line="568"/>
|
||||
<location filename="../../ImageView.cpp" line="573"/>
|
||||
<location filename="../../ImageView.cpp" line="584"/>
|
||||
<location filename="../../ImageView.cpp" line="589"/>
|
||||
<location filename="../../ImageView.cpp" line="600"/>
|
||||
<location filename="../../ImageView.cpp" line="605"/>
|
||||
<source>zoom</source>
|
||||
<translation>мащабиране</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="543"/>
|
||||
<location filename="../../ImageView.cpp" line="553"/>
|
||||
<location filename="../../ImageView.cpp" line="568"/>
|
||||
<location filename="../../ImageView.cpp" line="584"/>
|
||||
<location filename="../../ImageView.cpp" line="600"/>
|
||||
<source>outside image</source>
|
||||
<translation>извън изображението</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="68"/>
|
||||
<location filename="../../Command.cpp" line="115"/>
|
||||
<source>Images</source>
|
||||
<translation>Изображения</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="73"/>
|
||||
<location filename="../../Command.cpp" line="120"/>
|
||||
<source>All files</source>
|
||||
<translation>Всички файлове</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="75"/>
|
||||
<location filename="../../Command.cpp" line="122"/>
|
||||
<source>Choose an image file to open</source>
|
||||
<translation>Избор на файл с изображение за отваряне </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="128"/>
|
||||
<source>Error opening image</source>
|
||||
<translation>Грешка, отваряйки изображение</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="129"/>
|
||||
<source>Could not load the chosen image</source>
|
||||
<translation>Избраното изображение не можа да бъде заредено</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Workbench</name>
|
||||
<message>
|
||||
<location filename="../../Workbench.cpp" line="36"/>
|
||||
<source>Image</source>
|
||||
<translation>Изображение</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
@@ -1,268 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="ca" sourcelanguage="en">
|
||||
<context>
|
||||
<name>CmdCreateImagePlane</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="100"/>
|
||||
<source>Image</source>
|
||||
<translation>Imatge</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="101"/>
|
||||
<source>Create image plane...</source>
|
||||
<translation>Crea el pla d'imatge...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="102"/>
|
||||
<source>Create a planar image in the 3D space</source>
|
||||
<translation>Crear una imatge plana en l'espai 3D</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageOpen</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="55"/>
|
||||
<source>Image</source>
|
||||
<translation>Imatge</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="56"/>
|
||||
<source>Open...</source>
|
||||
<translation>Obrir...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="57"/>
|
||||
<source>Open image view</source>
|
||||
<translation>Obrir vista d'imatge</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageScaling</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="175"/>
|
||||
<source>Image</source>
|
||||
<translation>Imatge</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="176"/>
|
||||
<source>Scale...</source>
|
||||
<translation>Escala...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="177"/>
|
||||
<source>Image Scaling</source>
|
||||
<translation>Escalat d'imatge</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Command</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="150"/>
|
||||
<source>Create ImagePlane</source>
|
||||
<translation type="unfinished">Create ImagePlane</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::GLImageBox</name>
|
||||
<message>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="393"/>
|
||||
<source>Image pixel format</source>
|
||||
<translation>Format de píxel d'imatge</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="394"/>
|
||||
<source>Undefined type of colour space for image viewing</source>
|
||||
<translation>Tipus d'espai acolorit no definit per la visualització de la imatge</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageOrientationDialog</name>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="14"/>
|
||||
<source>Choose orientation</source>
|
||||
<translation type="unfinished">Choose orientation</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="20"/>
|
||||
<source>Image plane</source>
|
||||
<translation>Pla d'imatge</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="26"/>
|
||||
<source>XY-Plane</source>
|
||||
<translation type="unfinished">XY-Plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="36"/>
|
||||
<source>XZ-Plane</source>
|
||||
<translation type="unfinished">XZ-Plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="43"/>
|
||||
<source>YZ-Plane</source>
|
||||
<translation type="unfinished">YZ-Plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="72"/>
|
||||
<source>Reverse direction</source>
|
||||
<translation type="unfinished">Reverse direction</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="81"/>
|
||||
<source>Offset:</source>
|
||||
<translation type="unfinished">Offset:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageView</name>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="108"/>
|
||||
<source>&Fit image</source>
|
||||
<translation>&Ajustar imatge</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="110"/>
|
||||
<source>Stretch the image to fit the view</source>
|
||||
<translation>Estirar la imatge per ajustar-se a la vista</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="114"/>
|
||||
<source>&1:1 scale</source>
|
||||
<translation>& escala 1:1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="116"/>
|
||||
<source>Display the image at a 1:1 scale</source>
|
||||
<translation>Visualitzar la imatge a escala 1:1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="125"/>
|
||||
<source>Standard</source>
|
||||
<translation>Estàndard</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="143"/>
|
||||
<source>Ready...</source>
|
||||
<translation>Llest...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="568"/>
|
||||
<source>grey</source>
|
||||
<translation>gris</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="569"/>
|
||||
<location filename="../../ImageView.cpp" line="572"/>
|
||||
<location filename="../../ImageView.cpp" line="582"/>
|
||||
<location filename="../../ImageView.cpp" line="587"/>
|
||||
<location filename="../../ImageView.cpp" line="597"/>
|
||||
<location filename="../../ImageView.cpp" line="602"/>
|
||||
<location filename="../../ImageView.cpp" line="613"/>
|
||||
<location filename="../../ImageView.cpp" line="618"/>
|
||||
<location filename="../../ImageView.cpp" line="629"/>
|
||||
<location filename="../../ImageView.cpp" line="634"/>
|
||||
<source>zoom</source>
|
||||
<translation>zoom</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="572"/>
|
||||
<location filename="../../ImageView.cpp" line="582"/>
|
||||
<location filename="../../ImageView.cpp" line="597"/>
|
||||
<location filename="../../ImageView.cpp" line="613"/>
|
||||
<location filename="../../ImageView.cpp" line="629"/>
|
||||
<source>outside image</source>
|
||||
<translation>imatge exterior</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="70"/>
|
||||
<location filename="../../Command.cpp" line="114"/>
|
||||
<source>Images</source>
|
||||
<translation>Imatges</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="75"/>
|
||||
<location filename="../../Command.cpp" line="119"/>
|
||||
<source>All files</source>
|
||||
<translation>Tots els fitxers</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="77"/>
|
||||
<location filename="../../Command.cpp" line="121"/>
|
||||
<source>Choose an image file to open</source>
|
||||
<translation>Trieu un fitxer d'imatge per obrir</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="127"/>
|
||||
<source>Error opening image</source>
|
||||
<translation>Error a l'obrir la imatge</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="128"/>
|
||||
<source>Could not load the chosen image</source>
|
||||
<translation>No es pot carregar la imatge escollida</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Workbench</name>
|
||||
<message>
|
||||
<location filename="../../Workbench.cpp" line="33"/>
|
||||
<source>Image</source>
|
||||
<translation>Imatge</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Image_Scaling</name>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="55"/>
|
||||
<source>Scale image plane</source>
|
||||
<translation type="unfinished">Scale image plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="59"/>
|
||||
<source>Scales an image plane by defining a distance between two points</source>
|
||||
<translation type="unfinished">Scales an image plane by defining a distance between two points</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="139"/>
|
||||
<source>Scale image plane</source>
|
||||
<translation type="unfinished">Scale image plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="140"/>
|
||||
<source>Distance</source>
|
||||
<translation type="unfinished">Distance</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="141"/>
|
||||
<source>Select first point</source>
|
||||
<translation type="unfinished">Select first point</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="156"/>
|
||||
<source>Enter distance</source>
|
||||
<translation type="unfinished">Enter distance</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="159"/>
|
||||
<source>Select image plane</source>
|
||||
<translation type="unfinished">Select image plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="184"/>
|
||||
<source>Select second point</source>
|
||||
<translation type="unfinished">Select second point</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="193"/>
|
||||
<source>Select Image Plane and type distance</source>
|
||||
<translation type="unfinished">Select Image Plane and type distance</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
@@ -1,268 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="cs" sourcelanguage="en">
|
||||
<context>
|
||||
<name>CmdCreateImagePlane</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="100"/>
|
||||
<source>Image</source>
|
||||
<translation>Obrázek</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="101"/>
|
||||
<source>Create image plane...</source>
|
||||
<translation>Vytvoření roviny obrázku...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="102"/>
|
||||
<source>Create a planar image in the 3D space</source>
|
||||
<translation>Vytvoří rovinný obrázek ve 3D prostoru</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageOpen</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="55"/>
|
||||
<source>Image</source>
|
||||
<translation>Obrázek</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="56"/>
|
||||
<source>Open...</source>
|
||||
<translation>Otevřít...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="57"/>
|
||||
<source>Open image view</source>
|
||||
<translation>Otevřít náhled obrázku</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageScaling</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="175"/>
|
||||
<source>Image</source>
|
||||
<translation>Obrázek</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="176"/>
|
||||
<source>Scale...</source>
|
||||
<translation>Měřítko...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="177"/>
|
||||
<source>Image Scaling</source>
|
||||
<translation>Měřítko obrázku</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Command</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="150"/>
|
||||
<source>Create ImagePlane</source>
|
||||
<translation>Vytvoří rovinu obrazu</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::GLImageBox</name>
|
||||
<message>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="393"/>
|
||||
<source>Image pixel format</source>
|
||||
<translation>Formát bodu obrázku</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="394"/>
|
||||
<source>Undefined type of colour space for image viewing</source>
|
||||
<translation>Nedefinovaný typ barvy prostoru pro zobrazení obrázku</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageOrientationDialog</name>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="14"/>
|
||||
<source>Choose orientation</source>
|
||||
<translation type="unfinished">Choose orientation</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="20"/>
|
||||
<source>Image plane</source>
|
||||
<translation>Rovina obrázku</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="26"/>
|
||||
<source>XY-Plane</source>
|
||||
<translation type="unfinished">XY-Plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="36"/>
|
||||
<source>XZ-Plane</source>
|
||||
<translation type="unfinished">XZ-Plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="43"/>
|
||||
<source>YZ-Plane</source>
|
||||
<translation type="unfinished">YZ-Plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="72"/>
|
||||
<source>Reverse direction</source>
|
||||
<translation type="unfinished">Reverse direction</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="81"/>
|
||||
<source>Offset:</source>
|
||||
<translation type="unfinished">Offset:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageView</name>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="108"/>
|
||||
<source>&Fit image</source>
|
||||
<translation>Přizpůsobit obrázek</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="110"/>
|
||||
<source>Stretch the image to fit the view</source>
|
||||
<translation>Přizpůsobit obrázek velikosti pohledu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="114"/>
|
||||
<source>&1:1 scale</source>
|
||||
<translation>měřítko &1:1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="116"/>
|
||||
<source>Display the image at a 1:1 scale</source>
|
||||
<translation>Zobrazit obrázek v měřítku 1:1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="125"/>
|
||||
<source>Standard</source>
|
||||
<translation>Standardní</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="143"/>
|
||||
<source>Ready...</source>
|
||||
<translation>Připraven...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="568"/>
|
||||
<source>grey</source>
|
||||
<translation>šedá</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="569"/>
|
||||
<location filename="../../ImageView.cpp" line="572"/>
|
||||
<location filename="../../ImageView.cpp" line="582"/>
|
||||
<location filename="../../ImageView.cpp" line="587"/>
|
||||
<location filename="../../ImageView.cpp" line="597"/>
|
||||
<location filename="../../ImageView.cpp" line="602"/>
|
||||
<location filename="../../ImageView.cpp" line="613"/>
|
||||
<location filename="../../ImageView.cpp" line="618"/>
|
||||
<location filename="../../ImageView.cpp" line="629"/>
|
||||
<location filename="../../ImageView.cpp" line="634"/>
|
||||
<source>zoom</source>
|
||||
<translation>zvětšení</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="572"/>
|
||||
<location filename="../../ImageView.cpp" line="582"/>
|
||||
<location filename="../../ImageView.cpp" line="597"/>
|
||||
<location filename="../../ImageView.cpp" line="613"/>
|
||||
<location filename="../../ImageView.cpp" line="629"/>
|
||||
<source>outside image</source>
|
||||
<translation>okolí obrázku</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="70"/>
|
||||
<location filename="../../Command.cpp" line="114"/>
|
||||
<source>Images</source>
|
||||
<translation>Obrázky</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="75"/>
|
||||
<location filename="../../Command.cpp" line="119"/>
|
||||
<source>All files</source>
|
||||
<translation>Všechny soubory</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="77"/>
|
||||
<location filename="../../Command.cpp" line="121"/>
|
||||
<source>Choose an image file to open</source>
|
||||
<translation>Vyber soubor obrázku pro otevření</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="127"/>
|
||||
<source>Error opening image</source>
|
||||
<translation>Chyba při otevírání obrázku</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="128"/>
|
||||
<source>Could not load the chosen image</source>
|
||||
<translation>Nelze načíst vybraný obrázek</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Workbench</name>
|
||||
<message>
|
||||
<location filename="../../Workbench.cpp" line="33"/>
|
||||
<source>Image</source>
|
||||
<translation>Obrázek</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Image_Scaling</name>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="55"/>
|
||||
<source>Scale image plane</source>
|
||||
<translation type="unfinished">Scale image plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="59"/>
|
||||
<source>Scales an image plane by defining a distance between two points</source>
|
||||
<translation type="unfinished">Scales an image plane by defining a distance between two points</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="139"/>
|
||||
<source>Scale image plane</source>
|
||||
<translation type="unfinished">Scale image plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="140"/>
|
||||
<source>Distance</source>
|
||||
<translation type="unfinished">Distance</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="141"/>
|
||||
<source>Select first point</source>
|
||||
<translation type="unfinished">Select first point</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="156"/>
|
||||
<source>Enter distance</source>
|
||||
<translation type="unfinished">Enter distance</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="159"/>
|
||||
<source>Select image plane</source>
|
||||
<translation type="unfinished">Select image plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="184"/>
|
||||
<source>Select second point</source>
|
||||
<translation type="unfinished">Select second point</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="193"/>
|
||||
<source>Select Image Plane and type distance</source>
|
||||
<translation type="unfinished">Select Image Plane and type distance</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
@@ -1,268 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="de" sourcelanguage="en">
|
||||
<context>
|
||||
<name>CmdCreateImagePlane</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="100"/>
|
||||
<source>Image</source>
|
||||
<translation>Grafik</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="101"/>
|
||||
<source>Create image plane...</source>
|
||||
<translation>Bildebene erstellen...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="102"/>
|
||||
<source>Create a planar image in the 3D space</source>
|
||||
<translation>Erstellt ein ebenes Bild im 3D-Raum</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageOpen</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="55"/>
|
||||
<source>Image</source>
|
||||
<translation>Grafik</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="56"/>
|
||||
<source>Open...</source>
|
||||
<translation>Öffnen...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="57"/>
|
||||
<source>Open image view</source>
|
||||
<translation>Öffnet eine Bildansicht</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageScaling</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="175"/>
|
||||
<source>Image</source>
|
||||
<translation>Grafik</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="176"/>
|
||||
<source>Scale...</source>
|
||||
<translation>Skalieren...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="177"/>
|
||||
<source>Image Scaling</source>
|
||||
<translation>Bildskalierung</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Command</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="150"/>
|
||||
<source>Create ImagePlane</source>
|
||||
<translation>Bildebene erstellen</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::GLImageBox</name>
|
||||
<message>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="393"/>
|
||||
<source>Image pixel format</source>
|
||||
<translation>Pixelformat des Bildes</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="394"/>
|
||||
<source>Undefined type of colour space for image viewing</source>
|
||||
<translation>Undefinierter Farbraum-Typ für die Bildbetrachtung</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageOrientationDialog</name>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="14"/>
|
||||
<source>Choose orientation</source>
|
||||
<translation>Orientierung wählen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="20"/>
|
||||
<source>Image plane</source>
|
||||
<translation>Bildebene</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="26"/>
|
||||
<source>XY-Plane</source>
|
||||
<translation>XY-Ebene</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="36"/>
|
||||
<source>XZ-Plane</source>
|
||||
<translation>XZ-Ebene</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="43"/>
|
||||
<source>YZ-Plane</source>
|
||||
<translation>YZ-Ebene</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="72"/>
|
||||
<source>Reverse direction</source>
|
||||
<translation>Umgekehrte Richtung</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="81"/>
|
||||
<source>Offset:</source>
|
||||
<translation>Versatz:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageView</name>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="108"/>
|
||||
<source>&Fit image</source>
|
||||
<translation>Bild an&passen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="110"/>
|
||||
<source>Stretch the image to fit the view</source>
|
||||
<translation>Bild auf die Ansicht ausdehnen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="114"/>
|
||||
<source>&1:1 scale</source>
|
||||
<translation>&1:1 Maßstab</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="116"/>
|
||||
<source>Display the image at a 1:1 scale</source>
|
||||
<translation>Das Bild im Maßstab 1:1 anzeigen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="125"/>
|
||||
<source>Standard</source>
|
||||
<translation>Standard</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="143"/>
|
||||
<source>Ready...</source>
|
||||
<translation>Fertig...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="568"/>
|
||||
<source>grey</source>
|
||||
<translation>grau</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="569"/>
|
||||
<location filename="../../ImageView.cpp" line="572"/>
|
||||
<location filename="../../ImageView.cpp" line="582"/>
|
||||
<location filename="../../ImageView.cpp" line="587"/>
|
||||
<location filename="../../ImageView.cpp" line="597"/>
|
||||
<location filename="../../ImageView.cpp" line="602"/>
|
||||
<location filename="../../ImageView.cpp" line="613"/>
|
||||
<location filename="../../ImageView.cpp" line="618"/>
|
||||
<location filename="../../ImageView.cpp" line="629"/>
|
||||
<location filename="../../ImageView.cpp" line="634"/>
|
||||
<source>zoom</source>
|
||||
<translation>Zoom</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="572"/>
|
||||
<location filename="../../ImageView.cpp" line="582"/>
|
||||
<location filename="../../ImageView.cpp" line="597"/>
|
||||
<location filename="../../ImageView.cpp" line="613"/>
|
||||
<location filename="../../ImageView.cpp" line="629"/>
|
||||
<source>outside image</source>
|
||||
<translation>außerhalb Bild</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="70"/>
|
||||
<location filename="../../Command.cpp" line="114"/>
|
||||
<source>Images</source>
|
||||
<translation>Bilder</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="75"/>
|
||||
<location filename="../../Command.cpp" line="119"/>
|
||||
<source>All files</source>
|
||||
<translation>Alle Dateien</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="77"/>
|
||||
<location filename="../../Command.cpp" line="121"/>
|
||||
<source>Choose an image file to open</source>
|
||||
<translation>Wählen Sie ein Bild zum Öffnen aus</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="127"/>
|
||||
<source>Error opening image</source>
|
||||
<translation>Fehler beim Öffnen des Bildes</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="128"/>
|
||||
<source>Could not load the chosen image</source>
|
||||
<translation>Das gewählte Bild konnte nicht geladen werden</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Workbench</name>
|
||||
<message>
|
||||
<location filename="../../Workbench.cpp" line="33"/>
|
||||
<source>Image</source>
|
||||
<translation>Grafik</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Image_Scaling</name>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="55"/>
|
||||
<source>Scale image plane</source>
|
||||
<translation>Bildebene skalieren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="59"/>
|
||||
<source>Scales an image plane by defining a distance between two points</source>
|
||||
<translation>Skaliert eine Bildebene durch Festlegen des Abstandes zweier Punkte</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="139"/>
|
||||
<source>Scale image plane</source>
|
||||
<translation>Bildebene skalieren</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="140"/>
|
||||
<source>Distance</source>
|
||||
<translation>Abstand</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="141"/>
|
||||
<source>Select first point</source>
|
||||
<translation>Den ersten Punkt auswählen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="156"/>
|
||||
<source>Enter distance</source>
|
||||
<translation>Abstand eingeben</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="159"/>
|
||||
<source>Select image plane</source>
|
||||
<translation>Bildebene auswählen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="184"/>
|
||||
<source>Select second point</source>
|
||||
<translation>Den zweiten Punkt auswählen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="193"/>
|
||||
<source>Select Image Plane and type distance</source>
|
||||
<translation>Bildebene auswählen und den Abstand eingeben</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
@@ -1,268 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="el" sourcelanguage="en">
|
||||
<context>
|
||||
<name>CmdCreateImagePlane</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="100"/>
|
||||
<source>Image</source>
|
||||
<translation>Εικόνα</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="101"/>
|
||||
<source>Create image plane...</source>
|
||||
<translation>Δημιουργήστε επίπεδο εικόνας...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="102"/>
|
||||
<source>Create a planar image in the 3D space</source>
|
||||
<translation>Δημιουργήστε μια επίπεδη εικόνα στον τρισδιάστατο χώρο</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageOpen</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="55"/>
|
||||
<source>Image</source>
|
||||
<translation>Εικόνα</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="56"/>
|
||||
<source>Open...</source>
|
||||
<translation>Άνοιγμα...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="57"/>
|
||||
<source>Open image view</source>
|
||||
<translation>Άνοιγμα προβολής εικόνας</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageScaling</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="175"/>
|
||||
<source>Image</source>
|
||||
<translation>Εικόνα</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="176"/>
|
||||
<source>Scale...</source>
|
||||
<translation>Κλιμακοποίηση...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="177"/>
|
||||
<source>Image Scaling</source>
|
||||
<translation>Κλίμακα εικόνας</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Command</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="150"/>
|
||||
<source>Create ImagePlane</source>
|
||||
<translation>Δημιουργία Επιφάνειας</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::GLImageBox</name>
|
||||
<message>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="393"/>
|
||||
<source>Image pixel format</source>
|
||||
<translation>Μορφή εικονοστοιχείου εικόνας</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="394"/>
|
||||
<source>Undefined type of colour space for image viewing</source>
|
||||
<translation>Απροσδιόριστος τύπος χρωματικού χώρου για την προβολή εικόνων</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageOrientationDialog</name>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="14"/>
|
||||
<source>Choose orientation</source>
|
||||
<translation type="unfinished">Choose orientation</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="20"/>
|
||||
<source>Image plane</source>
|
||||
<translation>Επίπεδο εικόνας</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="26"/>
|
||||
<source>XY-Plane</source>
|
||||
<translation type="unfinished">XY-Plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="36"/>
|
||||
<source>XZ-Plane</source>
|
||||
<translation type="unfinished">XZ-Plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="43"/>
|
||||
<source>YZ-Plane</source>
|
||||
<translation type="unfinished">YZ-Plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="72"/>
|
||||
<source>Reverse direction</source>
|
||||
<translation type="unfinished">Reverse direction</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="81"/>
|
||||
<source>Offset:</source>
|
||||
<translation type="unfinished">Offset:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageView</name>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="108"/>
|
||||
<source>&Fit image</source>
|
||||
<translation>Προσαρμογή εικόνας</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="110"/>
|
||||
<source>Stretch the image to fit the view</source>
|
||||
<translation>Εκτείνετε την εικόνα ώστε να προσαρμόζεται στην προβολή</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="114"/>
|
||||
<source>&1:1 scale</source>
|
||||
<translation>κλίμακα &1:1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="116"/>
|
||||
<source>Display the image at a 1:1 scale</source>
|
||||
<translation>Απεικόνιση της εικόνας σε κλίμακα 1:1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="125"/>
|
||||
<source>Standard</source>
|
||||
<translation>Καθιερωμένο</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="143"/>
|
||||
<source>Ready...</source>
|
||||
<translation>Έτοιμο...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="568"/>
|
||||
<source>grey</source>
|
||||
<translation>γκρι</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="569"/>
|
||||
<location filename="../../ImageView.cpp" line="572"/>
|
||||
<location filename="../../ImageView.cpp" line="582"/>
|
||||
<location filename="../../ImageView.cpp" line="587"/>
|
||||
<location filename="../../ImageView.cpp" line="597"/>
|
||||
<location filename="../../ImageView.cpp" line="602"/>
|
||||
<location filename="../../ImageView.cpp" line="613"/>
|
||||
<location filename="../../ImageView.cpp" line="618"/>
|
||||
<location filename="../../ImageView.cpp" line="629"/>
|
||||
<location filename="../../ImageView.cpp" line="634"/>
|
||||
<source>zoom</source>
|
||||
<translation>εστίαση</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="572"/>
|
||||
<location filename="../../ImageView.cpp" line="582"/>
|
||||
<location filename="../../ImageView.cpp" line="597"/>
|
||||
<location filename="../../ImageView.cpp" line="613"/>
|
||||
<location filename="../../ImageView.cpp" line="629"/>
|
||||
<source>outside image</source>
|
||||
<translation>εξωτερική εικόνα</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="70"/>
|
||||
<location filename="../../Command.cpp" line="114"/>
|
||||
<source>Images</source>
|
||||
<translation>Εικόνες</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="75"/>
|
||||
<location filename="../../Command.cpp" line="119"/>
|
||||
<source>All files</source>
|
||||
<translation>Όλα τα αρχεία</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="77"/>
|
||||
<location filename="../../Command.cpp" line="121"/>
|
||||
<source>Choose an image file to open</source>
|
||||
<translation>Επιλέξτε ένα αρχείο εικόνας για άνοιγμα</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="127"/>
|
||||
<source>Error opening image</source>
|
||||
<translation>Σφάλμα κατά το άνοιγμα της εικόνας</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="128"/>
|
||||
<source>Could not load the chosen image</source>
|
||||
<translation>Αδυναμία φόρτωσης της επιλεγμένης εικόνας</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Workbench</name>
|
||||
<message>
|
||||
<location filename="../../Workbench.cpp" line="33"/>
|
||||
<source>Image</source>
|
||||
<translation>Εικόνα</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Image_Scaling</name>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="55"/>
|
||||
<source>Scale image plane</source>
|
||||
<translation type="unfinished">Scale image plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="59"/>
|
||||
<source>Scales an image plane by defining a distance between two points</source>
|
||||
<translation type="unfinished">Scales an image plane by defining a distance between two points</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="139"/>
|
||||
<source>Scale image plane</source>
|
||||
<translation type="unfinished">Scale image plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="140"/>
|
||||
<source>Distance</source>
|
||||
<translation type="unfinished">Distance</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="141"/>
|
||||
<source>Select first point</source>
|
||||
<translation type="unfinished">Select first point</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="156"/>
|
||||
<source>Enter distance</source>
|
||||
<translation type="unfinished">Enter distance</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="159"/>
|
||||
<source>Select image plane</source>
|
||||
<translation type="unfinished">Select image plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="184"/>
|
||||
<source>Select second point</source>
|
||||
<translation type="unfinished">Select second point</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="193"/>
|
||||
<source>Select Image Plane and type distance</source>
|
||||
<translation type="unfinished">Select Image Plane and type distance</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
@@ -1,268 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="es-AR" sourcelanguage="en">
|
||||
<context>
|
||||
<name>CmdCreateImagePlane</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="100"/>
|
||||
<source>Image</source>
|
||||
<translation>Imagen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="101"/>
|
||||
<source>Create image plane...</source>
|
||||
<translation>Crear plano de imagen...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="102"/>
|
||||
<source>Create a planar image in the 3D space</source>
|
||||
<translation>Crea una imagen plana en el espacio 3D</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageOpen</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="55"/>
|
||||
<source>Image</source>
|
||||
<translation>Imagen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="56"/>
|
||||
<source>Open...</source>
|
||||
<translation>Abrir...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="57"/>
|
||||
<source>Open image view</source>
|
||||
<translation>Abre vista de imagen</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageScaling</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="175"/>
|
||||
<source>Image</source>
|
||||
<translation>Imagen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="176"/>
|
||||
<source>Scale...</source>
|
||||
<translation>Escala...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="177"/>
|
||||
<source>Image Scaling</source>
|
||||
<translation>Escalado de la imagen</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Command</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="150"/>
|
||||
<source>Create ImagePlane</source>
|
||||
<translation>Crea Plano de Imagen</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::GLImageBox</name>
|
||||
<message>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="393"/>
|
||||
<source>Image pixel format</source>
|
||||
<translation>Formato de pixel de imagen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="394"/>
|
||||
<source>Undefined type of colour space for image viewing</source>
|
||||
<translation>Tipo de espacio de color no definido para la visualización de la imagen</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageOrientationDialog</name>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="14"/>
|
||||
<source>Choose orientation</source>
|
||||
<translation type="unfinished">Choose orientation</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="20"/>
|
||||
<source>Image plane</source>
|
||||
<translation>Plano de imagen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="26"/>
|
||||
<source>XY-Plane</source>
|
||||
<translation>Plano XY</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="36"/>
|
||||
<source>XZ-Plane</source>
|
||||
<translation>Plano XZ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="43"/>
|
||||
<source>YZ-Plane</source>
|
||||
<translation>Plano YZ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="72"/>
|
||||
<source>Reverse direction</source>
|
||||
<translation type="unfinished">Reverse direction</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="81"/>
|
||||
<source>Offset:</source>
|
||||
<translation>Desplazamiento:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageView</name>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="108"/>
|
||||
<source>&Fit image</source>
|
||||
<translation>&Ajustar imagen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="110"/>
|
||||
<source>Stretch the image to fit the view</source>
|
||||
<translation>Estira la imagen para que se ajuste a la vista</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="114"/>
|
||||
<source>&1:1 scale</source>
|
||||
<translation>&Escala 1:1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="116"/>
|
||||
<source>Display the image at a 1:1 scale</source>
|
||||
<translation>Muestra la imagen a escala 1:1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="125"/>
|
||||
<source>Standard</source>
|
||||
<translation>Estándar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="143"/>
|
||||
<source>Ready...</source>
|
||||
<translation>Listo...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="568"/>
|
||||
<source>grey</source>
|
||||
<translation>gris</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="569"/>
|
||||
<location filename="../../ImageView.cpp" line="572"/>
|
||||
<location filename="../../ImageView.cpp" line="582"/>
|
||||
<location filename="../../ImageView.cpp" line="587"/>
|
||||
<location filename="../../ImageView.cpp" line="597"/>
|
||||
<location filename="../../ImageView.cpp" line="602"/>
|
||||
<location filename="../../ImageView.cpp" line="613"/>
|
||||
<location filename="../../ImageView.cpp" line="618"/>
|
||||
<location filename="../../ImageView.cpp" line="629"/>
|
||||
<location filename="../../ImageView.cpp" line="634"/>
|
||||
<source>zoom</source>
|
||||
<translation>zoom</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="572"/>
|
||||
<location filename="../../ImageView.cpp" line="582"/>
|
||||
<location filename="../../ImageView.cpp" line="597"/>
|
||||
<location filename="../../ImageView.cpp" line="613"/>
|
||||
<location filename="../../ImageView.cpp" line="629"/>
|
||||
<source>outside image</source>
|
||||
<translation>imagen exterior</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="70"/>
|
||||
<location filename="../../Command.cpp" line="114"/>
|
||||
<source>Images</source>
|
||||
<translation>Imágenes</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="75"/>
|
||||
<location filename="../../Command.cpp" line="119"/>
|
||||
<source>All files</source>
|
||||
<translation>Todos los archivos</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="77"/>
|
||||
<location filename="../../Command.cpp" line="121"/>
|
||||
<source>Choose an image file to open</source>
|
||||
<translation>Elegir un archivo de imagen para abrir</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="127"/>
|
||||
<source>Error opening image</source>
|
||||
<translation>Error al abrir la imagen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="128"/>
|
||||
<source>Could not load the chosen image</source>
|
||||
<translation>No se pudo cargar la imagen seleccionada</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Workbench</name>
|
||||
<message>
|
||||
<location filename="../../Workbench.cpp" line="33"/>
|
||||
<source>Image</source>
|
||||
<translation>Imagen</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Image_Scaling</name>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="55"/>
|
||||
<source>Scale image plane</source>
|
||||
<translation>Escala del plano de la imagen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="59"/>
|
||||
<source>Scales an image plane by defining a distance between two points</source>
|
||||
<translation>Escala un plano de imagen definiendo una distancia entre dos puntos</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="139"/>
|
||||
<source>Scale image plane</source>
|
||||
<translation>Escala del plano de la imagen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="140"/>
|
||||
<source>Distance</source>
|
||||
<translation>Distancia</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="141"/>
|
||||
<source>Select first point</source>
|
||||
<translation>Seleccione el primer punto</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="156"/>
|
||||
<source>Enter distance</source>
|
||||
<translation>Ingrese la distancia</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="159"/>
|
||||
<source>Select image plane</source>
|
||||
<translation>Seleccionar plano de imagen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="184"/>
|
||||
<source>Select second point</source>
|
||||
<translation>Seleccione el segundo punto</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="193"/>
|
||||
<source>Select Image Plane and type distance</source>
|
||||
<translation>Seleccione el plano de la imagen y escriba la distancia</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
@@ -1,268 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="es-ES" sourcelanguage="en">
|
||||
<context>
|
||||
<name>CmdCreateImagePlane</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="100"/>
|
||||
<source>Image</source>
|
||||
<translation>Imagen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="101"/>
|
||||
<source>Create image plane...</source>
|
||||
<translation>Crear plano de imagen...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="102"/>
|
||||
<source>Create a planar image in the 3D space</source>
|
||||
<translation>Crear una imagen plana en el espacio 3D</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageOpen</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="55"/>
|
||||
<source>Image</source>
|
||||
<translation>Imagen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="56"/>
|
||||
<source>Open...</source>
|
||||
<translation>Abrir...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="57"/>
|
||||
<source>Open image view</source>
|
||||
<translation>Abrir vista de imagen</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageScaling</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="175"/>
|
||||
<source>Image</source>
|
||||
<translation>Imagen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="176"/>
|
||||
<source>Scale...</source>
|
||||
<translation>Escala...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="177"/>
|
||||
<source>Image Scaling</source>
|
||||
<translation>Escalado de la imagen</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Command</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="150"/>
|
||||
<source>Create ImagePlane</source>
|
||||
<translation>Crea Plano de Imagen</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::GLImageBox</name>
|
||||
<message>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="393"/>
|
||||
<source>Image pixel format</source>
|
||||
<translation>Formato de pixel de imagen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="394"/>
|
||||
<source>Undefined type of colour space for image viewing</source>
|
||||
<translation>Tipo de espacio color no definido para la visualización de la imagen</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageOrientationDialog</name>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="14"/>
|
||||
<source>Choose orientation</source>
|
||||
<translation type="unfinished">Choose orientation</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="20"/>
|
||||
<source>Image plane</source>
|
||||
<translation>Plano de imagen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="26"/>
|
||||
<source>XY-Plane</source>
|
||||
<translation>Plano XY</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="36"/>
|
||||
<source>XZ-Plane</source>
|
||||
<translation>Plano XZ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="43"/>
|
||||
<source>YZ-Plane</source>
|
||||
<translation>Plano YZ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="72"/>
|
||||
<source>Reverse direction</source>
|
||||
<translation type="unfinished">Reverse direction</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="81"/>
|
||||
<source>Offset:</source>
|
||||
<translation>Desplazamiento:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageView</name>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="108"/>
|
||||
<source>&Fit image</source>
|
||||
<translation>&Ajustar imagen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="110"/>
|
||||
<source>Stretch the image to fit the view</source>
|
||||
<translation>Estirar la imagen para ajustarse a la vista</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="114"/>
|
||||
<source>&1:1 scale</source>
|
||||
<translation>&Escala 1:1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="116"/>
|
||||
<source>Display the image at a 1:1 scale</source>
|
||||
<translation>Muestra la imagen a escala 1:1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="125"/>
|
||||
<source>Standard</source>
|
||||
<translation>Estándar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="143"/>
|
||||
<source>Ready...</source>
|
||||
<translation>Preparado...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="568"/>
|
||||
<source>grey</source>
|
||||
<translation>Gris</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="569"/>
|
||||
<location filename="../../ImageView.cpp" line="572"/>
|
||||
<location filename="../../ImageView.cpp" line="582"/>
|
||||
<location filename="../../ImageView.cpp" line="587"/>
|
||||
<location filename="../../ImageView.cpp" line="597"/>
|
||||
<location filename="../../ImageView.cpp" line="602"/>
|
||||
<location filename="../../ImageView.cpp" line="613"/>
|
||||
<location filename="../../ImageView.cpp" line="618"/>
|
||||
<location filename="../../ImageView.cpp" line="629"/>
|
||||
<location filename="../../ImageView.cpp" line="634"/>
|
||||
<source>zoom</source>
|
||||
<translation>Zoom</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="572"/>
|
||||
<location filename="../../ImageView.cpp" line="582"/>
|
||||
<location filename="../../ImageView.cpp" line="597"/>
|
||||
<location filename="../../ImageView.cpp" line="613"/>
|
||||
<location filename="../../ImageView.cpp" line="629"/>
|
||||
<source>outside image</source>
|
||||
<translation>Imagen exterior</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="70"/>
|
||||
<location filename="../../Command.cpp" line="114"/>
|
||||
<source>Images</source>
|
||||
<translation>Imágenes</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="75"/>
|
||||
<location filename="../../Command.cpp" line="119"/>
|
||||
<source>All files</source>
|
||||
<translation>Todos los archivos</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="77"/>
|
||||
<location filename="../../Command.cpp" line="121"/>
|
||||
<source>Choose an image file to open</source>
|
||||
<translation>Selecciona un archivo de imagen para abrir</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="127"/>
|
||||
<source>Error opening image</source>
|
||||
<translation>Error al abrir el archivo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="128"/>
|
||||
<source>Could not load the chosen image</source>
|
||||
<translation>No se pude cargar la imagen solicitada</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Workbench</name>
|
||||
<message>
|
||||
<location filename="../../Workbench.cpp" line="33"/>
|
||||
<source>Image</source>
|
||||
<translation>Imagen</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Image_Scaling</name>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="55"/>
|
||||
<source>Scale image plane</source>
|
||||
<translation>Escala del plano de la imagen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="59"/>
|
||||
<source>Scales an image plane by defining a distance between two points</source>
|
||||
<translation>Escala del plano de imagen definiendo una distancia entre dos puntos</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="139"/>
|
||||
<source>Scale image plane</source>
|
||||
<translation>Escala del plano de la imagen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="140"/>
|
||||
<source>Distance</source>
|
||||
<translation>Distancia</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="141"/>
|
||||
<source>Select first point</source>
|
||||
<translation>Seleccione el primer punto</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="156"/>
|
||||
<source>Enter distance</source>
|
||||
<translation>Ingresar distancia</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="159"/>
|
||||
<source>Select image plane</source>
|
||||
<translation>Seleccionar plano de la imagen</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="184"/>
|
||||
<source>Select second point</source>
|
||||
<translation>Seleccione el segundo punto</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="193"/>
|
||||
<source>Select Image Plane and type distance</source>
|
||||
<translation>Seleccione el plano de la imagen y escriba la distancia</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
@@ -1,268 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="eu" sourcelanguage="en">
|
||||
<context>
|
||||
<name>CmdCreateImagePlane</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="100"/>
|
||||
<source>Image</source>
|
||||
<translation>Irudia</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="101"/>
|
||||
<source>Create image plane...</source>
|
||||
<translation>Sortu irudi-planoa...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="102"/>
|
||||
<source>Create a planar image in the 3D space</source>
|
||||
<translation>Sortu 3D espazioaren irudi planarra</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageOpen</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="55"/>
|
||||
<source>Image</source>
|
||||
<translation>Irudia</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="56"/>
|
||||
<source>Open...</source>
|
||||
<translation>Ireki...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="57"/>
|
||||
<source>Open image view</source>
|
||||
<translation>Ireki irudi-bista</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageScaling</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="175"/>
|
||||
<source>Image</source>
|
||||
<translation>Irudia</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="176"/>
|
||||
<source>Scale...</source>
|
||||
<translation>Eskala...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="177"/>
|
||||
<source>Image Scaling</source>
|
||||
<translation>Irudia eskalatzea</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Command</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="150"/>
|
||||
<source>Create ImagePlane</source>
|
||||
<translation>Sortu irudi-planoa</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::GLImageBox</name>
|
||||
<message>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="393"/>
|
||||
<source>Image pixel format</source>
|
||||
<translation>Irudiaren pixel-formatua</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="394"/>
|
||||
<source>Undefined type of colour space for image viewing</source>
|
||||
<translation>Kolore-espazioaren definitu gabeko mota irudia bistaratzeko</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageOrientationDialog</name>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="14"/>
|
||||
<source>Choose orientation</source>
|
||||
<translation>Aukeratu orientazioa</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="20"/>
|
||||
<source>Image plane</source>
|
||||
<translation>Irudi-planoa</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="26"/>
|
||||
<source>XY-Plane</source>
|
||||
<translation>XY planoa</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="36"/>
|
||||
<source>XZ-Plane</source>
|
||||
<translation>XZ planoa</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="43"/>
|
||||
<source>YZ-Plane</source>
|
||||
<translation>YZ planoa</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="72"/>
|
||||
<source>Reverse direction</source>
|
||||
<translation>Alderantzikatu norabidea</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="81"/>
|
||||
<source>Offset:</source>
|
||||
<translation>Desplazamendua:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageView</name>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="108"/>
|
||||
<source>&Fit image</source>
|
||||
<translation>&Egokitu irudia</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="110"/>
|
||||
<source>Stretch the image to fit the view</source>
|
||||
<translation>Luzatu irudia bista egokitzeko</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="114"/>
|
||||
<source>&1:1 scale</source>
|
||||
<translation>&1:1 eskala</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="116"/>
|
||||
<source>Display the image at a 1:1 scale</source>
|
||||
<translation>Erakutsi irudia 1:1 eskalan</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="125"/>
|
||||
<source>Standard</source>
|
||||
<translation>Estandarra</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="143"/>
|
||||
<source>Ready...</source>
|
||||
<translation>Prest...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="568"/>
|
||||
<source>grey</source>
|
||||
<translation>grisa</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="569"/>
|
||||
<location filename="../../ImageView.cpp" line="572"/>
|
||||
<location filename="../../ImageView.cpp" line="582"/>
|
||||
<location filename="../../ImageView.cpp" line="587"/>
|
||||
<location filename="../../ImageView.cpp" line="597"/>
|
||||
<location filename="../../ImageView.cpp" line="602"/>
|
||||
<location filename="../../ImageView.cpp" line="613"/>
|
||||
<location filename="../../ImageView.cpp" line="618"/>
|
||||
<location filename="../../ImageView.cpp" line="629"/>
|
||||
<location filename="../../ImageView.cpp" line="634"/>
|
||||
<source>zoom</source>
|
||||
<translation>zoom-a</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="572"/>
|
||||
<location filename="../../ImageView.cpp" line="582"/>
|
||||
<location filename="../../ImageView.cpp" line="597"/>
|
||||
<location filename="../../ImageView.cpp" line="613"/>
|
||||
<location filename="../../ImageView.cpp" line="629"/>
|
||||
<source>outside image</source>
|
||||
<translation>kanpo-irudia</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="70"/>
|
||||
<location filename="../../Command.cpp" line="114"/>
|
||||
<source>Images</source>
|
||||
<translation>Irudiak</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="75"/>
|
||||
<location filename="../../Command.cpp" line="119"/>
|
||||
<source>All files</source>
|
||||
<translation>Fitxategi guztiak</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="77"/>
|
||||
<location filename="../../Command.cpp" line="121"/>
|
||||
<source>Choose an image file to open</source>
|
||||
<translation>Aukeratu irekiko den irudi-fitxategia</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="127"/>
|
||||
<source>Error opening image</source>
|
||||
<translation>Errorea irudia irekitzean</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="128"/>
|
||||
<source>Could not load the chosen image</source>
|
||||
<translation>Ezin izan da hautatutako irudia kargatu</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Workbench</name>
|
||||
<message>
|
||||
<location filename="../../Workbench.cpp" line="33"/>
|
||||
<source>Image</source>
|
||||
<translation>Irudia</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Image_Scaling</name>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="55"/>
|
||||
<source>Scale image plane</source>
|
||||
<translation>Eskalatu irudi-planoa</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="59"/>
|
||||
<source>Scales an image plane by defining a distance between two points</source>
|
||||
<translation>Irudi-plano bat eskalatzen du bi punturen arteko distantzia definituta</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="139"/>
|
||||
<source>Scale image plane</source>
|
||||
<translation>Eskalatu irudi-planoa</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="140"/>
|
||||
<source>Distance</source>
|
||||
<translation>Distantzia</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="141"/>
|
||||
<source>Select first point</source>
|
||||
<translation>Hautatu lehen puntua</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="156"/>
|
||||
<source>Enter distance</source>
|
||||
<translation>Sartu distantzia</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="159"/>
|
||||
<source>Select image plane</source>
|
||||
<translation>Eskalatu irudi-planoa</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="184"/>
|
||||
<source>Select second point</source>
|
||||
<translation>Hautatu bigarren puntua</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="193"/>
|
||||
<source>Select Image Plane and type distance</source>
|
||||
<translation>Hautatu irudi-planoa eta idatzi distantzia</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
@@ -1,268 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="fi" sourcelanguage="en">
|
||||
<context>
|
||||
<name>CmdCreateImagePlane</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="100"/>
|
||||
<source>Image</source>
|
||||
<translation>Kuva</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="101"/>
|
||||
<source>Create image plane...</source>
|
||||
<translation>Luo kuvan taso...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="102"/>
|
||||
<source>Create a planar image in the 3D space</source>
|
||||
<translation>Luo tasomainen kuva 3D-avaruudessa</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageOpen</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="55"/>
|
||||
<source>Image</source>
|
||||
<translation>Kuva</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="56"/>
|
||||
<source>Open...</source>
|
||||
<translation>Avaa...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="57"/>
|
||||
<source>Open image view</source>
|
||||
<translation>Avaa kuvan näkymä</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageScaling</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="175"/>
|
||||
<source>Image</source>
|
||||
<translation>Kuva</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="176"/>
|
||||
<source>Scale...</source>
|
||||
<translation>Skaalaa...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="177"/>
|
||||
<source>Image Scaling</source>
|
||||
<translation>Kuvan skaalaus</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Command</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="150"/>
|
||||
<source>Create ImagePlane</source>
|
||||
<translation type="unfinished">Create ImagePlane</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::GLImageBox</name>
|
||||
<message>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="393"/>
|
||||
<source>Image pixel format</source>
|
||||
<translation>Kuvan pikselimuoto</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="394"/>
|
||||
<source>Undefined type of colour space for image viewing</source>
|
||||
<translation>Määrittämätön tyyppi väriavaruudesta kuvien katseluun</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageOrientationDialog</name>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="14"/>
|
||||
<source>Choose orientation</source>
|
||||
<translation>Valitse suunta</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="20"/>
|
||||
<source>Image plane</source>
|
||||
<translation>Kuvataso</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="26"/>
|
||||
<source>XY-Plane</source>
|
||||
<translation>XY-taso</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="36"/>
|
||||
<source>XZ-Plane</source>
|
||||
<translation>XZ-taso</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="43"/>
|
||||
<source>YZ-Plane</source>
|
||||
<translation>YZ-taso</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="72"/>
|
||||
<source>Reverse direction</source>
|
||||
<translation>Vastakkainen suunta</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="81"/>
|
||||
<source>Offset:</source>
|
||||
<translation>Siirtymä:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageView</name>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="108"/>
|
||||
<source>&Fit image</source>
|
||||
<translation>&Sovita kuva</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="110"/>
|
||||
<source>Stretch the image to fit the view</source>
|
||||
<translation>Venytä kuva sopimaan näkymään</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="114"/>
|
||||
<source>&1:1 scale</source>
|
||||
<translation>mittakaavassa &1:1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="116"/>
|
||||
<source>Display the image at a 1:1 scale</source>
|
||||
<translation>Näytä kuva mittakaavassa 1:1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="125"/>
|
||||
<source>Standard</source>
|
||||
<translation>Standardi</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="143"/>
|
||||
<source>Ready...</source>
|
||||
<translation>Valmis...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="568"/>
|
||||
<source>grey</source>
|
||||
<translation>harmaa</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="569"/>
|
||||
<location filename="../../ImageView.cpp" line="572"/>
|
||||
<location filename="../../ImageView.cpp" line="582"/>
|
||||
<location filename="../../ImageView.cpp" line="587"/>
|
||||
<location filename="../../ImageView.cpp" line="597"/>
|
||||
<location filename="../../ImageView.cpp" line="602"/>
|
||||
<location filename="../../ImageView.cpp" line="613"/>
|
||||
<location filename="../../ImageView.cpp" line="618"/>
|
||||
<location filename="../../ImageView.cpp" line="629"/>
|
||||
<location filename="../../ImageView.cpp" line="634"/>
|
||||
<source>zoom</source>
|
||||
<translation>Zoomaus</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="572"/>
|
||||
<location filename="../../ImageView.cpp" line="582"/>
|
||||
<location filename="../../ImageView.cpp" line="597"/>
|
||||
<location filename="../../ImageView.cpp" line="613"/>
|
||||
<location filename="../../ImageView.cpp" line="629"/>
|
||||
<source>outside image</source>
|
||||
<translation>kuvan ulkopuolella</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="70"/>
|
||||
<location filename="../../Command.cpp" line="114"/>
|
||||
<source>Images</source>
|
||||
<translation>Kuvat</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="75"/>
|
||||
<location filename="../../Command.cpp" line="119"/>
|
||||
<source>All files</source>
|
||||
<translation>Kaikki tiedostot</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="77"/>
|
||||
<location filename="../../Command.cpp" line="121"/>
|
||||
<source>Choose an image file to open</source>
|
||||
<translation>Valitse avattava kuvatiedosto</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="127"/>
|
||||
<source>Error opening image</source>
|
||||
<translation>Tiedoston avaaminen ei onnistu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="128"/>
|
||||
<source>Could not load the chosen image</source>
|
||||
<translation>Valittua kuvaa ei voi avata</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Workbench</name>
|
||||
<message>
|
||||
<location filename="../../Workbench.cpp" line="33"/>
|
||||
<source>Image</source>
|
||||
<translation>Kuva</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Image_Scaling</name>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="55"/>
|
||||
<source>Scale image plane</source>
|
||||
<translation type="unfinished">Scale image plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="59"/>
|
||||
<source>Scales an image plane by defining a distance between two points</source>
|
||||
<translation type="unfinished">Scales an image plane by defining a distance between two points</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="139"/>
|
||||
<source>Scale image plane</source>
|
||||
<translation type="unfinished">Scale image plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="140"/>
|
||||
<source>Distance</source>
|
||||
<translation>Etäisyys</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="141"/>
|
||||
<source>Select first point</source>
|
||||
<translation type="unfinished">Select first point</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="156"/>
|
||||
<source>Enter distance</source>
|
||||
<translation type="unfinished">Enter distance</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="159"/>
|
||||
<source>Select image plane</source>
|
||||
<translation type="unfinished">Select image plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="184"/>
|
||||
<source>Select second point</source>
|
||||
<translation type="unfinished">Select second point</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="193"/>
|
||||
<source>Select Image Plane and type distance</source>
|
||||
<translation type="unfinished">Select Image Plane and type distance</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
@@ -1,217 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="fil" sourcelanguage="en">
|
||||
<context>
|
||||
<name>CmdCreateImagePlane</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="100"/>
|
||||
<source>Image</source>
|
||||
<translation>Imahe</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="101"/>
|
||||
<source>Create image plane...</source>
|
||||
<translation>Lumikha ng plane ng imahe...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="102"/>
|
||||
<source>Create a planar image in the 3D space</source>
|
||||
<translation>Lumikha ng isang planar na imahe sa 3D space</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageOpen</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="55"/>
|
||||
<source>Image</source>
|
||||
<translation>Imahe</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="56"/>
|
||||
<source>Open...</source>
|
||||
<translation>Buksan...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="57"/>
|
||||
<source>Open image view</source>
|
||||
<translation>Buksan ang view ng imahe</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageScaling</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="175"/>
|
||||
<source>Image</source>
|
||||
<translation>Imahe</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="176"/>
|
||||
<source>Scale...</source>
|
||||
<translation>Scale...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="177"/>
|
||||
<source>Image Scaling</source>
|
||||
<translation type="unfinished">Image Scaling</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Command</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="150"/>
|
||||
<source>Create ImagePlane</source>
|
||||
<translation type="unfinished">Create ImagePlane</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::GLImageBox</name>
|
||||
<message>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="393"/>
|
||||
<source>Image pixel format</source>
|
||||
<translation>Pixel format ng imahe</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="394"/>
|
||||
<source>Undefined type of colour space for image viewing</source>
|
||||
<translation>Hindi matukoy na uri ng colour space para sa pag view ng imahe</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageOrientationDialog</name>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="14"/>
|
||||
<source>Choose orientation</source>
|
||||
<translation type="unfinished">Choose orientation</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="20"/>
|
||||
<source>Image plane</source>
|
||||
<translation>Plane ng imahe</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="26"/>
|
||||
<source>XY-Plane</source>
|
||||
<translation type="unfinished">XY-Plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="36"/>
|
||||
<source>XZ-Plane</source>
|
||||
<translation type="unfinished">XZ-Plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="43"/>
|
||||
<source>YZ-Plane</source>
|
||||
<translation type="unfinished">YZ-Plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="72"/>
|
||||
<source>Reverse direction</source>
|
||||
<translation type="unfinished">Reverse direction</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="81"/>
|
||||
<source>Offset:</source>
|
||||
<translation type="unfinished">Offset:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageView</name>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="108"/>
|
||||
<source>&Fit image</source>
|
||||
<translation>&Fit imahe</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="110"/>
|
||||
<source>Stretch the image to fit the view</source>
|
||||
<translation>I-stretch ang imahe para magkasya sa view</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="114"/>
|
||||
<source>&1:1 scale</source>
|
||||
<translation>&1:1 scale</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="116"/>
|
||||
<source>Display the image at a 1:1 scale</source>
|
||||
<translation>I-display ang imahe sa isang 1:1 scale</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="125"/>
|
||||
<source>Standard</source>
|
||||
<translation>Pamantayan</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="143"/>
|
||||
<source>Ready...</source>
|
||||
<translation>Handa...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="544"/>
|
||||
<source>grey</source>
|
||||
<translation>grey</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="545"/>
|
||||
<location filename="../../ImageView.cpp" line="548"/>
|
||||
<location filename="../../ImageView.cpp" line="558"/>
|
||||
<location filename="../../ImageView.cpp" line="563"/>
|
||||
<location filename="../../ImageView.cpp" line="573"/>
|
||||
<location filename="../../ImageView.cpp" line="578"/>
|
||||
<location filename="../../ImageView.cpp" line="589"/>
|
||||
<location filename="../../ImageView.cpp" line="594"/>
|
||||
<location filename="../../ImageView.cpp" line="605"/>
|
||||
<location filename="../../ImageView.cpp" line="610"/>
|
||||
<source>zoom</source>
|
||||
<translation>palakihin</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="548"/>
|
||||
<location filename="../../ImageView.cpp" line="558"/>
|
||||
<location filename="../../ImageView.cpp" line="573"/>
|
||||
<location filename="../../ImageView.cpp" line="589"/>
|
||||
<location filename="../../ImageView.cpp" line="605"/>
|
||||
<source>outside image</source>
|
||||
<translation>sa labas na imahe</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="70"/>
|
||||
<location filename="../../Command.cpp" line="114"/>
|
||||
<source>Images</source>
|
||||
<translation>Mga imahe</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="75"/>
|
||||
<location filename="../../Command.cpp" line="119"/>
|
||||
<source>All files</source>
|
||||
<translation>Lahat ng mga file</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="77"/>
|
||||
<location filename="../../Command.cpp" line="121"/>
|
||||
<source>Choose an image file to open</source>
|
||||
<translation>Pumili ng isang file ng imahe para buksan</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="127"/>
|
||||
<source>Error opening image</source>
|
||||
<translation>Kamalian sa pagbukas ng imahe</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="128"/>
|
||||
<source>Could not load the chosen image</source>
|
||||
<translation>Hindi ma load ang napiling imahe</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Workbench</name>
|
||||
<message>
|
||||
<location filename="../../Workbench.cpp" line="33"/>
|
||||
<source>Image</source>
|
||||
<translation>Imahe</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
@@ -1,268 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="fr" sourcelanguage="en">
|
||||
<context>
|
||||
<name>CmdCreateImagePlane</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="100"/>
|
||||
<source>Image</source>
|
||||
<translation>Image</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="101"/>
|
||||
<source>Create image plane...</source>
|
||||
<translation>Créer un plan d'image...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="102"/>
|
||||
<source>Create a planar image in the 3D space</source>
|
||||
<translation>Créer une image plane dans l'espace 3D</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageOpen</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="55"/>
|
||||
<source>Image</source>
|
||||
<translation>Image</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="56"/>
|
||||
<source>Open...</source>
|
||||
<translation>Ouvrir...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="57"/>
|
||||
<source>Open image view</source>
|
||||
<translation>Ouvrir une image</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageScaling</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="175"/>
|
||||
<source>Image</source>
|
||||
<translation>Image</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="176"/>
|
||||
<source>Scale...</source>
|
||||
<translation>Échelle...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="177"/>
|
||||
<source>Image Scaling</source>
|
||||
<translation>Redimensionnement d'image</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Command</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="150"/>
|
||||
<source>Create ImagePlane</source>
|
||||
<translation>Créer PlanImage</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::GLImageBox</name>
|
||||
<message>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="393"/>
|
||||
<source>Image pixel format</source>
|
||||
<translation>Format de l'image en pixels</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="394"/>
|
||||
<source>Undefined type of colour space for image viewing</source>
|
||||
<translation>Type d'espace colorimétrique indéfini</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageOrientationDialog</name>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="14"/>
|
||||
<source>Choose orientation</source>
|
||||
<translation>Sélectionner l'orientation</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="20"/>
|
||||
<source>Image plane</source>
|
||||
<translation>Plan de l'image</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="26"/>
|
||||
<source>XY-Plane</source>
|
||||
<translation>Plan XY</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="36"/>
|
||||
<source>XZ-Plane</source>
|
||||
<translation>Plan XZ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="43"/>
|
||||
<source>YZ-Plane</source>
|
||||
<translation>Plan YZ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="72"/>
|
||||
<source>Reverse direction</source>
|
||||
<translation>Inverser la direction</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="81"/>
|
||||
<source>Offset:</source>
|
||||
<translation>Décalage :</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageView</name>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="108"/>
|
||||
<source>&Fit image</source>
|
||||
<translation>&Adapter l'image</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="110"/>
|
||||
<source>Stretch the image to fit the view</source>
|
||||
<translation>Étirer l'image pour l'adapter à la vue</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="114"/>
|
||||
<source>&1:1 scale</source>
|
||||
<translation>Échelle &1:1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="116"/>
|
||||
<source>Display the image at a 1:1 scale</source>
|
||||
<translation>Afficher l'image à l'échelle 1:1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="125"/>
|
||||
<source>Standard</source>
|
||||
<translation>Standard</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="143"/>
|
||||
<source>Ready...</source>
|
||||
<translation>Prêt...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="568"/>
|
||||
<source>grey</source>
|
||||
<translation>gris</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="569"/>
|
||||
<location filename="../../ImageView.cpp" line="572"/>
|
||||
<location filename="../../ImageView.cpp" line="582"/>
|
||||
<location filename="../../ImageView.cpp" line="587"/>
|
||||
<location filename="../../ImageView.cpp" line="597"/>
|
||||
<location filename="../../ImageView.cpp" line="602"/>
|
||||
<location filename="../../ImageView.cpp" line="613"/>
|
||||
<location filename="../../ImageView.cpp" line="618"/>
|
||||
<location filename="../../ImageView.cpp" line="629"/>
|
||||
<location filename="../../ImageView.cpp" line="634"/>
|
||||
<source>zoom</source>
|
||||
<translation>zoom</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="572"/>
|
||||
<location filename="../../ImageView.cpp" line="582"/>
|
||||
<location filename="../../ImageView.cpp" line="597"/>
|
||||
<location filename="../../ImageView.cpp" line="613"/>
|
||||
<location filename="../../ImageView.cpp" line="629"/>
|
||||
<source>outside image</source>
|
||||
<translation>image extérieure</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="70"/>
|
||||
<location filename="../../Command.cpp" line="114"/>
|
||||
<source>Images</source>
|
||||
<translation>Images</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="75"/>
|
||||
<location filename="../../Command.cpp" line="119"/>
|
||||
<source>All files</source>
|
||||
<translation>Tous les fichiers</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="77"/>
|
||||
<location filename="../../Command.cpp" line="121"/>
|
||||
<source>Choose an image file to open</source>
|
||||
<translation>Choisir un fichier d'image à ouvrir</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="127"/>
|
||||
<source>Error opening image</source>
|
||||
<translation>Erreur à l'ouverture de l'image</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="128"/>
|
||||
<source>Could not load the chosen image</source>
|
||||
<translation>Impossible de charger l'image choisie</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Workbench</name>
|
||||
<message>
|
||||
<location filename="../../Workbench.cpp" line="33"/>
|
||||
<source>Image</source>
|
||||
<translation>Image</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Image_Scaling</name>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="55"/>
|
||||
<source>Scale image plane</source>
|
||||
<translation>Mettre à l'échelle le plan de l'image</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="59"/>
|
||||
<source>Scales an image plane by defining a distance between two points</source>
|
||||
<translation>Met le plan de l'image à l'échelle en définissant une distance entre deux points</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="139"/>
|
||||
<source>Scale image plane</source>
|
||||
<translation>Mettre à l'échelle le plan de l'image</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="140"/>
|
||||
<source>Distance</source>
|
||||
<translation>Distance</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="141"/>
|
||||
<source>Select first point</source>
|
||||
<translation>Sélectionnez le premier point</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="156"/>
|
||||
<source>Enter distance</source>
|
||||
<translation>Entrez une distance</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="159"/>
|
||||
<source>Select image plane</source>
|
||||
<translation>Sélectionner un plan d'image</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="184"/>
|
||||
<source>Select second point</source>
|
||||
<translation>Sélectionnez un deuxième point</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="193"/>
|
||||
<source>Select Image Plane and type distance</source>
|
||||
<translation>Sélectionnez le plan de l'image et entrez une distance</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
@@ -1,268 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="gl" sourcelanguage="en">
|
||||
<context>
|
||||
<name>CmdCreateImagePlane</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="100"/>
|
||||
<source>Image</source>
|
||||
<translation>Imaxe</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="101"/>
|
||||
<source>Create image plane...</source>
|
||||
<translation>Crear plano de imaxe...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="102"/>
|
||||
<source>Create a planar image in the 3D space</source>
|
||||
<translation>Crear una imaxe plana nun espazo 3D</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageOpen</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="55"/>
|
||||
<source>Image</source>
|
||||
<translation>Imaxe</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="56"/>
|
||||
<source>Open...</source>
|
||||
<translation>Abrir...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="57"/>
|
||||
<source>Open image view</source>
|
||||
<translation>Abrir vista de imaxe</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageScaling</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="175"/>
|
||||
<source>Image</source>
|
||||
<translation>Imaxe</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="176"/>
|
||||
<source>Scale...</source>
|
||||
<translation>Escala...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="177"/>
|
||||
<source>Image Scaling</source>
|
||||
<translation>Escalado de Imaxe</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Command</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="150"/>
|
||||
<source>Create ImagePlane</source>
|
||||
<translation>Crear plano de imaxe</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::GLImageBox</name>
|
||||
<message>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="393"/>
|
||||
<source>Image pixel format</source>
|
||||
<translation>Formato de imaxe de píxeles</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="394"/>
|
||||
<source>Undefined type of colour space for image viewing</source>
|
||||
<translation>Non hai definido un espazo de cor para a visualización da imaxe</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageOrientationDialog</name>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="14"/>
|
||||
<source>Choose orientation</source>
|
||||
<translation type="unfinished">Choose orientation</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="20"/>
|
||||
<source>Image plane</source>
|
||||
<translation>Plano de imaxe</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="26"/>
|
||||
<source>XY-Plane</source>
|
||||
<translation type="unfinished">XY-Plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="36"/>
|
||||
<source>XZ-Plane</source>
|
||||
<translation type="unfinished">XZ-Plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="43"/>
|
||||
<source>YZ-Plane</source>
|
||||
<translation type="unfinished">YZ-Plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="72"/>
|
||||
<source>Reverse direction</source>
|
||||
<translation type="unfinished">Reverse direction</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="81"/>
|
||||
<source>Offset:</source>
|
||||
<translation type="unfinished">Offset:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageView</name>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="108"/>
|
||||
<source>&Fit image</source>
|
||||
<translation>&Axustar imaxe</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="110"/>
|
||||
<source>Stretch the image to fit the view</source>
|
||||
<translation>Estalicar a imaxe para axustala á vista</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="114"/>
|
||||
<source>&1:1 scale</source>
|
||||
<translation>&Escala 1:1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="116"/>
|
||||
<source>Display the image at a 1:1 scale</source>
|
||||
<translation>Amosa a imaxe a escala 1:1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="125"/>
|
||||
<source>Standard</source>
|
||||
<translation>Estándar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="143"/>
|
||||
<source>Ready...</source>
|
||||
<translation>Listo...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="568"/>
|
||||
<source>grey</source>
|
||||
<translation>gris</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="569"/>
|
||||
<location filename="../../ImageView.cpp" line="572"/>
|
||||
<location filename="../../ImageView.cpp" line="582"/>
|
||||
<location filename="../../ImageView.cpp" line="587"/>
|
||||
<location filename="../../ImageView.cpp" line="597"/>
|
||||
<location filename="../../ImageView.cpp" line="602"/>
|
||||
<location filename="../../ImageView.cpp" line="613"/>
|
||||
<location filename="../../ImageView.cpp" line="618"/>
|
||||
<location filename="../../ImageView.cpp" line="629"/>
|
||||
<location filename="../../ImageView.cpp" line="634"/>
|
||||
<source>zoom</source>
|
||||
<translation>zoom</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="572"/>
|
||||
<location filename="../../ImageView.cpp" line="582"/>
|
||||
<location filename="../../ImageView.cpp" line="597"/>
|
||||
<location filename="../../ImageView.cpp" line="613"/>
|
||||
<location filename="../../ImageView.cpp" line="629"/>
|
||||
<source>outside image</source>
|
||||
<translation>imaxe exterior</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="70"/>
|
||||
<location filename="../../Command.cpp" line="114"/>
|
||||
<source>Images</source>
|
||||
<translation>Imaxes</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="75"/>
|
||||
<location filename="../../Command.cpp" line="119"/>
|
||||
<source>All files</source>
|
||||
<translation>Tódolos ficheiros</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="77"/>
|
||||
<location filename="../../Command.cpp" line="121"/>
|
||||
<source>Choose an image file to open</source>
|
||||
<translation>Escolme un ficheiro de imaxe para abrir</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="127"/>
|
||||
<source>Error opening image</source>
|
||||
<translation>Erro ó abrir a imaxe</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="128"/>
|
||||
<source>Could not load the chosen image</source>
|
||||
<translation>Non se puido cargar a imaxe escolmada</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Workbench</name>
|
||||
<message>
|
||||
<location filename="../../Workbench.cpp" line="33"/>
|
||||
<source>Image</source>
|
||||
<translation>Imaxe</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Image_Scaling</name>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="55"/>
|
||||
<source>Scale image plane</source>
|
||||
<translation type="unfinished">Scale image plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="59"/>
|
||||
<source>Scales an image plane by defining a distance between two points</source>
|
||||
<translation type="unfinished">Scales an image plane by defining a distance between two points</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="139"/>
|
||||
<source>Scale image plane</source>
|
||||
<translation type="unfinished">Scale image plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="140"/>
|
||||
<source>Distance</source>
|
||||
<translation type="unfinished">Distance</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="141"/>
|
||||
<source>Select first point</source>
|
||||
<translation type="unfinished">Select first point</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="156"/>
|
||||
<source>Enter distance</source>
|
||||
<translation type="unfinished">Enter distance</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="159"/>
|
||||
<source>Select image plane</source>
|
||||
<translation type="unfinished">Select image plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="184"/>
|
||||
<source>Select second point</source>
|
||||
<translation type="unfinished">Select second point</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="193"/>
|
||||
<source>Select Image Plane and type distance</source>
|
||||
<translation type="unfinished">Select Image Plane and type distance</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
@@ -1,268 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="hr" sourcelanguage="en">
|
||||
<context>
|
||||
<name>CmdCreateImagePlane</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="100"/>
|
||||
<source>Image</source>
|
||||
<translation>Prikaz</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="101"/>
|
||||
<source>Create image plane...</source>
|
||||
<translation>Napravi ravninu slike...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="102"/>
|
||||
<source>Create a planar image in the 3D space</source>
|
||||
<translation>Napravi ravninsku sliku u 3D prostoru</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageOpen</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="55"/>
|
||||
<source>Image</source>
|
||||
<translation>Prikaz</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="56"/>
|
||||
<source>Open...</source>
|
||||
<translation>Otvori ...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="57"/>
|
||||
<source>Open image view</source>
|
||||
<translation>Otvori pogled slike</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageScaling</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="175"/>
|
||||
<source>Image</source>
|
||||
<translation>Prikaz</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="176"/>
|
||||
<source>Scale...</source>
|
||||
<translation>Skalirajte...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="177"/>
|
||||
<source>Image Scaling</source>
|
||||
<translation>Promjena veličine slike</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Command</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="150"/>
|
||||
<source>Create ImagePlane</source>
|
||||
<translation>Stvori slikovnu ravninu</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::GLImageBox</name>
|
||||
<message>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="393"/>
|
||||
<source>Image pixel format</source>
|
||||
<translation>format slike u pixelima</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="394"/>
|
||||
<source>Undefined type of colour space for image viewing</source>
|
||||
<translation>nedefinirani tip boja za gledanje slika</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageOrientationDialog</name>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="14"/>
|
||||
<source>Choose orientation</source>
|
||||
<translation>Odaberite orijentaciju</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="20"/>
|
||||
<source>Image plane</source>
|
||||
<translation>Ploha slike</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="26"/>
|
||||
<source>XY-Plane</source>
|
||||
<translation>XY ravnina</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="36"/>
|
||||
<source>XZ-Plane</source>
|
||||
<translation>XZ-Ravnina</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="43"/>
|
||||
<source>YZ-Plane</source>
|
||||
<translation>YZ-Ravnina</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="72"/>
|
||||
<source>Reverse direction</source>
|
||||
<translation>Obrnutim smjerom</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="81"/>
|
||||
<source>Offset:</source>
|
||||
<translation>Odmak:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageView</name>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="108"/>
|
||||
<source>&Fit image</source>
|
||||
<translation>Prilagodi sliku</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="110"/>
|
||||
<source>Stretch the image to fit the view</source>
|
||||
<translation>Rastegni sliku da odgovara prikazu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="114"/>
|
||||
<source>&1:1 scale</source>
|
||||
<translation>u mjerilu 1:1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="116"/>
|
||||
<source>Display the image at a 1:1 scale</source>
|
||||
<translation>Prikaz slike u mjerilu 1:1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="125"/>
|
||||
<source>Standard</source>
|
||||
<translation>Standard</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="143"/>
|
||||
<source>Ready...</source>
|
||||
<translation>Spreman...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="568"/>
|
||||
<source>grey</source>
|
||||
<translation>siva</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="569"/>
|
||||
<location filename="../../ImageView.cpp" line="572"/>
|
||||
<location filename="../../ImageView.cpp" line="582"/>
|
||||
<location filename="../../ImageView.cpp" line="587"/>
|
||||
<location filename="../../ImageView.cpp" line="597"/>
|
||||
<location filename="../../ImageView.cpp" line="602"/>
|
||||
<location filename="../../ImageView.cpp" line="613"/>
|
||||
<location filename="../../ImageView.cpp" line="618"/>
|
||||
<location filename="../../ImageView.cpp" line="629"/>
|
||||
<location filename="../../ImageView.cpp" line="634"/>
|
||||
<source>zoom</source>
|
||||
<translation>zum</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="572"/>
|
||||
<location filename="../../ImageView.cpp" line="582"/>
|
||||
<location filename="../../ImageView.cpp" line="597"/>
|
||||
<location filename="../../ImageView.cpp" line="613"/>
|
||||
<location filename="../../ImageView.cpp" line="629"/>
|
||||
<source>outside image</source>
|
||||
<translation>izvan slike</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="70"/>
|
||||
<location filename="../../Command.cpp" line="114"/>
|
||||
<source>Images</source>
|
||||
<translation>Slike</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="75"/>
|
||||
<location filename="../../Command.cpp" line="119"/>
|
||||
<source>All files</source>
|
||||
<translation>Sve datoteke</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="77"/>
|
||||
<location filename="../../Command.cpp" line="121"/>
|
||||
<source>Choose an image file to open</source>
|
||||
<translation>Odaberite koju ce te sliku otvoriti</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="127"/>
|
||||
<source>Error opening image</source>
|
||||
<translation>Greška pri otvaranju slike</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="128"/>
|
||||
<source>Could not load the chosen image</source>
|
||||
<translation>Nije moguće učitati odabranu sliku</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Workbench</name>
|
||||
<message>
|
||||
<location filename="../../Workbench.cpp" line="33"/>
|
||||
<source>Image</source>
|
||||
<translation>Prikaz</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Image_Scaling</name>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="55"/>
|
||||
<source>Scale image plane</source>
|
||||
<translation>Skaliranje ravnine slike</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="59"/>
|
||||
<source>Scales an image plane by defining a distance between two points</source>
|
||||
<translation>Skaliranje ravnine slike kroz definiciju udaljenosti između dvije točke</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="139"/>
|
||||
<source>Scale image plane</source>
|
||||
<translation>Skaliranje ravnine slike</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="140"/>
|
||||
<source>Distance</source>
|
||||
<translation>Udaljenost</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="141"/>
|
||||
<source>Select first point</source>
|
||||
<translation>Odaberite početnu točku</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="156"/>
|
||||
<source>Enter distance</source>
|
||||
<translation>Unesite udaljenost</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="159"/>
|
||||
<source>Select image plane</source>
|
||||
<translation>Odaberite ravninu slike</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="184"/>
|
||||
<source>Select second point</source>
|
||||
<translation>Odaberite drugu točku</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="193"/>
|
||||
<source>Select Image Plane and type distance</source>
|
||||
<translation>Odabir ravninu slike i unesite udaljenost</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
@@ -1,268 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="hu" sourcelanguage="en">
|
||||
<context>
|
||||
<name>CmdCreateImagePlane</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="100"/>
|
||||
<source>Image</source>
|
||||
<translation>Kép</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="101"/>
|
||||
<source>Create image plane...</source>
|
||||
<translation>Kép sík létrehozása...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="102"/>
|
||||
<source>Create a planar image in the 3D space</source>
|
||||
<translation>Hozzon létre egy síkbeli képet a 3D-s térben</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageOpen</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="55"/>
|
||||
<source>Image</source>
|
||||
<translation>Kép</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="56"/>
|
||||
<source>Open...</source>
|
||||
<translation>Megnyitás...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="57"/>
|
||||
<source>Open image view</source>
|
||||
<translation>Kép megnyitása megtekintése</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageScaling</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="175"/>
|
||||
<source>Image</source>
|
||||
<translation>Kép</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="176"/>
|
||||
<source>Scale...</source>
|
||||
<translation>Lépték...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="177"/>
|
||||
<source>Image Scaling</source>
|
||||
<translation>Kép méretezése</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Command</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="150"/>
|
||||
<source>Create ImagePlane</source>
|
||||
<translation>Képsík létrehozása</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::GLImageBox</name>
|
||||
<message>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="393"/>
|
||||
<source>Image pixel format</source>
|
||||
<translation>Képpont formátum</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="394"/>
|
||||
<source>Undefined type of colour space for image viewing</source>
|
||||
<translation>A képnéző által meghatározhatatlan típusú színtér</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageOrientationDialog</name>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="14"/>
|
||||
<source>Choose orientation</source>
|
||||
<translation>Válasszon tájolást</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="20"/>
|
||||
<source>Image plane</source>
|
||||
<translation>Kép sík</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="26"/>
|
||||
<source>XY-Plane</source>
|
||||
<translation>XY-sík</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="36"/>
|
||||
<source>XZ-Plane</source>
|
||||
<translation>XZ-sík</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="43"/>
|
||||
<source>YZ-Plane</source>
|
||||
<translation>YZ-sík</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="72"/>
|
||||
<source>Reverse direction</source>
|
||||
<translation>Fordított irányban</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="81"/>
|
||||
<source>Offset:</source>
|
||||
<translation>Eltolás:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageView</name>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="108"/>
|
||||
<source>&Fit image</source>
|
||||
<translation>Kép kitöltse a képernyőt</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="110"/>
|
||||
<source>Stretch the image to fit the view</source>
|
||||
<translation>Nyújtsa ki a képet, hogy illeszkedjen a nézethez</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="114"/>
|
||||
<source>&1:1 scale</source>
|
||||
<translation>&1:1 léptékű</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="116"/>
|
||||
<source>Display the image at a 1:1 scale</source>
|
||||
<translation>A kép megjelenítése 1:1 méretarányban</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="125"/>
|
||||
<source>Standard</source>
|
||||
<translation>Szabvány</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="143"/>
|
||||
<source>Ready...</source>
|
||||
<translation>Kész ...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="568"/>
|
||||
<source>grey</source>
|
||||
<translation>szürke</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="569"/>
|
||||
<location filename="../../ImageView.cpp" line="572"/>
|
||||
<location filename="../../ImageView.cpp" line="582"/>
|
||||
<location filename="../../ImageView.cpp" line="587"/>
|
||||
<location filename="../../ImageView.cpp" line="597"/>
|
||||
<location filename="../../ImageView.cpp" line="602"/>
|
||||
<location filename="../../ImageView.cpp" line="613"/>
|
||||
<location filename="../../ImageView.cpp" line="618"/>
|
||||
<location filename="../../ImageView.cpp" line="629"/>
|
||||
<location filename="../../ImageView.cpp" line="634"/>
|
||||
<source>zoom</source>
|
||||
<translation>nagyítás</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="572"/>
|
||||
<location filename="../../ImageView.cpp" line="582"/>
|
||||
<location filename="../../ImageView.cpp" line="597"/>
|
||||
<location filename="../../ImageView.cpp" line="613"/>
|
||||
<location filename="../../ImageView.cpp" line="629"/>
|
||||
<source>outside image</source>
|
||||
<translation>külső kép</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="70"/>
|
||||
<location filename="../../Command.cpp" line="114"/>
|
||||
<source>Images</source>
|
||||
<translation>Képek</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="75"/>
|
||||
<location filename="../../Command.cpp" line="119"/>
|
||||
<source>All files</source>
|
||||
<translation>Összes fájl</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="77"/>
|
||||
<location filename="../../Command.cpp" line="121"/>
|
||||
<source>Choose an image file to open</source>
|
||||
<translation>Egy képfájl kiválasztása megnyitásra</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="127"/>
|
||||
<source>Error opening image</source>
|
||||
<translation>Hiba a kép megnyitása során</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="128"/>
|
||||
<source>Could not load the chosen image</source>
|
||||
<translation>Nem sikerült betölteni a kiválasztott képet</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Workbench</name>
|
||||
<message>
|
||||
<location filename="../../Workbench.cpp" line="33"/>
|
||||
<source>Image</source>
|
||||
<translation>Kép</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Image_Scaling</name>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="55"/>
|
||||
<source>Scale image plane</source>
|
||||
<translation>Kép sík méretezés</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="59"/>
|
||||
<source>Scales an image plane by defining a distance between two points</source>
|
||||
<translation>Képsíkot méretez két pont közti távolság megadásával</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="139"/>
|
||||
<source>Scale image plane</source>
|
||||
<translation>Kép sík méretezés</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="140"/>
|
||||
<source>Distance</source>
|
||||
<translation>Távolság</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="141"/>
|
||||
<source>Select first point</source>
|
||||
<translation>Válassza ki az első pontot</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="156"/>
|
||||
<source>Enter distance</source>
|
||||
<translation>Távolság megadása</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="159"/>
|
||||
<source>Select image plane</source>
|
||||
<translation>Képsík kijelölése</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="184"/>
|
||||
<source>Select second point</source>
|
||||
<translation>Második pont kiválasztása</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="193"/>
|
||||
<source>Select Image Plane and type distance</source>
|
||||
<translation>Képsík kiválasztása és távolság beírása</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
@@ -1,217 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="id" sourcelanguage="en">
|
||||
<context>
|
||||
<name>CmdCreateImagePlane</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="100"/>
|
||||
<source>Image</source>
|
||||
<translation>Gambar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="101"/>
|
||||
<source>Create image plane...</source>
|
||||
<translation>Create image plane...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="102"/>
|
||||
<source>Create a planar image in the 3D space</source>
|
||||
<translation>Create a planar image in the 3D space</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageOpen</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="55"/>
|
||||
<source>Image</source>
|
||||
<translation>Gambar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="56"/>
|
||||
<source>Open...</source>
|
||||
<translation>Buka...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="57"/>
|
||||
<source>Open image view</source>
|
||||
<translation>Buka gambar pemandangan</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageScaling</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="175"/>
|
||||
<source>Image</source>
|
||||
<translation>Gambar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="176"/>
|
||||
<source>Scale...</source>
|
||||
<translation>Skala...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="177"/>
|
||||
<source>Image Scaling</source>
|
||||
<translation>Skala Gambar</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Command</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="150"/>
|
||||
<source>Create ImagePlane</source>
|
||||
<translation type="unfinished">Create ImagePlane</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::GLImageBox</name>
|
||||
<message>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="393"/>
|
||||
<source>Image pixel format</source>
|
||||
<translation>Format piksel gambar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="394"/>
|
||||
<source>Undefined type of colour space for image viewing</source>
|
||||
<translation>Undefined jenis ruang warna untuk melihat gambar</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageOrientationDialog</name>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="14"/>
|
||||
<source>Choose orientation</source>
|
||||
<translation type="unfinished">Choose orientation</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="20"/>
|
||||
<source>Image plane</source>
|
||||
<translation>Bidang gambar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="26"/>
|
||||
<source>XY-Plane</source>
|
||||
<translation type="unfinished">XY-Plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="36"/>
|
||||
<source>XZ-Plane</source>
|
||||
<translation type="unfinished">XZ-Plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="43"/>
|
||||
<source>YZ-Plane</source>
|
||||
<translation type="unfinished">YZ-Plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="72"/>
|
||||
<source>Reverse direction</source>
|
||||
<translation type="unfinished">Reverse direction</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="81"/>
|
||||
<source>Offset:</source>
|
||||
<translation type="unfinished">Offset:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageView</name>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="108"/>
|
||||
<source>&Fit image</source>
|
||||
<translation>& Gambar Fit</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="110"/>
|
||||
<source>Stretch the image to fit the view</source>
|
||||
<translation>Peregangan gambar agar sesuai dengan tampilan</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="114"/>
|
||||
<source>&1:1 scale</source>
|
||||
<translation>& Skala 1: 1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="116"/>
|
||||
<source>Display the image at a 1:1 scale</source>
|
||||
<translation>Tampilkan gambar pada skala 1: 1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="125"/>
|
||||
<source>Standard</source>
|
||||
<translation>Standar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="143"/>
|
||||
<source>Ready...</source>
|
||||
<translation>Siap...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="544"/>
|
||||
<source>grey</source>
|
||||
<translation>abu-abu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="545"/>
|
||||
<location filename="../../ImageView.cpp" line="548"/>
|
||||
<location filename="../../ImageView.cpp" line="558"/>
|
||||
<location filename="../../ImageView.cpp" line="563"/>
|
||||
<location filename="../../ImageView.cpp" line="573"/>
|
||||
<location filename="../../ImageView.cpp" line="578"/>
|
||||
<location filename="../../ImageView.cpp" line="589"/>
|
||||
<location filename="../../ImageView.cpp" line="594"/>
|
||||
<location filename="../../ImageView.cpp" line="605"/>
|
||||
<location filename="../../ImageView.cpp" line="610"/>
|
||||
<source>zoom</source>
|
||||
<translation>perbesaran</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="548"/>
|
||||
<location filename="../../ImageView.cpp" line="558"/>
|
||||
<location filename="../../ImageView.cpp" line="573"/>
|
||||
<location filename="../../ImageView.cpp" line="589"/>
|
||||
<location filename="../../ImageView.cpp" line="605"/>
|
||||
<source>outside image</source>
|
||||
<translation>gambar luar</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="70"/>
|
||||
<location filename="../../Command.cpp" line="114"/>
|
||||
<source>Images</source>
|
||||
<translation>Gambar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="75"/>
|
||||
<location filename="../../Command.cpp" line="119"/>
|
||||
<source>All files</source>
|
||||
<translation>Semua file</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="77"/>
|
||||
<location filename="../../Command.cpp" line="121"/>
|
||||
<source>Choose an image file to open</source>
|
||||
<translation>Pilih file gambar yang akan dibuka</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="127"/>
|
||||
<source>Error opening image</source>
|
||||
<translation>Kesalahan saat membuka gambar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="128"/>
|
||||
<source>Could not load the chosen image</source>
|
||||
<translation>Tidak dapat memuat gambar yang dipilih</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Workbench</name>
|
||||
<message>
|
||||
<location filename="../../Workbench.cpp" line="33"/>
|
||||
<source>Image</source>
|
||||
<translation>Gambar</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
@@ -1,268 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="it" sourcelanguage="en">
|
||||
<context>
|
||||
<name>CmdCreateImagePlane</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="100"/>
|
||||
<source>Image</source>
|
||||
<translation>Immagine</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="101"/>
|
||||
<source>Create image plane...</source>
|
||||
<translation>Crea un piano immagine...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="102"/>
|
||||
<source>Create a planar image in the 3D space</source>
|
||||
<translation>Crea un'immagine planare nello spazio 3D</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageOpen</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="55"/>
|
||||
<source>Image</source>
|
||||
<translation>Immagine</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="56"/>
|
||||
<source>Open...</source>
|
||||
<translation>Apri...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="57"/>
|
||||
<source>Open image view</source>
|
||||
<translation>Apri il visualizzatore di immagini</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageScaling</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="175"/>
|
||||
<source>Image</source>
|
||||
<translation>Immagine</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="176"/>
|
||||
<source>Scale...</source>
|
||||
<translation>Scala...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="177"/>
|
||||
<source>Image Scaling</source>
|
||||
<translation>Ridimensionamento dell'immagine</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Command</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="150"/>
|
||||
<source>Create ImagePlane</source>
|
||||
<translation>Crea un piano immagine</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::GLImageBox</name>
|
||||
<message>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="393"/>
|
||||
<source>Image pixel format</source>
|
||||
<translation>Formato pixel</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="394"/>
|
||||
<source>Undefined type of colour space for image viewing</source>
|
||||
<translation>Tipo di spazio colore indefinito per la visualizzazione delle immagini</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageOrientationDialog</name>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="14"/>
|
||||
<source>Choose orientation</source>
|
||||
<translation>Orientamento</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="20"/>
|
||||
<source>Image plane</source>
|
||||
<translation>Piano dell'immagine</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="26"/>
|
||||
<source>XY-Plane</source>
|
||||
<translation>Piano XY</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="36"/>
|
||||
<source>XZ-Plane</source>
|
||||
<translation>Piano XZ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="43"/>
|
||||
<source>YZ-Plane</source>
|
||||
<translation>Piano YZ</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="72"/>
|
||||
<source>Reverse direction</source>
|
||||
<translation>Direzione inversa</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="81"/>
|
||||
<source>Offset:</source>
|
||||
<translation>Offset:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageView</name>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="108"/>
|
||||
<source>&Fit image</source>
|
||||
<translation>&Adatta immagine</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="110"/>
|
||||
<source>Stretch the image to fit the view</source>
|
||||
<translation>Stira l'immagine per adattarla alla vista</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="114"/>
|
||||
<source>&1:1 scale</source>
|
||||
<translation>Scala &1:1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="116"/>
|
||||
<source>Display the image at a 1:1 scale</source>
|
||||
<translation>Visualizza l'immagine in scala 1:1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="125"/>
|
||||
<source>Standard</source>
|
||||
<translation>Standard</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="143"/>
|
||||
<source>Ready...</source>
|
||||
<translation>Pronto...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="568"/>
|
||||
<source>grey</source>
|
||||
<translation>grigio</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="569"/>
|
||||
<location filename="../../ImageView.cpp" line="572"/>
|
||||
<location filename="../../ImageView.cpp" line="582"/>
|
||||
<location filename="../../ImageView.cpp" line="587"/>
|
||||
<location filename="../../ImageView.cpp" line="597"/>
|
||||
<location filename="../../ImageView.cpp" line="602"/>
|
||||
<location filename="../../ImageView.cpp" line="613"/>
|
||||
<location filename="../../ImageView.cpp" line="618"/>
|
||||
<location filename="../../ImageView.cpp" line="629"/>
|
||||
<location filename="../../ImageView.cpp" line="634"/>
|
||||
<source>zoom</source>
|
||||
<translation>zoom</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="572"/>
|
||||
<location filename="../../ImageView.cpp" line="582"/>
|
||||
<location filename="../../ImageView.cpp" line="597"/>
|
||||
<location filename="../../ImageView.cpp" line="613"/>
|
||||
<location filename="../../ImageView.cpp" line="629"/>
|
||||
<source>outside image</source>
|
||||
<translation>fuori dall'immagine</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="70"/>
|
||||
<location filename="../../Command.cpp" line="114"/>
|
||||
<source>Images</source>
|
||||
<translation>Immagini</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="75"/>
|
||||
<location filename="../../Command.cpp" line="119"/>
|
||||
<source>All files</source>
|
||||
<translation>Tutti i file</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="77"/>
|
||||
<location filename="../../Command.cpp" line="121"/>
|
||||
<source>Choose an image file to open</source>
|
||||
<translation>Seleziona un file immagine da aprire</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="127"/>
|
||||
<source>Error opening image</source>
|
||||
<translation>Errore durante l'apertura dell'immagine</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="128"/>
|
||||
<source>Could not load the chosen image</source>
|
||||
<translation>Impossibile caricare l'immagine scelta</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Workbench</name>
|
||||
<message>
|
||||
<location filename="../../Workbench.cpp" line="33"/>
|
||||
<source>Image</source>
|
||||
<translation>Immagine</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Image_Scaling</name>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="55"/>
|
||||
<source>Scale image plane</source>
|
||||
<translation>Scala un piano immagine</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="59"/>
|
||||
<source>Scales an image plane by defining a distance between two points</source>
|
||||
<translation>Scala un piano immagine definendo una distanza tra due punti</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="139"/>
|
||||
<source>Scale image plane</source>
|
||||
<translation>Scala un piano immagine</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="140"/>
|
||||
<source>Distance</source>
|
||||
<translation>Distanza</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="141"/>
|
||||
<source>Select first point</source>
|
||||
<translation>Seleziona primo punto</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="156"/>
|
||||
<source>Enter distance</source>
|
||||
<translation>Inserisci distanza</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="159"/>
|
||||
<source>Select image plane</source>
|
||||
<translation>Seleziona piano immagine</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="184"/>
|
||||
<source>Select second point</source>
|
||||
<translation>Selezionare il secondo punto</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="193"/>
|
||||
<source>Select Image Plane and type distance</source>
|
||||
<translation>Selezionare il Piano Immagine e digitare distanza</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
@@ -1,268 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="ja" sourcelanguage="en">
|
||||
<context>
|
||||
<name>CmdCreateImagePlane</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="100"/>
|
||||
<source>Image</source>
|
||||
<translation>画像</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="101"/>
|
||||
<source>Create image plane...</source>
|
||||
<translation>イメージプレーンを作成...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="102"/>
|
||||
<source>Create a planar image in the 3D space</source>
|
||||
<translation>3D空間に平面画像を作成します</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageOpen</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="55"/>
|
||||
<source>Image</source>
|
||||
<translation>画像</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="56"/>
|
||||
<source>Open...</source>
|
||||
<translation>開く...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="57"/>
|
||||
<source>Open image view</source>
|
||||
<translation>イメージビューで開く</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CmdImageScaling</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="175"/>
|
||||
<source>Image</source>
|
||||
<translation>画像</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="176"/>
|
||||
<source>Scale...</source>
|
||||
<translation>拡大縮小...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="177"/>
|
||||
<source>Image Scaling</source>
|
||||
<translation>イメージの拡大縮小</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Command</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="150"/>
|
||||
<source>Create ImagePlane</source>
|
||||
<translation>イメージプレーンを作成</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::GLImageBox</name>
|
||||
<message>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="393"/>
|
||||
<source>Image pixel format</source>
|
||||
<translation>画像のピクセルフォーマット</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../OpenGLImageBox.cpp" line="394"/>
|
||||
<source>Undefined type of colour space for image viewing</source>
|
||||
<translation>表示中の画像の色空間は未定義です</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageOrientationDialog</name>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="14"/>
|
||||
<source>Choose orientation</source>
|
||||
<translation>方向を選択</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="20"/>
|
||||
<source>Image plane</source>
|
||||
<translation>イメージプレーン</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="26"/>
|
||||
<source>XY-Plane</source>
|
||||
<translation>XY 平面</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="36"/>
|
||||
<source>XZ-Plane</source>
|
||||
<translation>XZ 平面</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="43"/>
|
||||
<source>YZ-Plane</source>
|
||||
<translation>YZ 平面</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="72"/>
|
||||
<source>Reverse direction</source>
|
||||
<translation>逆方向</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageOrientationDialog.ui" line="81"/>
|
||||
<source>Offset:</source>
|
||||
<translation>オフセット:</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ImageGui::ImageView</name>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="108"/>
|
||||
<source>&Fit image</source>
|
||||
<translation>フィット(&F)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="110"/>
|
||||
<source>Stretch the image to fit the view</source>
|
||||
<translation>ビューに合わせて画像を拡大します</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="114"/>
|
||||
<source>&1:1 scale</source>
|
||||
<translation>1:1スケール(&1)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="116"/>
|
||||
<source>Display the image at a 1:1 scale</source>
|
||||
<translation>1:1の尺度で画像を表示します</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="125"/>
|
||||
<source>Standard</source>
|
||||
<translation>標準</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="143"/>
|
||||
<source>Ready...</source>
|
||||
<translation>Ready...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="568"/>
|
||||
<source>grey</source>
|
||||
<translation>グレー</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="569"/>
|
||||
<location filename="../../ImageView.cpp" line="572"/>
|
||||
<location filename="../../ImageView.cpp" line="582"/>
|
||||
<location filename="../../ImageView.cpp" line="587"/>
|
||||
<location filename="../../ImageView.cpp" line="597"/>
|
||||
<location filename="../../ImageView.cpp" line="602"/>
|
||||
<location filename="../../ImageView.cpp" line="613"/>
|
||||
<location filename="../../ImageView.cpp" line="618"/>
|
||||
<location filename="../../ImageView.cpp" line="629"/>
|
||||
<location filename="../../ImageView.cpp" line="634"/>
|
||||
<source>zoom</source>
|
||||
<translation>ズーム</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../ImageView.cpp" line="572"/>
|
||||
<location filename="../../ImageView.cpp" line="582"/>
|
||||
<location filename="../../ImageView.cpp" line="597"/>
|
||||
<location filename="../../ImageView.cpp" line="613"/>
|
||||
<location filename="../../ImageView.cpp" line="629"/>
|
||||
<source>outside image</source>
|
||||
<translation>画像の外側</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="70"/>
|
||||
<location filename="../../Command.cpp" line="114"/>
|
||||
<source>Images</source>
|
||||
<translation>画像</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="75"/>
|
||||
<location filename="../../Command.cpp" line="119"/>
|
||||
<source>All files</source>
|
||||
<translation>すべてのファイル</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="77"/>
|
||||
<location filename="../../Command.cpp" line="121"/>
|
||||
<source>Choose an image file to open</source>
|
||||
<translation>開く画像ファイルを選択</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="127"/>
|
||||
<source>Error opening image</source>
|
||||
<translation>画像を開く際にエラーが発生しました</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../Command.cpp" line="128"/>
|
||||
<source>Could not load the chosen image</source>
|
||||
<translation>選択された画像を読み込めません</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Workbench</name>
|
||||
<message>
|
||||
<location filename="../../Workbench.cpp" line="33"/>
|
||||
<source>Image</source>
|
||||
<translation>画像</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Image_Scaling</name>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="55"/>
|
||||
<source>Scale image plane</source>
|
||||
<translation type="unfinished">Scale image plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="59"/>
|
||||
<source>Scales an image plane by defining a distance between two points</source>
|
||||
<translation type="unfinished">Scales an image plane by defining a distance between two points</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Dialog</name>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="139"/>
|
||||
<source>Scale image plane</source>
|
||||
<translation type="unfinished">Scale image plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="140"/>
|
||||
<source>Distance</source>
|
||||
<translation>距離</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="141"/>
|
||||
<source>Select first point</source>
|
||||
<translation type="unfinished">Select first point</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="156"/>
|
||||
<source>Enter distance</source>
|
||||
<translation type="unfinished">Enter distance</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="159"/>
|
||||
<source>Select image plane</source>
|
||||
<translation type="unfinished">Select image plane</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="184"/>
|
||||
<source>Select second point</source>
|
||||
<translation type="unfinished">Select second point</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../ImageTools/_CommandImageScaling.py" line="193"/>
|
||||
<source>Select Image Plane and type distance</source>
|
||||
<translation type="unfinished">Select Image Plane and type distance</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||