forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
Copy pathappearancewidget.h
59 lines (44 loc) · 1.46 KB
/
appearancewidget.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// Copyright (c) 2020-2023 The Dash Core developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_QT_APPEARANCEWIDGET_H
#define BITCOIN_QT_APPEARANCEWIDGET_H
#include <QWidget>
#include <qt/guiutil.h>
namespace Ui {
class AppearanceWidget;
}
class OptionsModel;
class QDataWidgetMapper;
class QSlider;
class QComboBox;
class AppearanceWidget : public QWidget
{
Q_OBJECT
public:
explicit AppearanceWidget(QWidget* parent = 0);
~AppearanceWidget();
void setModel(OptionsModel* model);
Q_SIGNALS:
void appearanceChanged();
public Q_SLOTS:
void accept();
private Q_SLOTS:
void updateTheme(const QString& toTheme = QString());
void updateFontFamily(int index);
void updateFontScale(int nScale);
void updateFontWeightNormal(int nValue, bool fForce = false);
void updateFontWeightBold(int nValue, bool fForce = false);
private:
Ui::AppearanceWidget* ui;
QDataWidgetMapper* mapper;
OptionsModel* model;
bool fAcceptChanges{false};
QString prevTheme{GUIUtil::getActiveTheme()};
int prevScale{GUIUtil::getFontScale()};
GUIUtil::FontFamily prevFontFamily{GUIUtil::getFontFamily()};
QFont::Weight prevWeightNormal{GUIUtil::getFontWeightNormal()};
QFont::Weight prevWeightBold{GUIUtil::getFontWeightBold()};
void updateWeightSlider(bool fForce = false);
};
#endif // BITCOIN_QT_APPEARANCEWIDGET_H