/*! Constructs a color group. You can pass either brushes, pixmaps or plain colors for \a foreground, \a button, \a light, \a dark, \a mid, \a text, \a bright_text, \a base and \a background. \sa QBrush */ QColorGroup::QColorGroup( const QBrush &foreground, const QBrush &button, const QBrush &light, const QBrush &dark, const QBrush &mid, const QBrush &text, const QBrush &bright_text, const QBrush &base, const QBrush &background) { d = new QColorGroupPrivate; br = d->br; br[Foreground] = foreground; br[Button] = button; br[Light] = light; br[Dark] = dark; br[Mid] = mid; br[Text] = text; br[BrightText] = bright_text; br[ButtonText] = text; br[Base] = base; br[Background] = background; br[Midlight] = qt_mix_colors( br[Button].color(), br[Light].color() ); br[Shadow] = Qt::black; br[Highlight] = Qt::darkBlue; br[HighlightedText] = Qt::white; br[Link] = Qt::blue; br[LinkVisited] = Qt::magenta; }
QColorGroup::QColorGroup( const QColor &foreground, const QColor &background, const QColor &light, const QColor &dark, const QColor &mid, const QColor &text, const QColor &base ) { br = new QBrush[(uint)NColorRoles]; br[Foreground] = QBrush(foreground); br[Button] = QBrush(background); br[Light] = QBrush(light); br[Dark] = QBrush(dark); br[Mid] = QBrush(mid); br[Text] = QBrush(text); br[BrightText] = br[Light]; br[ButtonText] = br[Text]; br[Base] = QBrush(base); br[Background] = QBrush(background); br[Midlight] = qt_mix_colors( br[Button].color(), br[Light].color() ); br[Shadow] = Qt::black; br[Highlight] = Qt::darkBlue; br[HighlightedText] = Qt::white; }
/*! Constructs a color group. You can pass either brushes, pixmaps or plain colors for each parameter. This constructor can be very handy sometimes, but don't overuse it: Such long lists of arguments are rather error-prone. \sa QBrush */ QColorGroup::QColorGroup( const QBrush &foreground, const QBrush &button, const QBrush &light, const QBrush &dark, const QBrush &mid, const QBrush &text, const QBrush &bright_text, const QBrush &base, const QBrush &background) { br = new QBrush[(uint)NColorRoles]; br[Foreground] = foreground; br[Button] = button; br[Light] = light; br[Dark] = dark; br[Mid] = mid; br[Text] = text; br[BrightText] = bright_text; br[ButtonText] = text; br[Base] = base; br[Background] = background; br[Midlight] = qt_mix_colors( br[Button].color(), br[Light].color() ); br[Shadow] = Qt::black; br[Highlight] = Qt::darkBlue; br[HighlightedText] = Qt::white; }
QColorGroup::QColorGroup( const QColor &foreground, const QColor &background, const QColor &light, const QColor &dark, const QColor &mid, const QColor &text, const QColor &base ) { d = new QColorGroupPrivate; br = d->br; br[Foreground] = QBrush(foreground); br[Button] = QBrush(background); br[Light] = QBrush(light); br[Dark] = QBrush(dark); br[Mid] = QBrush(mid); br[Text] = QBrush(text); br[BrightText] = br[Light]; br[ButtonText] = br[Text]; br[Base] = QBrush(base); br[Background] = QBrush(background); br[Midlight] = qt_mix_colors( br[Button].color(), br[Light].color() ); br[Shadow] = Qt::black; br[Highlight] = Qt::darkBlue; br[HighlightedText] = Qt::white; br[Link] = Qt::blue; br[LinkVisited] = Qt::magenta; }