亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
亚洲永久免费av| 日本精品一区二区三区高清| 成人久久18免费网站麻豆| 91尤物视频在线观看| 欧美精品 国产精品| 欧美va日韩va| 最新中文字幕一区二区三区| 午夜电影久久久| 国产精品女人毛片| 天天色天天操综合| 国产精品99久久久久久久女警| 91丨九色丨尤物| 日韩一区二区三区在线观看| 国产精品伦理一区二区| 亚洲成人av一区二区三区| 国产成人aaa| 在线成人高清不卡| 综合欧美一区二区三区| 久久国产三级精品| 91女神在线视频| www一区二区| 7777精品伊人久久久大香线蕉经典版下载 | 在线观看视频一区二区| 欧美mv日韩mv国产网站| 一区二区三区 在线观看视频| 久久精品国产亚洲5555| 一本大道久久精品懂色aⅴ| 久久综合给合久久狠狠狠97色69| 亚洲激情综合网| 国产成人精品亚洲777人妖 | 欧美一级片免费看| 日韩美女视频一区二区 | 国产精品久久久久久久岛一牛影视 | 国产精品久久免费看| 久久精品国产久精国产| 在线视频欧美区| 欧美国产日韩在线观看| 蜜臀av性久久久久蜜臀aⅴ| 色欧美88888久久久久久影院| 精品福利视频一区二区三区| 91精品国产麻豆| 亚洲最新视频在线观看| 99精品视频免费在线观看| 国产午夜精品一区二区三区视频 | 欧美美女激情18p| 亚洲乱码中文字幕| 成人免费观看男女羞羞视频| 欧美不卡视频一区| 视频一区二区中文字幕| 91高清视频在线| 欧美色综合影院| 亚洲图片欧美激情| 国产成a人无v码亚洲福利| 欧美成人艳星乳罩| 美腿丝袜在线亚洲一区| 欧美日韩国产成人在线免费| 亚洲精品欧美在线| 91麻豆文化传媒在线观看| 国产精品美女久久久久aⅴ| 国产精品69毛片高清亚洲| 26uuu久久天堂性欧美| 久久超碰97中文字幕| 国模一区二区三区白浆| 日韩欧美一级特黄在线播放| 一区二区激情视频| 色菇凉天天综合网| 亚洲视频免费看| 99精品视频在线播放观看| 综合久久久久综合| 99麻豆久久久国产精品免费| 99久久久精品| 《视频一区视频二区| 色偷偷成人一区二区三区91| 亚洲视频综合在线| 色妞www精品视频| 一区二区在线看| 欧美日本一区二区三区四区| 亚洲国产视频在线| 另类小说视频一区二区| 欧美精品一区二区三区在线| 国产一区在线看| 国产精品无圣光一区二区| 99视频热这里只有精品免费| 亚洲另类在线视频| 欧美日韩一区二区三区在线 | 欧美大片在线观看一区二区| 国产亚洲午夜高清国产拍精品 | 国产精品国产a| 日本韩国视频一区二区| 亚洲gay无套男同| 欧美刺激脚交jootjob| 国产成人在线电影| 中文字幕在线不卡| 欧美性感一类影片在线播放| 丝袜美腿一区二区三区| 2021久久国产精品不只是精品| 国产剧情av麻豆香蕉精品| 中文字幕永久在线不卡| 亚洲成人一区在线| 欧美一级二级在线观看| 懂色av中文一区二区三区| 亚洲人成网站影音先锋播放| 欧美日韩在线播| 精品在线亚洲视频| 自拍偷在线精品自拍偷无码专区| 欧美午夜免费电影| 精品在线一区二区| 亚洲欧美日韩一区二区 | 久久久久成人黄色影片| av中文字幕不卡| 偷窥国产亚洲免费视频| 久久综合狠狠综合久久激情| 91香蕉视频黄| 蜜臀91精品一区二区三区 | 91在线码无精品| 日韩二区在线观看| 9久草视频在线视频精品| 午夜激情一区二区| 国产亚洲欧美日韩俺去了| 欧美在线免费视屏| 国内外精品视频| 亚洲最大色网站| 久久亚洲精品国产精品紫薇| 日本精品裸体写真集在线观看 | 成人免费电影视频| 肉色丝袜一区二区| 欧美国产精品一区二区| 在线不卡免费欧美| www.亚洲免费av| 久久精品国产999大香线蕉| 自拍偷拍国产精品| 久久尤物电影视频在线观看| 欧洲激情一区二区| 高清不卡一二三区| 捆绑调教美女网站视频一区| 亚洲精品视频在线观看免费| 久久久99精品久久| 欧美久久一二区| 99精品一区二区三区| 国产人成亚洲第一网站在线播放| 欧美日韩dvd在线观看| 成人白浆超碰人人人人| 麻豆中文一区二区| 亚洲国产成人91porn| 中文字幕 久热精品 视频在线| 日韩一级大片在线| 在线视频一区二区免费| 成人白浆超碰人人人人| 国内成人免费视频| 男女性色大片免费观看一区二区| 亚洲激情欧美激情| 中文字幕精品一区| 精品国产免费一区二区三区四区 | 欧美精品精品一区| 一本到不卡精品视频在线观看| 国产精品一色哟哟哟| 强制捆绑调教一区二区| 亚洲午夜国产一区99re久久| 中文字幕在线不卡国产视频| 国产亚洲精品7777| 久久亚区不卡日本| 国产激情一区二区三区四区| 美女一区二区在线观看| 日韩av不卡一区二区| 亚洲风情在线资源站| 夜夜嗨av一区二区三区| 亚洲乱码日产精品bd| 国产精品不卡在线| 国产精品久久久久影院| 国产日韩v精品一区二区| 久久综合五月天婷婷伊人| 久久精品国产澳门| 麻豆极品一区二区三区| 青青草原综合久久大伊人精品 | 欧美日韩亚洲综合| 欧美色区777第一页| 91成人免费网站| 欧美三级韩国三级日本一级| 91视频精品在这里| 色哟哟亚洲精品| 性做久久久久久久免费看| 亚洲综合视频在线| 亚洲一区二区三区视频在线| 夜夜揉揉日日人人青青一国产精品 | 久久成人精品无人区| 久久99精品国产91久久来源| 精品一区二区三区视频在线观看 | 国产精品美女久久久久久久久 | 国产91精品一区二区麻豆网站 | 99re热这里只有精品视频| 97精品国产97久久久久久久久久久久| 本田岬高潮一区二区三区| 99精品偷自拍| 欧美性生交片4| 91精品国产91久久久久久最新毛片 | 国产精品美女一区二区在线观看| 国产精品全国免费观看高清 | 婷婷久久综合九色综合绿巨人 | 精品久久久久久久人人人人传媒 | 日本一区二区久久|