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

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

?? qaction.cpp

?? qtopia-phone-2.2.0下公共的控件實現源代碼。
?? CPP
?? 第 1 頁 / 共 2 頁
字號:
/****************************************************************************** $Id: qt/src/widgets/qaction.cpp   2.3.12   edited 2005-10-27 $**** Implementation of QAction class**** Created : 000000**** Copyright (C) 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 "qaction.h"#ifndef QT_NO_ACTION#include <qtoolbar.h>#include <qlist.h>#include <qpopupmenu.h>#include <qaccel.h>#include <qtoolbutton.h>#include <qtooltip.h>#include <qwhatsthis.h>#include <qstatusbar.h>#include <qobjectlist.h>/*!  \class QAction qaction.h  \brief The QAction class abstracts a user interface action that can  appear both in menus and tool bars.  There are two basic kind of user interface actions, command actions  and options. QAction usually models a command action, for example  "open file". When the actual action shall be performed, it emits the  activated() signal. Options, for example the drawing tools in a  paint program, are represented by toggle actions (see  setToggleAction() ). A toggle action emits a toggled() signal  whenever it changes state. Several toggle actions can be combined in  a QActionGroup.  To provide an action to the user, use addTo() to add it to either a  menu or a tool bar, for example:  \code  QPopupMenu* popup = new QPopupMenu;  QAction* myAction= new QAction;  myAction->setText( "MyAction" );  myAction->addTo( popup );  \endcode  You can add an action to an arbitrary number of menus and toolbars  and remove it again with removeFrom().  Changing an action's properties, for example using setEnabled(),  setOn() or setText(), immediately shows up in all  representations. Other properties that define the way an action is  presented to the user are iconSet(), menuText(), toolTip(),  statusTip() and whatsThis().  An action may also be triggered by an accelerator key declared with  setAccel(). Since accelerators are window specific, the application  window has to be an ancestor of the action. Generally, it is  therefore a good idea to always create actions as direct children of  the main window.*/class QActionPrivate{public:    QActionPrivate();    ~QActionPrivate();    QIconSet *iconset;    QString text;    QString menutext;    QString tooltip;    QString statustip;    QString whatsthis;    int key;#ifndef QT_NO_ACCEL    QAccel* accel;    int accelid;#endif    uint enabled : 1;    uint toggleaction :1;    uint on : 1;#ifndef QT_NO_TOOLTIP    QToolTipGroup* tipGroup;#endif    struct MenuItem {	MenuItem():popup(0),id(0){}	QPopupMenu* popup;	int id;    };    QList<MenuItem> menuitems;    QList<QToolButton> toolbuttons;    enum Update { Everything, Icons, State }; // Everything means everything but icons and state    void update( Update upd = Everything );    QString menuText() const;    QString toolTip() const;    QString statusTip() const;};QActionPrivate::QActionPrivate(){    iconset = 0;#ifndef QT_NO_ACCEL    accel = 0;    accelid = 0;#endif    key = 0;    enabled = 1;    toggleaction  = 0;    on = 0;    menuitems.setAutoDelete( TRUE );#ifndef QT_NO_TOOLTIP    tipGroup = new QToolTipGroup( 0 );#endif}QActionPrivate::~QActionPrivate(){    QListIterator<QToolButton> ittb( toolbuttons );    QToolButton *tb;    while ( ( tb = ittb.current() ) ) {	++ittb;	QWidget* parent = tb->parentWidget();	delete tb;#ifndef QT_NO_TOOLBAR	if ( parent->inherits( "QToolBar" ) ) {	    QToolBar* toolbar = (QToolBar*) parent;	    QObjectList* lst = toolbar->queryList( "QToolButton" );	    if ( lst->isEmpty() )		delete toolbar;	    delete lst;	}#endif    }    QListIterator<QActionPrivate::MenuItem> itmi( menuitems);    QActionPrivate::MenuItem* mi;    while ( ( mi = itmi.current() ) ) {	++itmi;	QPopupMenu* menu = mi->popup;	if ( menu->findItem( mi->id ) )	    menu->removeItem( mi->id );	if ( !menu->count() ) {	    delete menu;	}    }#ifndef QT_NO_ACCEL    delete accel;#endif    delete iconset;#ifndef QT_NO_TOOLTIP    delete tipGroup;#endif}void QActionPrivate::update( Update upd ){    for ( QListIterator<MenuItem> it( menuitems); it.current(); ++it ) {	MenuItem* mi = it.current();	QString t = menuText();#ifndef QT_NO_ACCEL	if ( key )	    t += '\t' + QAccel::keyToString( key );#endif	switch ( upd ) {	case State:	    mi->popup->setItemEnabled( mi->id, enabled );	    if ( toggleaction )		mi->popup->setItemChecked( mi->id, on );	    break;	case Icons:	    if ( iconset )		mi->popup->changeItem( mi->id, *iconset, t );	    break;	default:	    mi->popup->changeItem( mi->id, t );	    if ( !whatsthis.isEmpty() )		mi->popup->setWhatsThis( mi->id, whatsthis );	    if ( toggleaction ) {		mi->popup->setCheckable( TRUE );		mi->popup->setItemChecked( mi->id, on );	    }	}    }    for ( QListIterator<QToolButton> it2( toolbuttons); it2.current(); ++it2 ) {	QToolButton* btn = it2.current();	switch ( upd ) {	case State:	    btn->setEnabled( enabled );	    if ( toggleaction )		btn->setOn( on );	    break;	case Icons:	    if ( iconset )		btn->setIconSet( *iconset );	    break;	default:	    btn->setToggleButton( toggleaction );	    if ( !text.isEmpty() )		btn->setTextLabel( text, FALSE );#ifndef QT_NO_TOOLTIP	    QToolTip::remove( btn );	    QToolTip::add( btn, toolTip(), tipGroup, statusTip() );#endif#ifndef QT_NO_WHATSTHIS	    QWhatsThis::remove( btn );	    if ( !whatsthis.isEmpty() )		QWhatsThis::add( btn, whatsthis );#endif	}    }}QString QActionPrivate::menuText() const{    if ( menutext.isNull() )	return text;    return menutext;}QString QActionPrivate::toolTip() const{    if ( tooltip.isNull() ) {#ifndef QT_NO_ACCEL	if ( accel )	    return text + " (" + QAccel::keyToString( accel->key( accelid )) + ")";#endif	return text;    }    return tooltip;}QString QActionPrivate::statusTip() const{    if ( statustip.isNull() )	return toolTip();    return statustip;}/*!  Constructs an action with parent \a parent and name \a name.  If \a toggle is TRUE, the action becomes a toggle action.  If the parent is a QActionGroup, the action automatically becomes a  member of it.  Note: for accelerators to work, the parent or one of its ancestors  has to be the application window. */QAction::QAction( QObject* parent, const char* name, bool toggle )    : QObject( parent, name ){    init();    d->toggleaction = toggle;}/*!\overload  Constructs an action with text \a text, icon \a icon, menu text  \a menuText, a keyboard accelerator \a accel, a \a parent and name  \a name. \a text will also show up in tooltips, unless you call  setToolTip() with a different tip later.  If the parent is a QActionGroup, the action automatically becomes a  member of it.  Note: for accelerators to work, the parent or one of its ancestors  has to be the application window. */QAction::QAction( const QString& text, const QIconSet& icon, const QString& menuText, int accel, QObject* parent, const char* name, bool toggle )    : QObject( parent, name ){    init();    d->toggleaction = toggle;    if ( !icon.pixmap().isNull() )	setIconSet( icon );    d->text = text;    d->menutext = menuText;    setAccel( accel );}/*!\overload  Constructs an action with text \a text, menu text \a  menuText, a keyboard accelerator \a accel, a \a parent and name \a  name. \a text will also show up in tooltips, unless you call  setToolTip() with a different tip later.  If \a toggle is TRUE, the action becomes a toggle action.  If the parent is a QActionGroup, the action automatically becomes a  member of it.  Note: for accelerators to work, the parent or one of its ancestors  has to be the application window. */QAction::QAction( const QString& text, const QString& menuText, int accel, QObject* parent, const char* name, bool toggle )    : QObject( parent, name ){    init();    d->toggleaction = toggle;    d->text = text;    d->menutext = menuText;    setAccel( accel );}void QAction::init(){    d = new QActionPrivate;    if ( parent() && parent()->inherits("QActionGroup") ) {	((QActionGroup*) parent())->insert( this );		// insert into action group    }}/*! Destroys the object and frees any allocated resources. */QAction::~QAction(){    delete d;}/*!  Sets the icon set to \a icon.  \sa iconSet(); */void QAction::setIconSet( const QIconSet& icon ){    register QIconSet *i = d->iconset;    d->iconset = new QIconSet( icon );    delete i;    d->update( QActionPrivate::Icons );}/*!  Returns the icon set.  \sa setIconSet(); */QIconSet QAction::iconSet() const{    if ( d->iconset )	return *d->iconset;    return QIconSet();}/*!  Sets the text to \a text.  \sa setMenuText(), text() */void QAction::setText( const QString& text ){    d->text = text;    d->update();}/*!  Returns the current text.  \sa setText(), menuText() */QString QAction::text() const{    return d->text;}/*!  Sets a special text \a text for menu items. Use this to specify  ellipses or keyboard shortcuts that should not show up in tooltips or  as button text.  \sa setText(), menuText() */void QAction::setMenuText( const QString& text ){    d->menutext = text;    d->update();}/*!  Returns the text used for menu items.  If no menu text has been defined yet, this is the same as text().  \sa setMenuText(),  text() */QString QAction::menuText() const{    return d->menuText();}/*!  Sets the tool tip to \a tip.  \sa toolTip() */void QAction::setToolTip( const QString& tip ){    d->tooltip = tip;    d->update();}/*!  Returns the current tool tip.  If no tool tip has been defined yet, it returns text  and a hotkey hint.  \sa setToolTip(), text()*/QString QAction::toolTip() const{    return d->toolTip();}/*!  Sets the status tip to \a tip. The tip will be displayed on  all status bars the topmost parent of the action provides.  \sa statusTip()*/void QAction::setStatusTip( const QString& tip ){    d->statustip = tip;    d->update();}/*!  Returns the current status tip.  If not status tip has been defined yet, this is the same as toolTip()  \sa setStatusTip(), toolTip()*/QString QAction::statusTip() const{    return d->statusTip();}/*!  Sets What's This help to \a whatsThis.  \sa whatsThis() */void QAction::setWhatsThis( const QString& whatsThis ){    d->whatsthis = whatsThis;#ifndef QT_NO_ACCEL    if ( !d->whatsthis.isEmpty() && d->accel )	d->accel->setWhatsThis( d->accelid, d->whatsthis );#endif    d->update();}/*!  Returns the What's This help for this action.  \sa setWhatsThis() */QString QAction::whatsThis() const{    return d->whatsthis;}/*!  Sets the action's accelerator to \a key.  Note: For accelerators to work, the parent or one of its ancestors

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
不卡在线观看av| 色噜噜夜夜夜综合网| 最新国产成人在线观看| 在线欧美小视频| 国产精品1区2区3区| 亚洲一区二区三区视频在线| 精品日韩一区二区三区免费视频| 色吊一区二区三区| 国产精品一二三四区| 一区二区三区精品| 精品少妇一区二区三区免费观看 | 成人app网站| 亚洲成av人片www| 亚洲欧美另类久久久精品2019| 欧美久久一二区| 在线观看一区日韩| fc2成人免费人成在线观看播放| 同产精品九九九| 亚洲精品精品亚洲| 亚洲欧洲精品一区二区精品久久久 | 欧洲精品一区二区三区在线观看| 麻豆91免费看| 久久精工是国产品牌吗| 亚洲国产精品久久久男人的天堂| 国产精品久久久久久久裸模| 日韩一卡二卡三卡国产欧美| 在线中文字幕一区| 色哟哟国产精品| 91老师片黄在线观看| 一本色道久久综合亚洲精品按摩| av在线不卡免费看| 色屁屁一区二区| 欧美日韩国产免费一区二区 | 在线看国产一区| 欧美日韩免费在线视频| 欧美四级电影在线观看| 国产精品77777| 免费在线观看精品| 国产精品自在欧美一区| 色综合咪咪久久| 日韩美女视频一区二区在线观看| 欧美高清一级片在线观看| 亚洲精品写真福利| 国产精品99久久久久| 欧美中文字幕一区二区三区 | 99精品在线观看视频| 欧美日韩一级片网站| 欧美高清一级片在线观看| 亚洲宅男天堂在线观看无病毒| 天天综合色天天综合色h| 成人国产电影网| 欧美哺乳videos| 亚洲大尺度视频在线观看| 不卡视频在线观看| 欧美韩日一区二区三区| 蜜臂av日日欢夜夜爽一区| 欧美在线视频日韩| 亚洲一区二区三区中文字幕| 不卡的电影网站| 亚洲乱码国产乱码精品精可以看| 久久国产福利国产秒拍| 欧美一卡二卡在线| 国内不卡的二区三区中文字幕 | 一区二区三区视频在线看| 成人精品免费网站| 国产精品久久久久久久久久久免费看| 黑人巨大精品欧美黑白配亚洲| 91黄色小视频| 午夜一区二区三区在线观看| 99久久精品免费| 视频在线观看国产精品| 国产精品午夜免费| 成人av在线电影| 美女视频黄免费的久久 | 图片区小说区区亚洲影院| 欧美不卡在线视频| 欧美亚洲丝袜传媒另类| 国产寡妇亲子伦一区二区| 亚洲精品视频一区二区| 午夜精品久久久久久久久久 | 成人免费毛片aaaaa**| 亚洲成年人网站在线观看| 欧美xingq一区二区| 亚洲精品国产视频| 欧美日韩一级二级| 在线观看一区日韩| 欧美日韩性生活| 欧美一区二区三区免费大片 | 天天综合色天天| 国产精品国产三级国产a| 欧美日韩精品一区二区三区蜜桃 | 欧美日韩精品二区第二页| 精品亚洲成a人| 人人狠狠综合久久亚洲| 国产精品国产三级国产有无不卡| 717成人午夜免费福利电影| 成人性视频免费网站| 美国三级日本三级久久99| 一区二区欧美国产| 亚洲视频网在线直播| 中文字幕亚洲成人| 欧美精品一区二区三| 久久免费国产精品| 精品久久久久久久久久久院品网| 欧美日韩日日骚| 国产麻豆精品在线观看| 国产69精品久久久久777| 免费成人在线视频观看| 国产呦精品一区二区三区网站| 国产资源在线一区| 成人高清视频在线观看| 一本色道亚洲精品aⅴ| 欧美视频完全免费看| 日韩欧美一级二级三级| 久久久久久久久久美女| 国产精品久久二区二区| 亚洲一区二区三区自拍| 毛片av一区二区三区| 国产精品一二二区| 色琪琪一区二区三区亚洲区| 欧美日韩综合一区| 久久久久久久国产精品影院| 国产精品免费观看视频| 亚洲一二三专区| 国产在线日韩欧美| 欧美无砖专区一中文字| 欧美大尺度电影在线| 亚洲人成网站精品片在线观看| 麻豆精品视频在线| 欧美三级电影网站| 国产精品―色哟哟| 精品一区二区三区的国产在线播放| 91丝袜美女网| 中文字幕精品一区| 蜜桃视频在线一区| 在线播放日韩导航| 亚洲第一激情av| 91精品欧美一区二区三区综合在 | 欧美一区二区三区免费视频| 一卡二卡欧美日韩| 欧美亚洲综合久久| 丝袜脚交一区二区| 欧美不卡在线视频| 亚洲自拍欧美精品| 91女神在线视频| 亚洲欧洲性图库| 成人精品鲁一区一区二区| 日韩小视频在线观看专区| 一区二区三区日韩在线观看| 不卡影院免费观看| 亚洲激情图片小说视频| 99久久精品免费看国产免费软件| 久久你懂得1024| 国产成人一级电影| 亚洲一卡二卡三卡四卡无卡久久| 成人美女视频在线观看| 欧美高清在线一区二区| 成人av电影在线观看| 中文字幕+乱码+中文字幕一区| 成人av在线资源| 亚洲精品videosex极品| 欧美另类高清zo欧美| 日韩成人av影视| 久久网站最新地址| av不卡免费在线观看| 亚洲一区二区三区在线播放 | 欧美亚洲综合久久| 国产精品一区二区三区乱码| 国产精品久久久久久久久免费丝袜 | 欧美视频在线观看一区| 蜜臀久久久99精品久久久久久| 久久亚洲一级片| 91成人网在线| 国产成人精品亚洲777人妖| 亚洲主播在线播放| 国产视频一区在线观看| 欧美精品一二三区| 成人午夜视频网站| 国产一区中文字幕| 亚洲成人高清在线| 中文字幕一区视频| 精品国产乱码久久久久久夜甘婷婷| 色诱亚洲精品久久久久久| 黄一区二区三区| 日韩高清在线观看| 一区二区三区四区精品在线视频 | 777亚洲妇女| 欧美视频精品在线观看| 成人av综合在线| 国产一区二区三区不卡在线观看| 天堂va蜜桃一区二区三区| 亚洲综合丝袜美腿| 亚洲综合丁香婷婷六月香| 国产精品久久久久9999吃药| 2020国产精品自拍| 欧美va亚洲va香蕉在线| 欧美大片在线观看一区二区| 欧美丰满少妇xxxxx高潮对白| 欧美视频一区在线| 欧美电影免费观看高清完整版在|