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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? qsgistyle.cpp

?? qtopia-phone-2.2.0下公共的控件實(shí)現(xiàn)源代碼。
?? CPP
?? 第 1 頁 / 共 3 頁
字號(hào):
/****************************************************************************** $Id: qt/src/widgets/qsgistyle.cpp   2.3.12   edited 2005-10-27 $**** Implementation of Motif-like style class**** Created : 981231**** Copyright (C) 1998-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 "qsgistyle.h"#ifndef QT_NO_STYLE_SGI#include "qapplication.h"#include "qbutton.h"#include "qpainter.h"#include "qdrawutil.h"#include "qpixmap.h"#include "qpalette.h"#include "qwidget.h"#include "qpushbutton.h"#include "qscrollbar.h"#define INCLUDE_MENUITEM_DEF#include "qpopupmenu.h"#include <limits.h>typedef void (QStyle::*QDrawMenuBarItemImpl) (QPainter *, int, int, int, int, QMenuItem *,					      QColorGroup &, bool, bool);QDrawMenuBarItemImpl qt_set_draw_menu_bar_impl(QDrawMenuBarItemImpl impl);static const int sgiItemFrame		= 2;	// menu item frame widthstatic const int sgiSepHeight		= 1;	// separator item heightstatic const int sgiItemHMargin		= 3;	// menu item hor text marginstatic const int sgiItemVMargin 	= 2;	// menu item ver text marginstatic const int sgiArrowHMargin	= 6;	// arrow horizontal marginstatic const int sgiCheckMarkSpace	= 20;static bool sliderMoving		= FALSE;static bool sliderHandleActive		= FALSE;static bool repaintByMouseMove		= FALSE;static QPalette* lastWidgetPalette	= 0;static int activeScrollBarElement	= 0;static void* deviceUnderMouse		= 0;static QPoint mousePos(-1,-1);struct SliderLastPosition{    SliderLastPosition() : pos(0,-1,0,-1), slider(0) {}    QRect pos;    QWidget* slider;};static SliderLastPosition sliderLastPosition;/*!  \class QSGIStyle qsgistyle.h  \brief SGI Look and Feel  \ingroup appearance  This class implements the SGI look and feel. It tries to  resemble a SGI-like GUI style with the QStyle system.*//*!  Constructs a QSGIStyle  If useHighlightCols is FALSE (default value), then the style will  polish the application's color palette to emulate the Motif way of  highlighting, which is a simple inversion between the base and the  text color.  \sa QMotifStyle::useHighlightColors()*/QSGIStyle::QSGIStyle( bool useHighlightCols ) : QMotifStyle( useHighlightCols ), isApplicationStyle( 0 ){    setButtonDefaultIndicatorWidth( 4 ); // ### remove and reimplement virtual function    setScrollBarExtent( 21,21 );}/*!  Destructs the style*/QSGIStyle::~QSGIStyle(){}/*! \reimp*/int QSGIStyle::defaultFrameWidth() const{    return 2;}/*!    Changes some application-wide settings to be    SGI like, e.g. sets bold/italic font for    the menu-system.*/voidQSGIStyle::polish( QApplication* app){    isApplicationStyle = 1;    QMotifStyle::polish( app );    QFont f = QApplication::font();    f.setBold( TRUE );    f.setItalic( TRUE );    QApplication::setFont( f, TRUE, "QPopupMenu" );    QApplication::setFont( f, TRUE, "QMenuBar" );    QApplication::setFont( f, TRUE, "QComboBox" );    QPalette pal = QApplication::palette();    // check this on SGI-Boxes    //pal.setColor( QColorGroup::Background, pal.active().midlight() );    if (pal.active().button() == pal.active().background())	pal.setColor( QColorGroup::Button, pal.active().button().dark(120) );    // darker basecolor in list-widgets    pal.setColor( QColorGroup::Base, pal.active().base().dark(130) );    if (! useHighlightColors() ) {        pal.setColor( QPalette::Active, QColorGroup::Highlight, pal.active().text() );        pal.setColor( QPalette::Active, QColorGroup::HighlightedText, pal.active().base() );        pal.setColor( QPalette::Inactive, QColorGroup::Highlight, pal.inactive().text() );        pal.setColor( QPalette::Inactive, QColorGroup::HighlightedText, pal.inactive().base() );        pal.setColor( QPalette::Disabled, QColorGroup::Highlight, pal.disabled().text() );        pal.setColor( QPalette::Disabled, QColorGroup::HighlightedText, pal.disabled().base() );    }    QApplication::setPalette( pal, TRUE );    // different basecolor and highlighting in Q(Multi)LineEdit    pal.setColor( QColorGroup::Base, QColor(211,181,181) );    pal.setColor( QPalette::Active, QColorGroup::Highlight, pal.active().midlight() );    pal.setColor( QPalette::Active, QColorGroup::HighlightedText, pal.active().text() );    pal.setColor( QPalette::Inactive, QColorGroup::Highlight, pal.inactive().midlight() );    pal.setColor( QPalette::Inactive, QColorGroup::HighlightedText, pal.inactive().text() );    pal.setColor( QPalette::Disabled, QColorGroup::Highlight, pal.disabled().midlight() );    pal.setColor( QPalette::Disabled, QColorGroup::HighlightedText, pal.disabled().text() );    QApplication::setPalette( pal, TRUE, "QLineEdit" );    QApplication::setPalette( pal, TRUE, "QMultiLineEdit" );    pal = QApplication::palette();    pal.setColor( QColorGroup::Button, pal.active().background() );    QApplication::setPalette( pal, TRUE, "QMenuBar" );    QApplication::setPalette( pal, TRUE, "QToolBar" );    qt_set_draw_menu_bar_impl((QDrawMenuBarItemImpl) &QSGIStyle::drawMenuBarItem);}/*! \reimp*/voidQSGIStyle::unPolish( QApplication* /* app */ ){    QFont f = QApplication::font();    QApplication::setFont( f, TRUE, "QPopupMenu" );    QApplication::setFont( f, TRUE, "QMenuBar" );    QApplication::setFont( f, TRUE, "QComboBox" );    qt_set_draw_menu_bar_impl(0);}/*!    Installs eventfilters for several widgets to enable    the SGI-effect of glowing buttons.*/voidQSGIStyle::polish( QWidget* w ){    QMotifStyle::polish(w);    if ( !isApplicationStyle ) {	QPalette sgiPal = QApplication::palette();	sgiPal.setColor( QColorGroup::Background, sgiPal.active().midlight() );	if (sgiPal.active().button() == sgiPal.active().background())	    sgiPal.setColor( QColorGroup::Button, sgiPal.active().button().dark(110) );	sgiPal.setColor( QColorGroup::Base, sgiPal.active().base().dark(130) );	if (! useHighlightColors() ) {	    sgiPal.setColor( QPalette::Active, QColorGroup::Highlight, sgiPal.active().text() );	    sgiPal.setColor( QPalette::Active, QColorGroup::HighlightedText, sgiPal.active().base() );	    sgiPal.setColor( QPalette::Inactive, QColorGroup::Highlight, sgiPal.inactive().text() );	    sgiPal.setColor( QPalette::Inactive, QColorGroup::HighlightedText, sgiPal.inactive().base() );	    sgiPal.setColor( QPalette::Disabled, QColorGroup::Highlight, sgiPal.disabled().text() );	    sgiPal.setColor( QPalette::Disabled, QColorGroup::HighlightedText, sgiPal.disabled().base() );	}	if ( w->inherits("QLineEdit") || w->inherits("QMultiLineEdit") ) {	    // different basecolor and highlighting in Q(Multi)LineEdit	    sgiPal.setColor( QColorGroup::Base, QColor(211,181,181) );	    sgiPal.setColor( QPalette::Active, QColorGroup::Highlight, sgiPal.active().midlight() );	    sgiPal.setColor( QPalette::Active, QColorGroup::HighlightedText, sgiPal.active().text() );	    sgiPal.setColor( QPalette::Inactive, QColorGroup::Highlight, sgiPal.inactive().midlight() );	    sgiPal.setColor( QPalette::Inactive, QColorGroup::HighlightedText, sgiPal.inactive().text() );	    sgiPal.setColor( QPalette::Disabled, QColorGroup::Highlight, sgiPal.disabled().midlight() );	    sgiPal.setColor( QPalette::Disabled, QColorGroup::HighlightedText, sgiPal.disabled().text() );	} else if ( w->inherits("QMenuBar") || w->inherits("QToolBar") ) {	    sgiPal.setColor( QColorGroup::Button, sgiPal.active().midlight() );	}	w->setPalette( sgiPal );    }    if ( w->inherits("QButton") || w->inherits("QSlider") || w->inherits("QScrollBar") ) {        w->installEventFilter( this );        w->setMouseTracking( TRUE );        if ( w->inherits("QToolButton") )            w->setBackgroundMode( QWidget::PaletteBackground );        if ( w->inherits("QScrollBar") )            w->setBackgroundMode( QWidget::NoBackground );    } else if ( w->inherits("QMenuBar") ) {        ((QFrame*) w)->setFrameStyle(QFrame::StyledPanel | QFrame::Raised);        w->setBackgroundMode( QWidget::PaletteBackground );    } else if ( w->inherits("QPopupMenu") ) {        ((QFrame*) w)->setLineWidth( defaultFrameWidth() + 1 );    } else if ( w->inherits("QToolBar") ) {        w->setBackgroundMode( QWidget::PaletteBackground );    } else if ( w->inherits("QToolBarSeparator") ) {        w->setBackgroundMode( QWidget::PaletteBackground );    }}/*! \reimp*/voidQSGIStyle::unPolish( QWidget* w ){    if ( w == lastWidget )	w->unsetPalette( );    if ( w->inherits("QButton") )	w->removeEventFilter( this );}/*! \reimp*/voidQSGIStyle::polish( QPalette& pal ){    QCommonStyle::polish( pal );}/*!  Draws a line to separate parts of the visual interface.*/voidQSGIStyle::drawSeparator( QPainter *p, int x1, int y1, int x2, int y2,			  const QColorGroup &g, bool sunken,			  int /*lineWidth*/, int /*midLineWidth*/ ){    QPen oldPen = p->pen();    p->setPen( g.midlight() );    p->drawLine( x1, y1, x2, y2 );    if (sunken) {	p->setPen( g.shadow() );	if ( y2-y1 < x2-x1 )	    p->drawLine( x1, y1+1, x2, y2+1 );	else	    p->drawLine( x1+1, y1, x2+1, y2 );    }    p->setPen( oldPen );}/*!    Draws a SGI-like panel with somewhat rounded edges.*/voidQSGIStyle::drawPanel( QPainter*p, int x, int y, int w, int h, const QColorGroup &g,		      bool sunken, int lineWidth, const QBrush* fill ){    if( w < 0 ) w = 0;    if( h < 0 ) h = 0;    QMotifStyle::drawPanel( p, x, y, w, h, g, sunken, ( w > lineWidth && h > lineWidth ) ? lineWidth : 1, fill );    if ( lineWidth <= 1 )	return;    // draw extra shadinglines    QPen oldPen = p->pen();    p->setPen( g.midlight() );    p->drawLine( x+1, y+h-3, x+1, y+1 );    p->drawLine( x+1, y+1, x+w-3, y+1 );    p->setPen( g.mid() );    p->drawLine( x+1, y+h-2, x+w-2, y+h-2 );    p->drawLine( x+w-2, y+h-2, x+w-2, y+1 );    p->setPen(oldPen);}/*!  Draws a press-senstive interface element.*/voidQSGIStyle::drawButton( QPainter *p, int x, int y, int w, int h,		       const QColorGroup &g, bool sunken, const QBrush *fill ){    drawPanel( p, x, y, w, h, g, sunken, defaultFrameWidth(),	       fill ? fill : (sunken ?			      &g.brush( QColorGroup::Mid )      :			      &g.brush( QColorGroup::Button ) ));}/*!    Draws a button with a stronger separation from    the user interface.*/voidQSGIStyle::drawBevelButton( QPainter *p, int x, int y, int w, int h,			    const QColorGroup &g, bool sunken, const QBrush *fill ){    drawButton( p, x+1, y+1, w-2, h-2, g, sunken, fill );    QPen oldPen = p->pen();    QPointArray a;    // draw twocolored rectangle    p->setPen( sunken ? g.light() : g.dark().dark(200) );    a.setPoints( 3, x, y+h-1, x+w-1, y+h-1, x+w-1, y );    p->drawPolyline( a );    p->setPen( g.dark() );    a.setPoints( 3, x, y+h-2, x, y, x+w-2, y );    p->drawPolyline( a );    p->setPen( oldPen );}/*!    Reimplemented ot be SGI-like.*/voidQSGIStyle::drawPushButton( QPushButton* btn, QPainter* p){    QColorGroup g = btn->colorGroup();    int x1, y1, x2, y2;    btn->rect().coords( &x1, &y1, &x2, &y2 );	// get coordinates    p->setPen( g.foreground() );    p->setBrush( QBrush(g.button(),NoBrush) );    int diw = buttonDefaultIndicatorWidth();    if ( btn->isDefault() || btn->autoDefault() ) {	x1 += diw;	y1 += diw;	x2 -= diw;	y2 -= diw;    }    QPointArray a;    if ( btn->isDefault() ) {	if ( diw == 0 ) {	    a.setPoints( 9,			 x1, y1, x2, y1, x2, y2, x1, y2, x1, y1+1,			 x2-1, y1+1, x2-1, y2-1, x1+1, y2-1, x1+1, y1+1 );	    p->setPen( g.shadow() );	    p->drawPolyline( a );	    x1 += 2;	    y1 += 2;	    x2 -= 2;	    y2 -= 2;	} else {	    qDrawShadePanel( p, btn->rect(), g, TRUE );	}    }    QBrush fill = g.brush( QColorGroup::Button );    if ( !btn->isFlat() || btn->isOn() || btn->isDown() )	drawBevelButton( p, x1, y1, x2-x1+1, y2-y1+1, g, btn->isOn() || btn->isDown(), &fill );    if ( p->brush().style() != NoBrush )	p->setBrush( NoBrush );}/*!    Reimplemented to be SGI-like.*/voidQSGIStyle::drawArrow( QPainter *p, ArrowType type, bool /*down*/,		      int x, int y, int w, int h,		      const QColorGroup &g, bool enabled, const QBrush *fill ){    QPointArray a;				// arrow polygon    switch ( type ) {    case UpArrow:	a.setPoints( 3, 0,-5, -5,4, 4,4 );	break;    case DownArrow:	a.setPoints( 3, 0,4, -4,-4, 4,-4 );	break;    case LeftArrow:	a.setPoints( 3, -4,0, 4,-5, 4,4 );	break;    case RightArrow:	a.setPoints( 3, 4,0, -4,-5, -4,4 );	break;    }    if ( a.isNull() )	return;    QPen savePen = p->pen();			// save current pen    if ( fill )	p->fillRect( x, y, w, h, *fill );    p->setPen( NoPen );    if ( enabled ) {	a.translate( x+w/2, y+h/2 );	p->setBrush( enabled ? g.dark() : g.light() );	p->drawPolygon( a );			// draw arrow    }    p->setPen( savePen );			// restore pen}/*! \reimp*/QSizeQSGIStyle::indicatorSize() const{    return QSize(20,20);}/*!    Draws a interface element showing the state of choice,    used by a checkbox.  \sa drawCheckMark()*/voidQSGIStyle::drawIndicator( QPainter* p, int x, int y, int w, int h,			  const QColorGroup &g, int s, bool down, bool enabled ){    QPen oldPen = p->pen();    p->fillRect( x, y, w, h, g.brush( QColorGroup::Background ) );

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品麻豆视频| 成人app下载| 激情综合网最新| 国产精品一区二区三区99| 成人高清在线视频| 91高清视频在线| 4438x成人网最大色成网站| 精品久久久久久久久久久久包黑料| 精品少妇一区二区三区视频免付费| 久久久99精品久久| 一区av在线播放| 肉色丝袜一区二区| 成人综合在线观看| 欧美日韩一区二区在线观看视频| 在线成人免费观看| 亚洲国产精品ⅴa在线观看| 亚洲主播在线观看| 国产在线播放一区三区四| 不卡在线视频中文字幕| 777午夜精品视频在线播放| 久久久久久久久97黄色工厂| 亚洲精品乱码久久久久久黑人| 热久久一区二区| 99久久er热在这里只有精品66| 6080国产精品一区二区| 国产精品欧美极品| 日韩高清在线一区| 丁香激情综合五月| 91精品国产91综合久久蜜臀| 中文字幕一区二区三区不卡 | 国产一区二区电影| 在线亚洲高清视频| 中文子幕无线码一区tr| 日本在线不卡一区| 91在线国产福利| 国产亚洲人成网站| 免费在线看一区| 在线看日韩精品电影| 国产日韩影视精品| 麻豆国产91在线播放| 在线免费观看不卡av| 中文字幕一区视频| 激情av综合网| 91精品国产91久久久久久最新毛片| 亚洲欧美日韩小说| 丰满放荡岳乱妇91ww| 欧美不卡在线视频| 日韩综合在线视频| 欧美日韩一卡二卡三卡 | 91精品国产综合久久精品麻豆| 国产精品成人一区二区三区夜夜夜| 美女尤物国产一区| 欧美美女bb生活片| 亚洲精品va在线观看| 不卡电影一区二区三区| 久久亚洲一区二区三区明星换脸 | 欧美视频在线观看一区二区| 国产精品美女一区二区三区| 蜜桃91丨九色丨蝌蚪91桃色| 欧美性受xxxx黑人xyx性爽| 欧美国产精品v| 国产精品一区在线观看你懂的| 欧美日韩一区成人| 亚洲一卡二卡三卡四卡五卡| 91麻豆免费看| 亚洲欧美色图小说| 99免费精品视频| 欧美国产精品一区二区三区| 国产激情视频一区二区在线观看 | 久久99九九99精品| 欧美一区二区播放| 日本vs亚洲vs韩国一区三区| 欧美日韩高清一区二区不卡 | 欧美一区二区三区免费在线看 | 欧美色老头old∨ideo| 亚洲一二三四区| 欧美系列在线观看| 午夜免费久久看| 91麻豆精品国产91久久久久| 亚洲午夜电影在线观看| 欧美视频一区二区三区| 亚洲国产精品久久久久秋霞影院| 欧洲中文字幕精品| 偷拍日韩校园综合在线| 欧美丰满美乳xxx高潮www| 日韩综合小视频| 日韩欧美国产一区二区在线播放| 久久精品久久久精品美女| 精品国产免费视频| 国产999精品久久| 亚洲欧美综合色| 色哟哟日韩精品| 亚洲超碰精品一区二区| 欧美一区二区视频在线观看| 久草热8精品视频在线观看| 久久伊99综合婷婷久久伊| 国产成人av一区二区| 中文字幕一区二区在线观看| 日本韩国视频一区二区| 爽好久久久欧美精品| 欧美成人bangbros| 福利视频网站一区二区三区| 亚洲欧美激情小说另类| 欧美日韩国产精选| 激情图片小说一区| 国产精品亲子伦对白| 欧美三级乱人伦电影| 狠狠色2019综合网| 中文字幕第一区第二区| 在线观看视频一区二区欧美日韩| 天堂在线亚洲视频| 久久久精品免费观看| 91视频在线看| 青青草精品视频| 国产精品免费视频一区| 欧美性色欧美a在线播放| 麻豆精品蜜桃视频网站| 国产精品沙发午睡系列990531| 色婷婷精品大视频在线蜜桃视频| 日韩激情一二三区| 国产拍欧美日韩视频二区| 日本二三区不卡| 九色|91porny| 亚洲欧美日韩国产手机在线| 91精品国产一区二区三区| 国产成人免费在线观看不卡| 一区二区三区成人在线视频| 2023国产精品| 91久久奴性调教| 国产麻豆精品95视频| 亚洲一区二区综合| 久久精品视频在线免费观看| 在线观看av一区二区| 国产精品99久久久久久宅男| 亚洲香蕉伊在人在线观| 国产日产欧产精品推荐色| 欧美日韩国产一级片| 国产成人一区二区精品非洲| 亚洲图片一区二区| 国产免费成人在线视频| 日韩欧美精品在线视频| 在线精品国精品国产尤物884a| 国产福利一区在线| 日韩av中文字幕一区二区 | 欧美性色综合网| 成人午夜av电影| 麻豆成人在线观看| 亚洲一区二区三区在线播放| 国产欧美久久久精品影院| 777午夜精品视频在线播放| 色诱视频网站一区| 成人av先锋影音| 久久av中文字幕片| 婷婷开心久久网| 亚洲免费观看高清| 亚洲国产岛国毛片在线| 欧美xxxx在线观看| 欧美久久一二三四区| 色先锋资源久久综合| 懂色av噜噜一区二区三区av| 精品一区二区在线免费观看| 午夜电影一区二区三区| 亚洲精品福利视频网站| 国产精品国产自产拍在线| 久久久久久97三级| 欧美成人r级一区二区三区| 91精品免费在线| 欧美日韩aaaaa| 在线欧美小视频| 色综合色狠狠天天综合色| 大胆亚洲人体视频| 国产成人精品网址| 国产一区二区在线影院| 久久国产精品区| 日韩高清电影一区| 丝袜亚洲另类欧美综合| 亚洲高清视频在线| 亚洲一区二区三区自拍| 亚洲国产你懂的| 亚洲香肠在线观看| 亚洲成人精品一区二区| 一区二区三区不卡在线观看| 亚洲人xxxx| 亚洲精品国产精华液| 一区2区3区在线看| 亚洲一区国产视频| 午夜激情久久久| 免费久久99精品国产| 蜜乳av一区二区| 久久福利资源站| 国精产品一区一区三区mba视频| 精品一区中文字幕| 国产精品99久久久久久久vr| 国产成人自拍高清视频在线免费播放| 国产九九视频一区二区三区| 精品中文字幕一区二区小辣椒| 狠狠色丁香九九婷婷综合五月| 国产精品88888| 成人黄色免费短视频| 91在线国内视频|