mirror of
https://github.com/mapmapteam/mapmap.git
synced 2026-06-16 12:33:19 +02:00
Base working integration of destination and output window (with crosshair working in fullscreen).
This commit is contained in:
+23
-3
@@ -21,11 +21,11 @@
|
||||
|
||||
#include "MainWindow.h"
|
||||
|
||||
OutputGLWindow::OutputGLWindow(MainWindow* mainWindow, QWidget* parent, const QGLWidget * shareWidget) : QDialog(parent)
|
||||
OutputGLWindow:: OutputGLWindow(const DestinationGLCanvas* canvas_)
|
||||
{
|
||||
resize(MainWindow::OUTPUT_WINDOW_MINIMUM_WIDTH, MainWindow::OUTPUT_WINDOW_MINIMUM_HEIGHT);
|
||||
|
||||
canvas = new DestinationGLCanvas(mainWindow, this, shareWidget);
|
||||
canvas = new DestinationGLCanvas(canvas_->getMainWindow(), this, (const QGLWidget*)canvas_->viewport(), canvas_->scene());
|
||||
canvas->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
canvas->setMinimumSize(MainWindow::OUTPUT_WINDOW_MINIMUM_WIDTH, MainWindow::OUTPUT_WINDOW_MINIMUM_HEIGHT);
|
||||
|
||||
@@ -38,9 +38,28 @@ OutputGLWindow::OutputGLWindow(MainWindow* mainWindow, QWidget* parent, const QG
|
||||
_geometry = saveGeometry();
|
||||
|
||||
_pointerIsVisible = true;
|
||||
|
||||
}
|
||||
|
||||
//OutputGLWindow::OutputGLWindow(MainWindow* mainWindow, QWidget* parent, const QGLWidget * shareWidget) : QDialog(parent)
|
||||
//{
|
||||
// resize(MainWindow::OUTPUT_WINDOW_MINIMUM_WIDTH, MainWindow::OUTPUT_WINDOW_MINIMUM_HEIGHT);
|
||||
//
|
||||
// canvas = new DestinationGLCanvas(mainWindow, this, shareWidget);
|
||||
// canvas->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
// canvas->setMinimumSize(MainWindow::OUTPUT_WINDOW_MINIMUM_WIDTH, MainWindow::OUTPUT_WINDOW_MINIMUM_HEIGHT);
|
||||
//
|
||||
// QLayout* layout = new QVBoxLayout;
|
||||
// layout->setContentsMargins(0,0,0,0); // remove margin
|
||||
// layout->addWidget(canvas);
|
||||
// setLayout(layout);
|
||||
//
|
||||
// // Save window geometry.
|
||||
// _geometry = saveGeometry();
|
||||
//
|
||||
// _pointerIsVisible = true;
|
||||
//
|
||||
//}
|
||||
|
||||
void OutputGLWindow::setCursorVisible(bool visible)
|
||||
{
|
||||
_pointerIsVisible = visible;
|
||||
@@ -52,6 +71,7 @@ void OutputGLWindow::setCursorVisible(bool visible)
|
||||
}
|
||||
else
|
||||
{
|
||||
this->setCursor(Qt::ArrowCursor);
|
||||
this->setCursor(Qt::BlankCursor);
|
||||
_pointerIsVisible = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user