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

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

?? qscrollbar.cpp

?? qtopia-phone-2.2.0下公共的控件實現源代碼。
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
/****************************************************************************** $Id: qt/src/widgets/qscrollbar.cpp   2.3.12   edited 2005-10-27 $**** Implementation of QScrollBar class**** Created : 940427**** Copyright (C) 1992-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 "qscrollbar.h"#ifndef QT_NO_SCROLLBAR#include "qpainter.h"#include "qbitmap.h"#include "qapplication.h"#include "qtimer.h"#include <limits.h>// REVISED: warwick/*!  \class QScrollBar qscrollbar.h  \brief The QScrollBar widget provides a vertical or horizontal scroll bar.  \ingroup basic  A scroll bar allows the user to control a value within a  program-definable range, and to give the user visible indication of  the current value of a \link QRangeControl range control \endlink.  Scroll bars include four separate controls:  <ul>   <li> The \e line-up and \e line-down controls are little button with    which the user can move one line up or down.  The meaning of "line"    is configurable.  In editors and list boxes it means one line of text,    while an image viewer it might mean 20 pixels.   <li> The \e slider is the handle that indicates the current value    of the scroll bar, and which the user can drag to change the value.    This part of the scroll bar is sometimes called the "thumb".   <li> The \a page-up/down control is the area on which the slider    slides (the scroll bar's background).  Clicking here moves the scroll    bar towards the click.  The meaning of page is also configurable    - in editors and list boxes it means as many lines as there is space    for in the widget.  </ul>  QScrollBar has not much of an API of its own; it mostly relies on  QRangeControl.  The most useful functions are setValue() to set the  scroll bar directly to some value; addPage(), addLine(), subtractPage()  and subtractLine() to simulate the effects of clicking (useful for  accelerator keys; setSteps() to define the values of pageStep() and  lineStep(); and setRange() to set the minValue()  and maxValue() of the scroll bar.  QScrollBar has a convenience  constructor with which you can set most of these properties.  Some GUI styles, for example the provided Windows and Motif styles,  also use the pageStep() value to calculate the size of the slider.  In addition to the access functions from QRangeControl, QScrollBar  has a comprehensive set of signals:  <ul>  <li> valueChanged() - emitted when the scroll bar's value has changed.	  The tracking() determines whether this signal is emitted	    \e during interaction.  <li> sliderPressed() - emitted when the user starts to drag the	  slider  <li> sliderMoved() - emitted when the user drags the slider  <li> sliderReleased() - emitted when the user releases the slider  <li> nextLine() - emitted when the scroll bar has moved one line	  down/rightwards.  Line is defined in QRangeControl.  <li> prevLine() - emitted when the scroll bar has moved one line	  up/leftwards.  <li> nextPage() - emitted when the scroll bar has moved one page	  down/rightwards.  <li> prevPage() - emitted when the scroll bar has moved one page      up/leftwards.  </ul>  QScrollBar only offers integer ranges.  Note that while QScrollBar  handles very large numbers, scroll bars on today's screens cannot  usefully control ranges above about 100,000 pixels.  Beyond that,  it becomes difficult for the user to control the  scroll bar using either keyboard or mouse.  A scroll bar can be controlled by the keyboard, but it has a  default focusPolicy() of \c NoFocus. Use setFocusPolicy() to  enable keyboard focus. See keyPressEvent() for a list of  key bindings.  If you need to add scrollbars to an interface, consider using the  QScrollView class which encapsulates the common uses for scrollbars.  <img src=qscrbar-m.png> <img src=qscrbar-w.png>  \sa QSlider QSpinBox QScrollView  <a href="guibooks.html#fowler">GUI Design Handbook: Scroll Bar</a>*//*!  \fn void QScrollBar::valueChanged( int value )  This signal is emitted when the scroll bar value has changed, with the  new scroll bar value as an argument.*//*!  \fn void QScrollBar::sliderPressed()  This signal is emitted when the user presses the slider with the mouse.*//*!  \fn void QScrollBar::sliderMoved( int value )  This signal is emitted when the slider is moved by the user, with  the new scroll bar value as an argument.  This signal is emitted even when tracking is turned off.  \sa tracking() valueChanged() nextLine() prevLine() nextPage() prevPage()*//*!  \fn void QScrollBar::sliderReleased()  This signal is emitted when the user releases the slider with the mouse.*//*!  \fn void QScrollBar::nextLine()  This signal is emitted when the scroll bar scrolls one line down/right.*//*!  \fn void QScrollBar::prevLine()  This signal is emitted when the scroll bar scrolls one line up/left.*//*!  \fn void QScrollBar::nextPage()  This signal is emitted when the scroll bar scrolls one page down/right.*//*!  \fn void QScrollBar::prevPage()  This signal is emitted when the scroll bar scrolls one page up/left.*/static const int thresholdTime = 500;static const int repeatTime	= 50;#define HORIZONTAL	(orientation() == Horizontal)#define VERTICAL	!HORIZONTAL#define MOTIF_BORDER	2#define SLIDER_MIN	9/*!  Constructs a vertical scroll bar.  The \e parent and \e name arguments are sent to the QWidget constructor.*/QScrollBar::QScrollBar( QWidget *parent, const char *name )    : QWidget( parent, name ){    orient = Vertical;    init();}/*!  Constructs a scroll bar.  The \e orientation must be QScrollBar::Vertical or QScrollBar::Horizontal.  The \e parent and \e name arguments are sent to the QWidget constructor.*/QScrollBar::QScrollBar( Orientation orientation, QWidget *parent,			const char *name )    : QWidget( parent, name ){    orient = orientation;    init();}/*!  Constructs a scroll bar.  \arg \e minValue is the minimum scroll bar value.  \arg \e maxValue is the maximum scroll bar value.  \arg \e lineStep is the line step value.  \arg \e pageStep is the page step value. It is also used to calculate the size	    of the slider.  \arg \e value is the initial value.  \arg \e orientation must be QScrollBar::Vertical or QScrollBar::Horizontal.  The \e parent and \e name arguments are sent to the QWidget constructor.*/QScrollBar::QScrollBar( int minValue, int maxValue, int lineStep, int pageStep,			int value,  Orientation orientation,			QWidget *parent, const char *name )    : QWidget( parent, name ),      QRangeControl( minValue, maxValue, lineStep, pageStep, value ){    orient = orientation;    init();}void QScrollBar::init(){    track = TRUE;    sliderPos = 0;    pressedControl = QStyle::NoScroll;    clickedAt = FALSE;    setFocusPolicy( NoFocus );    repeater = 0;    d = 0;    if ( style() == MotifStyle )	setBackgroundMode( PaletteMid );    else	setBackgroundMode( PaletteBackground );    if ( orient == Horizontal )	setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Fixed ) );    else	setSizePolicy( QSizePolicy(  QSizePolicy::Fixed, QSizePolicy::Minimum ) );}/*!  Sets the scroll bar orientation.  The \e orientation must be  QScrollBar::Vertical or QScrollBar::Horizontal.  \sa orientation()*/void QScrollBar::setOrientation( Orientation orientation ){    if ( (uint) orientation == orient )	return;    QSizePolicy pol = sizePolicy();    setSizePolicy( QSizePolicy( pol.verData(), pol.horData() ) );	    orient = orientation;    positionSliderFromValue();    update();}/*!  \fn Orientation QScrollBar::orientation() const  Returns the orientation of the scroll bar; QScrollBar::Vertical or  QScrollBar::Horizontal.  \sa setOrientation()*//*!  \fn void QScrollBar::setTracking( bool enable )  Enables scroll bar tracking if \e enable is TRUE, or disables tracking  if \e enable is FALSE.  If tracking is enabled (the default), the scroll bar emits the  valueChanged() signal while the slider is being dragged.  If  tracking is disabled, the scroll bar emits the valueChanged() signal  only when the user releases the mouse button after moving the  slider.  \sa tracking()*//*!  \fn bool QScrollBar::tracking() const  Returns TRUE if tracking is enabled, or FALSE if tracking is disabled.  Tracking is initially enabled.  \sa setTracking()*//*!  Returns TRUE if the user has clicked the mouse on the slider  and is currently dragging it, or FALSE if not.*/bool QScrollBar::draggingSlider() const{    return pressedControl == QStyle::Slider;}/*!  Reimplements the virtual function QWidget::setPalette().  Sets the background color to the mid color for Motif style scroll bars.*/void QScrollBar::setPalette( const QPalette &p ){    QWidget::setPalette( p );    if ( style() == MotifStyle )	setBackgroundMode( PaletteMid );    else	setBackgroundMode( PaletteBackground );}/*!\reimp*/QSize QScrollBar::sizeHint() const{    constPolish();    QSize sbextent = style().scrollBarExtent();    if ( orient == Horizontal ) {	return QSize( 30, sbextent.height() );    } else {	return QSize( sbextent.width(), 30 );    }}/*!\reimp*/QSizePolicy QScrollBar::sizePolicy() const{    //### removeme 3.0    return QWidget::sizePolicy();}/*!  \internal  Implements the virtual QRangeControl function.*/void QScrollBar::valueChange(){    int tmp = sliderPos;    positionSliderFromValue();    if ( tmp != sliderPos )	drawControls( QStyle::AddPage | QStyle::Slider | QStyle::SubPage,		      pressedControl );    emit valueChanged(value());}/*!  \internal  Implements the virtual QRangeControl function.*/void QScrollBar::stepChange(){    rangeChange();}/*!  \internal  Implements the virtual QRangeControl function.*/void QScrollBar::rangeChange(){    positionSliderFromValue();    drawControls( QStyle::AddLine | QStyle::AddPage | QStyle::Slider |	    QStyle::SubPage | QStyle::SubLine | QStyle::First | QStyle::Last,	    pressedControl );}/*!  Handles timer events for the scroll bar.*/void QScrollBar::doAutoRepeat(){    if ( clickedAt ){	if ( repeater )	    repeater->changeInterval( repeatTime );	action( (QStyle::ScrollControl) pressedControl );	QApplication::syncX();    } else {	stopAutoRepeat();    }}/*! Starts the auto-repeat logic.  Some time after this function iscalled, the auto-repeat starts taking effect, and from then on repeatsuntil stopAutoRepeat() is called.*/void QScrollBar::startAutoRepeat(){    if ( !repeater ) {	repeater = new QTimer( this, "auto-repeat timer" );	connect( repeater, SIGNAL(timeout()),		 this, SLOT(doAutoRepeat()) );    }    repeater->start( thresholdTime, FALSE );}/*! Stops the auto-repeat logic. */void QScrollBar::stopAutoRepeat(){    delete repeater;    repeater = 0;}/*!\reimp*/void QScrollBar::wheelEvent( QWheelEvent *e ){    static float offset = 0;    static QScrollBar* offset_owner = 0;    if (offset_owner != this){	offset_owner = this;	offset = 0;    }    e->accept();    int step = QMIN( QApplication::wheelScrollLines()*lineStep(),		     pageStep() );    if ( e->state() & ControlButton )	step = pageStep();    offset += -e->delta()*step/120;    if (QABS(offset)<1)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色综合色狠狠天天综合色| 8x8x8国产精品| 在线观看日韩毛片| 欧美一区二区女人| 综合久久综合久久| 麻豆精品一区二区av白丝在线| 成人va在线观看| 欧美日韩国产天堂| 国产精品美女久久久久aⅴ| 青青草97国产精品免费观看无弹窗版| 国产成人aaaa| 欧美成人欧美edvon| 一区二区三区在线播放| 东方欧美亚洲色图在线| 日韩女优av电影| 性感美女极品91精品| 一本一道波多野结衣一区二区| 精品国产乱码久久久久久牛牛| 亚洲国产日韩a在线播放性色| 成人午夜av在线| 久久九九久久九九| 韩国成人在线视频| 欧美白人最猛性xxxxx69交| 五月婷婷激情综合| 色av成人天堂桃色av| 亚洲天堂av一区| a在线播放不卡| 中文字幕欧美激情一区| 国产酒店精品激情| 精品成人在线观看| 麻豆精品一区二区综合av| 宅男在线国产精品| 美女在线观看视频一区二区| 91精品国产高清一区二区三区 | av电影天堂一区二区在线观看| 日韩欧美国产综合一区 | 欧美一区二区性放荡片| 亚洲成av人片| 欧美肥妇bbw| 日韩制服丝袜先锋影音| 欧美肥大bbwbbw高潮| 午夜精品一区二区三区三上悠亚 | 国产精选一区二区三区| 久久综合久久综合亚洲| 国产一区二区成人久久免费影院 | 成人av免费在线| 国产精品久久久久一区二区三区共| 国产成人精品免费一区二区| 国产精品麻豆欧美日韩ww| 成人精品一区二区三区中文字幕| 国产免费观看久久| 91在线码无精品| 亚洲午夜成aⅴ人片| 欧美日韩国产中文| 精品制服美女丁香| 欧美激情一区不卡| 91精品1区2区| 奇米精品一区二区三区在线观看 | 欧美久久久久久久久| 免费观看91视频大全| 久久久久久久综合日本| 91视频com| 天堂成人国产精品一区| 欧美mv和日韩mv的网站| 丁香婷婷综合五月| 亚洲国产一区二区三区青草影视| 91精品国产乱| 成人性生交大片免费看中文 | 国产91综合网| 亚洲自拍偷拍九九九| 日韩精品在线一区| 99久久精品免费看国产免费软件| 一区二区在线观看视频在线观看| 欧美久久久一区| 福利电影一区二区| 日韩精品视频网| 国产精品午夜免费| 7777精品伊人久久久大香线蕉完整版 | 久久新电视剧免费观看| 一本到不卡精品视频在线观看| 婷婷久久综合九色综合绿巨人 | 成人激情小说网站| 日韩中文字幕一区二区三区| 国产亚洲一区二区在线观看| 色视频成人在线观看免| 国产久卡久卡久卡久卡视频精品| 亚洲成人中文在线| 国产精品情趣视频| 日韩精品专区在线影院观看| 一本大道久久a久久精二百| 国产真实乱偷精品视频免| 一区2区3区在线看| 欧美韩国日本综合| 日韩欧美自拍偷拍| 在线精品国精品国产尤物884a| 国产一区在线不卡| 日韩电影在线一区二区三区| 1024国产精品| 久久久精品中文字幕麻豆发布| 欧美精品自拍偷拍| 色婷婷av一区二区三区软件| 成人h动漫精品一区二区| 精品影视av免费| 亚洲v日本v欧美v久久精品| 国产精品卡一卡二| 国产日韩欧美不卡| 精品第一国产综合精品aⅴ| 欧美一三区三区四区免费在线看 | 一区二区三区精密机械公司| 国产精品色婷婷| 久久―日本道色综合久久| 777午夜精品免费视频| 欧美视频一区二区三区四区| 色综合色综合色综合色综合色综合| 成人美女视频在线看| 国产成人综合网站| 国产精品1024| 成人免费高清在线观看| 国产成人亚洲精品青草天美| 国产一区二区三区最好精华液| 另类小说综合欧美亚洲| 久久不见久久见免费视频7| 日韩电影免费一区| 天堂av在线一区| 亚洲成av人片| 美国十次综合导航| 另类小说一区二区三区| 九九热在线视频观看这里只有精品| 日本成人在线网站| 精品在线亚洲视频| 国产精品一级片在线观看| 国产激情一区二区三区| 风间由美一区二区三区在线观看| 国产成人啪免费观看软件| 丰满岳乱妇一区二区三区| www.爱久久.com| 97久久超碰精品国产| 色丁香久综合在线久综合在线观看| 91成人国产精品| 欧美区在线观看| 日韩精品自拍偷拍| 日本一区二区电影| 一区二区三区四区视频精品免费| 亚洲午夜久久久久久久久电影网| 日韩国产欧美在线观看| 国内外成人在线| 91在线云播放| 日韩视频免费观看高清完整版在线观看 | 亚洲乱码一区二区三区在线观看| 亚洲综合视频在线| 美女一区二区三区在线观看| 国产成人精品1024| 欧美亚洲国产一区在线观看网站| 欧美丰满少妇xxxxx高潮对白| 久久综合久久综合九色| 亚洲欧美偷拍卡通变态| 日本不卡在线视频| 成人毛片视频在线观看| 777午夜精品免费视频| 欧美经典三级视频一区二区三区| 亚洲一区在线视频| 国产在线精品不卡| 色老汉一区二区三区| 久久婷婷国产综合国色天香| 亚洲天堂免费在线观看视频| 免费不卡在线观看| 99久久久国产精品| 精品动漫一区二区三区在线观看| 亚洲少妇30p| 久久精品国产久精国产爱| 91美女片黄在线观看| 精品国产一区久久| 亚洲国产精品影院| 成人福利视频在线看| 日韩三级中文字幕| 亚洲综合丁香婷婷六月香| 成人综合在线观看| 日韩午夜三级在线| 亚洲一级片在线观看| 成人黄色软件下载| 欧美一区二区啪啪| 亚洲第一搞黄网站| 色狠狠色噜噜噜综合网| 亚洲国产精品av| 免费成人你懂的| 欧美日韩三级在线| 亚洲精品大片www| 9色porny自拍视频一区二区| 久久影院视频免费| 奇米综合一区二区三区精品视频| 91国产福利在线| 亚洲日本护士毛茸茸| 成人免费看的视频| 精品欧美乱码久久久久久1区2区| 亚洲成人动漫在线观看| 一本到高清视频免费精品| 亚洲日本护士毛茸茸| 91在线免费看| 自拍偷拍亚洲综合| 91网站黄www|