SGL
gfontchooser.h
1 /*
2  * File: gfontchooser.h
3  * ----------------------
4  * This file defines the <code>GFontChooser</code> class which supports
5  * popping up graphical dialog boxes to select fonts.
6  *
7  * @author Marty Stepp
8  * @version 2021/04/09
9  * - added sgl namespace
10  * @version 2018/09/07
11  * - added doc comments for new documentation generation
12  * - added overloads that accept GWindow* parent
13  * @version 2018/08/23
14  * - renamed to gfontchooser.h to replace Java version
15  * @version 2018/07/29
16  * - initial version
17  */
18 
19 
20 #ifndef _gfontchooser_h
21 #define _gfontchooser_h
22 
23 #include <string>
24 #include <QWidget>
25 
26 #include "gwindow.h"
27 
28 namespace sgl {
29 
41 class GFontChooser {
42 public:
49  static string showDialog(const string& title = "", const string& initialFont = "");
50 
58  static string showDialog(GWindow* parent, const string& title = "", const string& initialFont = "");
59 
67  static string showDialog(QWidget* parent, const string& title = "", const string& initialFont = "");
68 
69 private:
70  GFontChooser(); // prevent construction
71 };
72 
73 } // namespace sgl
74 
75 #endif // _gfontchooser_h
This class represents a graphics window that supports simple graphics.
Definition: gwindow.h:102
Definition: console.h:45
The GFontChooser class contains static methods for popping up font-choosing dialog boxes that allow t...
Definition: gfontchooser.h:41
static string showDialog(string title="", string initialFont="")
Pops up a font chooser dialog with the given top title text and the given initially selected font...
Definition: gfontchooser.cpp:29