volmetrics
annotate src/mainwin.cc @ 37:1d935677d3ab
Created new branch non-qt-version
author | Eleni Maria Stea <elene.mst@gmail.com> |
---|---|
date | Mon, 17 Apr 2017 13:26:24 +0000 |
parents | |
children |
rev | line source |
---|---|
nuclear@36 | 1 #include <QMessageBox> |
nuclear@36 | 2 #include "mainwin.h" |
nuclear@36 | 3 #include "ui_mainwin.h" |
nuclear@36 | 4 #include "view3d.h" |
nuclear@36 | 5 |
nuclear@36 | 6 View3D view3d; |
nuclear@36 | 7 |
nuclear@36 | 8 MainWin::MainWin(QWidget *parent) : |
nuclear@36 | 9 QMainWindow(parent), |
nuclear@36 | 10 ui(new Ui::MainWin) |
nuclear@36 | 11 { |
nuclear@36 | 12 ui->setupUi(this); |
nuclear@36 | 13 } |
nuclear@36 | 14 |
nuclear@36 | 15 MainWin::~MainWin() |
nuclear@36 | 16 { |
nuclear@36 | 17 delete ui; |
nuclear@36 | 18 } |
nuclear@36 | 19 |
nuclear@36 | 20 void MainWin::on_action_quit_triggered() |
nuclear@36 | 21 { |
nuclear@36 | 22 close(); |
nuclear@36 | 23 } |
nuclear@36 | 24 |
nuclear@36 | 25 void MainWin::on_action_about_triggered() |
nuclear@36 | 26 { |
nuclear@36 | 27 static const char *text = |
nuclear@36 | 28 "Volmetrics version whatever\n" |
nuclear@36 | 29 "Copyright (C) 2015 Eleni-Maria Stea, Stathis Kamperis\n" |
nuclear@36 | 30 "web page, emails, support, blah blah ... whatever."; |
nuclear@36 | 31 QMessageBox::about(this, "About", text); |
nuclear@36 | 32 } |
nuclear@36 | 33 |
nuclear@36 | 34 void MainWin::on_spin_win_low_valueChanged(double arg1) |
nuclear@36 | 35 { |
nuclear@36 | 36 view3d.set_thresholds(arg1, ui->spin_win_high->value()); |
nuclear@36 | 37 } |
nuclear@36 | 38 |
nuclear@36 | 39 void MainWin::on_spin_win_high_valueChanged(double arg1) |
nuclear@36 | 40 { |
nuclear@36 | 41 view3d.set_thresholds(ui->spin_win_low->value(), arg1); |
nuclear@36 | 42 } |