1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
/**
*
* @file plugins/MatrixVisualizer/Windows/MatrixWindow.cpp
*
* @copyright 2008-2024 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
* Univ. Bordeaux. All rights reserved.
*
* @author Camille Ordronneau
* @author Arthur Chevalier
* @author Johnny Jazeix
* @author Mathieu Faverge
* @author Hamza Benmendil
*
* @date 2024-07-17
*/
#include "MatrixWindow.hpp"
#include <QVBoxLayout>
Matrix_window::Matrix_window(symbol_matrix_t *matrix, bool m_quadtree_button_checked) {
QWidget *widget = new QWidget();
QVBoxLayout *layout = new QVBoxLayout(widget);
m_label = new QLabel(nullptr);
m_label->setText(QStringLiteral("Infos: "));
m_gl = new MatrixGLWidget(nullptr, matrix, m_label, m_quadtree_button_checked);
m_gl->setObjectName(QStringLiteral("matrix_gl_visualizer"));
layout->addWidget(m_gl);
layout->addWidget(m_label);
this->setCentralWidget(widget);
}
Matrix_window::~Matrix_window() {
delete m_gl;
}
void Matrix_window::closeEvent(QCloseEvent *event) {
close();
}
void Matrix_window::keyPressEvent(QKeyEvent *event) {
switch (event->key()) {
case Qt::Key_Escape:
close();
break;
}
}
|