FemaLocalSoftware/mainwindow.h
Lopata PC 4de8b88fee Scrolling sensors ready.
Need to:
1)write beautiful code for flow layout.
2)start making flow windows.
3)start making second window.
2024-12-09 11:30:43 +03:00

55 lines
1.1 KiB
C++

#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