From 29a63fc5f2f4f0ec5be6d9ff6a688550f48fe88e Mon Sep 17 00:00:00 2001 From: Joshua Drake Date: Tue, 31 Jan 2023 09:22:48 -0600 Subject: Initial Commit. :) --- engineeringpage.h | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 engineeringpage.h (limited to 'engineeringpage.h') diff --git a/engineeringpage.h b/engineeringpage.h new file mode 100644 index 0000000..506d846 --- /dev/null +++ b/engineeringpage.h @@ -0,0 +1,72 @@ +#ifndef ENGINEERINGPAGE_H +#define ENGINEERINGPAGE_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "stdlib.h" + +#define SCREEN_HEIGHT 240 +#define SCREEN_WIDTH 320 + +class engineeringpage : public QWidget +{ + Q_OBJECT +public: + explicit engineeringpage(QWidget *parent = nullptr); + explicit engineeringpage(QString titletext, QStringList message_names, QWidget *parent = nullptr); + void configure(QString titletext, QStringList message_names); + +signals: + +public slots: + void update(QStringList message_data); + void update(int row, QString message_data); + void update(QList message_data); + void update(QByteArray message_data); +private slots: + void check_scroll(void); + +private: + typedef struct scrollText + { + scrollText () : fullText("") + { + position = 0; + scrolled = false; + } + scrollText(QString s) + { + fullText = s; + position = 0; + scrolled = false; + } + int position; + QString fullText; + bool scrolled; + } scrollText; + + int rows; + QString titletext; + QTableWidget *table = new QTableWidget(this); + QLabel *title = new QLabel(this); + QHeaderView *verticalheader, *horizontalheader; + std::vector tableHeader; + std::vector tableData; + void initializestylesheet(void); + bool textOverhang(QTableWidgetItem *instance, QString text); + QMap text_scrolling; + QTimer scroll_timer; + +}; + +#endif // ENGINEERINGPAGE_H -- cgit v1.2.3