]>
cloud.milkyroute.net Git - dolphin.git/blob - src/settings/viewmodes/dolphinfontrequester.h
2 * SPDX-FileCopyrightText: 2008 Peter Penz <peter.penz19@gmail.com>
4 * SPDX-License-Identifier: GPL-2.0-or-later
7 #ifndef DOLPHINFONTREQUESTER_H
8 #define DOLPHINFONTREQUESTER_H
17 * @brief Allows to select between using the system font or a custom font.
19 class DolphinFontRequester
: public QWidget
24 enum Mode
{ SystemFont
= 0, CustomFont
= 1 };
26 explicit DolphinFontRequester(QWidget
*parent
);
27 ~DolphinFontRequester() override
;
29 void setMode(Mode mode
);
33 * Returns the custom font (see DolphinFontRequester::customFont()),
34 * if the mode is \a CustomFont, otherwise the system font is
37 QFont
currentFont() const;
39 void setCustomFont(const QFont
&font
);
40 QFont
customFont() const;
43 /** Is emitted, if the font has been changed. */
47 void openFontDialog();
48 void changeMode(int index
);
51 QComboBox
*m_modeCombo
;
52 QPushButton
*m_chooseFontButton
;