mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-03 07:35:48 +08:00
[AFV] Ref T739, added a dialog for cockpit/audio so CAfvClient can be used in core UI
This commit is contained in:
28
src/blackgui/components/cockpitcomaudiodialog.cpp
Normal file
28
src/blackgui/components/cockpitcomaudiodialog.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
/* 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.
|
||||
*/
|
||||
|
||||
#include "cockpitcomaudiodialog.h"
|
||||
#include "ui_cockpitcomaudiodialog.h"
|
||||
|
||||
namespace BlackGui
|
||||
{
|
||||
namespace Components
|
||||
{
|
||||
CCockpitComAudioDialog::CCockpitComAudioDialog(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::CCockpitComAudioDialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowFlags(this->windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
}
|
||||
|
||||
CCockpitComAudioDialog::~CCockpitComAudioDialog()
|
||||
{ }
|
||||
|
||||
} // ns
|
||||
} // ns
|
||||
40
src/blackgui/components/cockpitcomaudiodialog.h
Normal file
40
src/blackgui/components/cockpitcomaudiodialog.h
Normal file
@@ -0,0 +1,40 @@
|
||||
/* Copyright (C) 2019 - let's see if there will be a (C) 2020
|
||||
* 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_COCKPITCOMAUDIODIALOG_H
|
||||
#define BLACKGUI_COMPONENTS_COCKPITCOMAUDIODIALOG_H
|
||||
|
||||
#include "blackgui/blackguiexport.h"
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui { class CCockpitComAudioDialog; }
|
||||
namespace BlackGui
|
||||
{
|
||||
namespace Components
|
||||
{
|
||||
//! Cockpit COM component as dialog
|
||||
class BLACKGUI_EXPORT CCockpitComAudioDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
//! Ctor
|
||||
explicit CCockpitComAudioDialog(QWidget *parent = nullptr);
|
||||
|
||||
//! Dtor
|
||||
virtual ~CCockpitComAudioDialog() override;
|
||||
|
||||
private:
|
||||
QScopedPointer<Ui::CCockpitComAudioDialog> ui;
|
||||
};
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
#endif // guard
|
||||
147
src/blackgui/components/cockpitcomaudiodialog.ui
Normal file
147
src/blackgui/components/cockpitcomaudiodialog.ui
Normal file
@@ -0,0 +1,147 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>CCockpitComAudioDialog</class>
|
||||
<widget class="QDialog" name="CCockpitComAudioDialog">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>500</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>400</width>
|
||||
<height>500</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Audio and cockpit</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="vl_CockpitComDialog">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="gb_Com">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>COM</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="BlackGui::Components::CCockpitComComponent" name="comp_Com">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="gb_Audio">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>100</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Audio</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<widget class="BlackGui::Components::CAudioDeviceVolumeSetupComponent" name="comp_Audio">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="bb_CockpitComDialog">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Close</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>BlackGui::Components::CCockpitComComponent</class>
|
||||
<extends>QFrame</extends>
|
||||
<header>blackgui/components/cockpitcomcomponent.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>BlackGui::Components::CAudioDeviceVolumeSetupComponent</class>
|
||||
<extends>QFrame</extends>
|
||||
<header>blackgui/components/audiodevicevolumesetupcomponent.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>bb_CockpitComDialog</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>CCockpitComAudioDialog</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_CockpitComDialog</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>CCockpitComAudioDialog</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>
|
||||
Reference in New Issue
Block a user