Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions src/core/Commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ AddPaintCommand::AddPaintCommand(MainWindow *mainWindow, uid paintId, const QIco
_icon(icon),
_name(name)
{
setText(QObject::tr("Add paint"));
setText(QObject::tr("Add source"));
}

void AddPaintCommand::undo()
Expand All @@ -59,7 +59,7 @@ AddMappingCommand::AddMappingCommand(MainWindow *mainWindow, uid mappingId, QUnd
_mainWindow(mainWindow),
_mappingId(mappingId)
{
setText(QObject::tr("Add mapping"));
setText(QObject::tr("Add layer"));
}

void AddMappingCommand::undo()
Expand All @@ -84,7 +84,7 @@ void AddMappingCommand::redo()
DuplicateMappingCommand::DuplicateMappingCommand(MainWindow *mainWindow, uid cloneId, QUndoCommand *parent):
AddMappingCommand(mainWindow, cloneId, parent)
{
setText(QObject::tr("Duplicate mapping"));
setText(QObject::tr("Duplicate layer"));
}

TransformShapeCommand::TransformShapeCommand(MapperGLCanvas* canvas, TransformShapeOption option, QUndoCommand* parent)
Expand Down Expand Up @@ -148,7 +148,7 @@ int MoveVertexCommand::id() const { return (_option == STEP ? CMD_KEY_MOVE_VERTE

void MoveVertexCommand::_doTransform(MShape::ptr shape)
{
shape->setVertex(_movedVertex, _vertexPosition);
shape->setVertex(_movedVertex, _vertexPosition);
}

bool MoveVertexCommand::mergeWith(const QUndoCommand* other)
Expand All @@ -171,7 +171,7 @@ bool MoveVertexCommand::mergeWith(const QUndoCommand* other)
ScaleRotateShapeCommand::ScaleRotateShapeCommand(MapperGLCanvas* canvas, TransformShapeOption option, int activeVertex, const QPointF &point, const QPointF& initialPositionPoint, const MShape::ptr& initialShape, QUndoCommand *parent)
: TransformShapeCommand(canvas, option, parent),
_movedVertex(activeVertex),
_initialShape(initialShape)
_initialShape(initialShape)
{
setText(QObject::tr("Scale and rotate shape"));

Expand All @@ -186,7 +186,7 @@ ScaleRotateShapeCommand::ScaleRotateShapeCommand(MapperGLCanvas* canvas, Transfo
// Compute rotation.
qreal rotation = currentVector.angleTo(initialVector);

// Create transform object.
// Create transform object.
// transform.rotate(rotation);
_transform.translate(+center.x(), +center.y());
_transform.rotate(rotation);
Expand Down Expand Up @@ -214,10 +214,10 @@ bool ScaleRotateShapeCommand::mergeWith(const QUndoCommand* other)
if (cmd->_movedVertex != _movedVertex)
return false;

_option = cmd->_option;
_option = cmd->_option;
_transform = cmd->_transform;

return true;
return true;
}


Expand Down Expand Up @@ -255,7 +255,7 @@ RemovePaintCommand::RemovePaintCommand(MainWindow *mainWindow, uid paintId, QUnd
_paintId(paintId),
_paintMappings()
{
setText(QObject::tr("Remove paint"));
setText(QObject::tr("Remove media"));
}

void RemovePaintCommand::undo()
Expand Down Expand Up @@ -293,7 +293,7 @@ DeleteMappingCommand::DeleteMappingCommand(MainWindow *mainWindow, uid mappingId
_mainWindow(mainWindow),
_mappingId(mappingId)
{
setText(QObject::tr("Delete mapping"));
setText(QObject::tr("Delete layer"));
}

void DeleteMappingCommand::undo()
Expand Down
95 changes: 36 additions & 59 deletions src/gui/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -772,29 +772,6 @@ void MainWindow::about()
{
// Stop video playback to avoid lags. XXX Hack
pause(false);

// // Pop-up about dialog.
// QMessageBox::about(this, tr("About MapMap"),
// tr("<h2><img src=\":mapmap-title\"/> %1</h2>"
// "<p>Copyright &copy; 2013 %2.</p>"
// "<p>MapMap is a free software for video mapping.</p>"
// "<p>Projection mapping, also known as video mapping and spatial augmented reality, "
// "is a projection technology used to turn objects, often irregularly shaped, into "
// "a display surface for video projection. These objects may be complex industrial "
// "landscapes, such as buildings. By using specialized software, a two or three "
// "dimensional object is spatially mapped on the virtual program which mimics the "
// "real environment it is to be projected on. The software can interact with a "
// "projector to fit any desired image onto the surface of that object. This "
// "technique is used by artists and advertisers alike who can add extra dimensions, "
// "optical illusions, and notions of movement onto previously static objects. The "
// "video is commonly combined with, or triggered by, audio to create an "
// "audio-visual narrative."
// "This project was made possible by the support of the International Organization of "
// "La Francophonie.</p>"
// "<p>http://mapmap.info<br />"
// "http://www.francophonie.org</p>"
// ).arg(MM::VERSION, MM::COPYRIGHT_OWNERS));

_aboutDialog = new AboutDialog(this);
_aboutDialog->setAttribute(Qt::WA_DeleteOnClose); // Important for ressource management
_aboutDialog->show();
Expand All @@ -811,8 +788,8 @@ void MainWindow::updateStatusBar()
else
mousePosLabel->setText(""); // Otherwise set empty text.
currentMessageLabel->setText(statusBar()->currentMessage());
sourceZoomLabel->setText("Source: " + QString::number(int(sourceCanvas->getZoomFactor() * 100)).append(QChar('%')));
destinationZoomLabel->setText("Destination: " + QString::number(int(destinationCanvas->getZoomFactor() * 100)).append(QChar('%')));
sourceZoomLabel->setText("Input Editor: " + QString::number(int(sourceCanvas->getZoomFactor() * 100)).append(QChar('%')));
destinationZoomLabel->setText("Output Editor: " + QString::number(int(destinationCanvas->getZoomFactor() * 100)).append(QChar('%')));
lastActionLabel->setText(undoStack->text(undoStack->count() - 1));
}

Expand Down Expand Up @@ -939,7 +916,7 @@ void MainWindow::deletePaintItem()
}
else
{
qCritical() << "No selected paint" << endl;
qCritical() << "No selected source" << endl;
}
}

Expand Down Expand Up @@ -1398,7 +1375,7 @@ void MainWindow::deletePaint(uid paintId, bool replace)
{
if (replace == false) {
int r = QMessageBox::warning(this, tr("MapMap"),
tr("Remove this paint and all its associated mappings?"),
tr("Remove this source and all its associated layers?"),
QMessageBox::Ok | QMessageBox::Cancel);
if (r == QMessageBox::Ok)
{
Expand Down Expand Up @@ -1468,7 +1445,7 @@ void MainWindow::createLayout()
sourceCanvas->setMinimumSize(CANVAS_MINIMUM_WIDTH, CANVAS_MINIMUM_HEIGHT);

sourceCanvasToolbar = new MapperGLCanvasToolbar(sourceCanvas, this);
sourceCanvasToolbar->setToolbarTitle(tr("Source"));
sourceCanvasToolbar->setToolbarTitle(tr("Input Editor"));
QVBoxLayout* sourceLayout = new QVBoxLayout;
sourceLayout->setContentsMargins(0, 0, 0, 0);
sourceLayout->setSpacing(0);
Expand All @@ -1484,7 +1461,7 @@ void MainWindow::createLayout()
destinationCanvas->setMinimumSize(CANVAS_MINIMUM_WIDTH, CANVAS_MINIMUM_HEIGHT);

destinationCanvasToolbar = new MapperGLCanvasToolbar(destinationCanvas, this);
destinationCanvasToolbar->setToolbarTitle(tr("Destination"));
destinationCanvasToolbar->setToolbarTitle(tr("Output Editor"));
QVBoxLayout* destinationLayout = new QVBoxLayout;
destinationLayout->setContentsMargins(0, 0, 0, 0);
destinationLayout->setSpacing(0);
Expand Down Expand Up @@ -1530,8 +1507,8 @@ void MainWindow::createLayout()

// Content tab.
contentTab = new QTabWidget;
contentTab->addTab(paintSplitter, QIcon(":/add-video"), tr("Paints"));
contentTab->addTab(mappingSplitter, QIcon(":/add-mesh"), tr("Mappings"));
contentTab->addTab(paintSplitter, QIcon(":/add-video"), tr("Library"));
contentTab->addTab(mappingSplitter, QIcon(":/add-mesh"), tr("Layers"));

canvasSplitter = new QSplitter(Qt::Vertical);
canvasSplitter->addWidget(sourcePanel);
Expand Down Expand Up @@ -1696,38 +1673,38 @@ void MainWindow::createActions()
connect(aboutAction, SIGNAL(triggered()), this, SLOT(about()));

// Duplicate.
cloneMappingAction = new QAction(tr("Duplicate Mapping"), this);
cloneMappingAction = new QAction(tr("Duplicate Layer"), this);
cloneMappingAction->setShortcut(Qt::CTRL + Qt::Key_D);
cloneMappingAction->setToolTip(tr("Duplicate mapping item"));
cloneMappingAction->setToolTip(tr("Duplicate layer item"));
cloneMappingAction->setIconVisibleInMenu(false);
cloneMappingAction->setEnabled(false);
cloneMappingAction->setShortcutContext(Qt::ApplicationShortcut);
addAction(cloneMappingAction);
connect(cloneMappingAction, SIGNAL(triggered()), this, SLOT(duplicateMappingItem()));

// Delete mapping.
deleteMappingAction = new QAction(tr("Delete Mapping"), this);
deleteMappingAction = new QAction(tr("Delete Layer"), this);
deleteMappingAction->setShortcut(QKeySequence::Delete);
deleteMappingAction->setToolTip(tr("Delete mapping item"));
deleteMappingAction->setToolTip(tr("Delete layer item"));
deleteMappingAction->setIconVisibleInMenu(false);
deleteMappingAction->setEnabled(false);
deleteMappingAction->setShortcutContext(Qt::ApplicationShortcut);
addAction(deleteMappingAction);
connect(deleteMappingAction, SIGNAL(triggered()), this, SLOT(deleteMappingItem()));

// Rename mapping.
renameMappingAction = new QAction(tr("Rename Mapping"), this);
renameMappingAction = new QAction(tr("Rename Layer"), this);
renameMappingAction->setShortcut(Qt::Key_F2);
renameMappingAction->setToolTip(tr("Rename mapping item"));
renameMappingAction->setToolTip(tr("Rename layer item"));
renameMappingAction->setIconVisibleInMenu(false);
renameMappingAction->setEnabled(false);
renameMappingAction->setShortcutContext(Qt::ApplicationShortcut);
addAction(renameMappingAction);
connect(renameMappingAction, SIGNAL(triggered()), this, SLOT(renameMappingItem()));

// Lock mapping.
mappingLockedAction = new QAction(tr("Lock Mapping"), this);
mappingLockedAction->setToolTip(tr("Lock mapping item"));
mappingLockedAction = new QAction(tr("Lock Layer"), this);
mappingLockedAction->setToolTip(tr("Lock layer item"));
mappingLockedAction->setIconVisibleInMenu(false);
mappingLockedAction->setCheckable(true);
mappingLockedAction->setChecked(false);
Expand All @@ -1737,8 +1714,8 @@ void MainWindow::createActions()
connect(mappingLockedAction, SIGNAL(triggered(bool)), this, SLOT(setMappingItemLocked(bool)));

// Hide mapping.
mappingHideAction = new QAction(tr("Hide Mapping"), this);
mappingHideAction->setToolTip(tr("Hide mapping item"));
mappingHideAction = new QAction(tr("Hide Layer"), this);
mappingHideAction->setToolTip(tr("Hide layer item"));
mappingHideAction->setIconVisibleInMenu(false);
mappingHideAction->setCheckable(true);
mappingHideAction->setChecked(false);
Expand All @@ -1748,8 +1725,8 @@ void MainWindow::createActions()
connect(mappingHideAction, SIGNAL(triggered(bool)), this, SLOT(setMappingItemHide(bool)));

// Solo mapping.
mappingSoloAction = new QAction(tr("Solo Mapping"), this);
mappingSoloAction->setToolTip(tr("solo mapping item"));
mappingSoloAction = new QAction(tr("Solo Layer"), this);
mappingSoloAction->setToolTip(tr("solo layer item"));
mappingSoloAction->setIconVisibleInMenu(false);
mappingSoloAction->setCheckable(true);
mappingSoloAction->setChecked(false);
Expand All @@ -1759,19 +1736,19 @@ void MainWindow::createActions()
connect(mappingSoloAction, SIGNAL(triggered(bool)), this, SLOT(setMappingItemSolo(bool)));

// Delete paint.
deletePaintAction = new QAction(tr("Delete Paint"), this);
deletePaintAction = new QAction(tr("Delete Source"), this);
//deletePaintAction->setShortcut(tr("CTRL+DEL"));
deletePaintAction->setToolTip(tr("Delete paint item"));
deletePaintAction->setToolTip(tr("Delete source item"));
deletePaintAction->setIconVisibleInMenu(false);
deletePaintAction->setEnabled(false);
deletePaintAction->setShortcutContext(Qt::ApplicationShortcut);
addAction(deletePaintAction);
connect(deletePaintAction, SIGNAL(triggered()), this, SLOT(deletePaintItem()));

// Rename paint.
renamePaintAction = new QAction(tr("Rename Paint"), this);
renamePaintAction = new QAction(tr("Rename Source"), this);
//renamePaintAction->setShortcut(Qt::Key_F2);
renamePaintAction->setToolTip(tr("Rename paint item"));
renamePaintAction->setToolTip(tr("Rename source item"));
renamePaintAction->setIconVisibleInMenu(false);
renamePaintAction->setEnabled(false);
renamePaintAction->setShortcutContext(Qt::ApplicationShortcut);
Expand All @@ -1789,32 +1766,32 @@ void MainWindow::createActions()
connect(preferencesAction, SIGNAL(triggered()), _preferenceDialog, SLOT(exec()));

// Add mesh.
addMeshAction = new QAction(tr("Add &Mesh"), this);
addMeshAction = new QAction(tr("Add &Mesh Layer"), this);
addMeshAction->setShortcut(Qt::CTRL + Qt::Key_M);
addMeshAction->setIcon(QIcon(":/add-mesh"));
addMeshAction->setToolTip(tr("Add mesh"));
addMeshAction->setToolTip(tr("Add mesh layer"));
addMeshAction->setIconVisibleInMenu(false);
addMeshAction->setShortcutContext(Qt::ApplicationShortcut);
addAction(addMeshAction);
connect(addMeshAction, SIGNAL(triggered()), this, SLOT(addMesh()));
addMeshAction->setEnabled(false);

// Add triangle.
addTriangleAction = new QAction(tr("Add &Triangle"), this);
addTriangleAction = new QAction(tr("Add &Triangle Layer"), this);
addTriangleAction->setShortcut(Qt::CTRL + Qt::Key_T);
addTriangleAction->setIcon(QIcon(":/add-triangle"));
addTriangleAction->setToolTip(tr("Add triangle"));
addTriangleAction->setToolTip(tr("Add triangle layer"));
addTriangleAction->setIconVisibleInMenu(false);
addTriangleAction->setShortcutContext(Qt::ApplicationShortcut);
addAction(addTriangleAction);
connect(addTriangleAction, SIGNAL(triggered()), this, SLOT(addTriangle()));
addTriangleAction->setEnabled(false);

// Add ellipse.
addEllipseAction = new QAction(tr("Add &Ellipse"), this);
addEllipseAction = new QAction(tr("Add &Ellipse Layer"), this);
addEllipseAction->setShortcut(Qt::CTRL + Qt::Key_E);
addEllipseAction->setIcon(QIcon(":/add-ellipse"));
addEllipseAction->setToolTip(tr("Add ellipse"));
addEllipseAction->setToolTip(tr("Add ellipse layer"));
addEllipseAction->setIconVisibleInMenu(false);
addEllipseAction->setShortcutContext(Qt::ApplicationShortcut);
addAction(addEllipseAction);
Expand Down Expand Up @@ -1890,10 +1867,10 @@ void MainWindow::createActions()
connect(displayControlsAction, SIGNAL(toggled(bool)), outputWindow, SLOT(setCanvasDisplayCrosshair(bool)));

// Toggle display of canvas controls.
displayPaintControlsAction = new QAction(tr("&Display Controls of Mappings of a Paint"), this);
displayPaintControlsAction = new QAction(tr("&Display Controls of Layers of a Source"), this);
//displayPaintControlsAction->setShortcut(Qt::ALT + Qt::Key_C);
displayPaintControlsAction->setIcon(QIcon(":/control-points"));
displayPaintControlsAction->setToolTip(tr("Display all canvas controls related to current paint"));
displayPaintControlsAction->setToolTip(tr("Display all canvas controls related to current source"));
displayPaintControlsAction->setIconVisibleInMenu(false);
displayPaintControlsAction->setCheckable(true);
displayPaintControlsAction->setChecked(_displayPaintControls);
Expand Down Expand Up @@ -1977,17 +1954,17 @@ void MainWindow::createActions()
connect(mainViewAction, SIGNAL(triggered(bool)), canvasSplitter->widget(0), SLOT(setVisible(bool)));
connect(mainViewAction, SIGNAL(triggered(bool)), canvasSplitter->widget(1), SLOT(setVisible(bool)));
// Source Only
sourceViewAction = new QAction(tr("Source Layout"), this);
sourceViewAction = new QAction(tr("Input editor Layout"), this);
sourceViewAction->setCheckable(true);
sourceViewAction->setShortcut(Qt::CTRL + Qt::Key_2);
sourceViewAction->setToolTip(tr("Switch to the Source layout."));
sourceViewAction->setToolTip(tr("Switch to the Input editor Layout."));
connect(sourceViewAction, SIGNAL(triggered(bool)), canvasSplitter->widget(0), SLOT(setVisible(bool)));
connect(sourceViewAction, SIGNAL(triggered(bool)), canvasSplitter->widget(1), SLOT(setHidden(bool)));
// Destination Only
destViewAction = new QAction(tr("Destination Layout"), this);
destViewAction = new QAction(tr("Output Editor Layout"), this);
destViewAction->setCheckable(true);
destViewAction->setShortcut(Qt::CTRL + Qt::Key_3);
destViewAction->setToolTip(tr("Switch to the Destination layout."));
destViewAction->setToolTip(tr("Switch to the Output Editors Layout."));
connect(destViewAction, SIGNAL(triggered(bool)), canvasSplitter->widget(0), SLOT(setHidden(bool)));
connect(destViewAction, SIGNAL(triggered(bool)), canvasSplitter->widget(1), SLOT(setVisible(bool)));
// Groups all actions
Expand Down
Loading