
# include <QtCore/QObject> 

#if QT_VERSION >= 0x060000
#include <QWidget>
#else
#if QT_VERSION >= 0x050000
#include <QtWidgets>
#else
# include <QtGui/QtGui> 
#endif
#endif

#if QT_VERSION >= 0x060000
# include <QThread>
#endif

#if QT_VERSION >= 0x060000
# include <QMainWindow>
# include <QEvent>
# endif

class MyClass : public QObject
{
	Q_OBJECT

public:
	MyClass(QObject *parent = 0);
	~MyClass();

	void Main_Window();

	public slots:

		void openfile();
		void update();	
		void tape_dialog();
		void play_pause();
		void Play();
		void rrrun();
		void record();
		void about();
		void browse();
		void b_1();
		void web();
		void nmi();

		void set_size1();
		void set_size2();
		void set_size3();
		void set_size4();
		void set_size5();
		void set_size6();
		void set_size7();
		void set_size8();

		void rst();
		void save();
		void full_screen();
		void settings();
		void apply_settings();

		void tt_changed();
		void Close(); void Close1(); void Close2();
		void fl_changed();

		void new_audio(int i);
		void FillAudioList(void);
		void pi1(void);
		void save_settings();
		void POKE();
		void poke();
		void peek();

};

class paint_area1 : public QWidget
{
	Q_OBJECT

public:
	paint_area1(QWidget *parent = 0);
	QSize minimumSizeHint() const;
	QSize sizeHint() const;                

protected:
	void paintEvent(QPaintEvent *event);
	void keyPressEvent ( QKeyEvent * event );  
	void keyReleaseEvent ( QKeyEvent * event );

 void	mouseMoveEvent ( QMouseEvent * event );
 void	mousePressEvent ( QMouseEvent * event );
 void	mouseReleaseEvent ( QMouseEvent * event );
};

class paint_area : public QWidget
{
	Q_OBJECT

public:
	paint_area(QWidget *parent = 0);

protected:
	void paintEvent(QPaintEvent *event);
};

class soundthreadclass : public QThread 
{
public:
	virtual void run();
};

void res(void);

class MyMainWindow : public QMainWindow
{
	bool event(QEvent *e)
{
	if(e->type() == QEvent::Close)
		{
			exit(0);
		}


    if(e->type() == QEvent::Resize)
	{
        res();
    }

	return QWidget::event(e);
}
};