#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include "leveldata.h"

namespace Ui {
class MainWindow;
}

enum TCurrentMode
{
    CM_ADD_POLYS,
    CM_MODIFY_POLYS,
};

class MainWindow : public QMainWindow
{
    Q_OBJECT
    
public:
    TCurrentMode CurrentMode;

    QPixmap* Pixmap;
    QImage bkgImage;

    LevelData* levelData;

    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();


    void InitSlots();
    void InitSlotsForAddPolys();
    void InitSlotsForModifyPolys();

    void SetImagePixmap(QPixmap* p);

signals:
    void deleteButtonPressed();

public slots:
    void LoadBackgroundSlot();
    void RadioButtonAddPolysSelected();
    void RadioButtonModifyPolysSelected();

    void OnSaveButtonPressed();
    void OnLoadButtonPressed();
    
private:
    Ui::MainWindow *ui;
protected:
    void keyReleaseEvent(QKeyEvent* event);
};

#endif // MAINWINDOW_H
