亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? qmotifplusstyle.cpp

?? qtopia-phone-2.2.0下公共的控件實現源代碼。
?? CPP
?? 第 1 頁 / 共 3 頁
字號:
/****************************************************************************** $Id: qt/src/widgets/qmotifplusstyle.cpp   2.3.12   edited 2005-10-27 $**** Implementation of QMotifPlusStyle class**** Created : 2000.07.27**** Copyright (C) 2000 Trolltech AS.  All rights reserved.**** This file is part of the widgets module of the Qt GUI Toolkit.**** This file may be distributed under the terms of the Q Public License** as defined by Trolltech AS of Norway and appearing in the file** LICENSE.QPL included in the packaging of this file.**** This file may be distributed and/or modified under the terms of the** GNU General Public License version 2 as published by the Free Software** Foundation and appearing in the file LICENSE.GPL included in the** packaging of this file.**** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition** licenses may use this file in accordance with the Qt Commercial License** Agreement provided with the Software.**** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.**** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for**   information about Qt Commercial License Agreements.** See http://www.trolltech.com/qpl/ for QPL licensing information.** See http://www.trolltech.com/gpl/ for GPL licensing information.**** Contact info@trolltech.com if any conditions of this licensing are** not clear to you.************************************************************************/#include "qmotifplusstyle.h"#ifndef QT_NO_STYLE_MOTIFPLUS#define INCLUDE_MENUITEM_DEF#include <qapplication.h>#include <qpainter.h>#include <qpalette.h>#include <qframe.h>#include <qpushbutton.h>#include <qmenubar.h>#include <qdrawutil.h>#include <qscrollbar.h>#include <qtabbar.h>#include <qguardedptr.h>#include <qlayout.h>typedef void (QStyle::*QDrawMenuBarItemImpl) (QPainter *, int, int, int, int, QMenuItem *,					      QColorGroup &, bool, bool);QDrawMenuBarItemImpl qt_set_draw_menu_bar_impl(QDrawMenuBarItemImpl impl);struct QMotifPlusStylePrivate{    QMotifPlusStylePrivate()	: hoverWidget(0), hovering(FALSE), sliderActive(FALSE),	  scrollbarElement(0), ref(1), hoverPalette(0)    { ; }    QGuardedPtr<QWidget> hoverWidget;    QPalette oldpalette, prelight_palette;    bool hovering, sliderActive;    int scrollbarElement, ref;    QPoint mousePos;    QPalette *hoverPalette;};static QMotifPlusStylePrivate *d = 0;/*!  \class QMotifPlusStyle qmotifplusstyle.h  \brief More sophisticated Motif-ish look and feel  \ingroup appearance This class implements a Motif-ish look and feel with more sophisticated bevelling as used by the GIMP Toolkit (GTK+) for Unix/X11. *//*!  Constructs a QMotifPlusStyle  If \a hoveringHighlight is FALSE (default value), then the style will not  highlight push buttons, checkboxes, radiobuttons, comboboxes, scrollbars  and sliders. */QMotifPlusStyle::QMotifPlusStyle(bool hoveringHighlight) : QMotifStyle(TRUE){    if (! d) {	d = new QMotifPlusStylePrivate;    } else {	d->ref++;    }    setScrollBarExtent(15, 15);    setButtonDefaultIndicatorWidth(5);    setSliderThickness(15);    setButtonMargin(2);    useHoveringHighlight = hoveringHighlight;}/*!  Destructs the style. */QMotifPlusStyle::~QMotifPlusStyle(){    if (d && d->ref == 0) {	delete d;	d = 0;    }}/*!  \reimp*/void QMotifPlusStyle::polish(QPalette &pal){    d->oldpalette = pal;    QColor bg = pal.color(QPalette::Active, QColorGroup::Background);    if (bg.red()   == 0xc0 &&	bg.green() == 0xc0 &&	bg.blue()  == 0xc0) {	// assume default palette... no -bg arg or color read from RESOURCE_MANAGER	QColor gtkdf(0x75, 0x75, 0x75);	QColor gtksf(0xff, 0xff, 0xff);	QColor gtkbg(0xd6, 0xd6, 0xd6);	QColor gtksl(0x00, 0x00, 0x9c);	pal.setColor(QPalette::Active, QColorGroup::Background, gtkbg);	pal.setColor(QPalette::Inactive, QColorGroup::Background, gtkbg);	pal.setColor(QPalette::Disabled, QColorGroup::Background, gtkbg);	pal.setColor(QPalette::Active, QColorGroup::Button, gtkbg);	pal.setColor(QPalette::Inactive, QColorGroup::Button, gtkbg);	pal.setColor(QPalette::Disabled, QColorGroup::Button, gtkbg);	pal.setColor(QPalette::Active, QColorGroup::Highlight, gtksl);	pal.setColor(QPalette::Inactive, QColorGroup::Highlight, gtksl);	pal.setColor(QPalette::Disabled, QColorGroup::Highlight, gtksl);	pal.setColor(QPalette::Active, QColorGroup::HighlightedText, gtksf);	pal.setColor(QPalette::Inactive, QColorGroup::HighlightedText, gtksf);	pal.setColor(QPalette::Disabled, QColorGroup::HighlightedText, gtkdf);    }    {	QColorGroup active(pal.color(QPalette::Active,				     QColorGroup::Foreground),           // foreground			   pal.color(QPalette::Active,				     QColorGroup::Button),               // button			   pal.color(QPalette::Active,				     QColorGroup::Background).light(),   // light			   pal.color(QPalette::Active,				     QColorGroup::Background).dark(142), // dark			   pal.color(QPalette::Active,				     QColorGroup::Background).dark(110), // mid			   pal.color(QPalette::Active,				     QColorGroup::Text),                 // text			   pal.color(QPalette::Active,				     QColorGroup::BrightText),           // bright text			   pal.color(QPalette::Active,				     QColorGroup::Base),                 // base			   pal.color(QPalette::Active,				     QColorGroup::Background)),          // background	    disabled(pal.color(QPalette::Disabled,			       QColorGroup::Foreground),                 // foreground		     pal.color(QPalette::Disabled,			       QColorGroup::Button),                     // button		     pal.color(QPalette::Disabled,			       QColorGroup::Background).light(),         // light		     pal.color(QPalette::Disabled,			       QColorGroup::Background).dark(156),       // dark		     pal.color(QPalette::Disabled,			       QColorGroup::Background).dark(110),       // mid		     pal.color(QPalette::Disabled,			       QColorGroup::Text),                       // text		     pal.color(QPalette::Disabled,			       QColorGroup::BrightText),                 // bright text		     pal.color(QPalette::Disabled,			       QColorGroup::Base),                       // base		     pal.color(QPalette::Disabled,			       QColorGroup::Background));                // background	active.setColor(QColorGroup::Highlight,			pal.color(QPalette::Active, QColorGroup::Highlight));	disabled.setColor(QColorGroup::Highlight,			  pal.color(QPalette::Disabled, QColorGroup::Highlight));	active.setColor(QColorGroup::HighlightedText,			pal.color(QPalette::Active, QColorGroup::HighlightedText));	disabled.setColor(QColorGroup::HighlightedText,			  pal.color(QPalette::Disabled, QColorGroup::HighlightedText));	pal.setActive(active);	pal.setInactive(active);	pal.setDisabled(disabled);    }    {	QColor prelight;	if ( (bg.red() + bg.green() + bg.blue()) / 3 > 128)	    prelight = pal.color(QPalette::Active,				 QColorGroup::Background).light(110);	else	    prelight = pal.color(QPalette::Active,				 QColorGroup::Background).light(120);	QColorGroup active2(pal.color(QPalette::Active,				      QColorGroup::Foreground), // foreground			    prelight,                           // button			    prelight.light(),                   // light			    prelight.dark(156),                 // dark			    prelight.dark(110),                 // mid			    pal.color(QPalette::Active,				      QColorGroup::Text),       // text			    pal.color(QPalette::Active,				      QColorGroup::BrightText), // bright text			    pal.color(QPalette::Active,				      QColorGroup::Base),       // base			    prelight);                          // background	d->prelight_palette = pal;	d->prelight_palette.setActive(active2);	d->prelight_palette.setInactive(active2);    }}/*!  \reimp*/void QMotifPlusStyle::polish(QWidget *widget){    if (widget->inherits("QFrame") &&	((QFrame *) widget)->frameStyle() == QFrame::Panel)	((QFrame *) widget)->setFrameStyle(QFrame::WinPanel);#ifndef QT_NO_MENUBAR    if (widget->inherits("QMenuBar") &&	((QMenuBar *) widget)->frameStyle() != QFrame::NoFrame)	((QMenuBar *) widget)->setFrameStyle(QFrame::StyledPanel | QFrame::Raised);#endif#ifndef QT_NO_TOOLBAR    if (widget->inherits("QToolBar"))	widget->layout()->setMargin(2);#endif    if (useHoveringHighlight) {	if (widget->inherits("QButton") ||	    widget->inherits("QComboBox"))	    widget->installEventFilter(this);	if (widget->inherits("QScrollBar") ||	    widget->inherits("QSlider")) {	    widget->setMouseTracking(TRUE);	    widget->installEventFilter(this);	}    }    QMotifStyle::polish(widget);}/*!  \reimp*/void QMotifPlusStyle::unPolish(QWidget *widget){    widget->removeEventFilter(this);    QMotifStyle::unPolish(widget);}/*!  \reimp*/void QMotifPlusStyle::polish(QApplication *){    qt_set_draw_menu_bar_impl((QDrawMenuBarItemImpl) &QMotifPlusStyle::drawMenuBarItem);}/*!  \reimp*/void QMotifPlusStyle::unPolish(QApplication *app){    app->setPalette(d->oldpalette);    qt_set_draw_menu_bar_impl(0);}/*!  \reimp*/void QMotifPlusStyle::polishPopupMenu(QPopupMenu *menu){    menu->setMouseTracking(TRUE);}/*!  \reimp*/void QMotifPlusStyle::drawPushButton(QPushButton *button, QPainter *p){    int x1, y1, x2, y2;    button->rect().coords(&x1, &y1, &x2, &y2);    if (button->isDefault())	drawButton(p, x1, y1, x2 - x1 + 1, y2 - y1 + 1,		   qApp->palette().active(), TRUE);    if (button->isDefault() || button->autoDefault()) {	x1 += buttonDefaultIndicatorWidth();	y1 += buttonDefaultIndicatorWidth();	x2 -= buttonDefaultIndicatorWidth();	y2 -= buttonDefaultIndicatorWidth();    }    QBrush fill;    if (button->isDown() || button->isOn())	fill = button->colorGroup().brush(QColorGroup::Mid);    else	fill = button->colorGroup().brush(QColorGroup::Button);    if ( !button->isFlat() || button->isOn() || button->isDown() )	drawButton(p, x1, y1, x2 - x1 + 1, y2 - y1 + 1,		   button->colorGroup(), button->isOn() || button->isDown(), &fill);}/*!  \reimp*/void QMotifPlusStyle::drawButton(QPainter *p, int x, int y, int w, int h,				 const QColorGroup &g, bool sunken, const QBrush *fill){    QPen oldpen = p->pen();    QPointArray a(4);    if (sunken) p->setPen(g.dark());    else p->setPen(g.light());    a.setPoint(0, x, y + h - 1);    a.setPoint(1, x, y);    a.setPoint(2, x, y);    a.setPoint(3, x + w - 1, y);    p->drawLineSegments(a);    if (sunken) p->setPen(black);    else p->setPen(g.button());    a.setPoint(0, x + 1, y + h - 2);    a.setPoint(1, x + 1, y + 1);    a.setPoint(2, x + 1, y + 1);    a.setPoint(3, x + w - 2, y + 1);    p->drawLineSegments(a);    if (sunken) p->setPen(g.button());    else p->setPen(g.dark());    a.setPoint(0, x + 2, y + h - 2);    a.setPoint(1, x + w - 2, y + h - 2);    a.setPoint(2, x + w - 2, y + h - 2);    a.setPoint(3, x + w - 2, y + 2);    p->drawLineSegments(a);    if (sunken) p->setPen(g.light());    else p->setPen(black);    a.setPoint(0, x + 1, y + h - 1);    a.setPoint(1, x + w - 1, y + h - 1);    a.setPoint(2, x + w - 1, y + h - 1);    a.setPoint(3, x + w - 1, y);    p->drawLineSegments(a);    if ( fill )	p->fillRect(x + 2, y + 2, w - 4, h - 4, *fill);    else	p->fillRect(x + 2, y + 2, w - 4, h - 4, QBrush(g.button()));    p->setPen(oldpen);}/*!  \reimp*/void QMotifPlusStyle::drawBevelButton(QPainter *p, int x, int y, int w, int h,				      const QColorGroup &g, bool sunken, const QBrush *fill){    drawButton(p, x, y, w, h, g, sunken, fill);}/*!  \reimp*/void QMotifPlusStyle::getButtonShift(int &x, int &y){    x = y = 0;}/*!  \reimp*/void QMotifPlusStyle::drawComboButton(QPainter *p, int x, int y, int w, int h,				 const QColorGroup &g, bool sunken,				 bool editable, bool,				 const QBrush *fill){    drawButton(p, x, y, w, h, g, sunken, fill);    if (editable) {	QRect r = comboButtonRect(x, y, w, h);	drawButton(p, r.x() - defaultFrameWidth(),		   r.y() - defaultFrameWidth(),		   r.width() + (defaultFrameWidth() * 2),		   r.height() + (defaultFrameWidth() * 2),		   g, TRUE);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产清纯美女被跳蛋高潮一区二区久久w | 日本一区中文字幕| 国产自产v一区二区三区c| 成人av网站免费观看| 欧美日韩你懂的| 国产精品网站在线播放| 青青草国产成人av片免费| av一本久道久久综合久久鬼色| 日韩一区二区三区av| 亚洲精品乱码久久久久久日本蜜臀| 美国av一区二区| 色乱码一区二区三区88| 国产欧美一区在线| 久久国产精品免费| 欧美久久一二三四区| 亚洲精品第一国产综合野| 国产麻豆精品视频| 日韩一区国产二区欧美三区| 亚洲香肠在线观看| 色婷婷av一区二区三区大白胸| 国产日韩欧美电影| 九色porny丨国产精品| 7777精品伊人久久久大香线蕉完整版 | 91尤物视频在线观看| 久久久久久久久一| 久久精品99国产精品| 在线免费观看成人短视频| 中文字幕一区二区三区视频| 韩国精品主播一区二区在线观看 | 国产欧美一区视频| 国产麻豆精品视频| 欧美成人精品3d动漫h| 日韩av二区在线播放| 欧美精品第1页| 亚洲午夜一区二区三区| 欧美三级韩国三级日本一级| 亚洲线精品一区二区三区| 91黄色激情网站| 亚洲小说春色综合另类电影| 欧美亚洲尤物久久| 亚洲国产成人va在线观看天堂| 欧美午夜宅男影院| 亚洲国产人成综合网站| 欧美精品 国产精品| 日韩精品亚洲一区二区三区免费| 欧美老人xxxx18| 日本视频一区二区| 日韩精品中文字幕一区二区三区| 国产一区亚洲一区| 欧美国产日韩亚洲一区| 91亚洲国产成人精品一区二三| 亚洲老妇xxxxxx| 欧美日韩精品一区二区天天拍小说 | 欧美综合久久久| 爽爽淫人综合网网站| 精品三级av在线| 国产成人免费在线| 中文字幕中文在线不卡住| 欧美亚洲日本一区| 日韩电影网1区2区| 久久色在线观看| 91小视频免费观看| 午夜精品久久久久久久99水蜜桃| 日韩欧美一二三| 成+人+亚洲+综合天堂| 亚洲尤物视频在线| 精品成人佐山爱一区二区| 国产精品99精品久久免费| 亚洲激情自拍视频| 欧美一级久久久久久久大片| 国产精品99久久久久久宅男| 亚洲在线成人精品| 国产欧美精品区一区二区三区 | 成人99免费视频| 亚洲大尺度视频在线观看| 久久精品一区二区三区av| 91精品91久久久中77777| 国产在线不卡一卡二卡三卡四卡| 亚洲美女视频在线| 欧美精品一区二区在线观看| 在线观看av一区| 国产精品一区二区久久不卡| 亚洲线精品一区二区三区八戒| 久久久电影一区二区三区| 欧美精选在线播放| 99综合影院在线| 国产麻豆精品theporn| 日本中文在线一区| 日韩美女精品在线| 久久精品视频一区二区| 欧美一区中文字幕| 欧美午夜不卡视频| aa级大片欧美| 国产精品主播直播| 免费在线欧美视频| 亚洲成人免费av| 亚洲制服丝袜一区| 亚洲品质自拍视频网站| 国产欧美一区二区三区网站 | 激情欧美一区二区| 亚洲成人免费在线观看| 亚洲蜜臀av乱码久久精品| 国产精品毛片久久久久久久| 国产亚洲一区二区三区四区| 日韩一区和二区| 日韩一区二区三区观看| 这里只有精品免费| 欧美美女直播网站| 欧美日韩精品久久久| 91色在线porny| 色综合一个色综合| jizzjizzjizz欧美| 成人激情综合网站| 99re热这里只有精品免费视频| 国产成人综合亚洲网站| 国产尤物一区二区在线 | 亚洲成人在线观看视频| 一区二区成人在线| 亚洲mv在线观看| 日一区二区三区| 日本不卡一区二区三区| 丝袜美腿亚洲一区| 久草精品在线观看| 国产盗摄一区二区| 国产成人免费在线| 94色蜜桃网一区二区三区| 91麻豆免费观看| 日本韩国欧美一区| 制服丝袜日韩国产| 精品日韩av一区二区| 久久免费国产精品| 日韩毛片在线免费观看| 一区二区三区高清在线| 午夜欧美电影在线观看| 青青草97国产精品免费观看无弹窗版| 免费不卡在线视频| 国产精品一级片| 色综合久久久久| 欧美浪妇xxxx高跟鞋交| xf在线a精品一区二区视频网站| 久久久777精品电影网影网| 国产农村妇女毛片精品久久麻豆 | 亚洲一区免费在线观看| 奇米综合一区二区三区精品视频| 韩国午夜理伦三级不卡影院| 岛国一区二区三区| 欧美视频完全免费看| 亚洲精品在线免费播放| 成人欧美一区二区三区小说| 三级一区在线视频先锋| 国产a级毛片一区| 日本高清免费不卡视频| 日韩精品一区二区三区视频| 国产精品青草久久| 亚洲成人动漫av| 丁香婷婷综合五月| 欧美日韩1234| 久久久国产午夜精品| 午夜精品一区二区三区电影天堂| 国产一区二区三区黄视频 | 欧美一区二区三区视频免费| 久久精品一区四区| 丝袜美腿亚洲一区| 99re6这里只有精品视频在线观看 99re8在线精品视频免费播放 | 亚洲色图制服诱惑 | 精品成人在线观看| 一区二区免费在线| 国产一区二区毛片| 欧美放荡的少妇| 《视频一区视频二区| 久久国产精品区| 欧美日韩国产综合久久| 国产精品蜜臀在线观看| 欧美a级一区二区| 在线观看视频欧美| 国产精品福利av| 国产精品77777竹菊影视小说| 欧美日产国产精品| 亚洲欧美精品午睡沙发| 国产河南妇女毛片精品久久久| 欧美精品在线视频| 亚洲日本免费电影| 岛国av在线一区| 国产无遮挡一区二区三区毛片日本| 天堂久久一区二区三区| 欧美午夜精品一区二区蜜桃| 国产精品久久久久久久午夜片| 国产在线精品一区二区不卡了| 欧美高清视频一二三区 | 欧美狂野另类xxxxoooo| 亚洲你懂的在线视频| www..com久久爱| 国产精品女同一区二区三区| 国产91精品久久久久久久网曝门 | 91精品免费观看| 亚洲mv大片欧洲mv大片精品| 欧美午夜一区二区| 亚洲线精品一区二区三区| 欧美日韩一级视频| 偷窥少妇高潮呻吟av久久免费|