12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- #ifndef _RVC_QT_BOOT_SENDER_H__
- #define _RVC_QT_BOOT_SENDER_H__
- #include "sp_gui_def.h"
- #include <Widgets/QtMessageInfo.h>
- #include <Widgets/BootWidget.h>
- #include <QApplication>
- #include <QObject>
- #include "SpBase.h"
- int qt_gui_create_format(sp_gui_format_t** p_gui);
- void qt_gui_destroy_format(sp_gui_format_t* p_gui);
- // type: 0 normal msg; 1 bluescreen; 2 fatal error
- int qt_gui_show_running_info(void* gui, const char* msg, int type);
- int qt_gui_show_entity_info(void* gui, const char* entity, int state);
- int qt_gui_display(void* gui);
- int qt_gui_undisplay(void* gui);
- void qt_gui_post_message(void* gui, unsigned long param1, unsigned long param2);
- class QtBootSender : public QObject
- {
- Q_OBJECT
- public:
- QtBootSender(QObject* parent = nullptr) :QObject(parent)
- {
- }
- ~QtBootSender() {}
- void SendShowMessage(const char* msg, MessageType type = TextEvent, int param1 = 0, int param2 = 0)
- {
- QtMessageInfo message;
- message.content = QString(msg);
- message.type = type;
- message.param1 = param1;
- message.param2 = param2;
- QVariant var;
- var.setValue(message);
- emit ShowMessageVariant(var);
- }
- void SendEntityInfo(QEntityActiveInfo info)
- {
- QVariant var;
- var.setValue(info);
- emit SendEntityStateChange(var);
- }
- signals:
- void SendEntityStateChange(QVariant entityInfo);
- void ShowMessage(const QtMessageInfo* meesage);
- void ShowMessageVariant(QVariant info);
- };
- #endif //_RVC_QT_BOOT_SENDER_H__
|