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

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

?? qtableview.cpp

?? qtopia-phone-2.2.0下公共的控件實現源代碼。
?? CPP
?? 第 1 頁 / 共 5 頁
字號:
/************************************************************************ $Id: qt/src/widgets/qtableview.cpp   2.3.12   edited 2005-10-27 $**** Implementation of QTableView class**** Created : 941115**** 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 "qtableview.h"#ifndef QT_NO_TABLEVIEW#include "qscrollbar.h"#include "qpainter.h"#include "qdrawutil.h"#include <limits.h>#ifdef QT_KEYPAD_MODEextern bool qt_modalEditingEnabled;#endifextern void qt_set_paintevent_clipping( QPaintDevice* dev, const QRegion& region);extern void qt_clear_paintevent_clipping();enum ScrollBarDirtyFlags {    verGeometry	  = 0x01,    verSteps	  = 0x02,    verRange	  = 0x04,    verValue	  = 0x08,    horGeometry	  = 0x10,    horSteps	  = 0x20,    horRange	  = 0x40,    horValue	  = 0x80,    verMask	  = 0x0F,    horMask	  = 0xF0};#define HSBEXT horizontalScrollBar()->sizeHint().height()#define VSBEXT verticalScrollBar()->sizeHint().width()class QCornerSquare : public QWidget		// internal class{public:    QCornerSquare( QWidget *, const char* = 0 );    void paintEvent( QPaintEvent * );};QCornerSquare::QCornerSquare( QWidget *parent, const char *name )	: QWidget( parent, name ){}void QCornerSquare::paintEvent( QPaintEvent * ){}// NOT REVISED/*!  \class QTableView qtableview.h  \brief This is an abstract base class for implementing tables  \ingroup abstractwidgets  A table view consists of a number of abstract cells organized in rows  and columns and a visible part called a view. The cells are identified  with a row index and a column index. The top left cell is in row 0,  column 0.  The behavior of the widget can be finely tuned using  setTableFlags(); a typical subclass will consist of little more than a  call to setTableFlags(), some table content manipulation, and an  implementation of paintCell().  Subclasses that need cells with  variable width or height must reimplement cellHeight() and/or  cellWidth(). Use updateTableSize() to tell QTableView when the  width or height has changed.  When you read this documentation, it is important to understand the  distinctions between the four pixel coordinate systems involved.  <ol>  <li> The \e cell coordinates.  (0,0) is the top left corner of a cell.  This is used by functions such as paintCell().  <li> The \e table coordinates.  (0,0) is the top left corner of the cell at  row 0 and column 0. These coordinates are absolute; that is, they are  independent of what part of the table is visible at the moment. This is  used by functions such as setXOffset() or maxYOffset().  <li> The \e widget coordinates. (0,0) is the top left corner of the widget,  \e including the frame.  This is used by functions such as repaint().  <li> The \e view coordinates.  (0,0) is the top left corner of the view, \e  excluding the frame.  This is the least-used coordinate system, used by  functions such as viewWidth().  </ol>  It is rather unfortunate that we have to use four different  coordinate systems, but if we were to provide a flexible and  powerful base class, there wasn't any way around it.  Note: The row,column indices are always given in that order,  i.e. first the vertical (row), then the horizontal (column). This is  the opposite order of all pixel operations, which take first the  horizontal (x), then the vertical (y).  <img src=qtablevw-m.png> <img src=qtablevw-w.png>  \warning the functions setNumRows(), setNumCols(), setCellHeight(),  setCellWidth(), setTableFlags() and clearTableFlags() may cause  virtual functions like cellWidth() and cellHeight() to be called,  even if autoUpdate() is FALSE.  This may cause errors if relevant  state variables are not initialized.  \warning Experience has shown that use of this widget tends to bring  more bugs than expected, and our analysis indicates that widget's  very flexibility is the problem.  If QScrollView or QListBox can  easily be made to do the job you need, we recommend subclassing  those widgets rather than QTableView. In addition, QScrollView makes  it easy to have child widgets inside tables, something QTableView  doesn't support at all.  \sa QScrollView  <a href="guibooks.html#fowler">GUI Design Handbook: Table</a>*//*!  Constructs a table view.  All the arguments are passed to the QFrame  constructor.  The \link setTableFlags() table flags\endlink are all cleared (set to zero).  Set \c Tbl_autoVScrollBar or \c Tbl_autoHScrollBar to get automatic scroll  bars and \c Tbl_clipCellPainting to get safe clipping.  The \link setCellHeight() cell height\endlink and \link setCellWidth()  cell width\endlink are set to 0.  Frame line shapes (QFrame::HLink and QFrame::VLine) are disallowed,  see QFrame::setFrameStyle().  Note that the \a f argument is \e not \link setTableFlags() table  flags \endlink but rather \link QWidget::QWidget() widget  flags. \endlink*/QTableView::QTableView( QWidget *parent, const char *name, WFlags f )    : QFrame( parent, name, f, FALSE ){    nRows		 = nCols      = 0;	// zero rows/cols    xCellOffs		 = yCellOffs  = 0;	// zero offset    xCellDelta		 = yCellDelta = 0;	// zero cell offset    xOffs		 = yOffs      = 0;	// zero total pixel offset    cellH		 = cellW      = 0;	// user defined cell size    tFlags		 = 0;    vScrollBar		 = hScrollBar = 0;	// no scroll bars    cornerSquare	 = 0;    sbDirty		 = 0;    eraseInPaint	 = FALSE;    verSliding		 = FALSE;    verSnappingOff	 = FALSE;    horSliding		 = FALSE;    horSnappingOff	 = FALSE;    coveringCornerSquare = FALSE;    inSbUpdate		 = FALSE;    setFontPropagation( SamePalette );    setPalettePropagation( SamePalette );}/*!  Destructs the table view.*/QTableView::~QTableView(){    delete vScrollBar;    delete hScrollBar;    delete cornerSquare;}/*!  \internal  Reimplements QWidget::setBackgroundColor() for binary compatibility.  \sa setPalette()*/void QTableView::setBackgroundColor( const QColor &c ){    QWidget::setBackgroundColor( c );}/*!\reimp*/void QTableView::setPalette( const QPalette &p ){    QWidget::setPalette( p );}/*!\reimp*/void QTableView::show(){    showOrHideScrollBars();    QWidget::show();}/*!  \overload void QTableView::repaint( bool erase )  Repaints the entire view.*//*!  Repaints the table view directly by calling paintEvent() directly,  unless updates are disabled.  Erases the view area \e (x,y,w,h) if \e erase is TRUE. Parameters \e  (x,y) are in \e widget coordinates.  If \e w is negative, it is replaced with <code>width() - x</code>.  If \e h is negative, it is replaced width <code>height() - y</code>.  Doing a repaint() usually is faster than doing an update(), but  calling update() many times in a row will generate a single paint  event.  At present, QTableView is the only widget that reimplements \link  QWidget::repaint() repaint()\endlink.	 It does this because by  clearing and then repainting one cell at at time, it can make the  screen flicker less than it would otherwise.  */void QTableView::repaint( int x, int y, int w, int h, bool erase ){    if ( !isVisible() || testWState(WState_BlockUpdates) )	return;    if ( w < 0 )	w = width()  - x;    if ( h < 0 )	h = height() - y;    QRect r( x, y, w, h );    if ( r.isEmpty() )	return; // nothing to do    QPaintEvent e( r );    if ( erase && backgroundMode() != NoBackground )	eraseInPaint = TRUE;			// erase when painting    qt_set_paintevent_clipping( this, r );    paintEvent( &e );    qt_clear_paintevent_clipping();    eraseInPaint = FALSE;}/*!  \overload void QTableView::repaint( const QRect &r, bool erase )*//*!  \fn int QTableView::numRows() const  Returns the number of rows in the table.  \sa numCols(), setNumRows()*//*!  Sets the number of rows of the table to \e rows (must be non-negative).  Does not change topCell().  The table repaints itself automatically if autoUpdate() is set.  \sa numCols(), setNumCols(), numRows()*/void QTableView::setNumRows( int rows ){    if ( rows < 0 ) {#if defined(CHECK_RANGE)	qWarning( "QTableView::setNumRows: (%s) Negative argument %d.",		 name( "unnamed" ), rows );#endif	return;    }    if ( nRows == rows )	return;    if ( autoUpdate() && isVisible() ) {	int oldLastVisible = lastRowVisible();	int oldTopCell = topCell();	nRows = rows;	if ( autoUpdate() && isVisible() &&	     ( oldLastVisible != lastRowVisible() || oldTopCell != topCell() ) )		repaint( oldTopCell != topCell() );    } else {	// Be more careful - if destructing, bad things might happen.	nRows = rows;    }    updateScrollBars( verRange );    updateFrameSize();}/*!  \fn int QTableView::numCols() const  Returns the number of columns in the table  \sa numRows(), setNumCols()*//*!  Sets the number of columns of the table to \e cols (must be non-negative).  Does not change leftCell().  The table repaints itself automatically if autoUpdate() is set.  \sa numCols(), numRows(), setNumRows()*/void QTableView::setNumCols( int cols ){    if ( cols < 0 ) {#if defined(CHECK_RANGE)	qWarning( "QTableView::setNumCols: (%s) Negative argument %d.",		 name( "unnamed" ), cols );#endif	return;    }    if ( nCols == cols )	return;    int oldCols = nCols;    nCols = cols;    if ( autoUpdate() && isVisible() ) {	int maxCol = lastColVisible();	if ( maxCol >= oldCols || maxCol >= nCols )	    repaint();    }    updateScrollBars( horRange );    updateFrameSize();}/*!  \fn int QTableView::topCell() const  Returns the index of the first row in the table that is visible in  the view.  The index of the very first row is 0.  \sa leftCell(), setTopCell()*//*!  Scrolls the table such that \e row becomes the top row.  The index of the very first row is 0.  \sa setYOffset(), setTopLeftCell(), setLeftCell()*/void QTableView::setTopCell( int row ){    setTopLeftCell( row, -1 );    return;}/*!  \fn int QTableView::leftCell() const  Returns the index of the first column in the table that is visible in  the view.  The index of the very leftmost column is 0.  \sa topCell(), setLeftCell()*//*!  Scrolls the table such that \e col becomes the leftmost  column.  The index of the very leftmost column is 0.  \sa setXOffset(), setTopLeftCell(), setTopCell()*/void QTableView::setLeftCell( int col ){    setTopLeftCell( -1, col );    return;}/*!  Scrolls the table such that the cell at row \e row and colum \e  col becomes the top left cell in the view.  The cell at the extreme  top left of the table is at position (0,0).  \sa setLeftCell(), setTopCell(), setOffset()*/void QTableView::setTopLeftCell( int row, int col ){    int newX = xOffs;    int newY = yOffs;    if ( col >= 0 ) {	if ( cellW ) {	    newX = col*cellW;	    if ( newX > maxXOffset() )		newX = maxXOffset();	} else {	    newX = 0;	    while ( col )		newX += cellWidth( --col );   // optimize using current! ###	}    }    if ( row >= 0 ) {	if ( cellH ) {	    newY = row*cellH;	    if ( newY > maxYOffset() )		newY = maxYOffset();	} else {	    newY = 0;	    while ( row )		newY += cellHeight( --row );   // optimize using current! ###	}    }    setOffset( newX, newY );}/*!  \fn int QTableView::xOffset() const  Returns the x coordinate in \e table coordinates of the pixel which is  currently on the left edge of the view.  \sa setXOffset(), yOffset(), leftCell() *//*!  Scrolls the table such that \e x becomes the leftmost pixel in the view.  The \e x parameter is in \e table coordinates.  The interaction with \link setTableFlags() Tbl_snapToHGrid  \endlink is tricky.  \sa xOffset(), setYOffset(), setOffset(), setLeftCell()*/void QTableView::setXOffset( int x ){    setOffset( x, yOffset() );}/*!  \fn int QTableView::yOffset() const  Returns the y coordinate in \e table coordinates of the pixel which is

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产三级精品在线| 成人综合在线视频| 日韩一区二区三区观看| 亚洲mv大片欧洲mv大片精品| 欧美日韩一本到| 日韩高清一区二区| 日韩午夜中文字幕| 国产精品自拍在线| 国产精品久久久久久久久久久免费看| 成人精品国产一区二区4080| 国产精品国产三级国产a| 色素色在线综合| 亚洲成a人v欧美综合天堂下载| 在线不卡一区二区| 黑人巨大精品欧美一区| 国产精品初高中害羞小美女文| 色域天天综合网| 久久精品国产一区二区三| 久久精品人人做人人爽人人| 91麻豆精品在线观看| 日韩精品视频网| 欧美激情艳妇裸体舞| 一本到三区不卡视频| 免费在线看一区| 中文字幕av一区 二区| 欧美日韩中文精品| 国内成+人亚洲+欧美+综合在线| 久久精品这里都是精品| 日本电影亚洲天堂一区| 久久99精品国产麻豆不卡| 国产精品网站在线播放| 7777精品伊人久久久大香线蕉超级流畅| 久久爱另类一区二区小说| 国产精品毛片大码女人| 91精品国产综合久久福利| 国产成人精品免费在线| 一区二区在线免费观看| 精品国产精品网麻豆系列| 97成人超碰视| 九九在线精品视频| 亚洲一二三四久久| 国产欧美一区二区精品久导航 | 不卡影院免费观看| 舔着乳尖日韩一区| 亚洲色图20p| 精品国产自在久精品国产| 日本韩国欧美国产| 国产成人av电影在线| 日韩av高清在线观看| 亚洲精品中文在线| 国产午夜精品久久| 日韩午夜在线观看| 欧美另类久久久品| 91久久精品日日躁夜夜躁欧美| 国产精品一区二区三区乱码| 青青国产91久久久久久| 亚洲在线视频一区| 综合中文字幕亚洲| 国产三级欧美三级| 精品成人一区二区三区| 91精品国产一区二区三区蜜臀 | 成人永久免费视频| 国产一区美女在线| 另类专区欧美蜜桃臀第一页| 亚洲成av人片观看| 亚洲一区二区精品3399| 亚洲精品中文在线影院| 中文字幕在线一区免费| 日本一区二区久久| 欧美国产日产图区| 久久丝袜美腿综合| 久久久久久久久伊人| 亚洲精品一线二线三线| 欧美变态tickling挠脚心| 91精品一区二区三区久久久久久| 在线观看av一区二区| 日本久久一区二区三区| 色吧成人激情小说| 欧美日韩精品三区| 91精品国产手机| 日韩精品一区二区三区视频播放| 91精品国产乱码| 日韩欧美一级二级| 久久精品一区二区三区不卡| 精品黑人一区二区三区久久| 精品三级在线看| 久久久美女艺术照精彩视频福利播放| 精品1区2区在线观看| 久久综合五月天婷婷伊人| 国产午夜精品一区二区三区嫩草| 久久综合九色综合97_久久久| 欧美成人精品福利| 欧美精品一区在线观看| 精品国产免费人成电影在线观看四季| 精品久久久久一区| 国产蜜臀97一区二区三区 | 亚洲婷婷国产精品电影人久久| 国产精品视频yy9299一区| 国产精品久久久久久亚洲毛片| 中文字幕亚洲一区二区av在线| 亚洲欧美日韩国产成人精品影院| 亚洲国产综合91精品麻豆| 日韩va欧美va亚洲va久久| 精品亚洲国产成人av制服丝袜| 国产精品一区二区91| 91免费版pro下载短视频| 欧美色视频在线观看| 欧美一区二区视频网站| 日韩一级免费观看| 中文字幕av资源一区| 亚洲成av人片一区二区| 精品一区二区三区不卡 | 欧美sm美女调教| 国产网红主播福利一区二区| 日韩久久一区二区| 视频在线观看一区二区三区| 久久99国产精品麻豆| a4yy欧美一区二区三区| 制服丝袜激情欧洲亚洲| 中日韩免费视频中文字幕| 午夜精品福利一区二区三区av| 国产传媒欧美日韩成人| 欧美午夜宅男影院| 久久天天做天天爱综合色| 亚洲自拍偷拍图区| 国产v日产∨综合v精品视频| 在线观看91av| 18欧美亚洲精品| 韩国v欧美v亚洲v日本v| 欧美在线free| 国产精品天干天干在线综合| 日本成人在线视频网站| 色播五月激情综合网| 国产欧美日韩另类一区| 日韩一区精品视频| 91性感美女视频| 国产欧美一区二区精品婷婷| 日本三级韩国三级欧美三级| 91麻豆精品一区二区三区| 日韩精品一区二区三区中文精品| 亚洲一区二区综合| k8久久久一区二区三区| 亚洲精品一区二区三区在线观看| 一卡二卡三卡日韩欧美| eeuss鲁片一区二区三区| 欧美xingq一区二区| 亚洲精品成人精品456| 成人丝袜视频网| 久久亚洲免费视频| 日韩av在线发布| 3d动漫精品啪啪一区二区竹菊| 一区二区三区四区国产精品| 成人一级片在线观看| 精品国产精品网麻豆系列 | 五月天久久比比资源色| 色女孩综合影院| 亚洲欧美偷拍三级| 99久久精品免费精品国产| 国产婷婷色一区二区三区四区 | 日本va欧美va瓶| 欧美系列亚洲系列| 伊人一区二区三区| 91久久免费观看| 亚洲激情在线激情| 一本色道亚洲精品aⅴ| 中文字幕中文字幕一区| voyeur盗摄精品| 亚洲欧美综合另类在线卡通| 91亚洲男人天堂| 亚洲视频在线观看一区| 成人av免费在线观看| 中文字幕免费不卡| 成人av手机在线观看| 亚洲品质自拍视频| 日本国产一区二区| 日韩成人午夜精品| 日韩欧美国产一区二区三区| 久久99国产精品免费网站| 久久婷婷国产综合国色天香| 国产精品456| 国产精品久久久久久亚洲毛片| 91色视频在线| 亚洲精品福利视频网站| 欧美日韩不卡在线| 日本不卡123| 国产调教视频一区| 91伊人久久大香线蕉| 一片黄亚洲嫩模| 日韩西西人体444www| 国产成+人+日韩+欧美+亚洲| 最新日韩av在线| 欧美日韩你懂得| 国产真实乱子伦精品视频| 国产精品免费视频网站| 欧美性做爰猛烈叫床潮| 老司机精品视频导航| 国产精品卡一卡二| 91精品国产综合久久香蕉麻豆| 国产一区二区在线影院| 最新国产成人在线观看|