aboutsummaryrefslogtreecommitdiffstats
path: root/ui/qt/color_utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ui/qt/color_utils.cpp')
-rw-r--r--ui/qt/color_utils.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/ui/qt/color_utils.cpp b/ui/qt/color_utils.cpp
index 499771aa5f..02f9c56f4b 100644
--- a/ui/qt/color_utils.cpp
+++ b/ui/qt/color_utils.cpp
@@ -21,13 +21,9 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
-#include "config.h"
-
-#include <glib.h>
#include "color_utils.h"
-#include "color.h"
/*
* Initialize a color with R, G, and B values, including any toolkit-dependent
@@ -51,12 +47,16 @@ initialize_color(color_t *color, guint16 red, guint16 green, guint16 blue)
return TRUE;
}
-// XXX - We probably don't need a class.
-ColorUtils::ColorUtils(QWidget *parent) :
- QWidget(parent)
+ColorUtils::ColorUtils(QObject *parent) :
+ QObject(parent)
{
}
+QColor ColorUtils::fromColorT (color_t *color) {
+ if (!color) return QColor();
+ return QColor(color->red >> 8, color->green >> 8, color->blue >> 8);
+}
+
/*
* Editor modelines
*