refs #681, GUI FSD setup

* form base class adjusted
* GUI form UI
This commit is contained in:
Klaus Basan
2016-06-26 19:47:32 +02:00
parent 0939b1f08f
commit 2d00ff42fe
7 changed files with 360 additions and 23 deletions

View File

@@ -0,0 +1,74 @@
/* 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 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_FSDSETUPCOMPONENT_H
#define BLACKGUI_EDITORS_FSDSETUPCOMPONENT_H
#include "blackmisc/network/fsdsetup.h"
#include "form.h"
#include <QFrame>
#include <QScopedPointer>
namespace Ui { class CFsdSetupForm; }
namespace BlackGui
{
namespace Editors
{
/*!
* Setup for FSD
*/
class CFsdSetupForm : public CForm
{
Q_OBJECT
public:
//! Constructor
explicit CFsdSetupForm(QWidget *parent = nullptr);
//! Constructor
~CFsdSetupForm();
//! FSD setup from GUI
BlackMisc::Network::CFsdSetup getValue() const;
//! FSD setup when disabled
const BlackMisc::Network::CFsdSetup &getDisabledValue() const;
//! Set to GUI
void setValue(const BlackMisc::Network::CFsdSetup &setup);
//! Enabled?
bool isFsdSetuoEnabled() const;
//! Set enabled / disabled
void setFsdSetupEnabled(bool enabled);
//! Show the enable info
void showEnableInfo(bool visible);
//! \name Form class implementations
//! @{
virtual void setReadOnly(bool readonly) override;
virtual BlackMisc::CStatusMessageList validate(bool nested = false) const override;
//! @}
private slots:
//! Enable / disable
void ps_enabledToggled(bool enabled);
private:
QScopedPointer<Ui::CFsdSetupForm> ui;
};
} // ns
} // ns
#endif // guard