summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Taylor <alex@vector35.com>2023-08-25 01:18:57 -0400
committerAlexander Taylor <alex@vector35.com>2023-08-25 16:02:16 -0400
commit276e080ccb275c2bd78c4bcc3ad2c030779cae44 (patch)
tree307a14a7045d1e43df4321be3636bf9e1071c872
parent5046073446456512359493848692557442235294 (diff)
Update font settings APIs, add documentation.
-rw-r--r--ui/fontsettings.h35
1 files changed, 27 insertions, 8 deletions
diff --git a/ui/fontsettings.h b/ui/fontsettings.h
index 85b0fb7f..3d29db33 100644
--- a/ui/fontsettings.h
+++ b/ui/fontsettings.h
@@ -5,9 +5,9 @@
#include "uicontext.h"
/*!
- @addtogroup FontSettings
- \ingroup uiapi
- @{
+ @addtogroup FontSettings
+ \ingroup uiapi
+ @{
*/
enum AntialiasingStyle
@@ -18,19 +18,38 @@ enum AntialiasingStyle
NoAntialiasing
};
-int BINARYNINJAUIAPI getDefaultFontSize();
-
+//! Returns the default application font, ignoring user settings.
QFont BINARYNINJAUIAPI getDefaultApplicationFont();
+//! Returns the currently configured application font (or the default, if it doesn't exist).
QFont BINARYNINJAUIAPI getApplicationFont(QWidget* widget);
-void BINARYNINJAUIAPI setApplicationFont(const QFont& font);
+/*!
+ * Sets the currently configured application font.
+ *
+ * @param font The font to use. Passing nullptr will reset the application font to the user's configured default.
+ */
+void BINARYNINJAUIAPI setApplicationFont(const QFont* font);
+//! Returns the default monospaced font, ignoring user settings.
QFont BINARYNINJAUIAPI getDefaultMonospaceFont();
+//! Returns the currently configured monospaced font (or the default, if it doesn't exist).
QFont BINARYNINJAUIAPI getMonospaceFont(QWidget* widget);
-void BINARYNINJAUIAPI setMonospaceFont(const QFont& font);
+/*!
+ * Sets the currently configured monospaced font.
+ *
+ * @param font The font to use. Passing nullptr will reset the monospaced font to the user's configured default.
+ */
+void BINARYNINJAUIAPI setMonospaceFont(const QFont* font);
+//! Returns the default emoji font, ignoring user settings.
QFont BINARYNINJAUIAPI getDefaultEmojiFont();
+//! Returns the currently configured emoji font (or the default, if it doesn't exist).
QFont BINARYNINJAUIAPI getEmojiFont(QWidget* widget);
-void BINARYNINJAUIAPI setEmojiFont(const QFont& font);
+/*!
+ * Sets the currently configured emoji font.
+ *
+ * @param font The font to use. Passing nullptr will reset the emoji font to the user's configured default.
+ */
+void BINARYNINJAUIAPI setEmojiFont(const QFont* font);
int BINARYNINJAUIAPI getDefaultExtraFontSpacing();
int BINARYNINJAUIAPI getExtraFontSpacing();