#ifndef MULTI_PLOT_H
#define MULTI_PLOT_H

#include <QtGui>

#include "Plot.h"
#include "CalcDlg.h"

#define DEFPLOTS 3
#define MAXPLOTS 5

class CalcDlg;

class MultiPlot : public QWidget{
	Q_OBJECT
	private:
		QStack<Plot *> plots;
		QStack<QCheckBox *> checks;
		QStack<QLabel *> checkLabels;
		QVBoxLayout * plotLayout;
		QGroupBox * ctrlBox;
		QGridLayout * ctrlLayout;
		QPushButton * addButton;
		QPushButton * removeButton;
		QHBoxLayout * plotSelectLayout;
		QPushButton * playButton;
		QPushButton * pauseButton;
		QPushButton * stopButton;
		QPushButton * editButton;

		CalcDlg  * calc;
	public:
		MultiPlot(QWidget* parent = 0);
		~MultiPlot();
		
		QStack<Plot *> getPlots();

	private:
		void createUI();
		void fixSize();

	public slots:
		void addClicked();
		void removeClicked();
		void playClicked();
		void pauseClicked();
		void stopClicked();
		void editClicked();
};

#endif

