goldendict-ng/src/ui/preferences.hh
xiaoyifang bff9d83efa
opt: add system font configuration (#1125)
* opt: add system font configuration

* [autofix.ci] apply automated fixes

* opt: add option to change the interface font

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2023-09-07 09:53:51 +08:00

67 lines
1.4 KiB
C++

#ifndef __PREFERENCES_HH_INCLUDED__
#define __PREFERENCES_HH_INCLUDED__
#include <QDialog>
#include <QAction>
#include "config.hh"
#include "ui_preferences.h"
/// Preferences dialog -- allows changing various program options.
class Preferences: public QDialog
{
Q_OBJECT
int prevInterfaceLanguage = 0;
#if !defined( Q_OS_WIN )
int prevInterfaceStyle = 0;
#endif
Config::CustomFonts prevWebFontFamily;
QString prevSysFont;
Config::Class & cfg;
QAction helpAction;
public:
Preferences( QWidget * parent, Config::Class & cfg_ );
void buildDisabledTypes( QString & disabledTypes, bool is_checked, QString name );
~Preferences() override = default;
Config::Preferences getPreferences();
private:
Ui::Preferences ui;
private slots:
void enableScanPopupModifiersToggled( bool );
void showScanFlagToggled( bool b );
void wholeAltClicked( bool );
void wholeCtrlClicked( bool );
void wholeShiftClicked( bool );
void sideAltClicked( bool );
void sideCtrlClicked( bool );
void sideShiftClicked( bool );
void on_enableMainWindowHotkey_toggled( bool checked );
void on_enableClipboardHotkey_toggled( bool checked );
void on_buttonBox_accepted();
void on_useExternalPlayer_toggled( bool enabled );
void customProxyToggled( bool );
void on_maxNetworkCacheSize_valueChanged( int value );
void on_collapseBigArticles_toggled( bool checked );
void on_limitInputPhraseLength_toggled( bool checked );
};
#endif