mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 06:35:52 +08:00
Ref T297, network setup form (dynamic offset times)
This commit is contained in:
@@ -13,19 +13,25 @@
|
||||
<property name="windowTitle">
|
||||
<string>Frame</string>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0" colspan="2">
|
||||
<layout class="QVBoxLayout" name="vl_SettingsNetworkComponent">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="gb_Network">
|
||||
<property name="title">
|
||||
<string>Network</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="vl_Network">
|
||||
<item>
|
||||
<widget class="BlackGui::Editors::CNetworkSetupForm" name="ediitor_NetworkSetup"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="gb_Services">
|
||||
<property name="title">
|
||||
<string>Services</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<layout class="QVBoxLayout" name="vl_NetworkServices">
|
||||
<item>
|
||||
<widget class="BlackGui::Components::CSettingsVatsimReadersComponent" name="comp_ReaderSettings">
|
||||
<property name="minimumSize">
|
||||
@@ -45,7 +51,7 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<item>
|
||||
<spacer name="vs_NetworkSettings">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
@@ -67,6 +73,12 @@
|
||||
<header>blackgui/components/settingsvatsimreaderscomponent.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>BlackGui::Editors::CNetworkSetupForm</class>
|
||||
<extends>QFrame</extends>
|
||||
<header>blackgui/editors/networksetupform.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
|
||||
35
src/blackgui/editors/networksetupform.cpp
Normal file
35
src/blackgui/editors/networksetupform.cpp
Normal file
@@ -0,0 +1,35 @@
|
||||
/* Copyright (C) 2018
|
||||
* 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 and at http://www.swift-project.org/license.html. 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 "networksetupform.h"
|
||||
#include "ui_networksetupform.h"
|
||||
#include "guiutility.h"
|
||||
|
||||
using namespace BlackMisc;
|
||||
|
||||
namespace BlackGui
|
||||
{
|
||||
namespace Editors
|
||||
{
|
||||
CNetworkSetupForm::CNetworkSetupForm(QWidget *parent) :
|
||||
CForm(parent),
|
||||
ui(new Ui::CNetworkSetupForm)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
CNetworkSetupForm::~CNetworkSetupForm()
|
||||
{ }
|
||||
|
||||
void CNetworkSetupForm::setReadOnly(bool readonly)
|
||||
{
|
||||
CGuiUtility::checkBoxReadOnly(ui->cb_DynamicOffsetTimes, readonly);
|
||||
}
|
||||
} // ns
|
||||
} // ns
|
||||
46
src/blackgui/editors/networksetupform.h
Normal file
46
src/blackgui/editors/networksetupform.h
Normal file
@@ -0,0 +1,46 @@
|
||||
/* Copyright (C) 2018
|
||||
* 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 and at http://www.swift-project.org/license.html. 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_EDITORS_NETWORKSETUPFORM_H
|
||||
#define BLACKGUI_EDITORS_NETWORKSETUPFORM_H
|
||||
|
||||
#include "form.h"
|
||||
#include <QScopedPointer>
|
||||
|
||||
namespace Ui { class CNetworkSetupForm; }
|
||||
namespace BlackGui
|
||||
{
|
||||
namespace Editors
|
||||
{
|
||||
//! Setup form
|
||||
class CNetworkSetupForm : public CForm
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
//! Constructor
|
||||
explicit CNetworkSetupForm(QWidget *parent = nullptr);
|
||||
|
||||
//! Destructor
|
||||
virtual ~CNetworkSetupForm() override;
|
||||
|
||||
//! \name Form class implementations
|
||||
//! @{
|
||||
virtual void setReadOnly(bool readonly) override;
|
||||
//! @}
|
||||
|
||||
private:
|
||||
QScopedPointer<Ui::CNetworkSetupForm> ui;
|
||||
};
|
||||
} // ns
|
||||
} // ns
|
||||
|
||||
#endif // guard
|
||||
28
src/blackgui/editors/networksetupform.ui
Normal file
28
src/blackgui/editors/networksetupform.ui
Normal file
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>CNetworkSetupForm</class>
|
||||
<widget class="QFrame" name="CNetworkSetupForm">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>118</width>
|
||||
<height>31</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Network offset times</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cb_DynamicOffsetTimes">
|
||||
<property name="text">
|
||||
<string>dynamic offset times</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
Reference in New Issue
Block a user