亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
激情欧美一区二区| xnxx国产精品| 欧美日韩在线亚洲一区蜜芽| 一本久久精品一区二区| 成人高清视频在线观看| 色综合天天做天天爱| 国产一区二区免费在线| 国内成人免费视频| 国产一区二区伦理| 国产酒店精品激情| 国产成人亚洲综合a∨婷婷图片| 国产米奇在线777精品观看| 国产美女视频91| 成人丝袜18视频在线观看| 成人美女视频在线观看18| 99久久久精品| 欧美综合在线视频| 666欧美在线视频| 精品欧美乱码久久久久久1区2区| 精品国产乱码久久久久久1区2区 | 精品久久久久久久久久久久久久久 | 顶级嫩模精品视频在线看| 成人av资源网站| 在线亚洲人成电影网站色www| 欧美综合在线视频| 91精品福利在线一区二区三区 | 亚洲成人一区在线| 蜜桃视频第一区免费观看| 国产在线精品不卡| www.成人网.com| 欧美午夜片在线观看| 欧美一区二区三区四区视频| 久久久91精品国产一区二区精品| 中文字幕日本不卡| 亚洲福利电影网| 久久福利视频一区二区| 成人午夜大片免费观看| 欧美综合欧美视频| 精品国产伦理网| 亚洲色欲色欲www| 日韩一区欧美二区| 国产精品一区在线观看乱码| 一道本成人在线| 日韩欧美视频一区| 综合久久久久久| 美女脱光内衣内裤视频久久网站| 丰满岳乱妇一区二区三区| 欧美综合一区二区三区| 2021国产精品久久精品| 樱花草国产18久久久久| 麻豆一区二区99久久久久| 91浏览器在线视频| 精品sm在线观看| 亚洲成人激情社区| 高清久久久久久| 欧美一区二区在线视频| 中文字幕在线不卡| 麻豆国产精品777777在线| 色综合欧美在线视频区| 精品国产一二三| 一区二区三区日本| 国产69精品一区二区亚洲孕妇| 欧美色图免费看| 国产精品人人做人人爽人人添| 日韩和欧美一区二区| www.欧美精品一二区| 欧美zozo另类异族| 天天av天天翘天天综合网| 97超碰欧美中文字幕| 久久尤物电影视频在线观看| 亚洲国产精品久久不卡毛片 | 久久只精品国产| 婷婷六月综合网| 一本色道久久综合精品竹菊| 久久蜜臀精品av| 日本中文字幕一区二区视频| 日本高清免费不卡视频| 国产偷国产偷精品高清尤物| 日本最新不卡在线| 欧美无砖砖区免费| 亚洲三级在线播放| 国产成人av福利| 久久综合给合久久狠狠狠97色69| 五月综合激情婷婷六月色窝| 色综合久久综合网| 欧美国产国产综合| 国产一区二区三区四区五区美女| 欧美裸体一区二区三区| 一二三区精品视频| 91色.com| 自拍偷拍亚洲激情| 99久久精品国产观看| 国产精品色婷婷| 成熟亚洲日本毛茸茸凸凹| 久久久精品欧美丰满| 韩国一区二区三区| 亚洲精品一区二区精华| 狠狠色丁香久久婷婷综合_中| 日韩视频在线永久播放| 日韩国产精品久久| 欧美一级片在线看| 男女视频一区二区| 日韩一级二级三级| 国产精品综合一区二区三区| 久久丝袜美腿综合| 久久99久久精品| 日韩亚洲欧美在线| 蜜乳av一区二区| 日韩你懂的电影在线观看| 蜜臀av国产精品久久久久| 精品国产乱码久久久久久1区2区| 麻豆精品一区二区综合av| 欧美成人猛片aaaaaaa| 狠狠v欧美v日韩v亚洲ⅴ| 久久综合久久鬼色中文字| 国产精品888| 亚洲国产精品成人久久综合一区| av中文一区二区三区| 自拍偷拍国产精品| 欧美少妇xxx| 日本不卡在线视频| 久久―日本道色综合久久| 成人h动漫精品| 亚洲美女免费在线| 欧美精品电影在线播放| 麻豆国产一区二区| 国产欧美一区二区精品性色超碰| 99久久精品情趣| 亚洲午夜免费福利视频| 3d成人动漫网站| 国产成人免费av在线| 亚洲男人天堂av网| 欧美精品高清视频| 国产成人免费av在线| 亚洲美女区一区| 91精品在线一区二区| 国产精品自拍一区| 亚洲精品视频免费看| 欧美精品tushy高清| 国产精品18久久久久久久久久久久 | 日韩av电影天堂| 久久婷婷色综合| 91美女福利视频| 轻轻草成人在线| 中文字幕在线播放不卡一区| 欧美日韩国产一区| 国产精品资源网站| 亚洲国产视频a| 久久九九全国免费| 欧美区一区二区三区| 懂色av中文一区二区三区| 亚洲成人黄色小说| 中文字幕久久午夜不卡| 欧美日韩精品一区视频| 国产成人亚洲精品狼色在线| 亚洲自拍偷拍综合| 久久麻豆一区二区| 欧美久久久久久久久中文字幕| 国产 欧美在线| 免费精品视频最新在线| 中文字幕av一区二区三区免费看 | 久久久久久一二三区| 欧美亚洲免费在线一区| 国产不卡视频在线观看| 视频精品一区二区| 国产精品免费网站在线观看| 日韩午夜精品电影| 91久久精品网| 成人综合在线网站| 美女一区二区在线观看| 亚洲一区在线电影| 中文字幕在线不卡一区| 精品国产乱码久久久久久免费| 欧美午夜宅男影院| www.色精品| 国产成人精品影视| 久久99日本精品| 亚洲观看高清完整版在线观看| 国产精品女同一区二区三区| 精品成a人在线观看| 欧美一区二区三区小说| 欧美三级电影一区| 99re66热这里只有精品3直播| 激情丁香综合五月| 麻豆久久一区二区| 日本不卡免费在线视频| 亚洲国产精品影院| 亚洲欧美激情小说另类| 国产精品麻豆欧美日韩ww| 久久久99精品免费观看| 欧美精品一区二| 精品美女被调教视频大全网站| 91精品欧美综合在线观看最新| 欧美性受xxxx黑人xyx| 色哟哟精品一区| 99久久精品久久久久久清纯| 不卡视频在线看| 成人精品视频一区二区三区尤物| 国产成人午夜高潮毛片| 粉嫩高潮美女一区二区三区|