Files
pilotclient/src/blackgui/components/settingsguicomponent.h
Klaus Basan 4e381a048f refs #740, GUI settings in own component
* used in client/mapping tool
* reset font possible
2016-08-26 21:05:46 +01:00

70 lines
2.0 KiB
C++

/* 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_COMPONENTS_SETTINGSGUICOMPONENT_H
#define BLACKGUI_COMPONENTS_SETTINGSGUICOMPONENT_H
#include "blackgui/settings/guisettings.h"
#include <QFrame>
#include <QScopedPointer>
namespace Ui { class CSettingsGuiComponent; }
namespace BlackGui
{
namespace Components
{
/*!
* General GUI settings
*/
class CSettingsGuiComponent : public QFrame
{
Q_OBJECT
public:
//! Constructor
explicit CSettingsGuiComponent(QWidget *parent = nullptr);
//! Destructor
~CSettingsGuiComponent();
//! Hide opacity elements
void hideOpacity(bool hide);
public slots:
//! GUI Opacity 0-100%
void setGuiOpacity(double value);
signals:
//! Change the windows opacity 0..100
void changedWindowsOpacity(int opacity);
private slots:
//! Font has been changed
void ps_fontChanged();
//! Font color dialof
void ps_fontColorDialog();
//! Reset font
void ps_resetFont();
private:
QScopedPointer<Ui::CSettingsGuiComponent> ui;
QColor m_fontColor;
void reloadWidgetStyleFromSettings();
void widgetStyleChanged(const QString &widgetStyle);
BlackMisc::CSetting<BlackGui::Settings::TWidgetStyle> m_settingsWidgetStyle { this, &CSettingsGuiComponent::reloadWidgetStyleFromSettings };
};
} // ns
} // ns
#endif // guard