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

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

?? qsgistyle.cpp

?? qtopia-phone-2.2.0下公共的控件實現源代碼。
?? CPP
?? 第 1 頁 / 共 3 頁
字號:
/****************************************************************************** $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 ) );

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产欧美日韩三级| 亚洲成人动漫精品| 欧美精选一区二区| 国产盗摄精品一区二区三区在线| 亚洲一区二区在线免费看| 国产亚洲一二三区| 欧美一区午夜视频在线观看| 91性感美女视频| 国产一区二区三区电影在线观看| 日韩激情av在线| 亚洲黄色免费网站| 国产精品久久久久久亚洲毛片 | 日韩欧美一二三四区| av不卡一区二区三区| 国产一区三区三区| 日本女人一区二区三区| 亚洲一区在线观看免费| 亚洲欧美激情插 | 日韩精品一区国产麻豆| 在线视频一区二区三| 不卡视频在线观看| 国产v综合v亚洲欧| 国产一区三区三区| 精品一区二区国语对白| 日韩av一区二区三区四区| 亚洲高清免费观看| 亚洲综合在线电影| 亚洲品质自拍视频网站| 亚洲柠檬福利资源导航| 成人免费在线观看入口| 国产精品妹子av| 中文子幕无线码一区tr| 国产欧美一二三区| 国产欧美久久久精品影院| 久久影院视频免费| 久久免费视频一区| 国产亚洲成av人在线观看导航| 久久综合999| 国产日韩在线不卡| 国产精品美女久久久久久久网站| 欧美国产禁国产网站cc| 国产精品视频你懂的| 国产精品色在线| 中文字幕亚洲在| 亚洲精品一卡二卡| 亚洲一区国产视频| 奇米影视一区二区三区| 美女视频一区二区三区| 激情综合色播五月| 懂色av中文一区二区三区| 99久久婷婷国产| 在线观看亚洲专区| 91精品国产免费久久综合| 日韩美女一区二区三区四区| 久久亚洲捆绑美女| 国产精品色呦呦| 亚洲综合在线视频| 奇米精品一区二区三区在线观看一| 日韩国产欧美三级| 国产一区二区久久| 99久久精品一区| 欧美日韩国产一二三| 日韩女优电影在线观看| 日本一区二区在线不卡| 亚洲免费在线播放| 日韩电影一区二区三区| 国产成人福利片| 欧美亚洲国产一卡| 2021中文字幕一区亚洲| 中文字幕欧美国产| 亚洲电影一区二区三区| 久久福利资源站| 99re66热这里只有精品3直播| 欧美系列一区二区| 久久免费看少妇高潮| 亚洲一区中文在线| 国精产品一区一区三区mba视频| 91色在线porny| 日韩欧美在线1卡| 综合久久一区二区三区| 蜜桃一区二区三区在线观看| 成人aa视频在线观看| 911国产精品| 国产精品久久久久永久免费观看 | 国产电影一区在线| 91国内精品野花午夜精品| 欧美一区二区观看视频| 国产精品情趣视频| 日韩电影一区二区三区四区| 99久久久久久| 日韩女优毛片在线| 亚洲图片欧美色图| 国产不卡在线视频| 欧美一区二区啪啪| 亚洲女同ⅹxx女同tv| 国产毛片一区二区| 欧美精品三级在线观看| 自拍偷拍欧美精品| 国产在线播放一区三区四| 欧美精品久久天天躁| 亚洲另类在线制服丝袜| 国产精品综合网| 欧美浪妇xxxx高跟鞋交| 一区二区三区色| 成人手机电影网| 2020国产精品| 免费看日韩精品| 欧美三级日韩三级| 亚洲欧美另类久久久精品| 国产精品1区2区3区| 欧美一级黄色片| 午夜精品久久久久久久久| 91麻豆精品一区二区三区| 国产人伦精品一区二区| 国产一区二区在线观看视频| 91精选在线观看| 亚洲国产精品久久一线不卡| 91麻豆国产精品久久| 国产精品狼人久久影院观看方式| 国产美女在线精品| 精品免费日韩av| 青青青爽久久午夜综合久久午夜| 欧美色综合影院| 一级特黄大欧美久久久| 色综合久久88色综合天天6| 国产精品久久久久久久久动漫| 国产乱国产乱300精品| 精品不卡在线视频| 裸体一区二区三区| 日韩欧美一级二级三级| 久久精品国产免费看久久精品| 91精品国产综合久久精品性色| 香蕉乱码成人久久天堂爱免费| 欧美日韩免费观看一区三区| 亚洲靠逼com| 欧美性生活一区| 亚洲午夜久久久久久久久电影网| 91久久奴性调教| 亚洲国产精品一区二区久久恐怖片| 色狠狠一区二区三区香蕉| 一区二区在线观看视频| 在线观看亚洲a| 丝袜美腿亚洲一区| 欧美一级黄色片| 国产精品自拍一区| 国产精品私人影院| 色婷婷久久久综合中文字幕| 亚洲高清不卡在线观看| 在线播放国产精品二区一二区四区| 日韩经典中文字幕一区| 日韩精品一区二区三区视频| 久99久精品视频免费观看| 久久精品网站免费观看| 99免费精品在线| 亚洲成人中文在线| 日韩视频一区二区三区| 国产一区二区三区四| 中文字幕在线一区免费| 欧美专区在线观看一区| 日本欧美肥老太交大片| 国产欧美日产一区| 欧美日韩一级二级| 在线日韩一区二区| 日韩精品一级二级| 亚洲自拍偷拍麻豆| 欧美精品免费视频| 精品在线观看视频| 国产精品福利在线播放| 精品视频色一区| 国产一区二区三区在线观看免费视频| 国产精品福利电影一区二区三区四区| 色悠悠亚洲一区二区| 欧美a级一区二区| 日韩毛片精品高清免费| 欧美喷潮久久久xxxxx| 国产精品自拍一区| 亚洲一级片在线观看| 2023国产精品| 欧美体内she精高潮| 国产盗摄一区二区三区| 亚洲成人激情社区| 欧美激情在线看| 制服丝袜在线91| av不卡在线播放| 久久99热狠狠色一区二区| 日韩美女啊v在线免费观看| 日韩精品专区在线影院重磅| 91麻豆精品一区二区三区| 久久99精品国产麻豆不卡| 亚洲男人的天堂在线观看| 精品88久久久久88久久久| 欧美在线不卡视频| 成人免费视频网站在线观看| 美女视频黄 久久| 一区二区三区在线视频观看58| 2020国产精品久久精品美国| 欧美丰满美乳xxx高潮www| 99久久精品国产导航| 国产一区日韩二区欧美三区| 五月天激情小说综合|