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

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

?? qtoolbar.cpp

?? qtopia-phone-2.2.0下公共的控件實現(xiàn)源代碼。
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
/****************************************************************************** $Id: qt/src/widgets/qtoolbar.cpp   2.3.12   edited 2005-10-27 $**** Implementation of QToolBar class**** Created : 980315**** 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 "qtoolbar.h"#ifndef QT_NO_TOOLBAR#include "qmainwindow.h"#include "qpushbutton.h"#include "qtooltip.h"#include "qlayout.h"#include "qframe.h"#include "qobjectlist.h"#include "qobjectdict.h"#include "qpainter.h"#include "qdrawutil.h"#include "qapplication.h"#include "qtoolbutton.h"#include "qpopupmenu.h"#include "qtimer.h"class QArrowWidget : public QWidget{    Q_OBJECTpublic:    QArrowWidget( Qt::Orientation o, QWidget *parent ) :	QWidget( parent, "qt_arrow_widget" ), orient( o ) {}#ifndef QT_NO_POPUPMENUprotected:    void paintEvent( QPaintEvent * ) {	QPainter p( this );	QPointArray a;	if ( orient == Horizontal ) {	    int h = height();	    a.setPoints( 5,  0, 0,  3, h / 4, 0, h / 2, 3,3 * h / 4, 0, h );	} else {	    int w = width();	    a.setPoints( 5,  0, 0,  w / 4, 3 , w / 2, 0 , 3 * w / 4, 3 , w, 0 );	}	p.setPen( colorGroup().light() );	p.drawPolyline( a );	if ( orient == Qt::Horizontal )	    a.translate( 1, 0 );	else	    a.translate( 0, 1 );	p.setPen( colorGroup().midlight() );	p.drawPolyline( a );    }#endifprivate:    Qt::Orientation orient;};class QToolBarPrivate{public:    QToolBarPrivate() : moving( FALSE ),#ifndef QT_NO_POPUPMENU	arrow( 0 ), menu( 0 ), back( 0 ),#endif	button( 0 )    { stretchable[ 0 ] = FALSE; stretchable[ 1 ] = FALSE; hiddenItems.setAutoDelete( FALSE ); }    bool moving;    bool stretchable[ 2 ];#ifndef QT_NO_POPUPMENU    QToolButton *arrow;    QPopupMenu *menu;    QArrowWidget *back;#endif    QIntDict<QButton> hiddenItems;    QButton *button;};class QToolBarSeparator : public QFrame{    Q_OBJECTpublic:    QToolBarSeparator( Orientation, QToolBar *parent, const char* name=0 );    QSize sizeHint() const;    QSizePolicy sizePolicy() const;    Orientation orientation() const { return orient; }public slots:   void setOrientation( Orientation );protected:    void styleChange( QStyle& );private:    Orientation orient;};QToolBarSeparator::QToolBarSeparator(Orientation o , QToolBar *parent,				     const char* name )    :QFrame( parent, name ){    connect( parent, SIGNAL(orientationChanged(Orientation)),	     this, SLOT(setOrientation(Orientation)) );    setOrientation( o );    setBackgroundMode( parent->backgroundMode() );    setBackgroundOrigin( ParentOrigin );    setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ) );}void QToolBarSeparator::setOrientation( Orientation o ){    orient = o;    if ( style() == WindowsStyle ) {	if ( orientation() == Vertical )	    setFrameStyle( HLine + Sunken );	else	    setFrameStyle( VLine + Sunken );    } else {	    setFrameStyle( NoFrame );    }}void QToolBarSeparator::styleChange( QStyle& ){    setOrientation( orient );}QSize QToolBarSeparator::sizeHint() const{    return orientation() == Vertical ? QSize( 0, 6 ) : QSize( 6, 0 );}QSizePolicy QToolBarSeparator::sizePolicy() const{    //### removeme 3.0    return QWidget::sizePolicy();}#include "qtoolbar.moc"// NOT REVISED/*! \class QToolBar qtoolbar.h  \brief The QToolBar class provides a tool bar.  \ingroup application  A toolbar is a panel that contains a set of controls, usually  represented by small icons.  Its purpose is to provide quick access  to frequently used commands or options. Within a main window, the  user can drag toolbars freely around and hide them with a click on  the toolbar handle.  To use QToolBar, you simply create a QToolBar as child of a  QMainWindow, create a number of QToolButton widgets (or other  widgets) in left to right (or top to bottom) order, call  addSeparator() when you want a separator, and that's all.  The application/application.cpp example does precisely this.  You may use any kind of widget within a toolbar, with QToolButton  and QComboBox being the two most common ones.  Each QToolBar lives in a \link QMainWindow dock \endlink in a  QMainWindow, and can optionally start a new line in its dock.  Tool  bars that start a new line are always positioned at the left end or  top of the tool bar dock; others are placed next to the previous  tool bar and word-wrapped as necessary. The main window can  be resized to a smaller size than a toolbar would need to show all  items. If this happens QToolbar shows a little arrow button at the  right or bottom end. When clicking on that button, a popup menu is  opened which shows all items of the toolbar which are  outside the visible area of the mainwindow.  Usually, a toolbar gets just the space it needs. However, with  setHorizontalStretchable()/setVerticalStretchable() or  setStretchableWidget() you can advise the main window to expand  the toolbar to fill all available width in the specified orientation.  The tool bar arranges its buttons either horizontally or vertically  (see setOrientation() for details). Generally, QMainWindow will set  the orientation correctly for you. The toolbar emits a signal  orientationChanged() each time the orientation changes, in case some  child widgets need adjustments.  To remove all items from a toolbar, you can use the clear() method.  \sa QToolButton QMainWindow  <a href="http://www.iarchitect.com/visual.htm">Parts of Isys on Visual Design</a>  <a href="guibooks.html#fowler">GUI Design Handbook: Tool Bar.</a>*//*!  Constructs an empty tool bar which is a child of \a parent and  managed by \a parent, initially in \a dock, labelled \a and starting  a new line in the dock if \a newLine is TRUE.  \a name is the object  name, as usual.*/QToolBar::QToolBar( const QString &label,		    QMainWindow * parent, QMainWindow::ToolBarDock dock,		    bool newLine, const char * name )    : QWidget( parent, name ){    mw = parent;    o = (dock == QMainWindow::Left || dock == QMainWindow::Right )	? Vertical : Horizontal;    init();    if ( parent )	parent->addToolBar( this, label, dock, newLine );}/*!  Constructs an empty horizontal tool bar with a parent of \a  parent and managed by \a mainWindow.  The \a label and \a newLine  are passed straight to QMainWindow::addToolBar().  \a name is the  object name and \a f is the widget flags.  This is the constructor to use if you want to create torn-off  toolbars, or toolbars in the status bar.*/QToolBar::QToolBar( const QString &label, QMainWindow * mainWindow,		    QWidget * parent, bool newLine, const char * name,		    WFlags f )    : QWidget( parent, name, f ){    mw = mainWindow;    o = Horizontal;    init();    if ( mainWindow )	mainWindow->addToolBar( this, label, QMainWindow::Unmanaged, newLine );}/*!  Constructs an empty tool bar in the top dock of its parent,  without any label and without requiring a newline.  This is mostly  useless. */QToolBar::QToolBar( QMainWindow * parent, const char * name )    : QWidget( parent, name ){    mw = parent;    o = Horizontal;    init();    if ( parent )	parent->addToolBar( this, QString::null, QMainWindow::Top );}/*!  Common initialization code. Requires that \c mw and \c o are set.  Does not call QMainWindow::addToolBar*/void QToolBar::init(){    d = new QToolBarPrivate;    bl = 0;    sw = 0;    bl = new QBoxLayout( this, orientation() == Vertical			? QBoxLayout::Down : QBoxLayout::LeftToRight,#ifdef _WS_QWS_			1,#else			style() == WindowsStyle ? 2 : 1,#endif			0 );    boxLayout()->setAutoAdd( TRUE );    if ( !mw || mw->toolBarsMovable() )	boxLayout()->addSpacing( 9 );    if ( mw ) {	connect( mw, SIGNAL( startMovingToolBar(QToolBar*) ),		 this, SLOT( startMoving(QToolBar*) ) );	connect( mw, SIGNAL( endMovingToolBar(QToolBar*) ),		 this, SLOT( endMoving(QToolBar*) ) );    }#if defined(CHECK_NULL)    else	qWarning( "QToolBar::QToolBar main window cannot be 0." );#endif    setBackgroundMode( PaletteButton);    setFocusPolicy( NoFocus );}QBoxLayout *QToolBar::boxLayout(){    if ( !layout() ) {	bl = new QBoxLayout( this, orientation() == Vertical			     ? QBoxLayout::Down : QBoxLayout::LeftToRight,			     style() == WindowsStyle ? 2 : 1, 0 );	if ( !mw || mw->toolBarsMovable() )	    boxLayout()->addSpacing( 9 );	return bl;    }    if ( bl == layout() || layout()->inherits( "QBoxLayout" ) ) {	bl = (QBoxLayout*)layout();	return (QBoxLayout*)layout();    }    return 0;}/*! Destructs the object and frees any allocated resources. */QToolBar::~QToolBar(){    d->menu = 0;    delete d;    d = 0;}/*!  Adds a separator to the end of the toolbar. */void QToolBar::addSeparator(){    (void) new QToolBarSeparator( orientation(), this, "tool bar separator" );}/*!\reimp*/void QToolBar::styleChange( QStyle& /*old*/ ){    QObjectList *childs = queryList( "QWidget" );    if ( childs ) {        QObject *ob = 0;	for ( ob = childs->first(); ob; ob = childs->next() ) {            if ( ob->inherits( "QToolButton" ) ) {                QToolButton* w = (QToolButton*)ob;                w->setStyle( &style() );            } else if ( ob->inherits( "QToolBarSeparator" ) ) {                QToolBarSeparator* w = (QToolBarSeparator*)ob;                w->setStyle( &style() );            }        }    }    delete childs;}    /*!  Sets this toolbar to organize its content vertically if \a  newOrientation is \c Vertical and horizontally if \a newOrientation  is \c Horizontal.  Emits the orientationChanged() signal.  \sa orientation()*/void QToolBar::setOrientation( Orientation newOrientation ){    if ( o != newOrientation ) {	o = newOrientation;#ifndef QT_NO_POPUPMENU	if ( d->arrow ) {	    delete d->arrow;	    d->arrow = 0;	}	if ( d->back ) {	    delete d->back;	    d->back = 0;	}#endif	boxLayout()->setDirection( o==Horizontal ? QBoxLayout::LeftToRight :				   QBoxLayout::TopToBottom );	emit orientationChanged( newOrientation );    }}/*! \fn Orientation QToolBar::orientation() const  Returns the current orientation of the toolbar.*//*!  \reimp. */void QToolBar::show(){    QWidget::show();    if ( mw )	mw->triggerLayout( FALSE );}/*!  \reimp*/void QToolBar::hide(){    QWidget::hide();    if ( mw )	mw->triggerLayout( FALSE );}void QToolBar::setUpGM(){    //Does nothing, present for binary compatibility}/*!  Paint the handle.  The Motif style is rather close to Netscape  and even closer to KDE.*/void QToolBar::paintEvent( QPaintEvent * ){    paintToolBar();}/*!  Returns a pointer to the QMainWindow which controls this tool bar.*/QMainWindow * QToolBar::mainWindow(){    return mw;}/*!  Sets \a w to be expanded if this toolbar is requested to stretch  (because QMainWindow right-justifies the dock it's in or isVerticalStretchable()  or isHorizontalStretchable() of this toolbar is TRUE).  If you call setStretchableWidget() and the toolbar is not stretchable  yet, setStretchable(  ) is called.  \sa QMainWindow::setRightJustification(), setVerticalStretchable(), setHorizontalStretchable()*/void QToolBar::setStretchableWidget( QWidget * w ){    sw = w;    boxLayout()->setStretchFactor( w, 1 );    if ( !isHorizontalStretchable() && !isVerticalStretchable() ) {	if ( orientation() == Horizontal )	    setHorizontalStretchable( TRUE );	else	    setVerticalStretchable( TRUE );    }}/*! \reimp */bool QToolBar::event( QEvent * e ){    bool r =  QWidget::event( e );    //after the event filters have dealt with it:    if ( e->type() == QEvent::ChildInserted ) {	QObject * child = ((QChildEvent*)e)->child();	if ( isVisible() && child && child->isWidgetType() &&	     child->parent() == this && !child->inherits( "QPopupMenu" ) )	    ( (QWidget*)child )->show();	if ( child && child->isWidgetType() && ((QWidget*)child) == sw )	    boxLayout()->setStretchFactor( (QWidget*)child, 1 );

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜欧美在线一二页| 亚洲国产日韩精品| 亚洲综合一二三区| 国产精品美女久久久久av爽李琼| 久久精品一级爱片| 欧美极品另类videosde| 国产精品国产自产拍高清av| 自拍偷拍亚洲激情| 亚洲国产日韩一级| 蜜臀va亚洲va欧美va天堂 | 色哟哟一区二区三区| 亚洲天堂福利av| 亚洲国产精品成人综合色在线婷婷| 东方aⅴ免费观看久久av| 欧美va亚洲va在线观看蝴蝶网| 99久久综合99久久综合网站| 亚洲国产一区二区视频| 亚洲人精品一区| 国产精品久久综合| 日韩电影一区二区三区四区| 91久久香蕉国产日韩欧美9色| 国产成人亚洲精品青草天美| 国产99精品视频| av一区二区三区四区| 欧洲色大大久久| 欧美唯美清纯偷拍| 欧美日本韩国一区二区三区视频| 欧美欧美欧美欧美首页| 久久嫩草精品久久久精品| 国产精品久久99| 亚洲v日本v欧美v久久精品| 免费人成精品欧美精品| 国产成人在线视频免费播放| 色婷婷精品大在线视频| 欧美电影免费观看高清完整版| 欧美激情一区二区三区四区 | 一区二区三区四区亚洲| 婷婷丁香激情综合| 国产精品一区二区三区网站| 91在线精品一区二区| 欧美一区二区三区系列电影| 中文字幕av一区二区三区高 | 91在线观看美女| 日韩一区二区电影在线| 国产精品嫩草久久久久| 丝袜诱惑制服诱惑色一区在线观看 | 欧美人伦禁忌dvd放荡欲情| ww亚洲ww在线观看国产| 一区二区三区中文字幕| 韩国av一区二区三区四区| 91影视在线播放| 欧美成人一区二区三区片免费 | www.99精品| 欧美一区二区网站| 日韩一区欧美一区| 精品一区二区三区免费观看| 一本一道久久a久久精品| wwwwxxxxx欧美| 亚洲v精品v日韩v欧美v专区| 成人激情黄色小说| 欧美mv和日韩mv国产网站| 国产91精品久久久久久久网曝门| 在线精品视频一区二区| 国产精品高潮呻吟久久| 日本欧美韩国一区三区| 欧美在线视频不卡| 国产精品久久久一区麻豆最新章节| 亚洲国产中文字幕| 欧洲精品视频在线观看| 欧美激情一区二区| 国产精品资源在线观看| 国产日本欧洲亚洲| 欧美电影免费观看高清完整版在线| 日韩欧美中文一区| 亚洲自拍偷拍欧美| 成人国产电影网| 久久久久久久一区| 精品亚洲国内自在自线福利| 欧美老年两性高潮| 亚洲免费在线电影| 国产福利一区在线观看| 久久综合九色综合欧美98| 秋霞午夜鲁丝一区二区老狼| 欧美伊人久久久久久午夜久久久久| 久久久久久电影| 蜜臀久久99精品久久久久久9| 欧美久久久久久蜜桃| 青青草97国产精品免费观看无弹窗版| 日韩欧美国产一区二区三区 | 午夜精品久久久久久久| 国产精品丝袜91| 欧美亚洲国产一卡| 成人黄色国产精品网站大全在线免费观看 | 欧美在线观看一二区| 狠狠v欧美v日韩v亚洲ⅴ| 亚洲最大成人综合| 国产校园另类小说区| 日韩免费性生活视频播放| 91国偷自产一区二区使用方法| 久久爱另类一区二区小说| 亚洲一区二区三区在线播放| 国产精品久久久久国产精品日日| 欧美一区二区三区四区高清| 欧美性欧美巨大黑白大战| 91色九色蝌蚪| 99久精品国产| 91尤物视频在线观看| jizzjizzjizz欧美| eeuss鲁片一区二区三区在线看| 久久精品国产免费看久久精品| 亚洲国产综合91精品麻豆| 亚洲高清三级视频| 亚洲一区国产视频| 亚洲第一二三四区| 亚洲地区一二三色| 视频一区二区不卡| 日本亚洲免费观看| 国产专区欧美精品| 国产成人日日夜夜| 成人av免费网站| 欧美性大战久久久久久久蜜臀| 色婷婷亚洲综合| 7777精品伊人久久久大香线蕉的 | 国产盗摄一区二区| 97se亚洲国产综合自在线观| 欧美手机在线视频| 欧美一区二区三区不卡| 久久女同性恋中文字幕| 中文字幕在线一区免费| 日韩精品成人一区二区三区| 性做久久久久久免费观看| 久久精品国内一区二区三区| 国产成人超碰人人澡人人澡| 99re这里只有精品视频首页| 538prom精品视频线放| 久久久亚洲午夜电影| 一区二区成人在线视频| 国模娜娜一区二区三区| 99久久免费精品| 日韩视频一区在线观看| 自拍av一区二区三区| 美女久久久精品| 91黄视频在线| 国产日韩精品一区二区三区| 三级影片在线观看欧美日韩一区二区 | 视频一区在线视频| 不卡av在线网| 精品人伦一区二区色婷婷| 一区二区三区在线视频观看| 黄色日韩网站视频| 欧美二区三区91| 一区2区3区在线看| 9人人澡人人爽人人精品| 久久久五月婷婷| 美女尤物国产一区| 91精品国产91久久久久久最新毛片 | 99久久精品一区二区| 亚洲欧洲av色图| 国产乱码精品一区二区三区忘忧草 | 香蕉久久一区二区不卡无毒影院| 成人高清在线视频| 欧美极品aⅴ影院| 国产精品 日产精品 欧美精品| 91精品国产综合久久久蜜臀粉嫩| 一区二区三区在线免费视频| 99久久婷婷国产综合精品电影| 亚洲精品一区二区三区香蕉| 久久精品二区亚洲w码| 欧美一级在线视频| 久久66热re国产| 精品成人私密视频| 国产剧情一区在线| 欧美国产日韩亚洲一区| 成人激情av网| 亚洲一区二区三区四区五区黄| 日本道精品一区二区三区| 视频在线观看国产精品| 欧美一级黄色片| 国产福利精品导航| 亚洲女同ⅹxx女同tv| 欧美日韩久久一区二区| 日韩av网站免费在线| 久久精品在线免费观看| 成人国产精品免费观看视频| 亚洲一区二区中文在线| 久久久久高清精品| 在线观看一区二区精品视频| 日本女优在线视频一区二区| 国产欧美日韩亚州综合| 欧美午夜精品久久久久久超碰| 日本不卡视频一二三区| **性色生活片久久毛片| 91精品国产欧美日韩| 色综合天天综合网天天看片| 美女网站一区二区| 一区二区三区不卡视频在线观看| 欧美一区二区三区视频在线 | 蜜臀av一级做a爰片久久| 中文字幕日韩欧美一区二区三区| 日韩一区二区三区视频在线|