mirror of
https://bitbucket.org/smil3y/katie.git
synced 2025-02-23 10:22:55 +00:00
various cleanups
This commit is contained in:
parent
e313571085
commit
ff2683415b
13 changed files with 194 additions and 332 deletions
|
@ -3,7 +3,7 @@
|
||||||
import os, re
|
import os, re
|
||||||
|
|
||||||
cwd = os.path.dirname(__file__)
|
cwd = os.path.dirname(__file__)
|
||||||
regex = re.compile('defined\((QT_NO_[^\)]+)|def (QT_NO_[^\n]+)')
|
regex = re.compile('defined\((QT_NO_[^\)]+)|def (QT_NO_[\w]+)')
|
||||||
lmatches = []
|
lmatches = []
|
||||||
|
|
||||||
for root, subdirs, files in os.walk('%s/../src' % cwd):
|
for root, subdirs, files in os.walk('%s/../src' % cwd):
|
||||||
|
|
|
@ -56,11 +56,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(Q_WS_X11)
|
#if defined(Q_WS_X11)
|
||||||
# include "../kernel/qt_x11_p.h"
|
# include "qt_x11_p.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef SPI_GETSNAPTODEFBUTTON
|
|
||||||
# define SPI_GETSNAPTODEFBUTTON 95
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
|
@ -56,11 +56,6 @@
|
||||||
#include "qdebug.h"
|
#include "qdebug.h"
|
||||||
#include "qguiplatformplugin.h"
|
#include "qguiplatformplugin.h"
|
||||||
#include "qguicommon_p.h"
|
#include "qguicommon_p.h"
|
||||||
|
|
||||||
#ifdef Q_WS_X11
|
|
||||||
#include "qt_x11_p.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "qstylehelper_p.h"
|
#include "qstylehelper_p.h"
|
||||||
|
|
||||||
#ifndef QT_NO_ICON
|
#ifndef QT_NO_ICON
|
||||||
|
|
|
@ -57,10 +57,6 @@
|
||||||
#include <QtCore/QSettings>
|
#include <QtCore/QSettings>
|
||||||
#include <QtGui/QPainter>
|
#include <QtGui/QPainter>
|
||||||
|
|
||||||
#ifdef Q_WS_X11
|
|
||||||
#include <qt_x11_p.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <qstylehelper_p.h>
|
#include <qstylehelper_p.h>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
@ -68,14 +64,7 @@ QT_BEGIN_NAMESPACE
|
||||||
Q_GLOBAL_STATIC(QIconLoader, iconLoaderInstance)
|
Q_GLOBAL_STATIC(QIconLoader, iconLoaderInstance)
|
||||||
|
|
||||||
/* Theme to use in last resort, if the theme does not have the icon, neither the parents */
|
/* Theme to use in last resort, if the theme does not have the icon, neither the parents */
|
||||||
static QString fallbackTheme()
|
static const QString fallbackTheme = QLatin1String("hicolor");
|
||||||
{
|
|
||||||
#ifdef Q_WS_X11
|
|
||||||
return QLatin1String("hicolor");
|
|
||||||
#else
|
|
||||||
return QString();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
QIconLoader::QIconLoader() :
|
QIconLoader::QIconLoader() :
|
||||||
m_themeKey(1), m_supportsSvg(false)
|
m_themeKey(1), m_supportsSvg(false)
|
||||||
|
@ -84,7 +73,7 @@ QIconLoader::QIconLoader() :
|
||||||
|
|
||||||
m_systemTheme = qt_guiPlatformPlugin()->systemIconThemeName();
|
m_systemTheme = qt_guiPlatformPlugin()->systemIconThemeName();
|
||||||
if (m_systemTheme.isEmpty())
|
if (m_systemTheme.isEmpty())
|
||||||
m_systemTheme = fallbackTheme();
|
m_systemTheme = fallbackTheme;
|
||||||
#ifndef QT_NO_LIBRARY
|
#ifndef QT_NO_LIBRARY
|
||||||
if (iconloader()->keys().contains(QLatin1String("svg")))
|
if (iconloader()->keys().contains(QLatin1String("svg")))
|
||||||
m_supportsSvg = true;
|
m_supportsSvg = true;
|
||||||
|
@ -104,7 +93,7 @@ void QIconLoader::updateSystemTheme()
|
||||||
if (m_userTheme.isEmpty()) {
|
if (m_userTheme.isEmpty()) {
|
||||||
QString theme = qt_guiPlatformPlugin()->systemIconThemeName();
|
QString theme = qt_guiPlatformPlugin()->systemIconThemeName();
|
||||||
if (theme.isEmpty())
|
if (theme.isEmpty())
|
||||||
theme = fallbackTheme();
|
theme = fallbackTheme;
|
||||||
if (theme != m_systemTheme) {
|
if (theme != m_systemTheme) {
|
||||||
m_systemTheme = theme;
|
m_systemTheme = theme;
|
||||||
invalidateKey();
|
invalidateKey();
|
||||||
|
@ -199,7 +188,7 @@ QIconTheme::QIconTheme(const QString &themeName)
|
||||||
|
|
||||||
// Ensure a default platform fallback for all themes
|
// Ensure a default platform fallback for all themes
|
||||||
if (m_parents.isEmpty())
|
if (m_parents.isEmpty())
|
||||||
m_parents.append(fallbackTheme());
|
m_parents.append(fallbackTheme);
|
||||||
|
|
||||||
// Ensure that all themes fall back to hicolor
|
// Ensure that all themes fall back to hicolor
|
||||||
if (!m_parents.contains(QLatin1String("hicolor")))
|
if (!m_parents.contains(QLatin1String("hicolor")))
|
||||||
|
@ -224,7 +213,7 @@ QThemeIconEntries QIconLoader::findIconHelper(const QString &themeName,
|
||||||
if (!theme.isValid()) {
|
if (!theme.isValid()) {
|
||||||
theme = QIconTheme(themeName);
|
theme = QIconTheme(themeName);
|
||||||
if (!theme.isValid())
|
if (!theme.isValid())
|
||||||
theme = QIconTheme(fallbackTheme());
|
theme = QIconTheme(fallbackTheme);
|
||||||
|
|
||||||
themeList.insert(themeName, theme);
|
themeList.insert(themeName, theme);
|
||||||
}
|
}
|
||||||
|
|
|
@ -555,10 +555,6 @@ void QApplicationPrivate::process_cmdline()
|
||||||
\o -fn or \c -font \e font, defines the application font. The font
|
\o -fn or \c -font \e font, defines the application font. The font
|
||||||
should be specified using an X logical font description. Note that
|
should be specified using an X logical font description. Note that
|
||||||
this option is ignored when Qt is built with fontconfig support enabled.
|
this option is ignored when Qt is built with fontconfig support enabled.
|
||||||
\o -bg or \c -background \e color, sets the default background color
|
|
||||||
and an application palette (light and dark shades are calculated).
|
|
||||||
\o -fg or \c -foreground \e color, sets the default foreground color.
|
|
||||||
\o -btn or \c -button \e color, sets the default button color.
|
|
||||||
\o -name \e name, sets the application name.
|
\o -name \e name, sets the application name.
|
||||||
\o -title \e title, sets the application title.
|
\o -title \e title, sets the application title.
|
||||||
\o -visual \c TrueColor, forces the application to use a TrueColor
|
\o -visual \c TrueColor, forces the application to use a TrueColor
|
||||||
|
|
|
@ -165,8 +165,6 @@ static const char * x11_atomnames = {
|
||||||
"_QT_SELECTION_SENTINEL\0"
|
"_QT_SELECTION_SENTINEL\0"
|
||||||
"CLIPBOARD_MANAGER\0"
|
"CLIPBOARD_MANAGER\0"
|
||||||
|
|
||||||
"RESOURCE_MANAGER\0"
|
|
||||||
|
|
||||||
"_XSETROOT_ID\0"
|
"_XSETROOT_ID\0"
|
||||||
|
|
||||||
"_QT_SCROLL_DONE\0"
|
"_QT_SCROLL_DONE\0"
|
||||||
|
@ -279,9 +277,6 @@ Q_GUI_EXPORT QX11Data *qt_x11Data = 0;
|
||||||
static const char *appName = 0; // application name
|
static const char *appName = 0; // application name
|
||||||
static const char *appClass = 0; // application class
|
static const char *appClass = 0; // application class
|
||||||
static const char *appFont = 0; // application font
|
static const char *appFont = 0; // application font
|
||||||
static const char *appBGCol = 0; // application bg color
|
|
||||||
static const char *appFGCol = 0; // application fg color
|
|
||||||
static const char *appBTNCol = 0; // application btn color
|
|
||||||
static const char *mwGeometry = 0; // main widget geometry
|
static const char *mwGeometry = 0; // main widget geometry
|
||||||
static const char *mwTitle = 0; // main widget title
|
static const char *mwTitle = 0; // main widget title
|
||||||
static bool appSync = false; // X11 synchronization
|
static bool appSync = false; // X11 synchronization
|
||||||
|
@ -670,6 +665,10 @@ Q_GUI_EXPORT void qt_x11_apply_settings_in_all_apps()
|
||||||
*/
|
*/
|
||||||
bool QApplicationPrivate::x11_apply_settings()
|
bool QApplicationPrivate::x11_apply_settings()
|
||||||
{
|
{
|
||||||
|
if (!QApplication::desktopSettingsAware()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
|
QSettings settings(QSettings::UserScope, QLatin1String("Trolltech"));
|
||||||
|
|
||||||
settings.beginGroup(QLatin1String("Qt"));
|
settings.beginGroup(QLatin1String("Qt"));
|
||||||
|
@ -809,13 +808,9 @@ bool QApplicationPrivate::x11_apply_settings()
|
||||||
if (!qt_x11Data->has_fontconfig) {
|
if (!qt_x11Data->has_fontconfig) {
|
||||||
settings.beginGroup(QLatin1String("Font Substitutions"));
|
settings.beginGroup(QLatin1String("Font Substitutions"));
|
||||||
QStringList fontsubs = settings.childKeys();
|
QStringList fontsubs = settings.childKeys();
|
||||||
if (!fontsubs.isEmpty()) {
|
for (const QString fam: fontsubs) {
|
||||||
QStringList::Iterator it = fontsubs.begin();
|
QStringList subs = settings.value(fam).toStringList();
|
||||||
for (; it != fontsubs.end(); ++it) {
|
QFont::insertSubstitutions(fam, subs);
|
||||||
QString fam = *it;
|
|
||||||
QStringList subs = settings.value(fam).toStringList();
|
|
||||||
QFont::insertSubstitutions(fam, subs);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
}
|
}
|
||||||
|
@ -1259,15 +1254,6 @@ void qt_init(QApplicationPrivate *priv, int,
|
||||||
} else if (arg == "-fn" || arg == "-font") {
|
} else if (arg == "-fn" || arg == "-font") {
|
||||||
if (++i < argc)
|
if (++i < argc)
|
||||||
appFont = argv[i];
|
appFont = argv[i];
|
||||||
} else if (arg == "-bg" || arg == "-background") {
|
|
||||||
if (++i < argc)
|
|
||||||
appBGCol = argv[i];
|
|
||||||
} else if (arg == "-btn" || arg == "-button") {
|
|
||||||
if (++i < argc)
|
|
||||||
appBTNCol = argv[i];
|
|
||||||
} else if (arg == "-fg" || arg == "-foreground") {
|
|
||||||
if (++i < argc)
|
|
||||||
appFGCol = argv[i];
|
|
||||||
} else if (arg == "-name") {
|
} else if (arg == "-name") {
|
||||||
if (++i < argc)
|
if (++i < argc)
|
||||||
appName = argv[i];
|
appName = argv[i];
|
||||||
|
@ -2041,7 +2027,7 @@ void qPRCleanup(QWidget *widget)
|
||||||
QETWidget *etw = static_cast<QETWidget *>(const_cast<QWidget *>(widget));
|
QETWidget *etw = static_cast<QETWidget *>(const_cast<QWidget *>(widget));
|
||||||
if (!(wPRmapper && widget->testAttribute(Qt::WA_WState_Reparented)))
|
if (!(wPRmapper && widget->testAttribute(Qt::WA_WState_Reparented)))
|
||||||
return; // not a reparented widget
|
return; // not a reparented widget
|
||||||
QWidgetMapper::Iterator it = wPRmapper->begin();
|
QWidgetMapper::iterator it = wPRmapper->begin();
|
||||||
while (it != wPRmapper->end()) {
|
while (it != wPRmapper->end()) {
|
||||||
QWidget *w = *it;
|
QWidget *w = *it;
|
||||||
if (w == etw) { // found widget
|
if (w == etw) { // found widget
|
||||||
|
|
|
@ -80,7 +80,6 @@
|
||||||
#define XK_ISO_Left_Tab 0xFE20
|
#define XK_ISO_Left_Tab 0xFE20
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef index
|
#ifdef index
|
||||||
# undef index
|
# undef index
|
||||||
#endif
|
#endif
|
||||||
|
@ -356,8 +355,6 @@ struct QX11Data
|
||||||
_QT_SELECTION_SENTINEL,
|
_QT_SELECTION_SENTINEL,
|
||||||
CLIPBOARD_MANAGER,
|
CLIPBOARD_MANAGER,
|
||||||
|
|
||||||
RESOURCE_MANAGER,
|
|
||||||
|
|
||||||
_XSETROOT_ID,
|
_XSETROOT_ID,
|
||||||
|
|
||||||
_QT_SCROLL_DONE,
|
_QT_SCROLL_DONE,
|
||||||
|
|
|
@ -1,81 +0,0 @@
|
||||||
/****************************************************************************
|
|
||||||
**
|
|
||||||
** Copyright (C) 2015 The Qt Company Ltd.
|
|
||||||
** Contact: http://www.qt.io/licensing/
|
|
||||||
**
|
|
||||||
** This file is part of the QtGui module of the Qt Toolkit.
|
|
||||||
**
|
|
||||||
** $QT_BEGIN_LICENSE:LGPL$
|
|
||||||
** Commercial License Usage
|
|
||||||
** Licensees holding valid commercial Qt licenses may use this file in
|
|
||||||
** accordance with the commercial license agreement provided with the
|
|
||||||
** Software or, alternatively, in accordance with the terms contained in
|
|
||||||
** a written agreement between you and The Qt Company. For licensing terms
|
|
||||||
** and conditions see http://www.qt.io/terms-conditions. For further
|
|
||||||
** information use the contact form at http://www.qt.io/contact-us.
|
|
||||||
**
|
|
||||||
** GNU Lesser General Public License Usage
|
|
||||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
|
||||||
** General Public License version 2.1 or version 3 as published by the Free
|
|
||||||
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
|
|
||||||
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
|
|
||||||
** following information to ensure the GNU Lesser General Public License
|
|
||||||
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
|
|
||||||
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
|
||||||
**
|
|
||||||
** As a special exception, The Qt Company gives you certain additional
|
|
||||||
** rights. These rights are described in The Qt Company LGPL Exception
|
|
||||||
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
|
|
||||||
**
|
|
||||||
** GNU General Public License Usage
|
|
||||||
** Alternatively, this file may be used under the terms of the GNU
|
|
||||||
** General Public License version 3.0 as published by the Free Software
|
|
||||||
** Foundation and appearing in the file LICENSE.GPL included in the
|
|
||||||
** packaging of this file. Please review the following information to
|
|
||||||
** ensure the GNU General Public License version 3.0 requirements will be
|
|
||||||
** met: http://www.gnu.org/copyleft/gpl.html.
|
|
||||||
**
|
|
||||||
** $QT_END_LICENSE$
|
|
||||||
**
|
|
||||||
****************************************************************************/
|
|
||||||
|
|
||||||
#include "qwidget.h"
|
|
||||||
#include "qt_x11_p.h"
|
|
||||||
|
|
||||||
/*
|
|
||||||
Internal Qt functions to create X windows. We have put them in
|
|
||||||
separate functions to allow the programmer to reimplement them by
|
|
||||||
custom versions.
|
|
||||||
*/
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
|
|
||||||
Window qt_XCreateWindow(const QWidget *, Display *display, Window parent,
|
|
||||||
int x, int y, uint w, uint h,
|
|
||||||
int borderwidth, int depth,
|
|
||||||
uint windowclass, Visual *visual,
|
|
||||||
ulong valuemask, XSetWindowAttributes *attributes)
|
|
||||||
{
|
|
||||||
return XCreateWindow(display, parent, x, y, w, h, borderwidth, depth,
|
|
||||||
windowclass, visual, valuemask, attributes);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
Window qt_XCreateSimpleWindow(const QWidget *, Display *display, Window parent,
|
|
||||||
int x, int y, uint w, uint h, int borderwidth,
|
|
||||||
ulong border, ulong background)
|
|
||||||
{
|
|
||||||
return XCreateSimpleWindow(display, parent, x, y, w, h, borderwidth,
|
|
||||||
border, background);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void qt_XDestroyWindow(const QWidget *, Display *display, Window window)
|
|
||||||
{
|
|
||||||
if (window)
|
|
||||||
XDestroyWindow(display, window);
|
|
||||||
}
|
|
||||||
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
|
|
||||||
|
|
|
@ -530,28 +530,7 @@ QString QColor::name() const
|
||||||
\sa QColor(), name(), isValid(), allowX11ColorNames()
|
\sa QColor(), name(), isValid(), allowX11ColorNames()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void QColor::setNamedColor(const QString &name)
|
bool QColor::setNamedColor(const QString &name)
|
||||||
{
|
|
||||||
setColorFromString(name);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
\since 4.7
|
|
||||||
|
|
||||||
Returns true if the \a name is a valid color name and can
|
|
||||||
be used to construct a valid QColor object, otherwise returns
|
|
||||||
false.
|
|
||||||
|
|
||||||
It uses the same algorithm used in setNamedColor().
|
|
||||||
|
|
||||||
\sa setNamedColor()
|
|
||||||
*/
|
|
||||||
bool QColor::isValidColor(const QString &name)
|
|
||||||
{
|
|
||||||
return !name.isEmpty() && QColor().setColorFromString(name);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool QColor::setColorFromString(const QString &name)
|
|
||||||
{
|
{
|
||||||
if (name.isEmpty()) {
|
if (name.isEmpty()) {
|
||||||
invalidate();
|
invalidate();
|
||||||
|
@ -594,6 +573,22 @@ bool QColor::setColorFromString(const QString &name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\since 4.7
|
||||||
|
|
||||||
|
Returns true if the \a name is a valid color name and can
|
||||||
|
be used to construct a valid QColor object, otherwise returns
|
||||||
|
false.
|
||||||
|
|
||||||
|
It uses the same algorithm used in setNamedColor().
|
||||||
|
|
||||||
|
\sa setNamedColor()
|
||||||
|
*/
|
||||||
|
bool QColor::isValidColor(const QString &name)
|
||||||
|
{
|
||||||
|
return !name.isEmpty() && QColor().setNamedColor(name);
|
||||||
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Returns a QStringList containing the color names Qt knows about.
|
Returns a QStringList containing the color names Qt knows about.
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,7 @@ public:
|
||||||
bool isValid() const;
|
bool isValid() const;
|
||||||
|
|
||||||
QString name() const;
|
QString name() const;
|
||||||
void setNamedColor(const QString& name);
|
bool setNamedColor(const QString& name);
|
||||||
|
|
||||||
static QStringList colorNames();
|
static QStringList colorNames();
|
||||||
|
|
||||||
|
@ -198,7 +198,6 @@ public:
|
||||||
static void setAllowX11ColorNames(bool enabled);
|
static void setAllowX11ColorNames(bool enabled);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static bool isValidColor(const QString &name);
|
static bool isValidColor(const QString &name);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -206,7 +205,6 @@ private:
|
||||||
QColor(int, int, int, Spec);
|
QColor(int, int, int, Spec);
|
||||||
|
|
||||||
void invalidate();
|
void invalidate();
|
||||||
bool setColorFromString(const QString &name);
|
|
||||||
|
|
||||||
Spec cspec;
|
Spec cspec;
|
||||||
union {
|
union {
|
||||||
|
|
|
@ -116,170 +116,164 @@ bool qt_get_hex_rgb(const QChar *str, int len, QRgb *rgb)
|
||||||
/*
|
/*
|
||||||
CSS color names = SVG 1.0 color names + transparent (rgba(0,0,0,0))
|
CSS color names = SVG 1.0 color names + transparent (rgba(0,0,0,0))
|
||||||
*/
|
*/
|
||||||
|
#define RGBCOLOR(r,g,b) (0xff000000 | (r << 16) | (g << 8) | b)
|
||||||
#ifdef rgb
|
|
||||||
# undef rgb
|
|
||||||
#endif
|
|
||||||
#define rgb(r,g,b) (0xff000000 | (r << 16) | (g << 8) | b)
|
|
||||||
|
|
||||||
static const struct RGBData {
|
static const struct RGBData {
|
||||||
const char *name;
|
const char *name;
|
||||||
uint value;
|
uint value;
|
||||||
} rgbTbl[] = {
|
} rgbTbl[] = {
|
||||||
{ "aliceblue", rgb(240, 248, 255) },
|
{ "aliceblue", RGBCOLOR(240, 248, 255) },
|
||||||
{ "antiquewhite", rgb(250, 235, 215) },
|
{ "antiquewhite", RGBCOLOR(250, 235, 215) },
|
||||||
{ "aqua", rgb( 0, 255, 255) },
|
{ "aqua", RGBCOLOR( 0, 255, 255) },
|
||||||
{ "aquamarine", rgb(127, 255, 212) },
|
{ "aquamarine", RGBCOLOR(127, 255, 212) },
|
||||||
{ "azure", rgb(240, 255, 255) },
|
{ "azure", RGBCOLOR(240, 255, 255) },
|
||||||
{ "beige", rgb(245, 245, 220) },
|
{ "beige", RGBCOLOR(245, 245, 220) },
|
||||||
{ "bisque", rgb(255, 228, 196) },
|
{ "bisque", RGBCOLOR(255, 228, 196) },
|
||||||
{ "black", rgb( 0, 0, 0) },
|
{ "black", RGBCOLOR(0, 0, 0) },
|
||||||
{ "blanchedalmond", rgb(255, 235, 205) },
|
{ "blanchedalmond", RGBCOLOR(255, 235, 205) },
|
||||||
{ "blue", rgb( 0, 0, 255) },
|
{ "blue", RGBCOLOR(0, 0, 255) },
|
||||||
{ "blueviolet", rgb(138, 43, 226) },
|
{ "blueviolet", RGBCOLOR(138, 43, 226) },
|
||||||
{ "brown", rgb(165, 42, 42) },
|
{ "brown", RGBCOLOR(165, 42, 42) },
|
||||||
{ "burlywood", rgb(222, 184, 135) },
|
{ "burlywood", RGBCOLOR(222, 184, 135) },
|
||||||
{ "cadetblue", rgb( 95, 158, 160) },
|
{ "cadetblue", RGBCOLOR( 95, 158, 160) },
|
||||||
{ "chartreuse", rgb(127, 255, 0) },
|
{ "chartreuse", RGBCOLOR(127, 255, 0) },
|
||||||
{ "chocolate", rgb(210, 105, 30) },
|
{ "chocolate", RGBCOLOR(210, 105, 30) },
|
||||||
{ "coral", rgb(255, 127, 80) },
|
{ "coral", RGBCOLOR(255, 127, 80) },
|
||||||
{ "cornflowerblue", rgb(100, 149, 237) },
|
{ "cornflowerblue", RGBCOLOR(100, 149, 237) },
|
||||||
{ "cornsilk", rgb(255, 248, 220) },
|
{ "cornsilk", RGBCOLOR(255, 248, 220) },
|
||||||
{ "crimson", rgb(220, 20, 60) },
|
{ "crimson", RGBCOLOR(220, 20, 60) },
|
||||||
{ "cyan", rgb( 0, 255, 255) },
|
{ "cyan", RGBCOLOR(0, 255, 255) },
|
||||||
{ "darkblue", rgb( 0, 0, 139) },
|
{ "darkblue", RGBCOLOR(0, 0, 139) },
|
||||||
{ "darkcyan", rgb( 0, 139, 139) },
|
{ "darkcyan", RGBCOLOR(0, 139, 139) },
|
||||||
{ "darkgoldenrod", rgb(184, 134, 11) },
|
{ "darkgoldenrod", RGBCOLOR(184, 134, 11) },
|
||||||
{ "darkgray", rgb(169, 169, 169) },
|
{ "darkgray", RGBCOLOR(169, 169, 169) },
|
||||||
{ "darkgreen", rgb( 0, 100, 0) },
|
{ "darkgreen", RGBCOLOR(0, 100, 0) },
|
||||||
{ "darkgrey", rgb(169, 169, 169) },
|
{ "darkgrey", RGBCOLOR(169, 169, 169) },
|
||||||
{ "darkkhaki", rgb(189, 183, 107) },
|
{ "darkkhaki", RGBCOLOR(189, 183, 107) },
|
||||||
{ "darkmagenta", rgb(139, 0, 139) },
|
{ "darkmagenta", RGBCOLOR(139, 0, 139) },
|
||||||
{ "darkolivegreen", rgb( 85, 107, 47) },
|
{ "darkolivegreen", RGBCOLOR( 85, 107, 47) },
|
||||||
{ "darkorange", rgb(255, 140, 0) },
|
{ "darkorange", RGBCOLOR(255, 140, 0) },
|
||||||
{ "darkorchid", rgb(153, 50, 204) },
|
{ "darkorchid", RGBCOLOR(153, 50, 204) },
|
||||||
{ "darkred", rgb(139, 0, 0) },
|
{ "darkred", RGBCOLOR(139, 0, 0) },
|
||||||
{ "darksalmon", rgb(233, 150, 122) },
|
{ "darksalmon", RGBCOLOR(233, 150, 122) },
|
||||||
{ "darkseagreen", rgb(143, 188, 143) },
|
{ "darkseagreen", RGBCOLOR(143, 188, 143) },
|
||||||
{ "darkslateblue", rgb( 72, 61, 139) },
|
{ "darkslateblue", RGBCOLOR(72, 61, 139) },
|
||||||
{ "darkslategray", rgb( 47, 79, 79) },
|
{ "darkslategray", RGBCOLOR(47, 79, 79) },
|
||||||
{ "darkslategrey", rgb( 47, 79, 79) },
|
{ "darkslategrey", RGBCOLOR(47, 79, 79) },
|
||||||
{ "darkturquoise", rgb( 0, 206, 209) },
|
{ "darkturquoise", RGBCOLOR(0, 206, 209) },
|
||||||
{ "darkviolet", rgb(148, 0, 211) },
|
{ "darkviolet", RGBCOLOR(148, 0, 211) },
|
||||||
{ "deeppink", rgb(255, 20, 147) },
|
{ "deeppink", RGBCOLOR(255, 20, 147) },
|
||||||
{ "deepskyblue", rgb( 0, 191, 255) },
|
{ "deepskyblue", RGBCOLOR( 0, 191, 255) },
|
||||||
{ "dimgray", rgb(105, 105, 105) },
|
{ "dimgray", RGBCOLOR(105, 105, 105) },
|
||||||
{ "dimgrey", rgb(105, 105, 105) },
|
{ "dimgrey", RGBCOLOR(105, 105, 105) },
|
||||||
{ "dodgerblue", rgb( 30, 144, 255) },
|
{ "dodgerblue", RGBCOLOR( 30, 144, 255) },
|
||||||
{ "firebrick", rgb(178, 34, 34) },
|
{ "firebrick", RGBCOLOR(178, 34, 34) },
|
||||||
{ "floralwhite", rgb(255, 250, 240) },
|
{ "floralwhite", RGBCOLOR(255, 250, 240) },
|
||||||
{ "forestgreen", rgb( 34, 139, 34) },
|
{ "forestgreen", RGBCOLOR(34, 139, 34) },
|
||||||
{ "fuchsia", rgb(255, 0, 255) },
|
{ "fuchsia", RGBCOLOR(255, 0, 255) },
|
||||||
{ "gainsboro", rgb(220, 220, 220) },
|
{ "gainsboro", RGBCOLOR(220, 220, 220) },
|
||||||
{ "ghostwhite", rgb(248, 248, 255) },
|
{ "ghostwhite", RGBCOLOR(248, 248, 255) },
|
||||||
{ "gold", rgb(255, 215, 0) },
|
{ "gold", RGBCOLOR(255, 215, 0) },
|
||||||
{ "goldenrod", rgb(218, 165, 32) },
|
{ "goldenrod", RGBCOLOR(218, 165, 32) },
|
||||||
{ "gray", rgb(128, 128, 128) },
|
{ "gray", RGBCOLOR(128, 128, 128) },
|
||||||
{ "green", rgb( 0, 128, 0) },
|
{ "green", RGBCOLOR(0, 128, 0) },
|
||||||
{ "greenyellow", rgb(173, 255, 47) },
|
{ "greenyellow", RGBCOLOR(173, 255, 47) },
|
||||||
{ "grey", rgb(128, 128, 128) },
|
{ "grey", RGBCOLOR(128, 128, 128) },
|
||||||
{ "honeydew", rgb(240, 255, 240) },
|
{ "honeydew", RGBCOLOR(240, 255, 240) },
|
||||||
{ "hotpink", rgb(255, 105, 180) },
|
{ "hotpink", RGBCOLOR(255, 105, 180) },
|
||||||
{ "indianred", rgb(205, 92, 92) },
|
{ "indianred", RGBCOLOR(205, 92, 92) },
|
||||||
{ "indigo", rgb( 75, 0, 130) },
|
{ "indigo", RGBCOLOR(75, 0, 130) },
|
||||||
{ "ivory", rgb(255, 255, 240) },
|
{ "ivory", RGBCOLOR(255, 255, 240) },
|
||||||
{ "khaki", rgb(240, 230, 140) },
|
{ "khaki", RGBCOLOR(240, 230, 140) },
|
||||||
{ "lavender", rgb(230, 230, 250) },
|
{ "lavender", RGBCOLOR(230, 230, 250) },
|
||||||
{ "lavenderblush", rgb(255, 240, 245) },
|
{ "lavenderblush", RGBCOLOR(255, 240, 245) },
|
||||||
{ "lawngreen", rgb(124, 252, 0) },
|
{ "lawngreen", RGBCOLOR(124, 252, 0) },
|
||||||
{ "lemonchiffon", rgb(255, 250, 205) },
|
{ "lemonchiffon", RGBCOLOR(255, 250, 205) },
|
||||||
{ "lightblue", rgb(173, 216, 230) },
|
{ "lightblue", RGBCOLOR(173, 216, 230) },
|
||||||
{ "lightcoral", rgb(240, 128, 128) },
|
{ "lightcoral", RGBCOLOR(240, 128, 128) },
|
||||||
{ "lightcyan", rgb(224, 255, 255) },
|
{ "lightcyan", RGBCOLOR(224, 255, 255) },
|
||||||
{ "lightgoldenrodyellow", rgb(250, 250, 210) },
|
{ "lightgoldenrodyellow", RGBCOLOR(250, 250, 210) },
|
||||||
{ "lightgray", rgb(211, 211, 211) },
|
{ "lightgray", RGBCOLOR(211, 211, 211) },
|
||||||
{ "lightgreen", rgb(144, 238, 144) },
|
{ "lightgreen", RGBCOLOR(144, 238, 144) },
|
||||||
{ "lightgrey", rgb(211, 211, 211) },
|
{ "lightgrey", RGBCOLOR(211, 211, 211) },
|
||||||
{ "lightpink", rgb(255, 182, 193) },
|
{ "lightpink", RGBCOLOR(255, 182, 193) },
|
||||||
{ "lightsalmon", rgb(255, 160, 122) },
|
{ "lightsalmon", RGBCOLOR(255, 160, 122) },
|
||||||
{ "lightseagreen", rgb( 32, 178, 170) },
|
{ "lightseagreen", RGBCOLOR( 32, 178, 170) },
|
||||||
{ "lightskyblue", rgb(135, 206, 250) },
|
{ "lightskyblue", RGBCOLOR(135, 206, 250) },
|
||||||
{ "lightslategray", rgb(119, 136, 153) },
|
{ "lightslategray", RGBCOLOR(119, 136, 153) },
|
||||||
{ "lightslategrey", rgb(119, 136, 153) },
|
{ "lightslategrey", RGBCOLOR(119, 136, 153) },
|
||||||
{ "lightsteelblue", rgb(176, 196, 222) },
|
{ "lightsteelblue", RGBCOLOR(176, 196, 222) },
|
||||||
{ "lightyellow", rgb(255, 255, 224) },
|
{ "lightyellow", RGBCOLOR(255, 255, 224) },
|
||||||
{ "lime", rgb( 0, 255, 0) },
|
{ "lime", RGBCOLOR(0, 255, 0) },
|
||||||
{ "limegreen", rgb( 50, 205, 50) },
|
{ "limegreen", RGBCOLOR(50, 205, 50) },
|
||||||
{ "linen", rgb(250, 240, 230) },
|
{ "linen", RGBCOLOR(250, 240, 230) },
|
||||||
{ "magenta", rgb(255, 0, 255) },
|
{ "magenta", RGBCOLOR(255, 0, 255) },
|
||||||
{ "maroon", rgb(128, 0, 0) },
|
{ "maroon", RGBCOLOR(128, 0, 0) },
|
||||||
{ "mediumaquamarine", rgb(102, 205, 170) },
|
{ "mediumaquamarine", RGBCOLOR(102, 205, 170) },
|
||||||
{ "mediumblue", rgb( 0, 0, 205) },
|
{ "mediumblue", RGBCOLOR(0, 0, 205) },
|
||||||
{ "mediumorchid", rgb(186, 85, 211) },
|
{ "mediumorchid", RGBCOLOR(186, 85, 211) },
|
||||||
{ "mediumpurple", rgb(147, 112, 219) },
|
{ "mediumpurple", RGBCOLOR(147, 112, 219) },
|
||||||
{ "mediumseagreen", rgb( 60, 179, 113) },
|
{ "mediumseagreen", RGBCOLOR( 60, 179, 113) },
|
||||||
{ "mediumslateblue", rgb(123, 104, 238) },
|
{ "mediumslateblue", RGBCOLOR(123, 104, 238) },
|
||||||
{ "mediumspringgreen", rgb( 0, 250, 154) },
|
{ "mediumspringgreen", RGBCOLOR(0, 250, 154) },
|
||||||
{ "mediumturquoise", rgb( 72, 209, 204) },
|
{ "mediumturquoise", RGBCOLOR(72, 209, 204) },
|
||||||
{ "mediumvioletred", rgb(199, 21, 133) },
|
{ "mediumvioletred", RGBCOLOR(199, 21, 133) },
|
||||||
{ "midnightblue", rgb( 25, 25, 112) },
|
{ "midnightblue", RGBCOLOR(25, 25, 112) },
|
||||||
{ "mintcream", rgb(245, 255, 250) },
|
{ "mintcream", RGBCOLOR(245, 255, 250) },
|
||||||
{ "mistyrose", rgb(255, 228, 225) },
|
{ "mistyrose", RGBCOLOR(255, 228, 225) },
|
||||||
{ "moccasin", rgb(255, 228, 181) },
|
{ "moccasin", RGBCOLOR(255, 228, 181) },
|
||||||
{ "navajowhite", rgb(255, 222, 173) },
|
{ "navajowhite", RGBCOLOR(255, 222, 173) },
|
||||||
{ "navy", rgb( 0, 0, 128) },
|
{ "navy", RGBCOLOR(0, 0, 128) },
|
||||||
{ "oldlace", rgb(253, 245, 230) },
|
{ "oldlace", RGBCOLOR(253, 245, 230) },
|
||||||
{ "olive", rgb(128, 128, 0) },
|
{ "olive", RGBCOLOR(128, 128, 0) },
|
||||||
{ "olivedrab", rgb(107, 142, 35) },
|
{ "olivedrab", RGBCOLOR(107, 142, 35) },
|
||||||
{ "orange", rgb(255, 165, 0) },
|
{ "orange", RGBCOLOR(255, 165, 0) },
|
||||||
{ "orangered", rgb(255, 69, 0) },
|
{ "orangered", RGBCOLOR(255, 69, 0) },
|
||||||
{ "orchid", rgb(218, 112, 214) },
|
{ "orchid", RGBCOLOR(218, 112, 214) },
|
||||||
{ "palegoldenrod", rgb(238, 232, 170) },
|
{ "palegoldenrod", RGBCOLOR(238, 232, 170) },
|
||||||
{ "palegreen", rgb(152, 251, 152) },
|
{ "palegreen", RGBCOLOR(152, 251, 152) },
|
||||||
{ "paleturquoise", rgb(175, 238, 238) },
|
{ "paleturquoise", RGBCOLOR(175, 238, 238) },
|
||||||
{ "palevioletred", rgb(219, 112, 147) },
|
{ "palevioletred", RGBCOLOR(219, 112, 147) },
|
||||||
{ "papayawhip", rgb(255, 239, 213) },
|
{ "papayawhip", RGBCOLOR(255, 239, 213) },
|
||||||
{ "peachpuff", rgb(255, 218, 185) },
|
{ "peachpuff", RGBCOLOR(255, 218, 185) },
|
||||||
{ "peru", rgb(205, 133, 63) },
|
{ "peru", RGBCOLOR(205, 133, 63) },
|
||||||
{ "pink", rgb(255, 192, 203) },
|
{ "pink", RGBCOLOR(255, 192, 203) },
|
||||||
{ "plum", rgb(221, 160, 221) },
|
{ "plum", RGBCOLOR(221, 160, 221) },
|
||||||
{ "powderblue", rgb(176, 224, 230) },
|
{ "powderblue", RGBCOLOR(176, 224, 230) },
|
||||||
{ "purple", rgb(128, 0, 128) },
|
{ "purple", RGBCOLOR(128, 0, 128) },
|
||||||
{ "red", rgb(255, 0, 0) },
|
{ "red", RGBCOLOR(255, 0, 0) },
|
||||||
{ "rosybrown", rgb(188, 143, 143) },
|
{ "rosybrown", RGBCOLOR(188, 143, 143) },
|
||||||
{ "royalblue", rgb( 65, 105, 225) },
|
{ "royalblue", RGBCOLOR(65, 105, 225) },
|
||||||
{ "saddlebrown", rgb(139, 69, 19) },
|
{ "saddlebrown", RGBCOLOR(139, 69, 19) },
|
||||||
{ "salmon", rgb(250, 128, 114) },
|
{ "salmon", RGBCOLOR(250, 128, 114) },
|
||||||
{ "sandybrown", rgb(244, 164, 96) },
|
{ "sandybrown", RGBCOLOR(244, 164, 96) },
|
||||||
{ "seagreen", rgb( 46, 139, 87) },
|
{ "seagreen", RGBCOLOR(46, 139, 87) },
|
||||||
{ "seashell", rgb(255, 245, 238) },
|
{ "seashell", RGBCOLOR(255, 245, 238) },
|
||||||
{ "sienna", rgb(160, 82, 45) },
|
{ "sienna", RGBCOLOR(160, 82, 45) },
|
||||||
{ "silver", rgb(192, 192, 192) },
|
{ "silver", RGBCOLOR(192, 192, 192) },
|
||||||
{ "skyblue", rgb(135, 206, 235) },
|
{ "skyblue", RGBCOLOR(135, 206, 235) },
|
||||||
{ "slateblue", rgb(106, 90, 205) },
|
{ "slateblue", RGBCOLOR(106, 90, 205) },
|
||||||
{ "slategray", rgb(112, 128, 144) },
|
{ "slategray", RGBCOLOR(112, 128, 144) },
|
||||||
{ "slategrey", rgb(112, 128, 144) },
|
{ "slategrey", RGBCOLOR(112, 128, 144) },
|
||||||
{ "snow", rgb(255, 250, 250) },
|
{ "snow", RGBCOLOR(255, 250, 250) },
|
||||||
{ "springgreen", rgb( 0, 255, 127) },
|
{ "springgreen", RGBCOLOR( 0, 255, 127) },
|
||||||
{ "steelblue", rgb( 70, 130, 180) },
|
{ "steelblue", RGBCOLOR(70, 130, 180) },
|
||||||
{ "tan", rgb(210, 180, 140) },
|
{ "tan", RGBCOLOR(210, 180, 140) },
|
||||||
{ "teal", rgb( 0, 128, 128) },
|
{ "teal", RGBCOLOR(0, 128, 128) },
|
||||||
{ "thistle", rgb(216, 191, 216) },
|
{ "thistle", RGBCOLOR(216, 191, 216) },
|
||||||
{ "tomato", rgb(255, 99, 71) },
|
{ "tomato", RGBCOLOR(255, 99, 71) },
|
||||||
{ "transparent", 0 },
|
{ "transparent", 0 },
|
||||||
{ "turquoise", rgb( 64, 224, 208) },
|
{ "turquoise", RGBCOLOR(64, 224, 208) },
|
||||||
{ "violet", rgb(238, 130, 238) },
|
{ "violet", RGBCOLOR(238, 130, 238) },
|
||||||
{ "wheat", rgb(245, 222, 179) },
|
{ "wheat", RGBCOLOR(245, 222, 179) },
|
||||||
{ "white", rgb(255, 255, 255) },
|
{ "white", RGBCOLOR(255, 255, 255) },
|
||||||
{ "whitesmoke", rgb(245, 245, 245) },
|
{ "whitesmoke", RGBCOLOR(245, 245, 245) },
|
||||||
{ "yellow", rgb(255, 255, 0) },
|
{ "yellow", RGBCOLOR(255, 255, 0) },
|
||||||
{ "yellowgreen", rgb(154, 205, 50) }
|
{ "yellowgreen", RGBCOLOR(154, 205, 50) }
|
||||||
};
|
};
|
||||||
|
#undef RGBCOLOR
|
||||||
|
|
||||||
static const int rgbTblSize = sizeof(rgbTbl) / sizeof(RGBData);
|
static const int rgbTblSize = sizeof(rgbTbl) / sizeof(RGBData);
|
||||||
|
|
||||||
#undef rgb
|
|
||||||
|
|
||||||
inline bool operator<(const char *name, const RGBData &data)
|
inline bool operator<(const char *name, const RGBData &data)
|
||||||
{ return qstrcmp(name, data.name) < 0; }
|
{ return qstrcmp(name, data.name) < 0; }
|
||||||
inline bool operator<(const RGBData &data, const char *name)
|
inline bool operator<(const RGBData &data, const char *name)
|
||||||
|
|
|
@ -62,12 +62,11 @@
|
||||||
#include <qabstractitemmodel_p.h>
|
#include <qabstractitemmodel_p.h>
|
||||||
#include <qabstractscrollarea_p.h>
|
#include <qabstractscrollarea_p.h>
|
||||||
#include <qdebug.h>
|
#include <qdebug.h>
|
||||||
#ifdef Q_WS_X11
|
|
||||||
#include <qt_x11_p.h>
|
|
||||||
#endif
|
|
||||||
#ifndef QT_NO_EFFECTS
|
#ifndef QT_NO_EFFECTS
|
||||||
# include <qeffects_p.h>
|
# include <qeffects_p.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef QT_NO_ACCESSIBILITY
|
#ifndef QT_NO_ACCESSIBILITY
|
||||||
#include "qaccessible.h"
|
#include "qaccessible.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -51,16 +51,6 @@
|
||||||
#include "qpainter.h"
|
#include "qpainter.h"
|
||||||
#include "qapplication.h"
|
#include "qapplication.h"
|
||||||
#include "qdesktopwidget.h"
|
#include "qdesktopwidget.h"
|
||||||
#ifndef QT_NO_ACCESSIBILITY
|
|
||||||
# include "qaccessible.h"
|
|
||||||
#endif
|
|
||||||
#ifndef QT_NO_EFFECTS
|
|
||||||
# include <qeffects_p.h>
|
|
||||||
#endif
|
|
||||||
#ifndef QT_NO_WHATSTHIS
|
|
||||||
# include <qwhatsthis.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "qmenu_p.h"
|
#include "qmenu_p.h"
|
||||||
#include "qmenubar_p.h"
|
#include "qmenubar_p.h"
|
||||||
#include "qwidgetaction.h"
|
#include "qwidgetaction.h"
|
||||||
|
@ -69,8 +59,16 @@
|
||||||
#include <qpushbutton_p.h>
|
#include <qpushbutton_p.h>
|
||||||
#include <qaction_p.h>
|
#include <qaction_p.h>
|
||||||
|
|
||||||
#ifdef Q_WS_X11
|
#ifndef QT_NO_ACCESSIBILITY
|
||||||
# include <qt_x11_p.h>
|
# include "qaccessible.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef QT_NO_EFFECTS
|
||||||
|
# include <qeffects_p.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef QT_NO_WHATSTHIS
|
||||||
|
# include <qwhatsthis.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue