From 2dff8d760594661114615366c7cb51133fec0c10 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Thu, 24 Jan 2013 01:10:12 +0000 Subject: Add font and color preferences. Unfortunately Qt doesn't have a color picker widget so we're back to popping up dialogs. Move the contents of monospace_font.{cpp,h} to wireshark_application.{cpp,h}. Pango and Qt use completely different string representations for fonts. Add a separate gui.qt.font_name preference so that they don't clobber each other. svn path=/trunk/; revision=47240 --- ui/qt/color_utils.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'ui/qt/color_utils.cpp') 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 #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 * -- cgit v1.2.3