Browse Source

CommConfigurationWindow - make it a proper QDialog, and not a floating widget

QGC4.4
John Tapsell 12 years ago
parent
commit
c90c55d480
  1. 2
      src/ui/CommConfigurationWindow.cc
  2. 4
      src/ui/CommConfigurationWindow.h
  3. 2
      src/ui/MainWindow.cc

2
src/ui/CommConfigurationWindow.cc

@ -55,7 +55,7 @@ This file is part of the QGROUNDCONTROL project
#include "LinkManager.h" #include "LinkManager.h"
#include "MainWindow.h" #include "MainWindow.h"
CommConfigurationWindow::CommConfigurationWindow(LinkInterface* link, ProtocolInterface* protocol, QWidget *parent) : QWidget(parent) CommConfigurationWindow::CommConfigurationWindow(LinkInterface* link, ProtocolInterface* protocol, QWidget *parent) : QDialog(parent)
{ {
this->link = link; this->link = link;

4
src/ui/CommConfigurationWindow.h

@ -33,7 +33,7 @@ This file is part of the QGROUNDCONTROL project
#define _COMMCONFIGURATIONWINDOW_H_ #define _COMMCONFIGURATIONWINDOW_H_
#include <QObject> #include <QObject>
#include <QWidget> #include <QDialog>
#include <QAction> #include <QAction>
#include "LinkInterface.h" #include "LinkInterface.h"
#include "ProtocolInterface.h" #include "ProtocolInterface.h"
@ -62,7 +62,7 @@ enum qgc_protocol_t {
/** /**
* @brief Configuration window for communication links * @brief Configuration window for communication links
*/ */
class CommConfigurationWindow : public QWidget class CommConfigurationWindow : public QDialog
{ {
Q_OBJECT Q_OBJECT

2
src/ui/MainWindow.cc

@ -1683,7 +1683,7 @@ void MainWindow::addLink(LinkInterface *link)
if (!found) if (!found)
{ {
CommConfigurationWindow* commWidget = new CommConfigurationWindow(link, mavlink, NULL); CommConfigurationWindow* commWidget = new CommConfigurationWindow(link, mavlink, this);
commsWidgetList.append(commWidget); commsWidgetList.append(commWidget);
connect(commWidget,SIGNAL(destroyed(QObject*)),this,SLOT(commsWidgetDestroyed(QObject*))); connect(commWidget,SIGNAL(destroyed(QObject*)),this,SLOT(commsWidgetDestroyed(QObject*)));
QAction* action = commWidget->getAction(); QAction* action = commWidget->getAction();

Loading…
Cancel
Save