2023-08-13 22:12:38 +02:00
|
|
|
#ifndef MAINWINDOW_H
|
|
|
|
#define MAINWINDOW_H
|
|
|
|
|
|
|
|
#include <QMainWindow>
|
2023-08-15 00:09:29 +02:00
|
|
|
#include <QImage>
|
2023-08-14 13:53:34 +02:00
|
|
|
#include "udpserver.h"
|
2023-08-13 22:12:38 +02:00
|
|
|
|
2023-08-15 00:09:29 +02:00
|
|
|
|
|
|
|
#define MAXIMUM_PANELSIZE 5
|
|
|
|
#define PANEL_WIDTH 32
|
|
|
|
#define PANEL_HEIGHT 40
|
|
|
|
|
2023-08-15 12:51:35 +02:00
|
|
|
#define LED_DIAMETER 8
|
|
|
|
#define LED_DISTANCE (LED_DIAMETER + 3)
|
2023-08-15 00:09:29 +02:00
|
|
|
|
|
|
|
#define DEFAULT_WIDTH (LED_DISTANCE * MAXIMUM_PANELSIZE * PANEL_WIDTH)
|
|
|
|
#define DEFAULT_HEIGHT (LED_DISTANCE * PANEL_HEIGHT)
|
|
|
|
|
|
|
|
|
|
|
|
#define COLOR_BACKGROUND Qt::black
|
2023-08-15 12:51:35 +02:00
|
|
|
#define COLOR_FOREGROUND QColor(255, 127, 0, 255)
|
2023-08-15 00:09:29 +02:00
|
|
|
|
2023-08-13 22:12:38 +02:00
|
|
|
QT_BEGIN_NAMESPACE
|
|
|
|
namespace Ui { class MainWindow; }
|
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
|
|
class MainWindow : public QMainWindow
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
|
|
|
MainWindow(QWidget *parent = nullptr);
|
|
|
|
~MainWindow();
|
|
|
|
|
|
|
|
private:
|
|
|
|
Ui::MainWindow *ui;
|
2023-08-14 13:53:34 +02:00
|
|
|
UdpLedServer *server;
|
2023-08-15 12:51:35 +02:00
|
|
|
QImage *mOffscreenPanel;
|
2023-08-15 00:09:29 +02:00
|
|
|
void drawImage(QImage *image);
|
2023-08-13 22:12:38 +02:00
|
|
|
};
|
|
|
|
#endif // MAINWINDOW_H
|