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

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