#ifndef MAIN_WIN_H
#define MAIN_WIN_H

#include <QtGui/QAction>
#include <QtGui/QApplication>
#include <QtGui/QButtonGroup>
#include <QtGui/QMainWindow>
#include <QtGui/QMenu>
#include <QtGui/QMenuBar>
#include <QtGui/QStatusBar>
#include <QtGui/QWidget>
#include <QtGui/QGridLayout>
#include <QtCore/QVariant>
#include <QtGui/QDockWidget>
#include <QColor>
#include <QWorkspace>
#include <QString>


#include "Plot.h"
#include "MultiPlot.h"
#include "SignalEditor.h"
#include "MathPlot.h"

class MainWin : public QMainWindow {
	Q_OBJECT;
	
	private:
		QWidget * lastWindow;
		int windowsNum;
	
	public:
		QWorkspace * workspace;
		QMenuBar *menubar;
		QMenu *menuFile;
		QMenu *menuWindows;
		QMenu *menuHelp;

		//Actions
		QAction *actionOpenFiles;
		QAction *actionNewSingle;
		QAction *actionNewMulti;
		QAction *actionNewMath;
		QAction *actionOpenSignalEditor;
		QAction *actionQuit;
		
		QAction *actionPrevWin;
		QAction *actionNextWin;
		QAction *actionCascade;
		QAction *actionCloseAct;
		QAction *actionCloseAll;
		
		
		QWidget *centralwidget;
		QStatusBar *statusbar;
	
	public:
		MainWin(QWidget* parent = 0, Qt::WindowFlags flags = 0);
		virtual ~MainWin();
		
	private:
		void connectActions();
		void createMenuBar();
		void createUI();
		
	private slots:
		void openNewSingle();
		void openNewMulti();
		void openNewMath();
		void openEditor();
		void load();
	
};

#endif
