2024-11-24 09:48:52 +00:00
|
|
|
#ifndef MAINWINDOW_H
|
|
|
|
#define MAINWINDOW_H
|
|
|
|
|
|
|
|
#include <QMainWindow>
|
2024-11-24 21:46:29 +00:00
|
|
|
#include <QPixmap>
|
|
|
|
#include <QVBoxLayout>
|
|
|
|
|
2024-11-28 18:34:00 +00:00
|
|
|
#ifdef Q_OS_WIN
|
2024-12-09 08:30:43 +00:00
|
|
|
#include <Qlabel>
|
2024-11-28 18:34:00 +00:00
|
|
|
#elif defined(Q_OS_LINUX)
|
2024-12-09 08:30:43 +00:00
|
|
|
#include <QLabel>
|
2024-11-28 18:34:00 +00:00
|
|
|
#endif
|
|
|
|
|
2024-11-24 21:46:29 +00:00
|
|
|
#include <map>
|
2024-11-24 09:48:52 +00:00
|
|
|
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
namespace Ui {
|
|
|
|
class MainWindow;
|
|
|
|
}
|
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
2024-11-28 18:34:00 +00:00
|
|
|
struct TabImageData
|
|
|
|
{
|
2024-11-24 21:46:29 +00:00
|
|
|
QLabel *label;
|
|
|
|
QPixmap pixmap;
|
|
|
|
QSize originalSize;
|
|
|
|
};
|
|
|
|
|
2024-11-24 09:48:52 +00:00
|
|
|
class MainWindow : public QMainWindow
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
MainWindow(QWidget *parent = nullptr);
|
|
|
|
~MainWindow();
|
|
|
|
|
|
|
|
private:
|
|
|
|
Ui::MainWindow *ui;
|
2024-11-24 21:46:29 +00:00
|
|
|
|
|
|
|
private:
|
2024-11-28 18:34:00 +00:00
|
|
|
QLabel *imageLabel;
|
2024-11-24 21:46:29 +00:00
|
|
|
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);
|
2024-11-24 09:48:52 +00:00
|
|
|
};
|
|
|
|
#endif // MAINWINDOW_H
|