#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QPixmap>
#include <QVBoxLayout>

#ifdef Q_OS_WIN
#include <Qlabel>
#elif defined(Q_OS_LINUX)
#include <QLabel>
#endif

#include <map>

QT_BEGIN_NAMESPACE
namespace Ui {
class MainWindow;
}
QT_END_NAMESPACE

struct TabImageData
{
    QLabel *label;
    QPixmap pixmap;
    QSize originalSize;
};

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private:
    Ui::MainWindow *ui;

private:
    QLabel *imageLabel;
    QPixmap pixmap;
    std::map<QWidget *, TabImageData> tabImageLabels;

private:
    void ResizeEvent(QResizeEvent *event);
    void SetupTabs();
    void SetupSensorTab(QWidget *tab, QVBoxLayout *mainLayout);
    void SetupIncidentTab(QWidget *tab, QVBoxLayout *mainLayout);
    void SetupStatisticsTab(QWidget *tab, QVBoxLayout *mainLayout);
    void SetupJournalTab(QWidget *tab, QVBoxLayout *mainLayout);
    void SetupSettingsTab(QWidget *tab, QVBoxLayout *mainLayout);
};
#endif // MAINWINDOW_H
