QGCMessageView.h 1.03 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
#ifndef QGCMESSAGEVIEW_H
#define QGCMESSAGEVIEW_H

#include <QWidget>
#include <UASInterface.h>
#include <QVBoxLayout>
#include <QAction>
#include "QGCUnconnectedInfoWidget.h"

namespace Ui {
class QGCMessageView;
}

class QGCMessageView : public QWidget
{
    Q_OBJECT
    
public:
    explicit QGCMessageView(QWidget *parent = 0);
    ~QGCMessageView();

public slots:
    /**
     * @brief Set currently active UAS
     * @param uas the current active UAS
     */
    void setActiveUAS(UASInterface* uas);
    /**
     * @brief Handle text message from current active UAS
     * @param uasid
     * @param componentid
     * @param severity
     * @param text
     */
    void handleTextMessage(int uasid, int componentid, int severity, QString text);

protected:
38
    // Stores the UAS that we're currently receiving messages from.
39
    UASInterface* activeUAS;
40 41
    // Stores the connect widget that is displayed when no UAS is active.
    QGCUnconnectedInfoWidget* connectWidget;
42 43 44 45 46 47
    
private:
    Ui::QGCMessageView *ui;
};

#endif // QGCMESSAGEVIEW_H