mirror of
https://github.com/mapmapteam/mapmap.git
synced 2026-06-16 12:33:19 +02:00
Merge branch 'no-cursor' into develop
This commit is contained in:
@@ -1180,6 +1180,14 @@ void MainWindow::createActions()
|
||||
// Output window should be displayed for full screen option to be available.
|
||||
connect(displayOutputWindow, SIGNAL(toggled(bool)), outputWindowFullScreen, SLOT(setEnabled(bool)));
|
||||
|
||||
|
||||
// outputWindowHasCursor = new QAction(tr("O&utput window has cursor"), this);
|
||||
// outputWindowHasCursor->setStatusTip(tr("Show cursor in output window"));
|
||||
// outputWindowHasCursor->setIconVisibleInMenu(false);
|
||||
// outputWindowHasCursor->setCheckable(true);
|
||||
// outputWindowHasCursor->setChecked(true);
|
||||
// connect(outputWindowHasCursor, SIGNAL(toggled(bool)), outputWindow, SLOT(setFullScreen(bool)));
|
||||
|
||||
// Toggle display of canvas controls.
|
||||
displayCanvasControls = new QAction(tr("&Display canvas controls"), this);
|
||||
// displayCanvasControls->setShortcut(tr("Ctrl+E"));
|
||||
@@ -1254,6 +1262,7 @@ void MainWindow::createMenus()
|
||||
viewMenu->addAction(outputWindowFullScreen);
|
||||
viewMenu->addAction(displayCanvasControls);
|
||||
viewMenu->addAction(stickyVertices);
|
||||
//viewMenu->addAction(outputWindowHasCursor);
|
||||
|
||||
// Run.
|
||||
runMenu = menuBar->addMenu(tr("&Run"));
|
||||
|
||||
@@ -256,6 +256,7 @@ private:
|
||||
QAction *rewindAction;
|
||||
|
||||
QAction *displayOutputWindow;
|
||||
//QAction *outputWindowHasCursor;
|
||||
QAction *outputWindowFullScreen;
|
||||
QAction *displayCanvasControls;
|
||||
QAction *stickyVertices;
|
||||
|
||||
+27
-7
@@ -36,6 +36,24 @@ OutputGLWindow::OutputGLWindow(MainWindow* mainWindow, QWidget* parent, const QG
|
||||
|
||||
// Save window geometry.
|
||||
_geometry = saveGeometry();
|
||||
|
||||
_pointerIsVisible = true;
|
||||
}
|
||||
|
||||
void OutputGLWindow::setCursorVisible(bool visible)
|
||||
{
|
||||
_pointerIsVisible = visible;
|
||||
|
||||
if (_pointerIsVisible)
|
||||
{
|
||||
this->setCursor(Qt::ArrowCursor);
|
||||
_pointerIsVisible = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this->setCursor(Qt::BlankCursor);
|
||||
_pointerIsVisible = false;
|
||||
}
|
||||
}
|
||||
|
||||
void OutputGLWindow::closeEvent(QCloseEvent *event)
|
||||
@@ -47,14 +65,16 @@ void OutputGLWindow::closeEvent(QCloseEvent *event)
|
||||
void OutputGLWindow::keyPressEvent(QKeyEvent *event)
|
||||
{
|
||||
// Escape from full screen mode.
|
||||
if (isFullScreen() && event->key() == Qt::Key_Escape)
|
||||
if (event->key() == Qt::Key_Escape)
|
||||
{
|
||||
setFullScreen(false);
|
||||
emit fullScreenToggled(false);
|
||||
}
|
||||
else if (event->key() == Qt::Key_Escape)
|
||||
{
|
||||
// pass
|
||||
if (isFullScreen())
|
||||
{
|
||||
setFullScreen(false);
|
||||
emit fullScreenToggled(false);
|
||||
} else {
|
||||
setFullScreen(true);
|
||||
emit fullScreenToggled(true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
* 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
|
||||
@@ -22,6 +23,7 @@
|
||||
|
||||
#include <QDialog>
|
||||
#include <QtGlobal>
|
||||
#include <QTimer>
|
||||
#include "DestinationGLCanvas.h"
|
||||
|
||||
// TODO: add SLOT for mySetVisible
|
||||
@@ -47,10 +49,14 @@ signals:
|
||||
|
||||
public:
|
||||
DestinationGLCanvas* getCanvas() const { return canvas; }
|
||||
void setPointerHasMoved();
|
||||
void setCursorVisible(bool visible);
|
||||
|
||||
private:
|
||||
DestinationGLCanvas* canvas;
|
||||
QByteArray _geometry;
|
||||
|
||||
bool _pointerIsVisible;
|
||||
};
|
||||
|
||||
#endif /* OutputGLWINDOW_H_ */
|
||||
|
||||
Reference in New Issue
Block a user