FemaLocalSoftware/mainwindow.h

55 lines
1.1 KiB
C
Raw Normal View History

2024-11-24 09:48:52 +00:00
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QPixmap>
#include <QVBoxLayout>
2024-11-28 18:34:00 +00:00
#ifdef Q_OS_WIN
#include <Qlabel>
2024-11-28 18:34:00 +00:00
#elif defined(Q_OS_LINUX)
#include <QLabel>
2024-11-28 18:34:00 +00:00
#endif
#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
{
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;
private:
2024-11-28 18:34:00 +00:00
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);
2024-11-24 09:48:52 +00:00
};
#endif // MAINWINDOW_H