diff options
author | Gerald Combs <gerald@wireshark.org> | 2013-01-24 01:10:12 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2013-01-24 01:10:12 +0000 |
commit | 2dff8d760594661114615366c7cb51133fec0c10 (patch) | |
tree | d71608abb24be34d21cac0900d64a6ed01142af1 /ui/qt/color_utils.cpp | |
parent | 70755ffa17fc454b4e32c5c586ebbddda0e482e4 (diff) | |
download | wireshark-2dff8d760594661114615366c7cb51133fec0c10.tar.gz |
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
Diffstat (limited to 'ui/qt/color_utils.cpp')
-rw-r--r-- | ui/qt/color_utils.cpp | 14 |
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 * |