Commit d2317252 authored by Bryant's avatar Bryant

Removed the UnconnectedUASInfoWidget class as it could be replaced with a...

Removed the UnconnectedUASInfoWidget class as it could be replaced with a simple QLabel with the same functionality. Also styled the NO UAS warning on the ReadOnly mission view so it looks good in both dark and light themes.
parent d194b46c
......@@ -101,6 +101,10 @@ QLabel:disabled {
color: #353535;
}
QLabel#noUas {
font-size: 30pt;
}
QLabel#toolBarNameLabel {
font: bold 16px;
color: #3C7B9E;
......
......@@ -101,6 +101,10 @@ QLabel:disabled {
color: #AAA;
}
QLabel#noUas {
font-size: 30pt;
}
QLabel#toolBarNameLabel {
font: bold 16px;
color: #3C7B9E;
......
......@@ -202,7 +202,6 @@ FORMS += src/ui/MainWindow.ui \
src/ui/QGCMAVLinkInspector.ui \
src/ui/WaypointViewOnlyView.ui \
src/ui/WaypointEditableView.ui \
src/ui/UnconnectedUASInfoWidget.ui \
src/ui/mavlink/QGCMAVLinkMessageSender.ui \
src/ui/firmwareupdate/QGCFirmwareUpdateWidget.ui \
src/ui/QGCPluginHost.ui \
......@@ -346,7 +345,6 @@ HEADERS += src/MG.h \
src/ui/WaypointViewOnlyView.h \
src/ui/WaypointViewOnlyView.h \
src/ui/WaypointEditableView.h \
src/ui/UnconnectedUASInfoWidget.h \
src/ui/QGCRGBDView.h \
src/ui/mavlink/QGCMAVLinkMessageSender.h \
src/ui/firmwareupdate/QGCFirmwareUpdateWidget.h \
......@@ -515,7 +513,6 @@ SOURCES += src/main.cc \
src/ui/MAVLinkDecoder.cc \
src/ui/WaypointViewOnlyView.cc \
src/ui/WaypointEditableView.cc \
src/ui/UnconnectedUASInfoWidget.cc \
src/ui/QGCRGBDView.cc \
src/ui/mavlink/QGCMAVLinkMessageSender.cc \
src/ui/firmwareupdate/QGCFirmwareUpdateWidget.cc \
......
#include "UnconnectedUASInfoWidget.h"
#include "ui_UnconnectedUASInfoWidget.h"
UnconnectedUASInfoWidget::UnconnectedUASInfoWidget(QWidget *parent) :
QGroupBox(parent),
ui(new Ui::UnconnectedUASInfoWidget)
{
ui->setupUi(this);
}
UnconnectedUASInfoWidget::~UnconnectedUASInfoWidget()
{
delete ui;
}
#ifndef UNCONNECTEDUASINFOWIDGET_H
#define UNCONNECTEDUASINFOWIDGET_H
#include <QGroupBox>
namespace Ui {
class UnconnectedUASInfoWidget;
}
class UnconnectedUASInfoWidget : public QGroupBox
{
Q_OBJECT
public:
explicit UnconnectedUASInfoWidget(QWidget *parent = 0);
~UnconnectedUASInfoWidget();
private:
Ui::UnconnectedUASInfoWidget *ui;
};
#endif // UNCONNECTEDUASINFOWIDGET_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>UnconnectedUASInfoWidget</class>
<widget class="QGroupBox" name="UnconnectedUASInfoWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>279</width>
<height>114</height>
</rect>
</property>
<property name="windowTitle">
<string/>
</property>
<property name="styleSheet">
<string notr="true">border:0;</string>
</property>
<property name="title">
<string/>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="QTextEdit" name="textEdit">
<property name="lineWidth">
<number>0</number>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="horizontalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOff</enum>
</property>
<property name="autoFormatting">
<set>QTextEdit::AutoAll</set>
</property>
<property name="undoRedoEnabled">
<bool>false</bool>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
<property name="html">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;table border=&quot;0&quot; style=&quot;-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;&quot;&gt;
&lt;tr&gt;
&lt;td style=&quot;border: none;&quot;&gt;
&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:20pt; font-weight:600; color:#b5b5b5;&quot;&gt;NO UAV&lt;/span&gt;&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections/>
</ui>
......@@ -40,6 +40,7 @@ This file is part of the PIXHAWK project
#include <QFileDialog>
#include <QMessageBox>
#include <QMouseEvent>
#include <QTextEdit>
WaypointList::WaypointList(QWidget *parent, UASWaypointManager* wpm) :
QWidget(parent),
......@@ -108,8 +109,14 @@ WaypointList::WaypointList(QWidget *parent, UASWaypointManager* wpm) :
m_ui->readButton->hide();
m_ui->refreshButton->hide();
//FIXME: The whole "Onboard Waypoints"-tab should be hidden, instead of "refresh" button
UnconnectedUASInfoWidget* inf = new UnconnectedUASInfoWidget(this);
viewOnlyListLayout->insertWidget(0, inf); //insert a "NO UAV" info into the Onboard Tab
// Insert a "NO UAV" info into the Onboard Tab
QLabel* noUas = new QLabel(this);
noUas->setObjectName("noUas");
noUas->setText("NO UAS");
noUas->setEnabled(false);
noUas->setAlignment(Qt::AlignCenter);
viewOnlyListLayout->insertWidget(0, noUas);
showOfflineWarning = true;
} else {
setUAS(static_cast<UASInterface*>(WPM->getUAS()));
......
......@@ -42,9 +42,6 @@ This file is part of the QGROUNDCONTROL project
#include "UASInterface.h"
#include "WaypointEditableView.h"
#include "WaypointViewOnlyView.h"
#include "UnconnectedUASInfoWidget.h"
//#include "PopupMessage.h"
namespace Ui
{
......
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