Ref T731, moved QML map in dialog

* initial structure
* embedded a QQuickWidget in dialog
This commit is contained in:
Klaus Basan
2019-09-21 01:52:55 +02:00
committed by Mat Sutcliffe
parent cf6d60348e
commit 329b1e8c9a
14 changed files with 741 additions and 10 deletions

View File

@@ -0,0 +1,27 @@
/* Copyright (C) 2013
* swift project Community / Contributors
*
* This file is part of swift Project. It is subject to the license terms in the LICENSE file found in the top-level
* directory of this distribution. No part of swift project, including this file, may be copied, modified, propagated,
* or distributed except according to the terms contained in the LICENSE file.
*/
//! \file
#include "afvmapdialog.h"
#include "ui_afvmapdialog.h"
namespace BlackGui
{
namespace Components
{
CAfvMapDialog::CAfvMapDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::CAfvMapDialog)
{
ui->setupUi(this);
}
CAfvMapDialog::~CAfvMapDialog() { }
} // ns
} // ns

View File

@@ -0,0 +1,41 @@
/* Copyright (C) 2019
* swift project Community / Contributors
*
* This file is part of swift Project. It is subject to the license terms in the LICENSE file found in the top-level
* directory of this distribution. No part of swift project, including this file, may be copied, modified, propagated,
* or distributed except according to the terms contained in the LICENSE file.
*/
//! \file
#ifndef BLACKGUI_COMPONENTS_AFVMAPDIALOG_H
#define BLACKGUI_COMPONENTS_AFVMAPDIALOG_H
#include "blackgui/blackguiexport.h"
#include <QDialog>
#include <QScopedPointer>
namespace Ui { class CAfvMapDialog; }
namespace BlackGui
{
namespace Components
{
//! QML map to display ATC stations
class BLACKGUI_EXPORT CAfvMapDialog : public QDialog
{
Q_OBJECT
public:
//! Ctor
explicit CAfvMapDialog(QWidget *parent = nullptr);
//! Dtor
virtual ~CAfvMapDialog() override;
private:
QScopedPointer<Ui::CAfvMapDialog> ui;
};
} // ns
} // ns
#endif // guard

View File

@@ -0,0 +1,83 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>CAfvMapDialog</class>
<widget class="QDialog" name="CAfvMapDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>640</width>
<height>480</height>
</rect>
</property>
<property name="windowTitle">
<string>Dialog</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QQuickWidget" name="qw_AfvMap">
<property name="resizeMode">
<enum>QQuickWidget::SizeRootObjectToView</enum>
</property>
<property name="source">
<url>
<string>qrc:/blackgui/qml/AFVMap.qml</string>
</url>
</property>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="bb_AfvMap">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
</property>
</widget>
</item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>QQuickWidget</class>
<extends>QWidget</extends>
<header location="global">QtQuickWidgets/QQuickWidget</header>
</customwidget>
</customwidgets>
<resources/>
<connections>
<connection>
<sender>bb_AfvMap</sender>
<signal>accepted()</signal>
<receiver>CAfvMapDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>bb_AfvMap</sender>
<signal>rejected()</signal>
<receiver>CAfvMapDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>