HistogramToolDialog.h 1.11 KB
#ifndef HISTOGRAMTOOLDIALOG_H
#define HISTOGRAMTOOLDIALOG_H

#include "ui_HistogramToolDialog.h"
#include "VolumeDataStruct.h"
#include "GlobalValues.h"
#include <QFileDialog>
#include <iostream>
using namespace std;



class HistogramToolDialog : public QDialog
{
	Q_OBJECT

public:
	HistogramToolDialog(QWidget *parent = 0, Qt::WFlags flags = 0)
	{
		ui.setupUi(this);

	}
	~HistogramToolDialog(){}

private:
	Ui::HistogramToolDialogClass ui;




public slots:
	void on_okButton_clicked()
	{
		
	}

	void on_btnCreateHistogram_clicked()
	{
		//get the user-specified histogram margins
		float minX = ui.spinMinX->value();
		float maxX = ui.spinMaxX->value();
		float minY = ui.spinMinY->value();
		float maxY = ui.spinMaxY->value();

		int bins = ui.spinBins->value();

		//create the histogram and compute the exact margins
		CreateHistogram(bins, minX, maxX, minY, maxY);

		//display the exact margins in the labels
		ui.lblDataMinX->setText(QString::number(minX));
		ui.lblDataMaxX->setText(QString::number(maxX));
		ui.lblDataMinY->setText(QString::number(minY));
		ui.lblDataMaxY->setText(QString::number(maxY));

	}
	

};

#endif