Ref T297, network setup form (dynamic offset times)

This commit is contained in:
Klaus Basan
2018-08-04 23:51:47 +02:00
parent 1f17b49e6a
commit ba9c979769
4 changed files with 131 additions and 10 deletions

View File

@@ -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/>

View 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

View 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

View 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>