-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmainwindow.cpp
More file actions
33 lines (28 loc) · 970 Bytes
/
Copy pathmainwindow.cpp
File metadata and controls
33 lines (28 loc) · 970 Bytes
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
//
// (c) Georg Umlauf, 2021
//
#include "mainwindow.h"
#include <QFileDialog>
#include <QKeyEvent>
#include <iostream>
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent), ui(new Ui::MainWindowClass)
{
ui->setupUi(this);
ui->glwidget->setFocusPolicy(Qt::StrongFocus);
ui->glwidget->setFocus();
connect(ui->pushButton, &QPushButton ::clicked, ui->glwidget, &GLWidget ::openFileDialog);
connect(ui->radioButton_1, &QRadioButton::clicked, ui->glwidget, &GLWidget ::radioButtonClicked);
connect(ui->radioButton_2, &QRadioButton::clicked, ui->glwidget, &GLWidget ::radioButtonClicked);
connect(ui->horizontalSlider, &QSlider ::valueChanged, this, &MainWindow::updatePointSize);
updatePointSize(3);
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::updatePointSize(int value)
{
std::cout << "new pointsize: " << value << std::endl;
ui->glwidget->setPointSize(value);
}