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

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

?? qmainwindow.cpp

?? qtopia-phone-2.2.0下公共的控件實現源代碼。
?? CPP
?? 第 1 頁 / 共 5 頁
字號:
/****************************************************************************** $Id: qt/src/widgets/qmainwindow.cpp   2.3.12   edited 2005-10-27 $**** Implementation of QMainWindow class**** Created : 980312**** 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 "qmainwindow.h"#ifndef QT_NO_MAINWINDOW#include "qtimer.h"#include "qlayout.h"#include "qobjectlist.h"#include "qobjectdict.h"#include "qapplication.h"#include "qlist.h"#include "qmap.h"#include "qcursor.h"#include "qpainter.h"#include "qmenubar.h"#include "qtoolbar.h"#include "qstatusbar.h"#include "qscrollview.h"#include "qtooltip.h"#include "qdatetime.h"#include "qtooltip.h"#include "qwhatsthis.h"#include "qbitmap.h"//#define QMAINWINDOW_DEBUG//****************************************************************************// -------------------------- static convenience functions -------------------//****************************************************************************bool operator<( const QRect &r1, const QRect &r2 ){    return ( r1.x() < r2.x() ||	     r1.y() < r2.y() );}static Qt::Orientation swap_orientation( Qt::Orientation o ){    if ( o == Qt::Horizontal )	return Qt::Vertical;    else	return Qt::Horizontal;}#ifndef QT_NO_TOOLBARstatic int tb_pos( QToolBar *t, Qt::Orientation orient, bool swap = FALSE ){    Qt::Orientation o = orient;    if ( swap )	o = swap_orientation( o );    if ( o == Qt::Horizontal )	return t->x();    else	return t->y();}static int tb_extend( QToolBar *t, Qt::Orientation orient, bool swap = FALSE ){    Qt::Orientation o = orient;    if ( swap )	o = swap_orientation( o );    if ( o == Qt::Horizontal )	return t->width();    else	return t->height();}#endifstatic int rect_pos( const QRect &r, Qt::Orientation orient, bool swap = FALSE ){    Qt::Orientation o = orient;    if ( swap )	o = swap_orientation( o );    if ( o == Qt::Horizontal )	return r.x();    else	return r.y();}static int rect_extend( const QRect &r, Qt::Orientation orient, bool swap = FALSE ){    Qt::Orientation o = orient;    if ( swap )	o = swap_orientation( o );    if ( o == Qt::Horizontal )	return r.width();    else	return r.height();}static int size_extend( const QSize &s, Qt::Orientation orient, bool swap = FALSE ){    Qt::Orientation o = orient;    if ( swap )	o = swap_orientation( o );    if ( o == Qt::Horizontal )	return s.width();    else	return s.height();}#ifndef QT_NO_TOOLBARstatic QSize size_hint( QToolBar *tb ){    if ( !tb || !tb->isVisibleTo( tb->parentWidget() ) )	return QSize( 0, 0 );    QSize s = tb->sizeHint();    if ( tb->minimumWidth() > s.width() )	s.setWidth( tb->minimumWidth() );    if ( tb->minimumHeight() > s.height() )	s.setHeight( tb->minimumHeight() );    return s;}#endif//************************************************************************************************// ------------------------ QMainWindowPrivate  -----------------------//************************************************************************************************class QHideDock;class QToolLayout;class QMainWindowPrivate {public:#ifndef QT_NO_TOOLBAR    struct ToolBar {	ToolBar() : t(0), nl(FALSE) {}	ToolBar( QToolBar * tb, bool n=FALSE )	    : t( tb ), hiddenBefore( 0 ), hiddenAfter( 0 ), nl( n ),	      oldDock( QMainWindow::Top ), oldIndex( 0 ), extraOffset( -1 )  {}	bool isStretchable( Qt::Orientation o ) const	    { return o == Qt::Horizontal ? t->isHorizontalStretchable() : t->isVerticalStretchable(); }	QToolBar * t;	ToolBar *hiddenBefore;	ToolBar *hiddenAfter;	bool nl;	QValueList<int> disabledDocks;	QMainWindow::ToolBarDock oldDock;	int oldIndex;	int extraOffset;    };    typedef QList<ToolBar> ToolBarDock;#endif    enum InsertPos { Before, After, Above, Below, SameIndex };    QMainWindowPrivate() : #ifndef QT_NO_TOOLBAR	tornOff(0), unmanaged(0), hidden( 0 ),#endif	mb(0), sb(0), ttg(0), mc(0), timer(0), tll(0), ubp( FALSE ), utl( FALSE ),	justify( FALSE )    {	rectPainter = 0;#ifndef QT_NO_TOOLBAR	top = new ToolBarDock;	left = new ToolBarDock;	right = new ToolBarDock;	bottom = new ToolBarDock;	hidden = new ToolBarDock;	unmanaged = new ToolBarDock;	tornOff = new ToolBarDock;	dockable[ (int)QMainWindow::Left ] = TRUE;	dockable[ (int)QMainWindow::Right ] = TRUE;	dockable[ (int)QMainWindow::Top ] = TRUE;	dockable[ (int)QMainWindow::Bottom ] = TRUE;	dockable[ (int)QMainWindow::Unmanaged ] = TRUE;	dockable[ (int)QMainWindow::Minimized ] = TRUE;	dockable[ (int)QMainWindow::TornOff ] = TRUE;	lLeft = lRight = lTop = lBottom = 0;	movable = TRUE;	inMovement = FALSE;	dockMenu = TRUE;#endif	lastTopHeight = -1;#ifndef QT_NO_CURSOR	oldCursor = ArrowCursor;#endif    }#ifndef QT_NO_TOOLBAR    ToolBar *findToolbar( QToolBar *t, QMainWindowPrivate::ToolBarDock *&dock );    ToolBar *takeToolBarFromDock( QToolBar * t, bool remember = FALSE );#endif    ~QMainWindowPrivate()    {#ifndef QT_NO_TOOLBAR	if ( top ) {	    top->setAutoDelete( TRUE );	    delete top;	}	if ( left ) {	    left->setAutoDelete( TRUE );	    delete left;	}	if ( right ) {	    right->setAutoDelete( TRUE );	    delete right;	}	if ( bottom ) {	    bottom->setAutoDelete( TRUE );	    delete bottom;	}	if ( tornOff ) {	    tornOff->setAutoDelete( TRUE );	    delete tornOff;	}	if ( unmanaged ) {	    unmanaged->setAutoDelete( TRUE );	    delete unmanaged;	}	if ( hidden ) {	    hidden->setAutoDelete( TRUE );	    delete hidden;	}#endif    }#ifndef QT_NO_TOOLBAR    ToolBarDock * top, * left, * right, * bottom, * tornOff, * unmanaged, *hidden;    QToolLayout *lLeft, *lRight, *lTop, *lBottom;#endif#ifndef QT_NO_MENUBAR    QMenuBar * mb;#else    QWidget * mb;#endif    QStatusBar * sb;    QToolTipGroup * ttg;    QWidget * mc;    QTimer * timer;    QBoxLayout * tll;    bool ubp;    bool utl;    bool justify;    QPoint pos;    QPoint offset;    QPainter *rectPainter;    QRect oldPosRect;    QRect origPosRect;    bool oldPosRectValid, movedEnough;    QPoint cursorOffset;    int lastTopHeight;#ifndef QT_NO_CURSOR    QCursor oldCursor;#endif#ifndef QT_NO_TOOLBAR    QMainWindow::ToolBarDock oldDock, origDock;    QHideDock *hideDock;    QMap< int, bool > dockable;    bool movable;    bool opaque;    bool inMovement;    bool dockMenu;#endif};#ifndef QT_NO_TOOLBARQMainWindowPrivate::ToolBar * QMainWindowPrivate::findToolbar( QToolBar * t,							       QMainWindowPrivate::ToolBarDock *&dock ){    QMainWindowPrivate::ToolBarDock* docks[] = {	left, right, top, bottom, unmanaged, tornOff, hidden    };    QMainWindowPrivate::ToolBarDock *l = 0;    for ( unsigned int i = 0; i < 7; ++i ) {	l = docks[ i ];	if ( !l )	    continue;	QMainWindowPrivate::ToolBar * ct = l->first();	do {	    if ( ct && ct->t == t ) {		dock = l;		return ct;	    }	} while( ( ct = l->next() ) != 0 );    }    dock = 0;    return 0;}QMainWindowPrivate::ToolBar * QMainWindowPrivate::takeToolBarFromDock( QToolBar * t, bool remember ){    QMainWindowPrivate::ToolBarDock *l;    QMainWindowPrivate::ToolBar *tb = findToolbar( t, l );    if ( tb && l ) {	int p = l->findRef( tb );	if ( remember ) {	    if ( p < (int)l->count() - 1 && !l->at( p + 1 )->nl ) {		l->at( p + 1 )->hiddenBefore = tb;#ifdef QMAINWINDOW_DEBUG		qDebug( "remember toolbar before me" );#endif	    } else if ( p > 0 && !tb->nl ) {		l->at( p - 1 )->hiddenAfter = tb;#ifdef QMAINWINDOW_DEBUG		qDebug( "remember toolbar after me" );#endif	    }	    if ( p < (int)l->count() - 1 && tb->nl )		l->at( p + 1 )->nl = TRUE;	    tb->oldIndex = p;	}	return l->take( p );    }    return 0;}#endif//************************************************************************************************// --------------------------------- QToolLayout ---------------------------------//************************************************************************************************/*  This layout class does not work very well for vertical toolbars yet */class QToolLayout : public QLayout{    Q_OBJECT#ifndef QT_NO_TOOLBARpublic:    QToolLayout( QLayout* parent, QMainWindowPrivate::ToolBarDock *d,		 QBoxLayout::Direction dd, bool justify,		 int space=-1, const char *name=0 )	: QLayout( parent, space, name ), dock(d), dir(dd), fill(justify)	{ init(); }    ~QToolLayout();    void addItem( QLayoutItem *item);    bool hasHeightForWidth() const;    int heightForWidth( int ) const;    int widthForHeight( int ) const;    QSize sizeHint() const;    QSize minimumSize() const;    QLayoutIterator iterator();    QSizePolicy::ExpandData expanding() const { return QSizePolicy::NoDirection; }    void setDirection( QBoxLayout::Direction d ) { dir = d; }    QBoxLayout::Direction direction() const { return dir; }    void newLine();    void setRightJustified( bool on ) { fill = on; }    bool rightJustified() const { return fill; }    void invalidate();protected:    void setGeometry( const QRect& );private:    void init();    int layoutItems( const QRect&, bool testonly = FALSE );    QMainWindowPrivate::ToolBarDock *dock;    QBoxLayout::Direction dir;    bool fill;    int cached_width, cached_height;    int cached_hfw, cached_wfh;    friend class QMainWindowLayout;#endif};#ifndef QT_NO_TOOLBARQSize QToolLayout::sizeHint() const{    if ( !dock || !dock->first() )	return QSize(0,0);    int w = 0;    int h = 0;    QListIterator<QMainWindowPrivate::ToolBar> it(*dock);    QMainWindowPrivate::ToolBar *tb;    it.toFirst();    int y = -1;    int x = -1;    int ph = 0;    int pw = 0;    while ( (tb=it.current()) != 0 ) {	int plush = 0, plusw = 0;	++it;	if ( hasHeightForWidth() ) {	    if ( y != tb->t->y() )		plush = ph;	    y = tb->t->y();	    ph = tb->t->height();	} else {	    if ( x != tb->t->x() )		plusw = pw;	    x = tb->t->x();	    pw = tb->t->width();	}	h = QMAX( h, tb->t->height() + plush );	w = QMAX( w, tb->t->width() + plusw );    }    if ( hasHeightForWidth() )	return QSize( 0, h );    return QSize( w, 0 );}bool QToolLayout::hasHeightForWidth() const{    //direction is the dock's direction, which is perpendicular to the layout    return dir == QBoxLayout::Up || dir == QBoxLayout::Down;}void QToolLayout::init(){    cached_width = 0;    cached_height = 0;    cached_hfw = -1;    cached_wfh = -1;}QToolLayout::~QToolLayout(){}QSize QToolLayout::minimumSize() const{    if ( !dock )	return QSize(0,0);    QSize s;    QListIterator<QMainWindowPrivate::ToolBar> it(*dock);    QMainWindowPrivate::ToolBar *tb;    while ( (tb=it.current()) != 0 ) { 	++it; 	s = s.expandedTo( tb->t->minimumSizeHint() ) 	    .expandedTo(tb->t->minimumSize());    }    if ( s.width() < 0 )	s.setWidth( 0 );    if ( s.height() < 0 )	s.setHeight( 0 );    return s;}void QToolLayout::invalidate(){    cached_width = 0;    cached_height = 0;}int QToolLayout::layoutItems( const QRect &r, bool testonly )

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜国产不卡在线观看视频| 国产精品高清亚洲| 制服丝袜一区二区三区| 欧美美女一区二区在线观看| 成人99免费视频| www.欧美.com| 99久久精品免费精品国产| 成人午夜免费电影| eeuss鲁片一区二区三区在线观看| 成人黄色片在线观看| 日本韩国精品在线| 日韩一区二区三区免费观看| 久久人人超碰精品| 国产精品久久久久天堂| 国产精品网友自拍| 夜色激情一区二区| 免费在线观看视频一区| 久久99国产精品免费网站| 精品亚洲成a人| 成人黄色免费短视频| 在线观看欧美日本| 亚洲国产精品成人综合| 爽好久久久欧美精品| 美女诱惑一区二区| 欧美片在线播放| 久久精品夜色噜噜亚洲a∨| 洋洋av久久久久久久一区| 国内欧美视频一区二区| 精品一区免费av| 从欧美一区二区三区| av一二三不卡影片| 欧美一区二区三区在线视频| 精品国产91洋老外米糕| 日韩精品免费视频人成| 国产91精品一区二区| 精品蜜桃在线看| 激情六月婷婷综合| 欧美一区二区三区色| 日韩中文字幕不卡| 在线观看日韩电影| 一区av在线播放| 欧美性大战久久久久久久蜜臀 | 日韩三级av在线播放| 亚洲无线码一区二区三区| 欧美在线999| 亚洲福利一区二区三区| 欧美日韩一区三区| 偷偷要91色婷婷| 欧美一区二区视频在线观看2022 | 在线电影国产精品| 日韩专区一卡二卡| 精品日韩在线观看| 国产成人午夜高潮毛片| 国产精品国产馆在线真实露脸| 国产精品88av| 亚洲国产欧美在线| 精品国产一区二区三区忘忧草| 国产传媒欧美日韩成人| 亚洲精品老司机| 欧美一级片在线| 成人高清视频在线| 日韩高清电影一区| 国产精品白丝在线| 日韩精品一区二区三区视频播放| 国内精品写真在线观看| 亚洲欧美视频在线观看| 日韩久久精品一区| 欧美性猛交xxxxxxxx| 丁香桃色午夜亚洲一区二区三区| 自拍偷拍亚洲欧美日韩| 日韩午夜精品视频| 在线观看三级视频欧美| 成人av在线一区二区三区| 秋霞午夜av一区二区三区| 亚洲人被黑人高潮完整版| 久久综合久久99| 91精品国产福利| 欧美丰满美乳xxx高潮www| 99久久99久久综合| 成人激情av网| 成人污视频在线观看| 韩国女主播成人在线观看| 视频一区中文字幕| 亚洲mv大片欧洲mv大片精品| 亚洲激情在线激情| 亚洲品质自拍视频网站| 亚洲激情第一区| 亚洲人成亚洲人成在线观看图片| 亚洲国产岛国毛片在线| 久久久影院官网| 久久久精品tv| 国产视频一区不卡| 国产精品久久久久久久久免费相片| 日韩欧美色综合| 久久这里只精品最新地址| 日韩视频免费观看高清完整版在线观看| 欧美高清视频一二三区 | 日本人妖一区二区| 精品在线一区二区三区| 成人三级在线视频| 在线免费观看日韩欧美| 日韩一二三四区| 国产精品久久久久久久久免费相片 | 亚洲精品国产精品乱码不99| 一区二区三区美女视频| 午夜亚洲福利老司机| 国产美女精品人人做人人爽| 粉嫩av亚洲一区二区图片| 欧美自拍偷拍一区| 亚洲精品一线二线三线无人区| 国产日韩欧美在线一区| 亚洲女女做受ⅹxx高潮| 国产美女精品一区二区三区| 在线日韩一区二区| 中文字幕在线观看不卡| 中文字幕在线一区二区三区| 青青草精品视频| 日本精品视频一区二区| 久久青草欧美一区二区三区| 亚洲成人av一区| 色欧美片视频在线观看在线视频| 日韩欧美国产综合一区| 一区二区三区国产| 丰满岳乱妇一区二区三区| 欧美一区二区三区免费在线看| 国产精品无码永久免费888| 蜜臀精品久久久久久蜜臀 | 国产午夜精品福利| 日本成人在线电影网| 欧美日韩国产美| 亚洲伦在线观看| 91黄色免费观看| 亚洲精品欧美二区三区中文字幕| 国产成人三级在线观看| 欧美成人一区二区三区在线观看 | 蜜桃久久久久久久| 欧美精三区欧美精三区| 午夜不卡av在线| 欧美日本在线一区| 免费成人美女在线观看.| 日韩精品在线一区二区| 蜜臀av一区二区在线免费观看| 日韩一级片在线播放| 国产电影一区二区三区| 亚洲精品中文字幕乱码三区| 欧美无乱码久久久免费午夜一区 | 欧美精品第1页| 美女一区二区视频| 国产精品乱码一区二区三区软件| 91色porny在线视频| 视频在线观看一区| 国产丝袜欧美中文另类| 欧美精品久久99| 成人免费毛片a| 美女爽到高潮91| 一区二区三区四区视频精品免费| 91精品国产色综合久久不卡电影 | 综合激情网...| 精品久久久久一区| 欧美日韩国产综合一区二区 | 国产精品欧美久久久久无广告 | 亚洲国产精品一区二区尤物区| 欧美成人一级视频| 欧美精品国产精品| 91福利视频网站| gogogo免费视频观看亚洲一| 日韩精品免费专区| 樱花影视一区二区| 国产精品不卡视频| 中文成人av在线| 国产精品家庭影院| 国产视频视频一区| 久久久久97国产精华液好用吗| 欧美三级电影一区| 欧美性生活大片视频| 91久久精品一区二区三区| 99热国产精品| 91福利视频在线| 欧美日韩和欧美的一区二区| 欧美在线视频你懂得| 欧美年轻男男videosbes| www.欧美日韩| 91福利精品第一导航| 欧美性大战久久| 在线播放中文字幕一区| 在线一区二区视频| 欧美日韩一区国产| 91精品蜜臀在线一区尤物| 欧美精品一区二区久久婷婷| 欧美成人性福生活免费看| 精品国产乱码久久久久久浪潮| 欧美一区二区免费视频| 亚洲精品一区二区三区99 | 亚洲美女电影在线| 亚洲第一福利视频在线| 秋霞影院一区二区| www.亚洲色图| 精品成人a区在线观看| 国产精品久久久久久久久久久免费看| 亚洲在线观看免费|