Commit 74524490 authored by dogmaphobic's avatar dogmaphobic

Renamed classes and files away from the QGC prefix.

Shrunk the Message drop down dialog a bit.
Made the Message drop down dialog slightly transparent.
parent ab294134
...@@ -329,7 +329,7 @@ FORMS += \ ...@@ -329,7 +329,7 @@ FORMS += \
src/ui/uas/UASQuickViewItemSelect.ui \ src/ui/uas/UASQuickViewItemSelect.ui \
src/ui/QGCTabbedInfoView.ui \ src/ui/QGCTabbedInfoView.ui \
src/ui/UASRawStatusView.ui \ src/ui/UASRawStatusView.ui \
src/ui/uas/QGCMessageView.ui \ src/ui/uas/UASMessageView.ui \
src/ui/JoystickButton.ui \ src/ui/JoystickButton.ui \
src/ui/JoystickAxis.ui \ src/ui/JoystickAxis.ui \
src/ui/configuration/terminalconsole.ui \ src/ui/configuration/terminalconsole.ui \
...@@ -458,7 +458,7 @@ HEADERS += \ ...@@ -458,7 +458,7 @@ HEADERS += \
src/ui/QGCTabbedInfoView.h \ src/ui/QGCTabbedInfoView.h \
src/ui/UASRawStatusView.h \ src/ui/UASRawStatusView.h \
src/ui/PrimaryFlightDisplay.h \ src/ui/PrimaryFlightDisplay.h \
src/ui/uas/QGCMessageView.h \ src/ui/uas/UASMessageView.h \
src/ui/JoystickButton.h \ src/ui/JoystickButton.h \
src/ui/JoystickAxis.h \ src/ui/JoystickAxis.h \
src/ui/configuration/console.h \ src/ui/configuration/console.h \
...@@ -495,7 +495,7 @@ HEADERS += \ ...@@ -495,7 +495,7 @@ HEADERS += \
src/comm/LinkConfiguration.h \ src/comm/LinkConfiguration.h \
src/ui/QGCCommConfiguration.h \ src/ui/QGCCommConfiguration.h \
src/ui/QGCUDPLinkConfiguration.h \ src/ui/QGCUDPLinkConfiguration.h \
src/uas/QGCMessageHandler.h src/uas/UASMessageHandler.h
SOURCES += \ SOURCES += \
src/main.cc \ src/main.cc \
...@@ -605,7 +605,7 @@ SOURCES += \ ...@@ -605,7 +605,7 @@ SOURCES += \
src/ui/PrimaryFlightDisplay.cc \ src/ui/PrimaryFlightDisplay.cc \
src/ui/JoystickButton.cc \ src/ui/JoystickButton.cc \
src/ui/JoystickAxis.cc \ src/ui/JoystickAxis.cc \
src/ui/uas/QGCMessageView.cc \ src/ui/uas/UASMessageView.cc \
src/ui/configuration/terminalconsole.cpp \ src/ui/configuration/terminalconsole.cpp \
src/ui/configuration/console.cpp \ src/ui/configuration/console.cpp \
src/ui/configuration/SerialSettingsDialog.cc \ src/ui/configuration/SerialSettingsDialog.cc \
...@@ -637,7 +637,7 @@ SOURCES += \ ...@@ -637,7 +637,7 @@ SOURCES += \
src/comm/LinkConfiguration.cc \ src/comm/LinkConfiguration.cc \
src/ui/QGCCommConfiguration.cc \ src/ui/QGCCommConfiguration.cc \
src/ui/QGCUDPLinkConfiguration.cc \ src/ui/QGCUDPLinkConfiguration.cc \
src/uas/QGCMessageHandler.cc src/uas/UASMessageHandler.cc
# #
# Unit Test specific configuration goes here # Unit Test specific configuration goes here
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
#include "QGCSingleton.h" #include "QGCSingleton.h"
#include "LinkManager.h" #include "LinkManager.h"
#include "UASManager.h" #include "UASManager.h"
#include "QGCMessageHandler.h" #include "UASMessageHandler.h"
#include "AutoPilotPluginManager.h" #include "AutoPilotPluginManager.h"
#include "QGCTemporaryFile.h" #include "QGCTemporaryFile.h"
#include "QGCFileDialog.h" #include "QGCFileDialog.h"
...@@ -428,7 +428,7 @@ void QGCApplication::_createSingletons(void) ...@@ -428,7 +428,7 @@ void QGCApplication::_createSingletons(void)
Q_ASSERT(pluginManager); Q_ASSERT(pluginManager);
// Need UASManager // Need UASManager
QGCMessageHandler* messageHandler = QGCMessageHandler::_createSingleton(); UASMessageHandler* messageHandler = UASMessageHandler::_createSingleton();
Q_UNUSED(messageHandler); Q_UNUSED(messageHandler);
Q_ASSERT(messageHandler); Q_ASSERT(messageHandler);
...@@ -466,7 +466,7 @@ void QGCApplication::_destroySingletons(void) ...@@ -466,7 +466,7 @@ void QGCApplication::_destroySingletons(void)
MAVLinkProtocol::_deleteSingleton(); MAVLinkProtocol::_deleteSingleton();
FactSystem::_deleteSingleton(); FactSystem::_deleteSingleton();
QGCMessageHandler::_deleteSingleton(); UASMessageHandler::_deleteSingleton();
AutoPilotPluginManager::_deleteSingleton(); AutoPilotPluginManager::_deleteSingleton();
UASManager::_deleteSingleton(); UASManager::_deleteSingleton();
LinkManager::_deleteSingleton(); LinkManager::_deleteSingleton();
......
...@@ -28,19 +28,19 @@ This file is part of the QGROUNDCONTROL project ...@@ -28,19 +28,19 @@ This file is part of the QGROUNDCONTROL project
*/ */
#include "QGCApplication.h" #include "QGCApplication.h"
#include "QGCMessageHandler.h" #include "UASMessageHandler.h"
#include "UASManager.h" #include "UASManager.h"
QGCUasMessage::QGCUasMessage(int componentid, int severity, QString text) UASMessage::UASMessage(int componentid, int severity, QString text)
{ {
_compId = componentid; _compId = componentid;
_severity = severity; _severity = severity;
_text = text; _text = text;
} }
IMPLEMENT_QGC_SINGLETON(QGCMessageHandler, QGCMessageHandler) IMPLEMENT_QGC_SINGLETON(UASMessageHandler, UASMessageHandler)
QGCMessageHandler::QGCMessageHandler(QObject *parent) UASMessageHandler::UASMessageHandler(QObject *parent)
: QGCSingleton(parent) : QGCSingleton(parent)
, _activeUAS(NULL) , _activeUAS(NULL)
{ {
...@@ -48,12 +48,12 @@ QGCMessageHandler::QGCMessageHandler(QObject *parent) ...@@ -48,12 +48,12 @@ QGCMessageHandler::QGCMessageHandler(QObject *parent)
emit textMessageReceived(NULL); emit textMessageReceived(NULL);
} }
QGCMessageHandler::~QGCMessageHandler() UASMessageHandler::~UASMessageHandler()
{ {
_clearMessages(); _clearMessages();
} }
void QGCMessageHandler::_clearMessages() void UASMessageHandler::_clearMessages()
{ {
_mutex.lock(); _mutex.lock();
while(_messages.count()) { while(_messages.count()) {
...@@ -63,7 +63,7 @@ void QGCMessageHandler::_clearMessages() ...@@ -63,7 +63,7 @@ void QGCMessageHandler::_clearMessages()
_mutex.unlock(); _mutex.unlock();
} }
void QGCMessageHandler::setActiveUAS(UASInterface* uas) void UASMessageHandler::setActiveUAS(UASInterface* uas)
{ {
// If we were already attached to an autopilot, disconnect it. // If we were already attached to an autopilot, disconnect it.
if (_activeUAS && _activeUAS != uas) if (_activeUAS && _activeUAS != uas)
...@@ -83,7 +83,7 @@ void QGCMessageHandler::setActiveUAS(UASInterface* uas) ...@@ -83,7 +83,7 @@ void QGCMessageHandler::setActiveUAS(UASInterface* uas)
} }
} }
void QGCMessageHandler::handleTextMessage(int uasid, int compId, int severity, QString text) void UASMessageHandler::handleTextMessage(int uasid, int compId, int severity, QString text)
{ {
Q_UNUSED(uasid); Q_UNUSED(uasid);
...@@ -147,7 +147,7 @@ void QGCMessageHandler::handleTextMessage(int uasid, int compId, int severity, Q ...@@ -147,7 +147,7 @@ void QGCMessageHandler::handleTextMessage(int uasid, int compId, int severity, Q
// Finally preppend the properly-styled text with a timestamp. // Finally preppend the properly-styled text with a timestamp.
QString dateString = QDateTime::currentDateTime().toString("hh:mm:ss.zzz"); QString dateString = QDateTime::currentDateTime().toString("hh:mm:ss.zzz");
QGCUasMessage* message = new QGCUasMessage(compId, severity, text); UASMessage* message = new UASMessage(compId, severity, text);
message->_setFormatedText(QString("<p style=\"color:#CCCCCC\">[%2 - COMP:%3]<font style=\"%1\">%4 %5</font></p>").arg(style).arg(dateString).arg(compId).arg(severityText).arg(text)); message->_setFormatedText(QString("<p style=\"color:#CCCCCC\">[%2 - COMP:%3]<font style=\"%1\">%4 %5</font></p>").arg(style).arg(dateString).arg(compId).arg(severityText).arg(text));
_mutex.lock(); _mutex.lock();
_messages.append(message); _messages.append(message);
......
...@@ -37,15 +37,15 @@ This file is part of the QGROUNDCONTROL project ...@@ -37,15 +37,15 @@ This file is part of the QGROUNDCONTROL project
#include "QGCSingleton.h" #include "QGCSingleton.h"
class UASInterface; class UASInterface;
class QGCMessageHandler; class UASMessageHandler;
/*! /*!
* @class QGCUasMessage * @class UASMessage
* @brief Message element * @brief Message element
*/ */
class QGCUasMessage class UASMessage
{ {
friend class QGCMessageHandler; friend class UASMessageHandler;
public: public:
/** /**
* @brief Get message source component ID * @brief Get message source component ID
...@@ -64,7 +64,7 @@ public: ...@@ -64,7 +64,7 @@ public:
*/ */
QString getFormatedText() { return _formatedText; } QString getFormatedText() { return _formatedText; }
private: private:
QGCUasMessage(int componentid, int severity, QString text); UASMessage(int componentid, int severity, QString text);
void _setFormatedText(const QString formatedText) { _formatedText = formatedText; } void _setFormatedText(const QString formatedText) { _formatedText = formatedText; }
int _compId; int _compId;
int _severity; int _severity;
...@@ -72,13 +72,13 @@ private: ...@@ -72,13 +72,13 @@ private:
QString _formatedText; QString _formatedText;
}; };
class QGCMessageHandler : public QGCSingleton class UASMessageHandler : public QGCSingleton
{ {
Q_OBJECT Q_OBJECT
DECLARE_QGC_SINGLETON(QGCMessageHandler, QGCMessageHandler) DECLARE_QGC_SINGLETON(UASMessageHandler, UASMessageHandler)
public: public:
explicit QGCMessageHandler(QObject *parent = 0); explicit UASMessageHandler(QObject *parent = 0);
~QGCMessageHandler(); ~UASMessageHandler();
/** /**
* @brief Locks access to the message list * @brief Locks access to the message list
*/ */
...@@ -90,7 +90,7 @@ public: ...@@ -90,7 +90,7 @@ public:
/** /**
* @brief Access to the message list * @brief Access to the message list
*/ */
const QVector<QGCUasMessage*>& messages() { return _messages; } const QVector<UASMessage*>& messages() { return _messages; }
public slots: public slots:
/** /**
* @brief Set currently active UAS * @brief Set currently active UAS
...@@ -110,12 +110,12 @@ signals: ...@@ -110,12 +110,12 @@ signals:
* @brief Sent out when new message arrives * @brief Sent out when new message arrives
* @param message A pointer to the message. NULL if resetting (new UAS assigned) * @param message A pointer to the message. NULL if resetting (new UAS assigned)
*/ */
void textMessageReceived(QGCUasMessage* message); void textMessageReceived(UASMessage* message);
private: private:
void _clearMessages(); void _clearMessages();
// Stores the UAS that we're currently receiving messages from. // Stores the UAS that we're currently receiving messages from.
UASInterface* _activeUAS; UASInterface* _activeUAS;
QVector<QGCUasMessage*> _messages; QVector<UASMessage*> _messages;
QMutex _mutex; QMutex _mutex;
}; };
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
QGCTabbedInfoView::QGCTabbedInfoView(QWidget *parent) : QWidget(parent) QGCTabbedInfoView::QGCTabbedInfoView(QWidget *parent) : QWidget(parent)
{ {
ui.setupUi(this); ui.setupUi(this);
messageView = new QGCMessageViewWidget(this); messageView = new UASMessageViewWidget(this);
//actionsWidget = new UASActionsWidget(this); //actionsWidget = new UASActionsWidget(this);
quickView = new UASQuickView(this); quickView = new UASQuickView(this);
//rawView = new UASRawStatusView(this); //rawView = new UASRawStatusView(this);
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
#include <QWidget> #include <QWidget>
#include "ui_QGCTabbedInfoView.h" #include "ui_QGCTabbedInfoView.h"
#include "MAVLinkDecoder.h" #include "MAVLinkDecoder.h"
#include "QGCMessageView.h" #include "UASMessageView.h"
#include "UASQuickView.h" #include "UASQuickView.h"
#include "UASRawStatusView.h" #include "UASRawStatusView.h"
class QGCTabbedInfoView : public QWidget class QGCTabbedInfoView : public QWidget
...@@ -18,7 +18,7 @@ public: ...@@ -18,7 +18,7 @@ public:
private: private:
MAVLinkDecoder *m_decoder; MAVLinkDecoder *m_decoder;
Ui::QGCTabbedInfoView ui; Ui::QGCTabbedInfoView ui;
QGCMessageViewWidget *messageView; UASMessageViewWidget *messageView;
UASQuickView *quickView; UASQuickView *quickView;
UASRawStatusView *rawView; UASRawStatusView *rawView;
}; };
......
...@@ -31,8 +31,8 @@ This file is part of the QGROUNDCONTROL project ...@@ -31,8 +31,8 @@ This file is part of the QGROUNDCONTROL project
#include "UASManager.h" #include "UASManager.h"
#include "MainWindow.h" #include "MainWindow.h"
#include "QGCApplication.h" #include "QGCApplication.h"
#include "QGCMessageView.h" #include "UASMessageView.h"
#include "UASMessageHandler.h"
// Label class that sends mouse hover events // Label class that sends mouse hover events
class QCGHoverLabel : public QLabel class QCGHoverLabel : public QLabel
...@@ -739,13 +739,14 @@ void QGCToolBar::_updateConfigurations() ...@@ -739,13 +739,14 @@ void QGCToolBar::_updateConfigurations()
*/ */
void QGCToolBar::enterMessageLabel() void QGCToolBar::enterMessageLabel()
{ {
if(!_rollDownMessages) // If not already there and messages are actually present
if(!_rollDownMessages && UASMessageHandler::instance()->messages().count())
{ {
QPoint p = toolBarMessageLabel->mapToGlobal(QPoint(0,0)); QPoint p = toolBarMessageLabel->mapToGlobal(QPoint(0,0));
_rollDownMessages = new QGCMessageViewRollDown(MainWindow::instance(),this); _rollDownMessages = new UASMessageViewRollDown(MainWindow::instance(),this);
_rollDownMessages->setAttribute(Qt::WA_DeleteOnClose); _rollDownMessages->setAttribute(Qt::WA_DeleteOnClose);
_rollDownMessages->move(mapFromGlobal(p)); _rollDownMessages->move(mapFromGlobal(p));
_rollDownMessages->setMinimumSize(400,300); _rollDownMessages->setMinimumSize(360,200);
_rollDownMessages->show(); _rollDownMessages->show();
} }
} }
......
...@@ -37,7 +37,7 @@ This file is part of the QGROUNDCONTROL project ...@@ -37,7 +37,7 @@ This file is part of the QGROUNDCONTROL project
#include "SerialLink.h" #include "SerialLink.h"
#include "LinkManager.h" #include "LinkManager.h"
class QGCMessageViewRollDown; class UASMessageViewRollDown;
class QGCToolBar : public QToolBar class QGCToolBar : public QToolBar
{ {
...@@ -138,7 +138,7 @@ private: ...@@ -138,7 +138,7 @@ private:
QComboBox* _linkCombo; QComboBox* _linkCombo;
QAction* _linkComboAction; QAction* _linkComboAction;
QGCMessageViewRollDown* _rollDownMessages; UASMessageViewRollDown* _rollDownMessages;
QPushButton* _connectButton; QPushButton* _connectButton;
bool _linksConnected; bool _linksConnected;
......
...@@ -25,33 +25,33 @@ This file is part of the QGROUNDCONTROL project ...@@ -25,33 +25,33 @@ This file is part of the QGROUNDCONTROL project
#include <QScrollBar> #include <QScrollBar>
#include "QGCToolBar.h" #include "QGCToolBar.h"
#include "QGCMessageView.h" #include "UASMessageView.h"
#include "QGCUnconnectedInfoWidget.h" #include "QGCUnconnectedInfoWidget.h"
#include "QGCMessageHandler.h" #include "UASMessageHandler.h"
#include "ui_QGCMessageView.h" #include "ui_UASMessageView.h"
/*------------------------------------------------------------------------------------- /*-------------------------------------------------------------------------------------
QGCMessageView UASMessageView
-------------------------------------------------------------------------------------*/ -------------------------------------------------------------------------------------*/
QGCMessageView::QGCMessageView(QWidget *parent) : UASMessageView::UASMessageView(QWidget *parent) :
QWidget(parent), QWidget(parent),
_ui(new Ui::QGCMessageView) _ui(new Ui::UASMessageView)
{ {
_ui->setupUi(this); _ui->setupUi(this);
} }
QGCMessageView::~QGCMessageView() UASMessageView::~UASMessageView()
{ {
delete _ui; delete _ui;
} }
/*------------------------------------------------------------------------------------- /*-------------------------------------------------------------------------------------
QGCMessageViewWidget UASMessageViewWidget
-------------------------------------------------------------------------------------*/ -------------------------------------------------------------------------------------*/
QGCMessageViewWidget::QGCMessageViewWidget(QWidget *parent) UASMessageViewWidget::UASMessageViewWidget(QWidget *parent)
: QGCMessageView(parent) : UASMessageView(parent)
, _unconnectedWidget(NULL) , _unconnectedWidget(NULL)
{ {
setStyleSheet("QPlainTextEdit { border: 0px }"); setStyleSheet("QPlainTextEdit { border: 0px }");
...@@ -67,15 +67,15 @@ QGCMessageViewWidget::QGCMessageViewWidget(QWidget *parent) ...@@ -67,15 +67,15 @@ QGCMessageViewWidget::QGCMessageViewWidget(QWidget *parent)
connect(clearAction, SIGNAL(triggered()), ui()->plainTextEdit, SLOT(clear())); connect(clearAction, SIGNAL(triggered()), ui()->plainTextEdit, SLOT(clear()));
ui()->plainTextEdit->addAction(clearAction); ui()->plainTextEdit->addAction(clearAction);
// Connect message handler // Connect message handler
connect(QGCMessageHandler::instance(), SIGNAL(textMessageReceived(QGCUasMessage*)), this, SLOT(handleTextMessage(QGCUasMessage*))); connect(UASMessageHandler::instance(), SIGNAL(textMessageReceived(UASMessage*)), this, SLOT(handleTextMessage(UASMessage*)));
} }
QGCMessageViewWidget::~QGCMessageViewWidget() UASMessageViewWidget::~UASMessageViewWidget()
{ {
} }
void QGCMessageViewWidget::handleTextMessage(QGCUasMessage *message) void UASMessageViewWidget::handleTextMessage(UASMessage *message)
{ {
// Reset // Reset
if(!message) { if(!message) {
...@@ -102,41 +102,42 @@ void QGCMessageViewWidget::handleTextMessage(QGCUasMessage *message) ...@@ -102,41 +102,42 @@ void QGCMessageViewWidget::handleTextMessage(QGCUasMessage *message)
} }
/*------------------------------------------------------------------------------------- /*-------------------------------------------------------------------------------------
QGCMessageViewRollDown UASMessageViewRollDown
-------------------------------------------------------------------------------------*/ -------------------------------------------------------------------------------------*/
QGCMessageViewRollDown::QGCMessageViewRollDown(QWidget *parent, QGCToolBar *toolBar) UASMessageViewRollDown::UASMessageViewRollDown(QWidget *parent, QGCToolBar *toolBar)
: QGCMessageView(parent) : UASMessageView(parent)
{ {
_toolBar = toolBar; _toolBar = toolBar;
setStyleSheet("QPlainTextEdit { border: 1px }"); setAttribute(Qt::WA_TranslucentBackground);
setStyleSheet("background-color: rgba(0%,0%,0%,80%); border: 2px;");
QPlainTextEdit *msgWidget = ui()->plainTextEdit; QPlainTextEdit *msgWidget = ui()->plainTextEdit;
QAction* clearAction = new QAction(tr("Clear Text"), this); QAction* clearAction = new QAction(tr("Clear Text"), this);
connect(clearAction, SIGNAL(triggered()), msgWidget, SLOT(clear())); connect(clearAction, SIGNAL(triggered()), msgWidget, SLOT(clear()));
msgWidget->addAction(clearAction); msgWidget->addAction(clearAction);
// Init Messages // Init Messages
QGCMessageHandler::instance()->lockAccess(); UASMessageHandler::instance()->lockAccess();
msgWidget->setUpdatesEnabled(false); msgWidget->setUpdatesEnabled(false);
QVector<QGCUasMessage*> messages = QGCMessageHandler::instance()->messages(); QVector<UASMessage*> messages = UASMessageHandler::instance()->messages();
for(int i = 0; i < messages.count(); i++) { for(int i = 0; i < messages.count(); i++) {
msgWidget->appendHtml(messages.at(i)->getFormatedText()); msgWidget->appendHtml(messages.at(i)->getFormatedText());
} }
QScrollBar *scroller = msgWidget->verticalScrollBar(); QScrollBar *scroller = msgWidget->verticalScrollBar();
scroller->setValue(scroller->maximum()); scroller->setValue(scroller->maximum());
msgWidget->setUpdatesEnabled(true); msgWidget->setUpdatesEnabled(true);
connect(QGCMessageHandler::instance(), SIGNAL(textMessageReceived(QGCUasMessage*)), this, SLOT(handleTextMessage(QGCUasMessage*))); connect(UASMessageHandler::instance(), SIGNAL(textMessageReceived(UASMessage*)), this, SLOT(handleTextMessage(UASMessage*)));
QGCMessageHandler::instance()->unlockAccess(); UASMessageHandler::instance()->unlockAccess();
} }
QGCMessageViewRollDown::~QGCMessageViewRollDown() UASMessageViewRollDown::~UASMessageViewRollDown()
{ {
} }
void QGCMessageViewRollDown::handleTextMessage(QGCUasMessage *message) void UASMessageViewRollDown::handleTextMessage(UASMessage *message)
{ {
// Reset // Reset
if(message) { if(!message) {
ui()->plainTextEdit->clear(); ui()->plainTextEdit->clear();
} else { } else {
QPlainTextEdit *msgWidget = ui()->plainTextEdit; QPlainTextEdit *msgWidget = ui()->plainTextEdit;
...@@ -150,7 +151,7 @@ void QGCMessageViewRollDown::handleTextMessage(QGCUasMessage *message) ...@@ -150,7 +151,7 @@ void QGCMessageViewRollDown::handleTextMessage(QGCUasMessage *message)
} }
} }
void QGCMessageViewRollDown::leaveEvent(QEvent * event) void UASMessageViewRollDown::leaveEvent(QEvent * event)
{ {
Q_UNUSED(event); Q_UNUSED(event);
_toolBar->leaveMessageView(); _toolBar->leaveMessageView();
......
...@@ -30,48 +30,48 @@ This file is part of the QGROUNDCONTROL project ...@@ -30,48 +30,48 @@ This file is part of the QGROUNDCONTROL project
#include <QAction> #include <QAction>
#include "QGCUnconnectedInfoWidget.h" #include "QGCUnconnectedInfoWidget.h"
class QGCUasMessage; class UASMessage;
class QGCToolBar; class QGCToolBar;
namespace Ui { namespace Ui {
class QGCMessageView; class UASMessageView;
} }
// Message View base class // Message View base class
class QGCMessageView : public QWidget class UASMessageView : public QWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit QGCMessageView(QWidget *parent = 0); explicit UASMessageView(QWidget *parent = 0);
virtual ~QGCMessageView(); virtual ~UASMessageView();
Ui::QGCMessageView* ui() { return _ui; } Ui::UASMessageView* ui() { return _ui; }
private: private:
Ui::QGCMessageView* _ui; Ui::UASMessageView* _ui;
}; };
// Message View Widget (used in the Info View tabbed Widget) // Message View Widget (used in the Info View tabbed Widget)
class QGCMessageViewWidget : public QGCMessageView class UASMessageViewWidget : public UASMessageView
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit QGCMessageViewWidget(QWidget *parent = 0); explicit UASMessageViewWidget(QWidget *parent = 0);
~QGCMessageViewWidget(); ~UASMessageViewWidget();
public slots: public slots:
void handleTextMessage(QGCUasMessage* message); void handleTextMessage(UASMessage* message);
private: private:
QGCUnconnectedInfoWidget* _unconnectedWidget; QGCUnconnectedInfoWidget* _unconnectedWidget;
}; };
// Roll down Message View // Roll down Message View
class QGCMessageViewRollDown : public QGCMessageView class UASMessageViewRollDown : public UASMessageView
{ {
Q_OBJECT Q_OBJECT
public: public:
explicit QGCMessageViewRollDown(QWidget *parent, QGCToolBar* toolBar); explicit UASMessageViewRollDown(QWidget *parent, QGCToolBar* toolBar);
~QGCMessageViewRollDown(); ~UASMessageViewRollDown();
public slots: public slots:
void handleTextMessage(QGCUasMessage* message); void handleTextMessage(UASMessage* message);
protected: protected:
void leaveEvent(QEvent* event); void leaveEvent(QEvent* event);
private: private:
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0"> <ui version="4.0">
<class>QGCMessageView</class> <class>UASMessageView</class>
<widget class="QWidget" name="QGCMessageView"> <widget class="QWidget" name="UASMessageView">
<property name="geometry"> <property name="geometry">
<rect> <rect>
<x>0</x> <x>0</x>
...@@ -10,6 +10,12 @@ ...@@ -10,6 +10,12 @@
<height>249</height> <height>249</height>
</rect> </rect>
</property> </property>
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="contextMenuPolicy"> <property name="contextMenuPolicy">
<enum>Qt::NoContextMenu</enum> <enum>Qt::NoContextMenu</enum>
</property> </property>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment