refs #686, GUI for reader settings

* component
This commit is contained in:
Klaus Basan
2016-06-25 02:33:26 +02:00
parent 0fca9c1f18
commit c85b5d9341
5 changed files with 284 additions and 2 deletions

View File

@@ -0,0 +1,55 @@
/* Copyright (C) 2016
* 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_COMPONENTS_SETTINGSVATSIMREADERSCOMPONENT_H
#define BLACKGUI_COMPONENTS_SETTINGSVATSIMREADERSCOMPONENT_H
#include "blackcore/settings/reader.h"
#include <QFrame>
#include <QScopedPointer>
namespace Ui { class CSettingsVatsimReadersComponent; }
namespace BlackGui
{
namespace Components
{
/*!
* Settings for readers
*/
class CSettingsVatsimReadersComponent : public QFrame
{
Q_OBJECT
public:
//! Constructor
explicit CSettingsVatsimReadersComponent(QWidget *parent = nullptr);
//! Destructor
~CSettingsVatsimReadersComponent();
private slots:
void ps_settingsChanged();
void ps_save();
void ps_reload();
private:
void initValues();
QScopedPointer<Ui::CSettingsVatsimReadersComponent> ui;
BlackMisc::CSetting<BlackCore::Settings::SettingsVatsimBookings> m_settingsBookings { this, &CSettingsVatsimReadersComponent::ps_settingsChanged };
BlackMisc::CSetting<BlackCore::Settings::SettingsVatsimDataFile> m_settingsDataFile { this, &CSettingsVatsimReadersComponent::ps_settingsChanged };
BlackMisc::CSetting<BlackCore::Settings::SettingsVatsimMetars> m_settingsMetars { this, &CSettingsVatsimReadersComponent::ps_settingsChanged };
};
} // ns
} // ns
#endif // guard