소스 검색

Add hostMessage signal + "message" user command

Vincent Lang 9 년 전
부모
커밋
da1dda847b
2개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      src/system/SystemComponent.cpp
  2. 3 0
      src/system/SystemComponent.h

+ 1 - 0
src/system/SystemComponent.cpp

@@ -85,6 +85,7 @@ void SystemComponent::componentPostInitialize()
 {
   InputComponent::Get().registerHostCommand("crash!", this, "crashApp");
   InputComponent::Get().registerHostCommand("script", this, "runUserScript");
+  InputComponent::Get().registerHostCommand("message", this, "hostMessage");
 }
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////

+ 3 - 0
src/system/SystemComponent.h

@@ -73,6 +73,9 @@ public:
 
   Q_INVOKABLE void crashApp();
 
+signals:
+  void hostMessage(const QString& message);
+
 private:
   SystemComponent(QObject* parent = 0);
   static QMap<QString, QString> networkInterfaces();