SGL
gcolorchooser.h
1 /*
2  * File: gcolorchooser.h
3  * ---------------------
4  * This file defines the <code>GColorChooser</code> class which supports
5  * popping up graphical dialog boxes to select colors.
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 gcolorchooser.h to replace Java version
15  * @version 2018/07/29
16  * - initial version
17  */
18 
19 
20 #ifndef _gcolorchooser_h
21 #define _gcolorchooser_h
22 
23 #include <string>
24 #include <QWidget>
25 
26 #include "gwindow.h"
27 
28 namespace sgl {
29 
37 public:
43  static string showDialog(const string& title, int initialColor);
44 
50  static string showDialog(GWindow* parent, const string& title, int initialColor);
51 
57  static string showDialog(QWidget* parent, const string& title, int initialColor);
58 
64  static string showDialog(const string& title = "", const string& initialColor = "");
65 
71  static string showDialog(GWindow* parent, const string& title = "", const string& initialColor = "");
72 
78  static string showDialog(QWidget* parent, const string& title = "", const string& initialColor = "");
79 
80 private:
81  GColorChooser(); // prevent construction
82 };
83 
84 } // namespace sgl
85 
86 #endif // _gcolorchooser_h
This class represents a graphics window that supports simple graphics.
Definition: gwindow.h:102
The GColorChooser class contains static methods for popping up color-choosing dialog boxes that allow...
Definition: gcolorchooser.h:36
Definition: console.h:45
static string showDialog(string title, int initialColor)
Pops up a color chooser dialog with the given top title text, with the given initial color selected...
Definition: gcolorchooser.cpp:29