File indexing completed on 2024-04-21 05:51:22
0001 /* 0002 SPDX-FileCopyrightText: 2018 Mariusz Glebocki <mglb@arccos-1.net> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #ifndef FONTDIALOG_H 0008 #define FONTDIALOG_H 0009 0010 // Qt 0011 #include <KFontChooser> 0012 #include <QCheckBox> 0013 #include <QDialog> 0014 #include <QDialogButtonBox> 0015 #include <QToolButton> 0016 0017 namespace Konsole 0018 { 0019 class FontDialog : public QDialog 0020 { 0021 Q_OBJECT 0022 0023 public: 0024 explicit FontDialog(QWidget *parent = nullptr, bool emoji = false, const QFont font = QFont()); 0025 0026 QFont font() const 0027 { 0028 return _fontChooser->font(); 0029 } 0030 void setFont(const QFont &font); 0031 0032 Q_SIGNALS: 0033 void fontChanged(const QFont &font); 0034 0035 private: 0036 KFontChooser *_fontChooser; 0037 QCheckBox *_showAllFonts; 0038 QToolButton *_showAllFontsWarningButton; 0039 QDialogButtonBox *_buttonBox; 0040 bool _emoji; 0041 }; 0042 } 0043 0044 #endif // FONTDIALOG_H