encapsulated in a QStyle object. This can be changed at runtime
with setStyle().
- \o It specifies how the application is to allocate colors. See
- setColorSpec() for details.
-
\o It provides localization of strings that are visible to the
user via translate().
setStyle().
\row
- \o Color usage
- \o colorSpec(),
- setColorSpec(),
- qwsSetCustomColors().
-
- \row
\o Text handling
\o installTranslator(),
removeTranslator()
*/
/*!
- \enum QApplication::ColorSpec
-
- \value NormalColor the default color allocation policy
- \value CustomColor the same as NormalColor for X11; allocates colors
- to a palette on demand under Windows
- \value ManyColor the right choice for applications that use thousands of
- colors
-
- See setColorSpec() for full details.
-*/
-
-/*!
\fn QWidget *QApplication::topLevelAt(const QPoint &point)
Returns the top-level widget at the given \a point; returns 0 if
#endif
QPointer<QWidget> QApplicationPrivate::leaveAfterRelease = 0;
-int QApplicationPrivate::app_cspec = QApplication::NormalColor;
QPalette *QApplicationPrivate::app_pal = 0; // default application palette
QPalette *QApplicationPrivate::sys_pal = 0; // default system palette
QPalette *QApplicationPrivate::set_pal = 0; // default palette set by programmer
}
/*!
- Returns the color specification.
-
- \sa QApplication::setColorSpec()
-*/
-
-int QApplication::colorSpec()
-{
- return QApplicationPrivate::app_cspec;
-}
-
-/*!
- Sets the color specification for the application to \a spec.
-
- The color specification controls how the application allocates colors when
- run on a display with a limited amount of colors, e.g. 8 bit / 256 color
- displays.
-
- The color specification must be set before you create the QApplication
- object.
-
- The options are:
- \list
- \o QApplication::NormalColor. This is the default color allocation
- strategy. Use this option if your application uses buttons, menus,
- texts and pixmaps with few colors. With this option, the
- application uses system global colors. This works fine for most
- applications under X11, but on the Windows platform, it may cause
- dithering of non-standard colors.
- \o QApplication::CustomColor. Use this option if your application
- needs a small number of custom colors. On X11, this option is the
- same as NormalColor. On Windows, Qt creates a Windows palette, and
- allocates colors to it on demand.
- \o QApplication::ManyColor. Use this option if your application is
- very color hungry, e.g., it requires thousands of colors. \br
- Under X11 the effect is:
- \list
- \o For 256-color displays which have at best a 256 color true
- color visual, the default visual is used, and colors are
- allocated from a color cube. The color cube is the 6x6x6
- (216 color) "Web palette" (the red, green, and blue
- components always have one of the following values: 0x00,
- 0x33, 0x66, 0x99, 0xCC, or 0xFF), but the number of colors
- can be changed by the \e -ncols option. The user can force
- the application to use the true color visual with the
- \l{QApplication::QApplication()}{-visual} option.
- \o For 256-color displays which have a true color visual with
- more than 256 colors, use that visual. Silicon Graphics X
- servers this feature, for example. They provide an 8 bit
- visual by default but can deliver true color when asked.
- \endlist
- On Windows, Qt creates a Windows palette, and fills it with a color
- cube.
- \endlist
-
- Be aware that the CustomColor and ManyColor choices may lead to colormap
- flashing: The foreground application gets (most) of the available colors,
- while the background windows will look less attractive.
-
- Example:
-
- \snippet doc/src/snippets/code/src_gui_kernel_qapplication.cpp 2
-
- \sa colorSpec()
-*/
-
-void QApplication::setColorSpec(int spec)
-{
- if (qApp)
- qWarning("QApplication::setColorSpec: This function must be "
- "called before the QApplication object is created");
- QApplicationPrivate::app_cspec = spec;
-}
-
-/*!
\property QApplication::globalStrut
\brief the minimum size that any GUI element that the user can interact
with should have
#endif // QT_NO_SESSIONMANAGER
/*!
- \typedef QApplication::ColorMode
- \compat
-
- Use ColorSpec instead.
-*/
-
-/*!
\fn Qt::MacintoshVersion QApplication::macVersion()
Use QSysInfo::MacintoshVersion instead.
*/
/*!
- \fn QApplication::ColorMode QApplication::colorMode()
-
- Use colorSpec() instead, and use ColorSpec as the enum type.
-*/
-
-/*!
- \fn void QApplication::setColorMode(ColorMode mode)
-
- Use setColorSpec() instead, and pass a ColorSpec value instead.
-*/
-
-/*!
\fn bool QApplication::hasGlobalMouseTracking()
This feature does not exist anymore. This function always returns true