mirror of
https://github.com/mapmapteam/mapmap.git
synced 2026-06-16 12:33:19 +02:00
improve preferences system
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
* MM.cpp
|
||||
*
|
||||
* (c) 2013 Sofian Audry -- info(@)sofianaudry(.)com
|
||||
* (c) 2015 Dame Diongue -- baydamd(@)gmail(.)com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -30,6 +31,7 @@ const QString MM::FILE_EXTENSION = "mmp";
|
||||
const QString MM::VIDEO_FILES_FILTER = "*.mov *.mp4 *.avi *.ogg *.ogv *.mpeg *.mpeg1 *.mpeg4 *.mpg *.mpg2 *.mp2 *.mjpq *.mjp *.wmv *sock";
|
||||
const QString MM::IMAGE_FILES_FILTER = "*.jpg *.jpeg *.gif *.png *.tiff *.tif *.bmp";
|
||||
const QString MM::NAMESPACE_PREFIX = QString("%1::").arg(TOSTRING(MM_NAMESPACE));
|
||||
const QString MM::SUPPORTED_LANGUAGES = "en, fr";
|
||||
|
||||
const QColor MM::WHITE("#f6f5f5");
|
||||
const QColor MM::BLUE_GRAY("#323541");
|
||||
@@ -64,4 +66,7 @@ const qreal MM::ZOOM_FACTOR = 1.4f;
|
||||
const qreal MM::ZOOM_MIN = 0.1f;
|
||||
const qreal MM::ZOOM_MAX = 5.0f;
|
||||
|
||||
// Default values
|
||||
const QString MM::DEFAULT_LANGUAGE = "en";
|
||||
|
||||
MM_END_NAMESPACE
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
* MM.h
|
||||
*
|
||||
* (c) 2013 Sofian Audry -- info(@)sofianaudry(.)com
|
||||
* (c) 2015 Dame Diongue -- baydamd(@)gmail(.)com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -58,12 +59,12 @@ public:
|
||||
static const QString VIDEO_FILES_FILTER;
|
||||
static const QString IMAGE_FILES_FILTER;
|
||||
static const QString NAMESPACE_PREFIX;
|
||||
static const QString SUPPORTED_LANGUAGES;
|
||||
|
||||
// GUI.
|
||||
static const int DEFAULT_WINDOW_WIDTH = 640;
|
||||
static const int DEFAULT_WINDOW_HEIGHT = 480;
|
||||
static const int TOP_TOOLBAR_ICON_SIZE = 48;
|
||||
static const int BOTTOM_TOOLBAR_ICON_SIZE = 32;
|
||||
static const int TOOLBAR_ICON_SIZE = 48;
|
||||
static const int ZOOM_TOOLBAR_ICON_SIZE = 22;
|
||||
static const int ZOOM_TOOLBAR_BUTTON_SIZE = 32;
|
||||
static const int MAPPING_LIST_ICON_SIZE = 16;
|
||||
@@ -71,6 +72,19 @@ public:
|
||||
// OSC
|
||||
static const int DEFAULT_OSC_PORT = 12345;
|
||||
|
||||
// Default values
|
||||
static const bool DISPLAY_TEST_SIGNAL = false;
|
||||
static const bool DISPLAY_OUTPUT_WINDOW = false;
|
||||
static const bool DISPLAY_CONTROLS = true;
|
||||
static const bool DISPLAY_ALL_CONTROLS = true;
|
||||
static const bool DISPLAY_UNDO_STACK = false;
|
||||
static const bool DISPLAY_ZOOM_TOOLBAR = true;
|
||||
static const bool DISPLAY_MENU_BAR = true;
|
||||
static const bool STICKY_VERTICES = true;
|
||||
static const int DEFAULT_TEST_CARD = 0;
|
||||
static const bool SHOW_OUTPUT_RESOLUTION = true;
|
||||
static const QString DEFAULT_LANGUAGE;
|
||||
|
||||
// Style.
|
||||
static const QColor WHITE;
|
||||
static const QColor BLUE_GRAY;
|
||||
@@ -118,6 +132,12 @@ public:
|
||||
IconAndNameColum,
|
||||
GroupButtonColum
|
||||
};
|
||||
|
||||
enum TestCard {
|
||||
Classic,
|
||||
PAL,
|
||||
NTSC
|
||||
};
|
||||
};
|
||||
|
||||
MM_END_NAMESPACE
|
||||
|
||||
+5
-1
@@ -3,6 +3,7 @@
|
||||
*
|
||||
* (c) 2014 Sofian Audry -- info(@)sofianaudry(.)com
|
||||
* (c) 2014 Alexandre Quessy -- alexandre(@)quessy(.)net
|
||||
* (c) 2016 Dame Diongue -- baydamd(@)gmail(.)com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -25,13 +26,16 @@ MM_BEGIN_NAMESPACE
|
||||
MainApplication::MainApplication(int &argc, char *argv[])
|
||||
: QApplication(argc, argv)
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
#ifdef Q_OS_WIN32
|
||||
// Set GStreamer plugins path on Windows
|
||||
QString pluginPath = QCoreApplication::applicationDirPath() + "/plugins";
|
||||
QString libPath = QCoreApplication::applicationDirPath() + "/lib";
|
||||
|
||||
_putenv_s("GST_PLUGIN_PATH", pluginPath.toLocal8Bit());
|
||||
_putenv_s("PATH", libPath.toLocal8Bit());
|
||||
|
||||
// Set settings default format
|
||||
QSettings::setDefaultFormat(QSettings::IniFormat);
|
||||
#endif
|
||||
|
||||
// Initialize GStreamer.
|
||||
|
||||
+2
-1
@@ -3,6 +3,7 @@
|
||||
*
|
||||
* (c) 2014 Sofian Audry -- info(@)sofianaudry(.)com
|
||||
* (c) 2014 Alexandre Quessy -- alexandre(@)quessy(.)net
|
||||
* (c) 2016 Dame Diongue -- baydamd(@)gmail(.)com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -25,7 +26,7 @@
|
||||
#include <QApplication>
|
||||
#include <QDebug>
|
||||
#include "MM.h"
|
||||
#include "PreferencesDialog.h"
|
||||
#include <QSettings>
|
||||
|
||||
MM_BEGIN_NAMESPACE
|
||||
|
||||
|
||||
+35
-61
@@ -3,6 +3,7 @@
|
||||
*
|
||||
* (c) 2013 Sofian Audry -- info(@)sofianaudry(.)com
|
||||
* (c) 2013 Alexandre Quessy -- alexandre(@)quessy(.)net
|
||||
* (c) 2014 Dame Diongue -- baydamd(@)gmail(.)com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -19,6 +20,7 @@
|
||||
*/
|
||||
|
||||
#include "MainWindow.h"
|
||||
#include "PreferenceDialog.h"
|
||||
#include "Commands.h"
|
||||
#include "ProjectWriter.h"
|
||||
#include "ProjectReader.h"
|
||||
@@ -95,9 +97,6 @@ MainWindow::MainWindow()
|
||||
|
||||
// Start playing by default.
|
||||
play();
|
||||
|
||||
// after readSettings():
|
||||
_preferences_dialog = new PreferencesDialog(this, this);
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
@@ -362,7 +361,7 @@ void MainWindow::keyPressEvent(QKeyEvent *event)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef Q_OS_WIN
|
||||
#ifdef Q_OS_WIN32
|
||||
if (event->modifiers() & Qt::AltModifier) {
|
||||
if (!_showMenuBar) {
|
||||
menuBar()->setHidden(!menuBar()->isHidden());
|
||||
@@ -436,11 +435,6 @@ void MainWindow::open()
|
||||
videoTimer->start();
|
||||
}
|
||||
|
||||
void MainWindow::preferences()
|
||||
{
|
||||
this->_preferences_dialog->show();
|
||||
}
|
||||
|
||||
bool MainWindow::save()
|
||||
{
|
||||
// Popup save-as dialog if file has never been saved.
|
||||
@@ -731,7 +725,7 @@ void MainWindow::showMenuBar(bool shown)
|
||||
if (currentDesktop != "unity")
|
||||
menuBar()->setVisible(shown);
|
||||
#endif
|
||||
#ifdef Q_OS_WIN // On Windows
|
||||
#ifdef Q_OS_WIN32 // On Windows
|
||||
menuBar()->setVisible(shown);
|
||||
#endif
|
||||
}
|
||||
@@ -1419,6 +1413,9 @@ void MainWindow::createLayout()
|
||||
destinationLayout->addWidget(destinationCanvasToolbar, 0, Qt::AlignRight);
|
||||
destinationPanel->setLayout(destinationLayout);
|
||||
|
||||
// Preferences dialog
|
||||
_preferenceDialog = new PreferenceDialog(this);
|
||||
|
||||
outputWindow = new OutputGLWindow(this, destinationCanvas);
|
||||
outputWindow->installEventFilter(destinationCanvas);
|
||||
|
||||
@@ -1696,7 +1693,7 @@ void MainWindow::createActions()
|
||||
//preferencesAction->setIconVisibleInMenu(false);
|
||||
preferencesAction->setShortcutContext(Qt::ApplicationShortcut);
|
||||
addAction(preferencesAction);
|
||||
connect(preferencesAction, SIGNAL(triggered()), this, SLOT(preferences()));
|
||||
connect(preferencesAction, SIGNAL(triggered()), _preferenceDialog, SLOT(exec()));
|
||||
|
||||
// Add mesh.
|
||||
addMeshAction = new QAction(tr("Add &Mesh"), this);
|
||||
@@ -2015,7 +2012,7 @@ void MainWindow::createMenus()
|
||||
if (QString(getenv("XDG_CURRENT_DESKTOP")).toLower() != "unity")
|
||||
toolBarsMenu->addAction(showMenuBarAction);
|
||||
#endif
|
||||
#ifdef Q_OS_WIN
|
||||
#ifdef Q_OS_WIN32
|
||||
toolBarsMenu->addAction(showMenuBarAction);
|
||||
#endif
|
||||
windowMenu->addAction(displayUndoStackAction);
|
||||
@@ -2086,7 +2083,6 @@ void MainWindow::createPaintContextMenu()
|
||||
void MainWindow::createToolBars()
|
||||
{
|
||||
mainToolBar = addToolBar(tr("&Toolbar"));
|
||||
mainToolBar->setIconSize(QSize(MM::TOP_TOOLBAR_ICON_SIZE, MM::TOP_TOOLBAR_ICON_SIZE));
|
||||
mainToolBar->setMovable(false);
|
||||
mainToolBar->addAction(importMediaAction);
|
||||
mainToolBar->addAction(openCameraAction);
|
||||
@@ -2168,7 +2164,7 @@ void MainWindow::readSettings()
|
||||
{
|
||||
// FIXME: for each setting that is new since the first release in the major version number branch,
|
||||
// make sure it exists before reading its value.
|
||||
QSettings settings("MapMap", "MapMap");
|
||||
QSettings settings;
|
||||
|
||||
// settings present since 0.1.0:
|
||||
restoreGeometry(settings.value("geometry").toByteArray());
|
||||
@@ -2181,45 +2177,31 @@ void MainWindow::readSettings()
|
||||
outputWindow->restoreGeometry(settings.value("outputWindow").toByteArray());
|
||||
|
||||
// new in 0.1.2:
|
||||
if (settings.contains("displayOutputWindow"))
|
||||
{
|
||||
outputFullScreenAction->setChecked(settings.value("displayOutputWindow").toBool());
|
||||
outputWindow->setFullScreen(outputFullScreenAction->isChecked());
|
||||
}
|
||||
if (settings.contains("displayTestSignal"))
|
||||
{
|
||||
displayTestSignalAction->setChecked(settings.value("displayTestSignal").toBool());
|
||||
enableTestSignal(displayTestSignalAction->isChecked());
|
||||
}
|
||||
if (settings.contains("displayControls"))
|
||||
{
|
||||
displayControlsAction->setChecked(settings.value("displayControls").toBool());
|
||||
outputWindow->setDisplayCrosshair(displayControlsAction->isChecked());
|
||||
}
|
||||
if (settings.contains("displayAllControls"))
|
||||
{
|
||||
displayPaintControlsAction->setChecked(settings.value("displayAllControls").toBool());
|
||||
// outputWindow->setDisplayCrosshair(displayPaintControlsAction->isChecked());
|
||||
}
|
||||
|
||||
config_osc_receive_port = settings.value("osc_receive_port", MM::DEFAULT_OSC_PORT).toInt();
|
||||
outputFullScreenAction->setChecked(settings.value("displayOutputWindow", MM::DISPLAY_OUTPUT_WINDOW).toBool());
|
||||
displayTestSignalAction->setChecked(settings.value("displayTestSignal", MM::DISPLAY_TEST_SIGNAL).toBool());
|
||||
displayControlsAction->setChecked(settings.value("displayControls", MM::DISPLAY_CONTROLS).toBool());
|
||||
oscListeningPort = settings.value("oscListeningPort", MM::DEFAULT_OSC_PORT).toInt();
|
||||
|
||||
// Update Recent files and video
|
||||
updateRecentFileActions();
|
||||
updateRecentVideoActions();
|
||||
|
||||
// new in 0.3.2
|
||||
if (settings.contains("displayUndoStack"))
|
||||
displayUndoStackAction->setChecked(settings.value("displayUndoStack").toBool());
|
||||
if (settings.contains("zoomToolBar"))
|
||||
displayZoomToolAction->setChecked(settings.value("zoomToolBar").toBool());
|
||||
if (settings.contains("showMenuBar"))
|
||||
showMenuBarAction->setChecked(settings.value("showMenuBar").toBool());
|
||||
displayUndoStackAction->setChecked(settings.value("displayUndoStack", MM::DISPLAY_UNDO_STACK).toBool());
|
||||
displayZoomToolAction->setChecked(settings.value("zoomToolBar", MM::DISPLAY_ZOOM_TOOLBAR).toBool());
|
||||
showMenuBarAction->setChecked(settings.value("showMenuBar", MM::DISPLAY_MENU_BAR).toBool());
|
||||
|
||||
// New in 0.4.1
|
||||
displayPaintControlsAction->setChecked(settings.value("displayAllControls", MM::DISPLAY_ALL_CONTROLS).toBool());
|
||||
stickyVerticesAction->setChecked(settings.value("stickyVertices", MM::STICKY_VERTICES).toBool());
|
||||
// Set toolbar icon size
|
||||
int toolBarIconSize = settings.value("toolbarIconSize", MM::TOOLBAR_ICON_SIZE).toInt();
|
||||
mainToolBar->setIconSize(QSize(toolBarIconSize, toolBarIconSize));
|
||||
}
|
||||
|
||||
void MainWindow::writeSettings()
|
||||
{
|
||||
QSettings settings("MapMap", "MapMap");
|
||||
QSettings settings;
|
||||
|
||||
settings.setValue("geometry", saveGeometry());
|
||||
settings.setValue("windowState", saveState());
|
||||
@@ -2233,10 +2215,11 @@ void MainWindow::writeSettings()
|
||||
settings.setValue("displayTestSignal", displayTestSignalAction->isChecked());
|
||||
settings.setValue("displayControls", displayControlsAction->isChecked());
|
||||
settings.setValue("displayAllControls", displayPaintControlsAction->isChecked());
|
||||
settings.setValue("osc_receive_port", config_osc_receive_port);
|
||||
settings.setValue("oscListeningPort", oscListeningPort);
|
||||
settings.setValue("displayUndoStack", displayUndoStackAction->isChecked());
|
||||
settings.setValue("zoomToolBar", displayZoomToolAction->isChecked());
|
||||
settings.setValue("showMenuBar", showMenuBarAction->isChecked());
|
||||
settings.setValue("stickyVertices", stickyVerticesAction->isChecked());
|
||||
}
|
||||
|
||||
bool MainWindow::okToContinue()
|
||||
@@ -2717,9 +2700,6 @@ void MainWindow::addMappingItem(uid mappingId)
|
||||
mappingListModel->updateModel();
|
||||
setCurrentMapping(mappingId);
|
||||
|
||||
// Disable Test signal when add Shapes
|
||||
enableTestSignal(false);
|
||||
|
||||
// Add items to scenes.
|
||||
if (mapper->getInputGraphicsItem())
|
||||
sourceCanvas->scene()->addItem(mapper->getInputGraphicsItem().data());
|
||||
@@ -2878,12 +2858,12 @@ QString MainWindow::locateMediaFile(const QString &uri, bool isImage)
|
||||
return url;
|
||||
}
|
||||
|
||||
MainWindow* MainWindow::instance() {
|
||||
static MainWindow* inst = 0;
|
||||
if (!inst) {
|
||||
inst = new MainWindow;
|
||||
MainWindow* MainWindow::window() {
|
||||
static MainWindow* instance = 0;
|
||||
if (!instance) {
|
||||
instance = new MainWindow;
|
||||
}
|
||||
return inst;
|
||||
return instance;
|
||||
}
|
||||
|
||||
void MainWindow::updateCanvases()
|
||||
@@ -2978,12 +2958,6 @@ void MainWindow::enableDisplayPaintControls(bool display)
|
||||
updateCanvases();
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::enableTestSignal(bool enable)
|
||||
{
|
||||
updateCanvases();
|
||||
}
|
||||
|
||||
void MainWindow::displayUndoStack(bool display)
|
||||
{
|
||||
_displayUndoStack = display;
|
||||
@@ -3231,7 +3205,7 @@ void MainWindow::removeCurrentMapping() {
|
||||
void MainWindow::startOscReceiver()
|
||||
{
|
||||
#ifdef HAVE_OSC
|
||||
int port = config_osc_receive_port;
|
||||
int port = oscListeningPort;
|
||||
std::ostringstream os;
|
||||
os << port;
|
||||
#if QT_VERSION >= 0x050500
|
||||
@@ -3258,7 +3232,7 @@ bool MainWindow::setOscPort(int port)
|
||||
return false;
|
||||
}
|
||||
|
||||
config_osc_receive_port = port;
|
||||
oscListeningPort = port;
|
||||
startOscReceiver();
|
||||
|
||||
return true;
|
||||
@@ -3266,7 +3240,7 @@ bool MainWindow::setOscPort(int port)
|
||||
|
||||
int MainWindow::getOscPort() const
|
||||
{
|
||||
return config_osc_receive_port;
|
||||
return oscListeningPort;
|
||||
}
|
||||
|
||||
bool MainWindow::setOscPort(QString portNumber)
|
||||
|
||||
+6
-7
@@ -3,6 +3,7 @@
|
||||
*
|
||||
* (c) 2013 Sofian Audry -- info(@)sofianaudry(.)com
|
||||
* (c) 2013 Alexandre Quessy -- alexandre(@)quessy(.)net
|
||||
* (c) 2014 Dame Diongue -- baydamd(@)gmail(.)com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -41,7 +42,6 @@
|
||||
#endif
|
||||
|
||||
#include "OutputGLWindow.h"
|
||||
#include "PreferencesDialog.h"
|
||||
#include "ConsoleWindow.h"
|
||||
|
||||
#include "MappingManager.h"
|
||||
@@ -57,6 +57,7 @@
|
||||
|
||||
MM_BEGIN_NAMESPACE
|
||||
|
||||
class PreferenceDialog;
|
||||
|
||||
/**
|
||||
* This is the main window of MapMap. It acts as both a view and a controller interface.
|
||||
@@ -88,7 +89,6 @@ private slots:
|
||||
// File menu.
|
||||
void newFile();
|
||||
void open();
|
||||
void preferences();
|
||||
bool save();
|
||||
bool saveAs();
|
||||
void importMedia();
|
||||
@@ -236,7 +236,6 @@ public slots:
|
||||
void enableDisplayControls(bool display);
|
||||
void enableDisplayPaintControls(bool display);
|
||||
void enableStickyVertices(bool display);
|
||||
void enableTestSignal(bool enable);
|
||||
void displayUndoStack(bool display);
|
||||
|
||||
// Show Mapping Context Menu
|
||||
@@ -307,7 +306,7 @@ public:
|
||||
// Locate the file not found
|
||||
QString locateMediaFile(const QString& uri, bool isImage);
|
||||
|
||||
static MainWindow* instance();
|
||||
static MainWindow* window();
|
||||
|
||||
// Returns a short version of filename.
|
||||
static QString strippedName(const QString &fullFileName);
|
||||
@@ -469,7 +468,7 @@ private:
|
||||
#ifdef HAVE_OSC
|
||||
OscInterface::ptr osc_interface;
|
||||
#endif
|
||||
int config_osc_receive_port;
|
||||
int oscListeningPort;
|
||||
QTimer *osc_timer;
|
||||
|
||||
// View.
|
||||
@@ -510,7 +509,7 @@ private:
|
||||
QTimer *videoTimer;
|
||||
QElapsedTimer *systemTimer;
|
||||
|
||||
PreferencesDialog* _preferences_dialog;
|
||||
PreferenceDialog* _preferenceDialog;
|
||||
|
||||
// UndoStack
|
||||
QUndoStack *undoStack;
|
||||
@@ -560,7 +559,7 @@ public:
|
||||
bool displayPaintControls() const { return _displayPaintControls; }
|
||||
|
||||
/// Returns true iff we want vertices to stick to each other.
|
||||
bool stickyVertices() const { return _stickyVertices; }
|
||||
bool isStickyVertices() const { return _stickyVertices; }
|
||||
|
||||
// Use the same undoStack for whole program
|
||||
QUndoStack* getUndoStack() const { return undoStack; }
|
||||
|
||||
+14
-11
@@ -3,6 +3,7 @@
|
||||
*
|
||||
* (c) 2013 Sofian Audry -- info(@)sofianaudry(.)com
|
||||
* (c) 2013 Alexandre Quessy -- alexandre(@)quessy(.)net
|
||||
* (c) 2014 Dame Diongue -- baydamd(@)gmail(.)com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -82,7 +83,7 @@ MShape::ptr MapperGLCanvas::getShapeFromMapping(Mapping::ptr mapping)
|
||||
|
||||
MShape::ptr MapperGLCanvas::getCurrentShape()
|
||||
{
|
||||
return getShapeFromMapping(MainWindow::instance()->getCurrentMapping());
|
||||
return getShapeFromMapping(MainWindow::window()->getCurrentMapping());
|
||||
}
|
||||
|
||||
QSharedPointer<ShapeGraphicsItem> MapperGLCanvas::getShapeGraphicsItemFromMapping(Mapping::ptr mapping)
|
||||
@@ -93,7 +94,7 @@ QSharedPointer<ShapeGraphicsItem> MapperGLCanvas::getShapeGraphicsItemFromMappin
|
||||
}
|
||||
else
|
||||
{
|
||||
MappingGui::ptr mappingGui = MainWindow::instance()->getMappingGuiByMappingId(mapping->getId());
|
||||
MappingGui::ptr mappingGui = MainWindow::window()->getMappingGuiByMappingId(mapping->getId());
|
||||
return (isOutput() ? mappingGui->getGraphicsItem() : mappingGui->getInputGraphicsItem());
|
||||
}
|
||||
}
|
||||
@@ -107,9 +108,9 @@ QSharedPointer<ShapeGraphicsItem> MapperGLCanvas::getCurrentShapeGraphicsItem()
|
||||
void MapperGLCanvas::drawForeground(QPainter *painter , const QRectF &rect)
|
||||
{
|
||||
Q_UNUSED(rect);
|
||||
if (_mainWindow->displayControls())
|
||||
if (MainWindow::window()->displayControls())
|
||||
{
|
||||
uid mid = _mainWindow->getCurrentMappingId();
|
||||
uid mid = MainWindow::window()->getCurrentMappingId();
|
||||
if (mid != NULL_UID)
|
||||
{
|
||||
|
||||
@@ -317,9 +318,9 @@ void MapperGLCanvas::mouseReleaseEvent(QMouseEvent* event)
|
||||
QPointF p = mapToScene(event->pos());
|
||||
|
||||
// Stick to vertices.
|
||||
if (xOr(_mainWindow->stickyVertices(), (event->modifiers() & Qt::ShiftModifier)))
|
||||
if (xOr(_mainWindow->isStickyVertices(), (event->modifiers() & Qt::ShiftModifier)))
|
||||
{
|
||||
_glueVertex(&p);
|
||||
_snapVertex(&p);
|
||||
}
|
||||
|
||||
undoStack->push(new MoveVertexCommand(this,
|
||||
@@ -358,9 +359,9 @@ void MapperGLCanvas::mouseMoveEvent(QMouseEvent* event)
|
||||
QPointF p = scenePos;
|
||||
|
||||
// Stick to vertices.
|
||||
if (xOr(_mainWindow->stickyVertices(), (event->modifiers() & Qt::ShiftModifier)))
|
||||
if (xOr(_mainWindow->isStickyVertices(), (event->modifiers() & Qt::ShiftModifier)))
|
||||
{
|
||||
_glueVertex(&p);
|
||||
_snapVertex(&p);
|
||||
}
|
||||
|
||||
undoStack->push(new MoveVertexCommand(this,
|
||||
@@ -681,9 +682,11 @@ void MapperGLCanvas::setZoomFromMenu(const QString &text)
|
||||
applyZoomToView();
|
||||
}
|
||||
|
||||
void MapperGLCanvas::_glueVertex(QPointF* p)
|
||||
void MapperGLCanvas::_snapVertex(QPointF* p)
|
||||
{
|
||||
MappingManager manager = MainWindow::instance()->getMappingManager();
|
||||
QSettings settings;
|
||||
int vertexStickRadius = settings.value("vertexStickRadius", MM::VERTEX_STICK_RADIUS).toInt();
|
||||
MappingManager manager = MainWindow::window()->getMappingManager();
|
||||
MShape::ptr currentShape = getCurrentShape();
|
||||
for (int i = 0; i < manager.nMappings(); i++)
|
||||
{
|
||||
@@ -693,7 +696,7 @@ void MapperGLCanvas::_glueVertex(QPointF* p)
|
||||
for (int vertex = 0; vertex < shape->nVertices(); vertex++)
|
||||
{
|
||||
const QPointF& v = shape->getVertex(vertex);
|
||||
if (distIsInside(v, *p, MM::VERTEX_STICK_RADIUS))
|
||||
if (distIsInside(v, *p, vertexStickRadius))
|
||||
{
|
||||
p->setX(v.x());
|
||||
p->setY(v.y());
|
||||
|
||||
+2
-1
@@ -2,6 +2,7 @@
|
||||
* MapperGLCanvas.h
|
||||
*
|
||||
* (c) 2013 Sofian Audry -- info(@)sofianaudry(.)com
|
||||
* (c) 2014 Dame Diongue -- baydamd(@)gmail(.)com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -196,7 +197,7 @@ public slots:
|
||||
|
||||
protected:
|
||||
// TODO: Perhaps the sticky-sensitivity should be configurable through GUI
|
||||
void _glueVertex(QPointF* p);
|
||||
void _snapVertex(QPointF* p);
|
||||
|
||||
public:
|
||||
static const int NO_VERTEX = -1;
|
||||
|
||||
+2
-1
@@ -3,6 +3,7 @@
|
||||
*
|
||||
* (c) 2013 Sofian Audry -- info(@)sofianaudry(.)com
|
||||
* (c) 2013 Alexandre Quessy -- alexandre(@)quessy(.)net
|
||||
* (c) 2016 Dame Diongue -- baydamd(@)gmail(.)com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -91,7 +92,7 @@ void Mapping::read(const QDomElement& obj)
|
||||
|
||||
// Read paint.
|
||||
int paintId = obj.attribute("paintId").toInt();
|
||||
setPaint(MainWindow::instance()->getMappingManager().getPaintById(paintId));
|
||||
setPaint(MainWindow::window()->getMappingManager().getPaintById(paintId));
|
||||
|
||||
// Read output shape.
|
||||
_readShape(obj, true);
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
*
|
||||
* (c) 2013 Sofian Audry -- info(@)sofianaudry(.)com
|
||||
* (c) 2013 Alexandre Quessy -- alexandre(@)quessy(.)net
|
||||
* (c) 2016 Dame Diongue -- baydamd(@)gmail(.)com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
+151
-20
@@ -3,6 +3,7 @@
|
||||
*
|
||||
* (c) 2013 Sofian Audry -- info(@)sofianaudry(.)com
|
||||
* (c) 2013 Alexandre Quessy -- alexandre(@)quessy(.)net
|
||||
* (c) 2014 Dame Diongue -- baydamd(@)gmail(.)com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -28,7 +29,8 @@ OutputGLCanvas::OutputGLCanvas(MainWindow* mainWindow, QWidget* parent, const QG
|
||||
_displayCrosshair(false),
|
||||
_displayTestSignal(false),
|
||||
_svg_test_signal(":/test-signal"),
|
||||
_brush_test_signal(_svg_test_signal)
|
||||
_brush_test_signal(_svg_test_signal),
|
||||
_palTestCard(":/pal-test-card")
|
||||
{
|
||||
// Disable scrollbars.
|
||||
setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
@@ -46,10 +48,25 @@ void OutputGLCanvas::drawForeground(QPainter *painter , const QRectF &rect)
|
||||
{
|
||||
if (_displayTestSignal)
|
||||
{
|
||||
// Draw the preferred signal test card
|
||||
QSettings settings;
|
||||
int testCard = settings.value("signalTestCard", MM::DEFAULT_TEST_CARD).toInt();
|
||||
glPushMatrix();
|
||||
painter->translate(rect.x(), rect.y());
|
||||
painter->save();
|
||||
_drawTestSignal(painter);
|
||||
switch (testCard) {
|
||||
case MM::Classic:
|
||||
_drawTestSignal(painter);
|
||||
break;
|
||||
case MM::PAL:
|
||||
_drawPALTestCard(painter);
|
||||
break;
|
||||
case MM::NTSC:
|
||||
_drawNTSCTestCard(painter);
|
||||
break;
|
||||
default: // Do nothing;
|
||||
break;
|
||||
}
|
||||
painter->restore();
|
||||
glPopMatrix();
|
||||
}
|
||||
@@ -75,38 +92,152 @@ void OutputGLCanvas::drawForeground(QPainter *painter , const QRectF &rect)
|
||||
void OutputGLCanvas::_drawTestSignal(QPainter* painter)
|
||||
{
|
||||
const QRect& geo = geometry();
|
||||
painter->setPen(MM::CONTROL_COLOR);
|
||||
int rect_size = 10;
|
||||
QColor color_0(191, 191, 191);
|
||||
QColor color_1(128, 128, 128);
|
||||
QBrush brush_0(color_0);
|
||||
QBrush brush_1(color_1);
|
||||
int width = geo.width();
|
||||
int height = geo.height();
|
||||
int rectSize = 10;
|
||||
QColor darkerGray(191, 191, 191);
|
||||
QColor darkGray(Qt::darkGray);
|
||||
|
||||
painter->setPen(Qt::NoPen);
|
||||
|
||||
// Draw checkerboard pattern.
|
||||
for (int x = geo.x(); x < geo.width(); x += rect_size)
|
||||
for (int x = geo.x(); x < width; x += rectSize)
|
||||
{
|
||||
for (int y = geo.y(); y < geo.height(); y += rect_size)
|
||||
for (int y = geo.y(); y < height; y += rectSize)
|
||||
{
|
||||
if (((x + y) % 20) == 0)
|
||||
{
|
||||
painter->setBrush(brush_0);
|
||||
painter->setBrush(darkerGray);
|
||||
} else {
|
||||
painter->setBrush(brush_1);
|
||||
painter->setBrush(darkGray);
|
||||
}
|
||||
painter->drawRect(x, y, rect_size, rect_size);
|
||||
painter->drawRect(x, y, rectSize, rectSize);
|
||||
}
|
||||
}
|
||||
|
||||
// Create responsive image
|
||||
QImage test_signal = _svg_test_signal.scaled(geo.height(), geo.height(), Qt::KeepAspectRatio);
|
||||
// Set new brush
|
||||
this->_brush_test_signal = QBrush(test_signal);
|
||||
// Center the brush
|
||||
painter->translate((geo.width() - test_signal.width()) / 2, (geo.height() - test_signal.height()) / 2);
|
||||
// Draw the actual brush.
|
||||
painter->fillRect(0, 0, test_signal.width(), test_signal.height(), this->_brush_test_signal);
|
||||
QImage image = _svg_test_signal.scaled(height, height, Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
||||
int imageX = (width - image.width()) / 2;
|
||||
int imageY = (height - image.height()) / 2;
|
||||
|
||||
// Draw the image.
|
||||
painter->drawImage(imageX, imageY, image);
|
||||
}
|
||||
|
||||
void OutputGLCanvas::_drawPALTestCard(QPainter* painter)
|
||||
{
|
||||
const QRect& geo = geometry();
|
||||
int width = geo.width();
|
||||
int height = geo.height();
|
||||
int rectSize = 85;
|
||||
int marginX = (rectSize - width % rectSize) / 2;
|
||||
int marginY = (rectSize - height % rectSize) / 2;
|
||||
QColor black(Qt::black);
|
||||
QColor white(Qt::white);
|
||||
QColor darkGray(Qt::darkGray);
|
||||
|
||||
// Draw checkerboard pattern.
|
||||
for (int x = geo.x(); x < width; x += rectSize)
|
||||
{
|
||||
for (int y = geo.y(); y < height; y += rectSize)
|
||||
{
|
||||
painter->setPen(Qt::NoPen);
|
||||
if (((x + y) % (rectSize * 2)) == 0)
|
||||
{
|
||||
painter->setBrush(QBrush(white));
|
||||
} else {
|
||||
painter->setBrush(QBrush(black));
|
||||
}
|
||||
|
||||
if ((x > 0 && x <= (width - rectSize)) && (y > 0 && y <= (height - rectSize))) {
|
||||
painter->setBrush(QBrush(darkGray));
|
||||
painter->setPen(QPen(QBrush(white), 3));
|
||||
}
|
||||
|
||||
painter->drawRect(x - marginX, y - marginY, rectSize, rectSize);
|
||||
}
|
||||
}
|
||||
|
||||
// Create responsive image
|
||||
QImage image = _palTestCard.scaled(height - (rectSize * 2), height - (rectSize * 2),
|
||||
Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
||||
// Draw image
|
||||
int imageX = (width - image.width()) / 2;
|
||||
int imageY = (height - image.height()) / 2;
|
||||
int imageWidth = image.width();
|
||||
int imageHeight = image.height();
|
||||
painter->drawImage(imageX, imageY, image);
|
||||
// Draw text for screen resolution
|
||||
int fontSize = imageHeight / 20;
|
||||
QRect textRect((width / 2) - (fontSize * 3), imageY + (imageHeight / 13), fontSize * 6, fontSize);
|
||||
_drawResolutionText(painter, textRect, fontSize);
|
||||
}
|
||||
|
||||
void OutputGLCanvas::_drawNTSCTestCard(QPainter* painter)
|
||||
{
|
||||
const QRect& geo = geometry();
|
||||
int width = geo.width();
|
||||
int height = geo.height();
|
||||
QList<QColor> colors;
|
||||
QColor white(Qt::white);
|
||||
QColor yellow(Qt::yellow);
|
||||
QColor cyan(Qt::cyan);
|
||||
QColor green(Qt::green);
|
||||
QColor magenta(Qt::magenta);
|
||||
QColor red(Qt::red);
|
||||
QColor blue(Qt::blue);
|
||||
QColor black(Qt::black);
|
||||
|
||||
colors.push_back(white);
|
||||
colors.push_back(yellow);
|
||||
colors.push_back(cyan);
|
||||
colors.push_back(green);
|
||||
colors.push_back(magenta);
|
||||
colors.push_back(red);
|
||||
colors.push_back(blue);
|
||||
colors.push_back(black);
|
||||
|
||||
const int bandWidth = width / colors.size();
|
||||
|
||||
painter->setPen(Qt::NoPen);
|
||||
|
||||
// Draw checkerboard pattern.
|
||||
for (int x = 0; x < width / bandWidth; x++)
|
||||
{
|
||||
painter->setBrush(colors.at(x));
|
||||
painter->drawRect(x * bandWidth, 0, bandWidth, height);
|
||||
}
|
||||
|
||||
// Create responsive image
|
||||
// QImage image = _palTestCard.scaled(height - (rectSize * 2), height - (rectSize * 2),
|
||||
// Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
||||
// // Draw image
|
||||
// int imageX = (width - image.width()) / 2;
|
||||
// int imageY = (height - image.height()) / 2;
|
||||
// int imageWidth = image.width();
|
||||
// int imageHeight = image.height();
|
||||
// painter->drawImage(imageX, imageY, image);
|
||||
// Draw text for screen resolution
|
||||
int fontSize = height / 30;
|
||||
QRect textRect((width / 2) - (fontSize * 3), height / 3, fontSize * 6, fontSize);
|
||||
_drawResolutionText(painter, textRect, fontSize);
|
||||
}
|
||||
|
||||
void OutputGLCanvas::_drawResolutionText(QPainter *painter, const QRect &rect, int fontSize)
|
||||
{
|
||||
QSettings settings;
|
||||
|
||||
if (settings.value("showResolution").toBool())
|
||||
{
|
||||
painter->fillRect(rect, Qt::black);
|
||||
QFont font = painter->font();
|
||||
font.setPixelSize(fontSize);
|
||||
painter->setFont(font);
|
||||
painter->setPen(Qt::white);
|
||||
painter->drawText(rect, Qt::AlignCenter,
|
||||
QString::number(geometry().width()) +
|
||||
" x " + QString::number(geometry().height()));
|
||||
}
|
||||
}
|
||||
|
||||
void OutputGLCanvas::resizeGL(int width, int height)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
*
|
||||
* (c) 2013 Sofian Audry -- info(@)sofianaudry(.)com
|
||||
* (c) 2013 Alexandre Quessy -- alexandre(@)quessy(.)net
|
||||
* (c) 2014 Dame Diongue -- baydamd(@)gmail(.)com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -50,11 +51,16 @@ public:
|
||||
|
||||
private:
|
||||
void _drawTestSignal(QPainter* painter);
|
||||
void _drawPALTestCard(QPainter *painter);
|
||||
void _drawNTSCTestCard(QPainter *painter);
|
||||
|
||||
void _drawResolutionText(QPainter *painter, const QRect &rect, int fontSize);
|
||||
|
||||
bool _displayCrosshair;
|
||||
bool _displayTestSignal;
|
||||
QImage _svg_test_signal;
|
||||
QBrush _brush_test_signal;
|
||||
QImage _palTestCard;
|
||||
|
||||
protected:
|
||||
// overriden from QGlWidget:
|
||||
|
||||
@@ -0,0 +1,415 @@
|
||||
/*
|
||||
* PreferenceDialog.cpp
|
||||
*
|
||||
* (c) 2014 Sofian Audry -- info(@)sofianaudry(.)com
|
||||
* (c) 2014 Alexandre Quessy -- alexandre(@)quessy(.)net
|
||||
* (c) 2016 Dame Diongue -- baydamd(@)gmail(.)com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "PreferenceDialog.h"
|
||||
|
||||
MM_BEGIN_NAMESPACE
|
||||
|
||||
PreferenceDialog::PreferenceDialog(QWidget* parent) :
|
||||
QDialog(parent)
|
||||
{
|
||||
// configure size
|
||||
resize(PREFERENCES_WINDOW_WIDTH, PREFERENCES_WINDOW_HEIGHT);
|
||||
setMinimumSize(PREFERENCES_WINDOW_WIDTH, PREFERENCES_WINDOW_HEIGHT);
|
||||
|
||||
// Create different pages
|
||||
createInterfacePage();
|
||||
createMappingPage();
|
||||
createOutputPage();
|
||||
createControlsPage();
|
||||
createAdvancedPage();
|
||||
|
||||
// | Cancel || OK |
|
||||
_buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok
|
||||
| QDialogButtonBox::Cancel);
|
||||
|
||||
// Preferences list
|
||||
createPreferencesList();
|
||||
|
||||
// Rearrange position
|
||||
QGridLayout *mainLayout = new QGridLayout;
|
||||
mainLayout->setColumnStretch(0, 1);
|
||||
mainLayout->setColumnStretch(1, 3);
|
||||
mainLayout->addWidget(_listWidget, 0, 0);
|
||||
mainLayout->addLayout(_stackedLayout, 0, 1);
|
||||
mainLayout->addWidget(_buttonBox, 1, 0, 1, 2);
|
||||
setLayout(mainLayout);
|
||||
|
||||
connect(_buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
|
||||
connect(_buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
|
||||
|
||||
setWindowTitle(tr("Preferences"));
|
||||
_listWidget->setCurrentRow(0);
|
||||
}
|
||||
|
||||
PreferenceDialog::~PreferenceDialog()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void PreferenceDialog::showDialog()
|
||||
{
|
||||
exec();
|
||||
}
|
||||
|
||||
void PreferenceDialog::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
emit closed();
|
||||
event->accept();
|
||||
}
|
||||
|
||||
void PreferenceDialog::accept()
|
||||
{
|
||||
applySettings();
|
||||
QDialog::accept();
|
||||
}
|
||||
|
||||
void PreferenceDialog::reject()
|
||||
{
|
||||
close();
|
||||
}
|
||||
|
||||
int PreferenceDialog::exec()
|
||||
{
|
||||
// Make sure settings is loaded
|
||||
if (!loadSettings())
|
||||
return QDialog::Rejected;
|
||||
|
||||
return QDialog::exec();
|
||||
}
|
||||
|
||||
bool PreferenceDialog::loadSettings()
|
||||
{
|
||||
QSettings settings;
|
||||
// Listening port
|
||||
_listenPortNumber->setValue(settings.value("oscListeningPort", MM::DEFAULT_OSC_PORT).toInt());
|
||||
// Sticky vertices enabled
|
||||
_stickyVerticesBox->setChecked(settings.value("stickyVertices", MM::STICKY_VERTICES).toBool());
|
||||
// Sticky vertices radius
|
||||
_stickyRadiusBox->setCurrentText(settings.value("vertexStickRadius", MM::VERTEX_STICK_RADIUS).toString());
|
||||
// Show screen resolution on output
|
||||
_showResolutionBox->setChecked(settings.value("showResolution", MM::SHOW_OUTPUT_RESOLUTION).toBool());
|
||||
// Set preferred test signal pattern
|
||||
_radioGroup.at(settings.value("signalTestCard", MM::DEFAULT_TEST_CARD).toInt())->setChecked(true);
|
||||
// Set toolbar icon size
|
||||
_toolbarIconSizeBox->setCurrentIndex(_toolbarIconSizeBox->findData(
|
||||
settings.value("toolbarIconSize", MM::TOOLBAR_ICON_SIZE)));
|
||||
// Set language
|
||||
_languageBox->setCurrentIndex(_languageBox->findData(settings.value("language", MM::DEFAULT_LANGUAGE)));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void PreferenceDialog::applySettings()
|
||||
{
|
||||
QSettings settings;
|
||||
MainWindow *mainWindow = MainWindow::window();
|
||||
// Listen port
|
||||
settings.setValue("oscListeningPort", _listenPortNumber->value());
|
||||
mainWindow->setOscPort(settings.value("oscListeningPort").toInt());
|
||||
// Sticky vertices enabled
|
||||
settings.setValue("stickyVertices", _stickyVerticesBox->isChecked());
|
||||
// Sticky vertices radius
|
||||
settings.setValue("vertexStickRadius", _stickyRadiusBox->currentText());
|
||||
// Show screen resolution on output
|
||||
settings.setValue("showResolution", _showResolutionBox->isChecked());
|
||||
// Set preferred test signal pattern
|
||||
foreach (QRadioButton *radio, _radioGroup) {
|
||||
if (radio->isChecked()) {
|
||||
settings.setValue("signalTestCard", _radioGroup.indexOf(radio));
|
||||
break;
|
||||
}
|
||||
}
|
||||
// Set toolbar icon size
|
||||
settings.setValue("toolbarIconSize", _toolbarIconSizeBox->currentData());
|
||||
// Set language
|
||||
settings.setValue("language", _languageBox->currentData());
|
||||
}
|
||||
|
||||
void PreferenceDialog::refreshCurrentIP()
|
||||
{
|
||||
foreach (const QHostAddress &address, QNetworkInterface::allAddresses()) {
|
||||
if (address.protocol() == QAbstractSocket::IPv4Protocol
|
||||
&& address != QHostAddress(QHostAddress::LocalHost))
|
||||
_machineAddressLabel->setText(address.toString());
|
||||
}
|
||||
}
|
||||
|
||||
void PreferenceDialog::createInterfacePage()
|
||||
{
|
||||
_interfacePage = new QWidget;
|
||||
|
||||
// Create language box
|
||||
createLanguageList();
|
||||
|
||||
_toolbarIconSizeBox = new QComboBox;
|
||||
_toolbarIconSizeBox->addItem(tr("Large"), 64);
|
||||
_toolbarIconSizeBox->addItem(tr("Medium"), 48);
|
||||
_toolbarIconSizeBox->addItem(tr("Small"), 32);
|
||||
|
||||
QFormLayout *languageForm = new QFormLayout;
|
||||
languageForm->setFieldGrowthPolicy(QFormLayout::FieldsStayAtSizeHint);
|
||||
languageForm->addRow(tr("Language (requires restart)"), _languageBox);
|
||||
|
||||
QFormLayout *toolbarIconSizeForm = new QFormLayout;
|
||||
toolbarIconSizeForm->setFieldGrowthPolicy(QFormLayout::FieldsStayAtSizeHint);
|
||||
toolbarIconSizeForm->addRow(tr("Toolbar icon size (requires restart)"), _toolbarIconSizeBox);
|
||||
|
||||
QVBoxLayout *interfaceLayout = new QVBoxLayout;
|
||||
interfaceLayout->addLayout(languageForm);
|
||||
interfaceLayout->addLayout(toolbarIconSizeForm);
|
||||
|
||||
_interfacePage->setLayout(interfaceLayout);
|
||||
}
|
||||
|
||||
void PreferenceDialog::createMappingPage()
|
||||
{
|
||||
_mappingPage = new QWidget;
|
||||
QMargins marginLeft(40, 0, 0, 0);
|
||||
|
||||
// Vertex
|
||||
_stickyVerticesBox = new QCheckBox(tr("Enable Sticky vertices"));
|
||||
|
||||
_stickyRadiusBox = new QComboBox;
|
||||
QStringList stickList;
|
||||
for (int i(1); i <= 10; ++i)
|
||||
stickList.append(QString::number(i * 10));
|
||||
_stickyRadiusBox->addItems(stickList);
|
||||
// Enable box only if sticky vertices is enabled
|
||||
connect(_stickyVerticesBox, SIGNAL(toggled(bool)), _stickyRadiusBox, SLOT(setEnabled(bool)));
|
||||
|
||||
QFormLayout *stickRadiusForm = new QFormLayout;
|
||||
stickRadiusForm->setFieldGrowthPolicy(QFormLayout::FieldsStayAtSizeHint);
|
||||
stickRadiusForm->setContentsMargins(marginLeft);
|
||||
stickRadiusForm->addRow(tr("Sensitivity"), _stickyRadiusBox);
|
||||
|
||||
QGroupBox *vertexGroupBox = new QGroupBox(tr("Vertex"));
|
||||
|
||||
QVBoxLayout *vertexLayout = new QVBoxLayout;
|
||||
vertexLayout->addWidget(_stickyVerticesBox);
|
||||
vertexLayout->addLayout(stickRadiusForm);
|
||||
|
||||
vertexGroupBox->setLayout(vertexLayout);
|
||||
|
||||
// Shape
|
||||
QGroupBox *shapeGroupBox = new QGroupBox(tr("Shape"));
|
||||
|
||||
// Mapping
|
||||
QGroupBox *layerGroupBox = new QGroupBox(tr("Layers"));
|
||||
|
||||
QVBoxLayout *pageLayout = new QVBoxLayout;
|
||||
pageLayout->addWidget(vertexGroupBox);
|
||||
pageLayout->addWidget(shapeGroupBox);
|
||||
pageLayout->addWidget(layerGroupBox);
|
||||
|
||||
_mappingPage->setLayout(pageLayout);
|
||||
}
|
||||
|
||||
void PreferenceDialog::createOutputPage()
|
||||
{
|
||||
_outputPage = new QWidget;
|
||||
|
||||
_showResolutionBox = new QCheckBox(tr("Show resolution on output"));
|
||||
|
||||
_classicRadio = new QRadioButton(tr("Classic test card"));
|
||||
_palTestRadio = new QRadioButton(tr("PAL test card"));
|
||||
_ntscTestRadio = new QRadioButton(tr("NTSC test card"));
|
||||
|
||||
_radioGroup.append(_classicRadio);
|
||||
_radioGroup.append(_palTestRadio);
|
||||
_radioGroup.append(_ntscTestRadio);
|
||||
|
||||
_classicTestImg = new QLabel;
|
||||
_palTestImg = new QLabel;
|
||||
_ntscTestImg = new QLabel;
|
||||
|
||||
_classicTestImg->setPixmap(QPixmap(":/classic-test"));
|
||||
_palTestImg->setPixmap(QPixmap(":/pal-test"));
|
||||
_ntscTestImg->setPixmap(QPixmap(":/ntsc-test"));
|
||||
|
||||
QGridLayout *testLayout = new QGridLayout;
|
||||
testLayout->setContentsMargins(0, 0, 0, 0);
|
||||
testLayout->addWidget(_classicTestImg, 0, 0);
|
||||
testLayout->addWidget(_palTestImg, 0, 1);
|
||||
testLayout->addWidget(_ntscTestImg, 0, 2);
|
||||
testLayout->addWidget(_classicRadio, 1, 0);
|
||||
testLayout->addWidget(_palTestRadio, 1, 1);
|
||||
testLayout->addWidget(_ntscTestRadio, 1, 2);
|
||||
|
||||
QVBoxLayout *outputLayout = new QVBoxLayout;
|
||||
outputLayout->addWidget(_showResolutionBox);
|
||||
outputLayout->addSpacing(30);
|
||||
outputLayout->addLayout(testLayout);
|
||||
outputLayout->addStretch();
|
||||
|
||||
_outputPage->setLayout(outputLayout);
|
||||
}
|
||||
|
||||
void PreferenceDialog::createControlsPage()
|
||||
{
|
||||
_controlsPage = new QTabWidget;
|
||||
|
||||
// Osc Tab
|
||||
_oscWidget = new QWidget;
|
||||
|
||||
QFont bold;
|
||||
bold.setWeight(QFont::Bold);
|
||||
// Set IP Address validator
|
||||
QString octet("(?:[0-1]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])");
|
||||
QRegExp rx(octet + "\\." + octet + "\\." + octet + "\\." + octet);
|
||||
QRegExpValidator *ipValidator = new QRegExpValidator(rx);
|
||||
QMargins margins(40, 0, 0, 0);
|
||||
|
||||
_sendMessageBox = new QCheckBox;
|
||||
_sendMessageBox->setFont(bold);
|
||||
_sendMessageBox->setText(tr("Send OSC messages"));
|
||||
_sendMessageBox->setEnabled(false); // Disable until supported
|
||||
|
||||
_sendAddressEdit = new QLineEdit;
|
||||
_sendAddressEdit->setValidator(ipValidator);
|
||||
_sendAddressEdit->setEnabled(false); // Disable until supported
|
||||
|
||||
_sendPortNumber = new QSpinBox;
|
||||
_sendPortNumber->setRange(1024, 65534);
|
||||
_sendPortNumber->setFixedWidth(120);
|
||||
_sendPortNumber->setEnabled(false); // Disable until supported
|
||||
|
||||
QFormLayout *sendMessageForm = new QFormLayout;
|
||||
sendMessageForm->setFieldGrowthPolicy(QFormLayout::FieldsStayAtSizeHint);
|
||||
sendMessageForm->setContentsMargins(margins);
|
||||
sendMessageForm->addRow(tr("to machine"), _sendAddressEdit);
|
||||
sendMessageForm->addRow(tr("at port"), _sendPortNumber);
|
||||
|
||||
_listenMessageBox = new QCheckBox;
|
||||
_listenMessageBox->setFont(bold);
|
||||
_listenMessageBox->setText(tr("Listen OSC messages"));
|
||||
_listenMessageBox->setChecked(true); // TODO: Give the choice to the user
|
||||
|
||||
_listenPortNumber = new QSpinBox;
|
||||
_listenPortNumber->setRange(1024, 65534);
|
||||
_listenPortNumber->setFixedWidth(120);
|
||||
|
||||
QFormLayout *listenPortForm = new QFormLayout;
|
||||
listenPortForm->setContentsMargins(margins);
|
||||
listenPortForm->addRow(tr("on port"), _listenPortNumber);
|
||||
|
||||
_machineAddressLabel = new QLabel;
|
||||
_ipRefreshButton = new QPushButton(tr("Refresh"));
|
||||
connect(_ipRefreshButton, SIGNAL(clicked()), this, SLOT(refreshCurrentIP()));
|
||||
|
||||
QHBoxLayout *listenAddressLayout = new QHBoxLayout;
|
||||
listenAddressLayout->addWidget(_machineAddressLabel);
|
||||
listenAddressLayout->addWidget(_ipRefreshButton);
|
||||
|
||||
QFormLayout *listenAddressForm = new QFormLayout;
|
||||
listenAddressForm->setFieldGrowthPolicy(QFormLayout::FieldsStayAtSizeHint);
|
||||
listenAddressForm->setFormAlignment(Qt::AlignCenter);
|
||||
listenAddressForm->addRow(tr("Local IP"), listenAddressLayout);
|
||||
|
||||
QVBoxLayout *oscLayout = new QVBoxLayout;
|
||||
oscLayout->addWidget(_sendMessageBox, 1);
|
||||
oscLayout->addLayout(sendMessageForm, 4);
|
||||
oscLayout->addWidget(_listenMessageBox, 1);
|
||||
oscLayout->addLayout(listenPortForm, 1);
|
||||
oscLayout->addLayout(listenAddressForm, 3);
|
||||
|
||||
_oscWidget->setLayout(oscLayout);
|
||||
|
||||
_controlsPage->addTab(_oscWidget, tr("OSC Setup"));
|
||||
|
||||
refreshCurrentIP();
|
||||
}
|
||||
|
||||
void PreferenceDialog::createAdvancedPage()
|
||||
{
|
||||
_advancedPage = new QTabWidget;
|
||||
}
|
||||
|
||||
void PreferenceDialog::createPreferencesList()
|
||||
{
|
||||
// Apparence Item
|
||||
QListWidgetItem *interfaceItem = new QListWidgetItem(QIcon(":/add-color"), tr("Interface"));
|
||||
|
||||
// Mapping & Shape Item
|
||||
QListWidgetItem *shapeItem = new QListWidgetItem(QIcon(":/control-points"), tr("Mapping & Shape"));
|
||||
|
||||
// Output Item
|
||||
QListWidgetItem *outputItem = new QListWidgetItem(QIcon(":/output-window"), tr("Output"));
|
||||
|
||||
// Controls Item
|
||||
QListWidgetItem *controlsItem = new QListWidgetItem(QIcon(":/preferences"), tr("Controls"));
|
||||
|
||||
// Advanced Item
|
||||
QListWidgetItem *advancedItem = new QListWidgetItem(QIcon(":/preferences"), tr("Advanced"));
|
||||
|
||||
// Add items in the list
|
||||
_listWidget = new QListWidget;
|
||||
_listWidget->addItem(interfaceItem);
|
||||
_listWidget->addItem(shapeItem);
|
||||
_listWidget->addItem(outputItem);
|
||||
_listWidget->addItem(controlsItem);
|
||||
_listWidget->addItem(advancedItem);
|
||||
|
||||
for (int i = 0; i < _listWidget->count(); i++) {
|
||||
QListWidgetItem *item = _listWidget->item(i);
|
||||
item->setSizeHint(QSize(item->sizeHint().width(), PreferenceDialog::LIST_ITEM_HEIGHT));
|
||||
}
|
||||
|
||||
// Add pages in the stacked layout
|
||||
_stackedLayout = new QStackedLayout;
|
||||
_stackedLayout->addWidget(_interfacePage);
|
||||
_stackedLayout->addWidget(_mappingPage);
|
||||
_stackedLayout->addWidget(_outputPage);
|
||||
_stackedLayout->addWidget(_controlsPage);
|
||||
_stackedLayout->addWidget(_advancedPage);
|
||||
// Sync list and pages
|
||||
connect(_listWidget, SIGNAL(currentRowChanged(int)), _stackedLayout, SLOT(setCurrentIndex(int)));
|
||||
}
|
||||
|
||||
void PreferenceDialog::createLanguageList()
|
||||
{
|
||||
_languageBox = new QComboBox;
|
||||
|
||||
// format systems language
|
||||
QString defaultLocale = QLocale::system().name();
|
||||
defaultLocale.truncate(defaultLocale.lastIndexOf('_'));
|
||||
|
||||
_languageBox->addItem("System default", defaultLocale);
|
||||
|
||||
QString translationPath = QApplication::applicationDirPath().append("/translations");
|
||||
QDir dir(translationPath);
|
||||
QStringList translations = dir.entryList(QStringList("mapmap_*.qm"));
|
||||
|
||||
for (int i(0); i < translations.size(); i++) {
|
||||
// get locale extracted by filename
|
||||
QString locale;
|
||||
locale = translations[i]; // mapmap_fr.qm
|
||||
locale.truncate(locale.lastIndexOf('.')); // mapmap_fr
|
||||
locale.remove(0, locale.indexOf('_') + 1); // fr
|
||||
|
||||
QString lang = QLocale::languageToString(QLocale(locale).language());
|
||||
|
||||
_languageBox->addItem(QString("%1 (%2)").arg(lang).arg(locale), locale);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
MM_END_NAMESPACE
|
||||
@@ -0,0 +1,124 @@
|
||||
/*
|
||||
* PreferenceDialog.h
|
||||
*
|
||||
* (c) 2014 Sofian Audry -- info(@)sofianaudry(.)com
|
||||
* (c) 2014 Alexandre Quessy -- alexandre(@)quessy(.)net
|
||||
* (c) 2016 Dame Diongue -- baydamd(@)gmail(.)com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef PREFERENCEDIALOG_H_
|
||||
#define PREFERENCEDIALOG_H_
|
||||
|
||||
#include <QDialog>
|
||||
#include <QNetworkInterface>
|
||||
|
||||
#include "MainWindow.h"
|
||||
|
||||
MM_BEGIN_NAMESPACE
|
||||
|
||||
class PreferenceDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
PreferenceDialog(QWidget* parent = 0);
|
||||
|
||||
~PreferenceDialog();
|
||||
|
||||
void showDialog();
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent* event);
|
||||
bool loadSettings();
|
||||
|
||||
signals:
|
||||
void closed();
|
||||
|
||||
private slots:
|
||||
void accept();
|
||||
void reject();
|
||||
int exec();
|
||||
|
||||
void applySettings();
|
||||
void refreshCurrentIP();
|
||||
|
||||
private:
|
||||
// Reset port number
|
||||
void updatePortNumber();
|
||||
// Create categories pages
|
||||
void createInterfacePage();
|
||||
void createMappingPage();
|
||||
void createOutputPage();
|
||||
void createControlsPage();
|
||||
void createAdvancedPage();
|
||||
|
||||
// Create List
|
||||
void createPreferencesList();
|
||||
|
||||
// Create pages widgets
|
||||
QWidget *_interfacePage;
|
||||
QWidget *_mappingPage;
|
||||
QWidget *_outputPage;
|
||||
QTabWidget *_controlsPage;
|
||||
QWidget *_advancedPage;
|
||||
|
||||
// Interface widgets
|
||||
QComboBox *_languageBox;
|
||||
void createLanguageList();
|
||||
QComboBox *_toolbarIconSizeBox;
|
||||
|
||||
// Shape widgets
|
||||
// Sticky vertices
|
||||
QCheckBox *_stickyVerticesBox;
|
||||
QComboBox *_stickyRadiusBox;
|
||||
|
||||
// Output widgets
|
||||
QCheckBox *_showResolutionBox;
|
||||
QRadioButton *_classicRadio;
|
||||
QRadioButton *_palTestRadio;
|
||||
QRadioButton *_ntscTestRadio;
|
||||
QList<QRadioButton *> _radioGroup;
|
||||
QLabel *_classicTestImg;
|
||||
QLabel *_palTestImg;
|
||||
QLabel *_ntscTestImg;
|
||||
|
||||
// Controls widgets
|
||||
// OSC
|
||||
QWidget *_oscWidget;
|
||||
QCheckBox *_sendMessageBox;
|
||||
QCheckBox *_listenMessageBox;
|
||||
QLineEdit *_sendAddressEdit;
|
||||
QSpinBox *_sendPortNumber;
|
||||
QLabel *_machineAddressLabel;
|
||||
QSpinBox *_listenPortNumber;
|
||||
QPushButton *_ipRefreshButton;
|
||||
|
||||
// Advanced widgets
|
||||
|
||||
// Common widgets
|
||||
QListWidget *_listWidget;
|
||||
QStackedLayout *_stackedLayout;
|
||||
QDialogButtonBox* _buttonBox;
|
||||
|
||||
// Constantes
|
||||
static const int PREFERENCES_WINDOW_WIDTH = 720;
|
||||
static const int PREFERENCES_WINDOW_HEIGHT = 540;
|
||||
static const int LIST_ITEM_HEIGHT = 36;
|
||||
};
|
||||
|
||||
MM_END_NAMESPACE
|
||||
|
||||
#endif /* PREFERENCESDIALOG_H_ */
|
||||
@@ -1,89 +0,0 @@
|
||||
/*
|
||||
* OutputGLWindow.cpp
|
||||
*
|
||||
* (c) 2014 Sofian Audry -- info(@)sofianaudry(.)com
|
||||
* (c) 2014 Alexandre Quessy -- alexandre(@)quessy(.)net
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "PreferencesDialog.h"
|
||||
#include "MainWindow.h"
|
||||
#include <iostream>
|
||||
|
||||
MM_BEGIN_NAMESPACE
|
||||
|
||||
PreferencesDialog::PreferencesDialog(MainWindow* mainWindow, QWidget* parent) :
|
||||
QDialog(parent)
|
||||
{
|
||||
_main_window = mainWindow;
|
||||
// static const int width = 600;
|
||||
// static const int height = 400;
|
||||
// resize(MainWindow::OUTPUT_WINDOW_MINIMUM_WIDTH, MainWindow::OUTPUT_WINDOW_MINIMUM_HEIGHT);
|
||||
|
||||
// OSC port number
|
||||
QLabel* osc_port_label = new QLabel(tr("OSC port number"));
|
||||
|
||||
_osc_port_numbox = new QSpinBox;
|
||||
_osc_port_numbox->setRange(1024, 65534);
|
||||
|
||||
QLayout* hbox_osc_port = new QHBoxLayout;
|
||||
hbox_osc_port->addWidget(osc_port_label);
|
||||
hbox_osc_port->addWidget(_osc_port_numbox);
|
||||
|
||||
// cancel / ok
|
||||
_button_box = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel);
|
||||
connect(_button_box, SIGNAL(accepted()), this, SLOT(accept_cb()));
|
||||
connect(_button_box, SIGNAL(rejected()), this, SLOT(reject_cb()));
|
||||
|
||||
//QLayout* hbox_confirm = new QHBoxLayout;
|
||||
//hbox_confirm->addWidget(_button_box);
|
||||
hbox_osc_port->addWidget(_button_box);
|
||||
|
||||
// pack all rows
|
||||
//QLayout* vbox = new QVBoxLayout;
|
||||
//vbox->addWidget(hbox_osc_port);
|
||||
setLayout(hbox_osc_port);
|
||||
|
||||
this->resetValues();
|
||||
}
|
||||
|
||||
void PreferencesDialog::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
emit closed();
|
||||
event->accept();
|
||||
}
|
||||
|
||||
void PreferencesDialog::reject_cb()
|
||||
{
|
||||
this->resetValues();
|
||||
this->setResult(QMessageBox::Cancel);
|
||||
this->close();
|
||||
}
|
||||
|
||||
void PreferencesDialog::resetValues()
|
||||
{
|
||||
this->_osc_port_numbox->setValue(this->_main_window->getOscPort());
|
||||
}
|
||||
|
||||
void PreferencesDialog::accept_cb()
|
||||
{
|
||||
qDebug() << "Values:" << " osc port=" << _osc_port_numbox->value() << endl;
|
||||
this->_main_window->setOscPort(this->_osc_port_numbox->value());
|
||||
this->setResult(QMessageBox::Ok);
|
||||
this->close();
|
||||
}
|
||||
|
||||
|
||||
MM_END_NAMESPACE
|
||||
@@ -1,60 +0,0 @@
|
||||
/*
|
||||
* OutputGLWindow.h
|
||||
*
|
||||
* (c) 2014 Sofian Audry -- info(@)sofianaudry(.)com
|
||||
* (c) 2014 Alexandre Quessy -- alexandre(@)quessy(.)net
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef PREFERENCESDIALOG_H_
|
||||
#define PREFERENCESDIALOG_H_
|
||||
|
||||
#include <QDialog>
|
||||
#include "MM.h"
|
||||
#include <QTimer>
|
||||
#include <QSpinBox>
|
||||
#include <QDialogButtonBox>
|
||||
|
||||
MM_BEGIN_NAMESPACE
|
||||
|
||||
class MainWindow;
|
||||
|
||||
class PreferencesDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
PreferencesDialog(MainWindow* mainWindow, QWidget* parent = 0);
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent* event);
|
||||
|
||||
signals:
|
||||
void closed();
|
||||
|
||||
private slots:
|
||||
void accept_cb();
|
||||
void reject_cb();
|
||||
|
||||
private:
|
||||
QSpinBox* _osc_port_numbox;
|
||||
MainWindow* _main_window;
|
||||
QDialogButtonBox* _button_box;
|
||||
void resetValues();
|
||||
};
|
||||
|
||||
MM_END_NAMESPACE
|
||||
|
||||
#endif /* PREFERENCESDIALOG_H_ */
|
||||
@@ -3,6 +3,7 @@
|
||||
*
|
||||
* (c) 2013 Sofian Audry -- info(@)sofianaudry(.)com
|
||||
* (c) 2013 Alexandre Quessy -- alexandre(@)quessy(.)net
|
||||
* (c) 2016 Dame Diongue -- baydamd(@)gmail(.)com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -32,16 +33,16 @@ ShapeGraphicsItem::ShapeGraphicsItem(Mapping::ptr mapping, bool output)
|
||||
|
||||
MapperGLCanvas* ShapeGraphicsItem::getCanvas() const
|
||||
{
|
||||
MainWindow* win = MainWindow::instance();
|
||||
MainWindow* win = MainWindow::window();
|
||||
return isOutput() ? win->getDestinationCanvas() : win->getSourceCanvas();
|
||||
}
|
||||
|
||||
bool ShapeGraphicsItem::isMappingCurrent() const {
|
||||
return MainWindow::instance()->getCurrentMappingId() == getMapping()->getId();
|
||||
return MainWindow::window()->getCurrentMappingId() == getMapping()->getId();
|
||||
}
|
||||
|
||||
bool ShapeGraphicsItem::isMappingVisible() const {
|
||||
return MainWindow::instance()->getMappingManager().mappingIsVisible(getMapping());
|
||||
return MainWindow::window()->getMappingManager().mappingIsVisible(getMapping());
|
||||
}
|
||||
|
||||
void ShapeGraphicsItem::paint(QPainter *painter,
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
* ShapeGraphicsItem.h
|
||||
*
|
||||
* (c) 2015 Sofian Audry -- info(@)sofianaudry(.)com
|
||||
* (c) 2016 Dame Diongue -- baydamd(@)gmail(.)com
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -117,7 +117,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
// --lang option
|
||||
QCommandLineOption localeOption(QStringList() << "l" << "lang",
|
||||
"Use language <lang>.", "lang", "en");
|
||||
"Use language <lang>.", "lang", "");
|
||||
parser.addOption(localeOption);
|
||||
|
||||
// --frame-rate option
|
||||
@@ -139,19 +139,27 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
// IMPORTANT: Translator must be set *before* the MainWindow is created for it to work.
|
||||
QString langValue = parser.value("lang");
|
||||
QTranslator translator;
|
||||
if (translator.load(QString(":/translation-%1").arg(langValue)))
|
||||
QSettings settings;
|
||||
QString lang = parser.value("lang").isEmpty()
|
||||
? settings.value("language").toString()
|
||||
: parser.value("lang");
|
||||
if (MM::SUPPORTED_LANGUAGES.contains(lang))
|
||||
{
|
||||
qDebug() << "Setting language to " << langValue << "." << endl;
|
||||
app.installTranslator(&translator);
|
||||
QLocale::setDefault(QLocale(langValue));
|
||||
QLocale::setDefault(QLocale(lang));
|
||||
QTranslator qtTranslator;
|
||||
qtTranslator.load(QString("qtbase_%1").arg(lang),
|
||||
QLibraryInfo::location(QLibraryInfo::TranslationsPath));
|
||||
app.installTranslator(&qtTranslator);
|
||||
|
||||
QTranslator localization;
|
||||
localization.load(QString(":/mapmap_%1").arg(lang));
|
||||
app.installTranslator(&localization);
|
||||
}
|
||||
else if (langValue != "en")
|
||||
{
|
||||
qWarning() << "Unrecognized/unsupported language: " << langValue << "." << endl;
|
||||
else {
|
||||
qWarning() << "Unrecognized/unsupported language: " << lang;
|
||||
}
|
||||
|
||||
|
||||
#endif // USING_QT_5
|
||||
|
||||
if (! QGLFormat::hasOpenGL())
|
||||
@@ -174,7 +182,7 @@ int main(int argc, char *argv[])
|
||||
I::sleep(1);
|
||||
|
||||
// Create window.
|
||||
MainWindow* win = MainWindow::instance();
|
||||
MainWindow* win = MainWindow::window();
|
||||
// Add custom font
|
||||
int id = QFontDatabase::addApplicationFont(":/base-font");
|
||||
QString family = QFontDatabase::applicationFontFamilies(id).at(0);
|
||||
|
||||
+8
-5
@@ -3,7 +3,7 @@ TEMPLATE = app
|
||||
# Always use major.minor.micro version number format
|
||||
VERSION = 0.4.1
|
||||
TARGET = mapmap
|
||||
QT += gui opengl xml core
|
||||
QT += gui opengl xml core network
|
||||
greaterThan(QT_MAJOR_VERSION, 4) {
|
||||
QT -= gui # using widgets instead gui in Qt5
|
||||
QT += widgets multimedia
|
||||
@@ -36,7 +36,7 @@ HEADERS = \
|
||||
Paint.h \
|
||||
PaintGui.h \
|
||||
Polygon.h \
|
||||
PreferencesDialog.h \
|
||||
PreferenceDialog.h \
|
||||
ProjectLabels.h \
|
||||
ProjectReader.h \
|
||||
ProjectWriter.h \
|
||||
@@ -78,7 +78,7 @@ SOURCES = \
|
||||
Paint.cpp \
|
||||
PaintGui.cpp \
|
||||
Polygon.cpp \
|
||||
PreferencesDialog.cpp \
|
||||
PreferenceDialog.cpp \
|
||||
ProjectLabels.cpp \
|
||||
ProjectReader.cpp \
|
||||
ProjectWriter.cpp \
|
||||
@@ -98,8 +98,11 @@ SOURCES = \
|
||||
include(contrib/qtpropertybrowser/src/qtpropertybrowser.pri)
|
||||
include(contrib/qtpropertybrowser-extension/qtpropertybrowser-extension.pri)
|
||||
|
||||
TRANSLATIONS = resources/texts/mapmap_fr.ts
|
||||
RESOURCES = mapmap.qrc
|
||||
TRANSLATIONS = \
|
||||
translations/mapmap_en.ts \
|
||||
translations/mapmap_fr.ts
|
||||
RESOURCES = mapmap.qrc \
|
||||
translations/translation.qrc
|
||||
|
||||
# Manage lrelease (for translations)
|
||||
isEmpty(QMAKE_LRELEASE) {
|
||||
|
||||
+5
-3
@@ -35,10 +35,12 @@
|
||||
<file alias="visible-mapping">resources/images/icons/small/visible_w.png</file>
|
||||
<file alias="duplicate-mapping">resources/images/icons/small/duplicate_w.png</file>
|
||||
<file alias="solo-mapping">resources/images/icons/small/solo.png</file>
|
||||
|
||||
<file alias="stylesheet">resources/qss/mapmap.qss</file>
|
||||
<file alias="console-font">resources/fonts/Hack-Regular.otf</file>
|
||||
|
||||
<file alias="translation-fr">resources/texts/mapmap_fr.qm</file>
|
||||
<file alias="preferences">resources/images/menu/preferences.png</file>
|
||||
<file alias="pal-test-card">resources/images/test-signal/pal-test-signal.svg</file>
|
||||
<file alias="classic-test">resources/images/test-signal/examples/classic-test-card.png</file>
|
||||
<file alias="pal-test">resources/images/test-signal/examples/pal-test-card.png</file>
|
||||
<file alias="ntsc-test">resources/images/test-signal/examples/ntsc-test-card.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
||||
@@ -1,721 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.0" language="fr">
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<source>About MapMap</source>
|
||||
<translation>À propos de MapMap</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&New</source>
|
||||
<translation>&Nouveau</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Open...</source>
|
||||
<translation>&Ouvrir...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Save</source>
|
||||
<translation>&Sauvegarder</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Save &As...</source>
|
||||
<translation>S&auvegarder sous...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>E&xit</source>
|
||||
<translation>Quitter</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Ctrl+Q</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Exit the application</source>
|
||||
<translation>Quitter l'application</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&About</source>
|
||||
<translation>&À propos</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Show the application's About box</source>
|
||||
<translation>Afficher le dialogue À propos de l'application</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Add triangle</source>
|
||||
<translation>Ajouter un triangle</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&File</source>
|
||||
<translation>&Fichier</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Help</source>
|
||||
<translation>Aide</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The document has been modified.
|
||||
Do you want to save your changes?</source>
|
||||
<translation>Ce document a été modifié. Voulez-vous sauvegarder vos changements?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Error reading mapping project file</source>
|
||||
<translation>Erreur de lecture de projet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cannot read file %1:
|
||||
%2.</source>
|
||||
<translation>Impossible de lire le fichier %1: %2</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Parse error in file %1:
|
||||
|
||||
%2</source>
|
||||
<translation>Erreur de syntaxe dans le fichier %1: %2</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>File loaded</source>
|
||||
<translation>Fichier chargé</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Error saving mapping project</source>
|
||||
<translation>Erreur en sauvegardant le fichier de projet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cannot write file %1:
|
||||
%2.</source>
|
||||
<translation>Impossible d'écrire le fichier %1: %2</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>File saved</source>
|
||||
<translation>Fichier sauvegardé</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Untitled</source>
|
||||
<translation>Sans titre</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1[*] - %2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>MapMap Project</source>
|
||||
<translation>Projet MapMap</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>File imported</source>
|
||||
<translation>Fichier importé</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Open project</source>
|
||||
<translation>Ouvrir un projet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Save project</source>
|
||||
<translation>Sauvegarder le projet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source><h2>MapMap </source>
|
||||
<translation><h2>MapMap</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>MapMap</source>
|
||||
<translation>MapMap</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Import media source file</source>
|
||||
<translation>Importer un média</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Remove this paint and all its associated mappings?</source>
|
||||
<translation>Effacer cette peinture et tous les mappings qui y sont associés?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Create a new project</source>
|
||||
<translation>Créer un nouveau projet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Open an existing project</source>
|
||||
<translation>Ouvrir un projet existant</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Save the project</source>
|
||||
<translation>Sauvegarder le projet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Save the project as...</source>
|
||||
<translation>Sauvegarder le projet sous...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Import media source file...</source>
|
||||
<translation>&Importer un fichier média source...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Import a media source file...</source>
|
||||
<translation>Importer un fichier média source...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Add &Color paint...</source>
|
||||
<translation>Ajouter une peinture &Couleur...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Add a color paint...</source>
|
||||
<translation>Ajouter une peinture Couleur...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Delete</source>
|
||||
<translation>Effacer l'élément sélectionné</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>CTRL+DEL</source>
|
||||
<translation>CTRL+SUPPR</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Delete item</source>
|
||||
<translation>Effacer l'élément sélectionné</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Add Quad/&Mesh</source>
|
||||
<translation>Ajouter un quadrilatère/&Mesh</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>CTRL+M</source>
|
||||
<translation>CTRL+M</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Add quad/mesh</source>
|
||||
<translation>Ajouter un quadrilatère/&Mesh</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Add &Triangle</source>
|
||||
<translation>Ajouter un &Triangle</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>CTRL+T</source>
|
||||
<translation>CTRL+T</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Add &Ellipse</source>
|
||||
<translation>Ajouter une &Ellipse</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>CTRL+E</source>
|
||||
<translation>CTRL+E</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Add ellipse</source>
|
||||
<translation>Ajouter une ellipse</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Display output window</source>
|
||||
<translation>Afficher la fenêtre de sortie</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Ctrl+D</source>
|
||||
<translation>CTRL+D</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Display output window</source>
|
||||
<translation>Afficher la fenêtre de sortie</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Full screen</source>
|
||||
<translation>Plein écran</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Ctrl+F</source>
|
||||
<translation>CTRL+F</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Full screen</source>
|
||||
<translation>Plein écran</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Display canvas controls</source>
|
||||
<translation>Afficher les contrôles du canevas</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Display canvas controls</source>
|
||||
<translation>Afficher les contrôles du canevas</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&Edit</source>
|
||||
<translation>Édition</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>&View</source>
|
||||
<translation>Apparence</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Color paint added</source>
|
||||
<translation>Peinture couleur ajoutée</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>MapMap files (*.%1)</source>
|
||||
<translation>Fichiers MapMap (*.%1)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>All files (*)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QObject</name>
|
||||
<message>
|
||||
<source>Texture mapping</source>
|
||||
<translation>Mapping texturé</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Input shape</source>
|
||||
<translation>Forme en entrée</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Output shape</source>
|
||||
<translation>Forme en sortie</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Point %1</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Dimensions</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>%1
|
||||
Line %2, column %3</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>The file is not a mapmap version 0.1 file.</source>
|
||||
<translation>Ce fichier n'est pas un project MapMap version 0.1.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cannot create media with URI %1.</source>
|
||||
<translation type="obsolete">Impossible de créer un média avec l'URI %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cannot create color with RGB hex code %1.</source>
|
||||
<translation>Impossible de créer une couleur avec le code RVB hexadécimal %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unsupported paint type: %1.</source>
|
||||
<translation>Type de peinture non-supporté: %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cannot create triangle texture mapping</source>
|
||||
<translation>Impossible de créer un mapping de texture vers triangle</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cannot create mesh texture mapping</source>
|
||||
<translation>Impossible de créer un mapping de texture vers mesh</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cannot create ellipse texture mapping</source>
|
||||
<translation>Impossible de créer un mapping de texture vers ellipse</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cannot create triangle color mapping</source>
|
||||
<translation>Impossible de créer un mapping de couleur vers triangle</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cannot create quad color mapping</source>
|
||||
<translation>Impossible de créer un mapping de couleur vers quadrilatère</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cannot create ellipse color mapping</source>
|
||||
<translation>Impossible de créer un mapping de couleur vers ellipse</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Unsupported mapping type: %1.</source>
|
||||
<translation>Type de mapping non supporté: %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Wrong shape type "%1" for destination: expected "%2".</source>
|
||||
<translation>Mauvais type de forme "%1" pour la destination. On s'attend à "%2"</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Shape of type '%1' has %2 vertices: expected %3.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Shape has %1 vertices: expected 4 or 5.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Wrong shape type for destination: %1.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Shape has wrong number of vertices.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Initiating program...</source>
|
||||
<translation>Lancement du logiciel...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Done.</source>
|
||||
<translation>Terminé.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cannot create media with uri %1.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QtBoolEdit</name>
|
||||
<message>
|
||||
<source>True</source>
|
||||
<translation>vrai</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>False</source>
|
||||
<translation>faux</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QtBoolPropertyManager</name>
|
||||
<message>
|
||||
<source>True</source>
|
||||
<translation>vrai</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>False</source>
|
||||
<translation>faux</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QtCharEdit</name>
|
||||
<message>
|
||||
<source>Clear Char</source>
|
||||
<translation>Effacer le charactère</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QtColorEditWidget</name>
|
||||
<message>
|
||||
<source>...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QtColorPropertyManager</name>
|
||||
<message>
|
||||
<source>Red</source>
|
||||
<translation>Rouge</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Green</source>
|
||||
<translation>Vert</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Blue</source>
|
||||
<translation>Bleu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Alpha</source>
|
||||
<translation>Transparence</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QtCursorDatabase</name>
|
||||
<message>
|
||||
<source>Arrow</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Up Arrow</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Cross</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Wait</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>IBeam</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Size Vertical</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Size Horizontal</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Size Backslash</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Size Slash</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Size All</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Blank</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Split Vertical</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Split Horizontal</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Pointing Hand</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Forbidden</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Open Hand</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Closed Hand</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>What's This</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Busy</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QtFontEditWidget</name>
|
||||
<message>
|
||||
<source>...</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Select Font</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QtFontPropertyManager</name>
|
||||
<message>
|
||||
<source>Family</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Point Size</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Bold</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Italic</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Underline</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Strikeout</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Kerning</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QtKeySequenceEdit</name>
|
||||
<message>
|
||||
<source>Clear Shortcut</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QtLocalePropertyManager</name>
|
||||
<message>
|
||||
<source>%1, %2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Language</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Country</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QtPointFPropertyManager</name>
|
||||
<message>
|
||||
<source>(%1, %2)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>X</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Y</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QtPointPropertyManager</name>
|
||||
<message>
|
||||
<source>(%1, %2)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>X</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Y</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QtPropertyBrowserUtils</name>
|
||||
<message>
|
||||
<source>[%1, %2, %3] (%4)</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>[%1, %2]</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QtRectFPropertyManager</name>
|
||||
<message>
|
||||
<source>[(%1, %2), %3 x %4]</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>X</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Y</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Width</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Height</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QtRectPropertyManager</name>
|
||||
<message>
|
||||
<source>[(%1, %2), %3 x %4]</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>X</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Y</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Width</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Height</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QtSizeFPropertyManager</name>
|
||||
<message>
|
||||
<source>%1 x %2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Width</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Height</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QtSizePolicyPropertyManager</name>
|
||||
<message>
|
||||
<source><Invalid></source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>[%1, %2, %3, %4]</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Horizontal Policy</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Vertical Policy</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Horizontal Stretch</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Vertical Stretch</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QtSizePropertyManager</name>
|
||||
<message>
|
||||
<source>%1 x %2</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Width</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Height</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>QtTreePropertyBrowser</name>
|
||||
<message>
|
||||
<source>Property</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>Value</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,6 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>mapmap_fr.qm</file>
|
||||
<file>mapmap_en.qm</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
Reference in New Issue
Block a user