本文整理汇总了C++中KVBox::setAcceptDrops方法的典型用法代码示例。如果您正苦于以下问题:C++ KVBox::setAcceptDrops方法的具体用法?C++ KVBox::setAcceptDrops怎么用?C++ KVBox::setAcceptDrops使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KVBox
的用法示例。
在下文中一共展示了KVBox::setAcceptDrops方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: actionCollection
KHTMLImage::KHTMLImage( QWidget *parentWidget,
QObject *parent, KHTMLPart::GUIProfile prof )
: KParts::ReadOnlyPart( parent ), m_image( 0 )
{
KHTMLPart* parentPart = qobject_cast<KHTMLPart*>( parent );
setComponentData( KHTMLImageFactory::componentData(), prof == KHTMLPart::BrowserViewGUI && !parentPart );
KVBox *box = new KVBox( parentWidget );
box->setAcceptDrops( true );
m_khtml = new KHTMLPart( box, this, prof );
m_khtml->setAutoloadImages( true );
// We do not want our subpart to be destroyed when its widget is,
// since that may cause all KHTMLParts to die when we're dealing
// with
m_khtml->setAutoDeletePart( false );
connect( m_khtml->view(), SIGNAL(finishedLayout()), this, SLOT(restoreScrollPosition()) );
setWidget( box );
// VBox can't take focus, so pass it on to sub-widget
box->setFocusProxy( m_khtml->widget() );
m_ext = new KHTMLImageBrowserExtension( this );
m_ext->setObjectName( "be" );
m_sbExt = new KParts::StatusBarExtension( this );
m_sbExt->setObjectName( "sbe" );
// Remove unnecessary actions.
delete actionCollection()->action( "setEncoding" );
delete actionCollection()->action( "viewDocumentSource" );
delete actionCollection()->action( "selectAll" );
// forward important signals from the khtml part
// forward opening requests to parent frame (if existing)
KHTMLPart *p = qobject_cast<KHTMLPart*>(parent);
KParts::BrowserExtension *be = p ? p->browserExtension() : m_ext;
connect(m_khtml->browserExtension(), SIGNAL(openUrlRequestDelayed(KUrl,KParts::OpenUrlArguments,KParts::BrowserArguments)),
be, SIGNAL(openUrlRequestDelayed(KUrl,KParts::OpenUrlArguments,KParts::BrowserArguments)));
connect(m_khtml->browserExtension(), SIGNAL(popupMenu(QPoint,KUrl,mode_t,KParts::OpenUrlArguments,KParts::BrowserArguments,KParts::BrowserExtension::PopupFlags,KParts::BrowserExtension::ActionGroupMap)),
this, SLOT(slotPopupMenu(QPoint,KUrl,mode_t,KParts::OpenUrlArguments,KParts::BrowserArguments,KParts::BrowserExtension::PopupFlags,KParts::BrowserExtension::ActionGroupMap)));
connect( m_khtml->browserExtension(), SIGNAL(enableAction(const char*,bool)),
m_ext, SIGNAL(enableAction(const char*,bool)) );
m_ext->setURLDropHandlingEnabled( true );
}