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

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

?? qlistbox.cpp

?? qtopia-phone-2.2.0下公共的控件實現源代碼。
?? CPP
?? 第 1 頁 / 共 5 頁
字號:
/************************************************************************ $Id: qt/src/widgets/qlistbox.cpp   2.3.12   edited 2005-10-27 $**** Implementation of QListBox widget class**** Created : 941121**** 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 "qlistbox.h"#ifndef QT_NO_LISTBOX#include "qarray.h"#include "qfontmetrics.h"#include "qpainter.h"#include "qstrlist.h"#include "qscrollbar.h"#include "qpixmap.h"#include "qapplication.h"#include "qptrdict.h"#include <stdlib.h>#ifdef QT_KEYPAD_MODEextern bool qt_singleFocusWidget(const QWidget *in);extern bool qt_modalEditingEnabled;#endifclass QListBoxPrivate{public:    QListBoxPrivate( QListBox *lb ):	head( 0 ), last( 0 ), cache( 0 ), cacheIndex( -1 ), current( 0 ), highlighted( 0 ),	layoutDirty( TRUE ),	mustPaintAll( TRUE ),	dragging( FALSE ),	variableHeight( TRUE /* !!! ### FALSE */ ),	variableWidth( FALSE ),	columnPosOne( 0 ),	rowModeWins( FALSE ),	rowMode( QListBox::FixedNumber ), columnMode( QListBox::FixedNumber ),	numRows( 1 ), numColumns( 1 ),	currentRow( 0 ), currentColumn( 0 ),	mousePressRow( -1 ), mousePressColumn( -1 ),	mouseMoveRow( -1 ), mouseMoveColumn( -1 ),	scrollTimer( 0 ), updateTimer( 0 ), visibleTimer( 0 ),	selectionMode( QListBox::Single ),	count( 0 ),	ignoreMoves( FALSE ),	listBox( lb ), currInputString( QString::null )    {}    void findItemByName( const QString &text );    ~QListBoxPrivate();    QListBoxItem * head, *last, *cache;    int cacheIndex;    QListBoxItem * current, *highlighted, *tmpCurrent;    bool layoutDirty;    bool mustPaintAll;    bool dragging;    bool variableHeight;    bool variableWidth;    QArray<int> columnPos;    QArray<int> rowPos;    int columnPosOne;    bool rowModeWins;    QListBox::LayoutMode rowMode;    QListBox::LayoutMode columnMode;    int numRows;    int numColumns;    int currentRow;    int currentColumn;    int mousePressRow;    int mousePressColumn;    int mouseMoveRow;    int mouseMoveColumn;    QTimer * scrollTimer;    QTimer * updateTimer;    QTimer * visibleTimer;    QTimer * resizeTimer;    QPoint scrollPos;    QListBox::SelectionMode selectionMode;    int count;    bool ignoreMoves;    bool clearing;    QListBox *listBox;    QString currInputString;    QTimer *inputTimer;    QListBoxItem *pressedItem, *selectAnchor;    bool select;    bool pressedSelected;    QRect *rubber;    QPtrDict<bool> selectable;    struct SortableItem {	QListBoxItem *item;    };    QSize sizeHint;    QSize minimumSizeHint;};QListBoxPrivate::~QListBoxPrivate(){    ASSERT( !head );}// NOT REVISED/*!  \class QListBoxItem qlistbox.h  \brief This is the base class of all list box items.  This class is the abstract base class of all list box items. If you  need to insert customized items into a QListBox, you must inherit  this class and reimplement paint(), height() and width().  \sa QListBox*//*!  Constructs an empty list box item in the listbox \a listbox*/QListBoxItem::QListBoxItem( QListBox* listbox ){    lbox = listbox;    s = FALSE;    dirty = TRUE;    custom_highlight = FALSE;    p = n = 0;    // just something that'll look noticeable in the debugger    x = y = 42;    if (listbox)	listbox->insertItem( this );}/*!  Constructs an empty list box item in the listbox \a listbox and  inserts it after the item \a after.*/QListBoxItem::QListBoxItem( QListBox* listbox, QListBoxItem *after ){    lbox = listbox;    s = FALSE;    dirty = TRUE;    custom_highlight = FALSE;    p = n = 0;    // just something that'll look noticeable in the debugger    x = y = 42;    if (listbox)	listbox->insertItem( this, after );}/*!  Destroys the list box item.*/QListBoxItem::~QListBoxItem(){    if ( lbox )	lbox->takeItem( this );}/*!  Defines whether the list box items is responsible to draw itself  in a highlighted state when being selected.  If \a b is FALSE (the default), then the listbox will draw some  default highlight indicator before calling paint().  \sa selected(), paint() */void QListBoxItem::setCustomHighlighting( bool b ){    custom_highlight = b;}/*!  \fn void QListBoxItem::paint( QPainter *p )  Implement this function to draw your item.  \sa height(), width()*//*!  \fn int QListBoxItem::width( const QListBox* lb ) const  Implement this function to return the width of your item.  The \a lb parameter is the same as listBox() and is provided  for convenience and compatibility.  \sa paint(), height()*/int QListBoxItem::width(const QListBox*)  const{    return QApplication::globalStrut().width();}/*!  \fn int QListBoxItem::height( const QListBox* lb ) const  Implement this function to return the height of your item.  The \a lb parameter is the same as listBox() and is provided  for convenience and compatibility.  \sa paint(), width()*/int QListBoxItem::height(const QListBox*)  const{    return QApplication::globalStrut().height();}/*!  Returns the text of the item, which is used for sorting too.  \sa setText()*/QString QListBoxItem::text() const{    return txt;}/*!  Returns the pixmap connected with the item, if any.  The default implementation of this function returns a null pointer.*/const QPixmap *QListBoxItem::pixmap() const{    return 0;}/*!  Specifies if this item may be selected by the user or not.  \sa isSelectable()*/void QListBoxItem::setSelectable( bool b ){    if ( !listBox() )	return;    bool *sel = listBox()->d->selectable.find( this );    if ( !sel )	listBox()->d->selectable.insert( this, new bool( b ) );    else	listBox()->d->selectable.replace( this, new bool( b ) );}/*!  Returns if this item is selectable or not.  \sa setSelectable()*/bool QListBoxItem::isSelectable() const{    if ( !listBox() )	return TRUE;    bool *sel = listBox()->d->selectable.find( ( (QListBoxItem*)this ) );    if ( !sel )	return TRUE;    else	return *sel;}/*!  \fn void QListBoxItem::setText( const QString &text )  Sets the text of the widget, which is used for sorting too.  The text is not shown unless explicitly drawn in paint().  \sa text()*//*!  \class QListBoxText qlistbox.h  \brief The QListBoxText class provides list box items with text.  The text is drawn in the widget's current font. If you need several  different fonts, you have to make your own subclass of QListBoxItem.  \sa QListBox, QListBoxItem*//*!  Constructs a list box item in listbox \a listtbox showing the text \a text.*/QListBoxText::QListBoxText( QListBox *listbox, const QString &text )    :QListBoxItem( listbox ){    setText( text );}/*!  Constructs a list box item showing the text \a text.*/QListBoxText::QListBoxText( const QString &text )    :QListBoxItem(){    setText( text );}/*!  Constructs a list box item in listbox \a listtbox showing the text \a text. The  item gets inserted after the item \a after.*/QListBoxText::QListBoxText( QListBox* listbox, const QString &text, QListBoxItem *after )    : QListBoxItem( listbox, after ){    setText( text );}/*!  Destroys the item.*/QListBoxText::~QListBoxText(){}/*!  Draws the text using \a painter.*/void QListBoxText::paint( QPainter *painter ){    QFontMetrics fm = painter->fontMetrics();    painter->drawText( 3, fm.ascent() + fm.leading()/2, text() );}/*!  Returns the height of a line of text.  \sa paint(), width()*/int QListBoxText::height( const QListBox* lb ) const{    int h = lb ? lb->fontMetrics().lineSpacing() + 2 : 0;    return QMAX( h, QApplication::globalStrut().height() );}/*!  Returns the width of this line.  \sa paint(), height()*/int QListBoxText::width( const QListBox* lb ) const{    int w = lb ? lb->fontMetrics().width( text() ) + 6 : 0;    return QMAX( w, QApplication::globalStrut().width() );}/*!  \class QListBoxPixmap qlistbox.h  \brief The QListBoxPixmap class provides list box items with a pixmap  and an optional text.  \sa QListBox, QListBoxItem*//*!  Constructs a new list box item in listbox \a listbox showing the pixmap \a pixmap.*/QListBoxPixmap::QListBoxPixmap( QListBox* listbox, const QPixmap &pixmap )    : QListBoxItem( listbox ){    pm = pixmap;}/*!  Constructs a new list box item showing the pixmap \a pixmap.*/QListBoxPixmap::QListBoxPixmap( const QPixmap &pixmap )    : QListBoxItem(){    pm = pixmap;}/*!  Constructs a new list box item in listbox \a listbox showing the pixmap \a pixmap. The item  gets inserted after the item \a after.*/QListBoxPixmap::QListBoxPixmap( QListBox* listbox, const QPixmap &pixmap, QListBoxItem *after )    : QListBoxItem( listbox, after ){    pm = pixmap;}/*!  Destroys the item.*/QListBoxPixmap::~QListBoxPixmap(){}/*!  Constructs a new list box item in listbox \a listbox showing the pixmap  \a pixmap and the text \a text*/QListBoxPixmap::QListBoxPixmap( QListBox* listbox, const QPixmap &pix, const QString& text)    : QListBoxItem( listbox ){    pm = pix;    setText( text );}/*!  Constructs a new list box item in listbox \a listbox showing the pixmap  \a pixmap. The item gets inserted after the item \a after.*/QListBoxPixmap::QListBoxPixmap( const QPixmap & pix, const QString& text)    : QListBoxItem(){    pm = pix;    setText( text );}/*!  Constructs a new list box item in listbox \a listbox showing the pixmap  \a pixmap and the string \a text . The item gets inserted after the  item \a after.*/QListBoxPixmap::QListBoxPixmap( QListBox* listbox, const QPixmap & pix, const QString& text,				QListBoxItem *after )    : QListBoxItem( listbox, after ){    pm = pix;    setText( text );}/*!  \fn const QPixmap *QListBoxPixmap::pixmap() const  Returns the pixmap connected with the item.*//*!  Draws the pixmap using \a painter.*/void QListBoxPixmap::paint( QPainter *painter ){    painter->drawPixmap( 3, 0, pm );    if ( !text().isEmpty() ) {	QFontMetrics fm = painter->fontMetrics();	int yPos;			// vertical text position	if ( pm.height() < fm.height() )	    yPos = fm.ascent() + fm.leading()/2;	else	    yPos = pm.height()/2 - fm.height()/2 + fm.ascent();	painter->drawText( pm.width() + 5, yPos, text() );    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久草av在线| 日本欧美一区二区| 性做久久久久久| 国产精品一品二品| 欧美视频一区在线观看| 欧美国产精品中文字幕| 日韩激情一二三区| 色综合欧美在线| 国产精品国模大尺度视频| 精品一区二区综合| 欧美人妖巨大在线| 一区二区日韩电影| caoporen国产精品视频| 久久蜜桃av一区二区天堂| 日本亚洲三级在线| 欧美视频完全免费看| 亚洲男人的天堂一区二区| 国产成人aaaa| 欧美国产精品一区二区| 国产一区二区不卡在线| 欧美哺乳videos| 免费观看30秒视频久久| 欧美巨大另类极品videosbest| 日韩理论片在线| 欧美日韩免费一区二区三区视频| 中文字幕欧美日本乱码一线二线| 国产一区二区成人久久免费影院| 精品国产sm最大网站免费看| 秋霞成人午夜伦在线观看| 欧美日韩成人综合在线一区二区| 亚洲精品免费在线播放| 色综合天天狠狠| 亚洲一本大道在线| 欧美日韩aaa| 免费成人你懂的| www国产精品av| 国产原创一区二区| 国产欧美精品一区二区三区四区| 高潮精品一区videoshd| 国产精品家庭影院| 91成人免费网站| 午夜精品福利一区二区蜜股av| 欧美日韩国产在线播放网站| 日韩福利电影在线| 精品国产91亚洲一区二区三区婷婷 | 欧美激情一二三区| 不卡一卡二卡三乱码免费网站| 亚洲欧洲精品成人久久奇米网| 99re热视频这里只精品| 午夜欧美电影在线观看| 日韩一区二区三区视频| 国产精品综合视频| 综合色中文字幕| 欧美喷潮久久久xxxxx| 久久精品国产久精国产| 中文子幕无线码一区tr| 91激情在线视频| 六月婷婷色综合| 亚洲色图丝袜美腿| 91精品国产一区二区三区蜜臀 | 五月综合激情日本mⅴ| 日韩一级精品视频在线观看| 狠狠色综合日日| 亚洲永久免费视频| 2欧美一区二区三区在线观看视频| 国产**成人网毛片九色 | 成人黄色小视频| 亚洲在线成人精品| www国产成人免费观看视频 深夜成人网| 国产成人av影院| 日韩福利视频导航| 亚洲人成伊人成综合网小说| 日韩欧美亚洲国产精品字幕久久久 | 国产日韩欧美电影| 欧美日韩久久不卡| 成人激情视频网站| 久久不见久久见免费视频1| 亚洲视频香蕉人妖| 亚洲欧洲日韩女同| 欧美电影免费观看高清完整版在| yourporn久久国产精品| 蜜桃视频一区二区三区| 亚洲女人的天堂| 国产日产亚洲精品系列| 正在播放亚洲一区| 91国在线观看| 不卡高清视频专区| 国产综合久久久久久久久久久久| 亚洲一区二区三区四区在线观看| 国产女主播在线一区二区| 3d动漫精品啪啪一区二区竹菊 | 国产成人自拍在线| 免费观看在线色综合| 亚洲免费观看高清完整版在线观看熊 | 亚洲三级在线看| 国产欧美精品一区aⅴ影院| 欧美成人一区二区三区片免费 | 国产亚洲一二三区| 日韩无一区二区| 欧美日韩精品欧美日韩精品一 | 亚洲一区二区三区在线| 国产精品成人网| 国产视频在线观看一区二区三区| 欧美老女人第四色| 欧美视频一区二区三区| 色久优优欧美色久优优| 91丨porny丨国产入口| 成人免费黄色在线| 国产91精品欧美| www.日韩大片| 91在线免费播放| 色综合天天综合网天天狠天天| 99综合影院在线| 99久久婷婷国产综合精品电影| 成人美女在线观看| 99久久夜色精品国产网站| av亚洲精华国产精华精华| av一区二区不卡| 91国产福利在线| 欧美日本国产视频| 日韩一区二区在线看片| 欧美mv日韩mv| 欧美国产激情一区二区三区蜜月| 国产精品毛片高清在线完整版 | 91丨porny丨最新| 欧美做爰猛烈大尺度电影无法无天| 色综合色狠狠综合色| 欧美在线免费视屏| 4438亚洲最大| 久久免费看少妇高潮| 国产精品天美传媒| 亚洲视频你懂的| 日韩成人免费看| 国产精品资源在线看| 99久久精品国产导航| 欧美体内she精视频| 精品噜噜噜噜久久久久久久久试看| www久久久久| 一区二区三区蜜桃| 美国欧美日韩国产在线播放| 国产精品66部| 在线观看日韩一区| 精品国一区二区三区| 亚洲欧洲日产国码二区| 日本怡春院一区二区| 欧美日韩精品高清| 精品成a人在线观看| 国产精品欧美经典| 丝袜国产日韩另类美女| 国产成人高清在线| 欧美裸体bbwbbwbbw| 国产日韩欧美一区二区三区综合| 亚洲欧美一区二区三区极速播放| 青青草97国产精品免费观看无弹窗版| 国产不卡在线一区| 欧美精品日韩综合在线| 国产精品午夜在线| 亚洲va欧美va天堂v国产综合| 精品亚洲国产成人av制服丝袜| 91影视在线播放| 久久影视一区二区| 偷拍日韩校园综合在线| 国产91在线观看| 91精品久久久久久久99蜜桃| 国产精品女同一区二区三区| 美女尤物国产一区| 欧美专区日韩专区| 国产欧美日韩一区二区三区在线观看| 婷婷久久综合九色综合伊人色| 成人晚上爱看视频| 日韩欧美不卡在线观看视频| 亚洲综合自拍偷拍| 成人av午夜电影| 久久麻豆一区二区| 免费久久99精品国产| 欧美在线观看一二区| 中文字幕一区二区不卡| 国产精品资源网| 日韩免费观看高清完整版在线观看| 亚洲综合在线免费观看| 99精品国产热久久91蜜凸| 日本一区二区在线不卡| 麻豆91免费看| 91精品欧美综合在线观看最新| 一区二区高清视频在线观看| www.激情成人| 国产精品久久看| 成人天堂资源www在线| 国产视频亚洲色图| 国产麻豆日韩欧美久久| 精品对白一区国产伦| 久久99国产精品久久| 精品福利二区三区| 国产麻豆一精品一av一免费| 欧美一级理论片| 久久国产麻豆精品| 久久久久久99久久久精品网站| 国产一区二区免费在线| 久久久亚洲精华液精华液精华液 | 日本中文字幕不卡|