//--------------------------------------------------
// main.h contents
//--------------------------------------------------

#ifndef MAIN_H
#define MAIN_H

#include <QApplication>
#include <QMainWindow>
#include <QTableWidget>
#include <QPaintEvent>
#include <QStatusBar>
#include <QMenuBar>

extern int paints_cnt;	// Global variable - paintEvent calls counter

class QTableWidgetEx : public QTableWidget
	{
	Q_OBJECT
	public:
		inline explicit QTableWidgetEx(QWidget *parent = 0) : QTableWidget(parent) {};
	protected:
		virtual void paintEvent(QPaintEvent* e) override;
	};


class MainWindow : public QMainWindow
	{
	Q_OBJECT
	public:
		QTableWidgetEx*		table_widget_ex;
		QMenuBar*			menuBar;
		QStatusBar*			statusBar;

		explicit MainWindow(QWidget *parent = 0);
		inline ~MainWindow(){};
	protected slots:
		void on_call_update();
		void on_check_paint_cnt();
	};

#endif
