volmetrics

diff src/mainwin.cc @ 36:1df14c5ffa71

conversion to Qt
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 06 Feb 2015 22:39:51 +0200
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/mainwin.cc	Fri Feb 06 22:39:51 2015 +0200
     1.3 @@ -0,0 +1,42 @@
     1.4 +#include <QMessageBox>
     1.5 +#include "mainwin.h"
     1.6 +#include "ui_mainwin.h"
     1.7 +#include "view3d.h"
     1.8 +
     1.9 +View3D view3d;
    1.10 +
    1.11 +MainWin::MainWin(QWidget *parent) :
    1.12 +	QMainWindow(parent),
    1.13 +	ui(new Ui::MainWin)
    1.14 +{
    1.15 +	ui->setupUi(this);
    1.16 +}
    1.17 +
    1.18 +MainWin::~MainWin()
    1.19 +{
    1.20 +	delete ui;
    1.21 +}
    1.22 +
    1.23 +void MainWin::on_action_quit_triggered()
    1.24 +{
    1.25 +	close();
    1.26 +}
    1.27 +
    1.28 +void MainWin::on_action_about_triggered()
    1.29 +{
    1.30 +	static const char *text =
    1.31 +			"Volmetrics version whatever\n"
    1.32 +			"Copyright (C) 2015 Eleni-Maria Stea, Stathis Kamperis\n"
    1.33 +			"web page, emails, support, blah blah ... whatever.";
    1.34 +	QMessageBox::about(this, "About", text);
    1.35 +}
    1.36 +
    1.37 +void MainWin::on_spin_win_low_valueChanged(double arg1)
    1.38 +{
    1.39 +	view3d.set_thresholds(arg1, ui->spin_win_high->value());
    1.40 +}
    1.41 +
    1.42 +void MainWin::on_spin_win_high_valueChanged(double arg1)
    1.43 +{
    1.44 +	view3d.set_thresholds(ui->spin_win_low->value(), arg1);
    1.45 +}