本文整理汇总了C++中KDockWidget::toolTipString方法的典型用法代码示例。如果您正苦于以下问题:C++ KDockWidget::toolTipString方法的具体用法?C++ KDockWidget::toolTipString怎么用?C++ KDockWidget::toolTipString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KDockWidget
的用法示例。
在下文中一共展示了KDockWidget::toolTipString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: insertWidget
void KMdiDockContainer::insertWidget ( KDockWidget *dwdg, TQPixmap pixmap, const TQString &text, int & )
{
kdDebug( 760 ) << k_funcinfo << "Adding a dockwidget to the dock container" << endl;
KDockWidget* w = dwdg;
int tab;
bool alreadyThere = m_map.contains( w );
if ( alreadyThere )
{
tab = m_map[ w ];
if ( m_ws->addWidget( w, tab ) != tab )
kdDebug( 760 ) << "ERROR COULDN'T READD WIDGET" << endl;
kdDebug( 760 ) << k_funcinfo << "Readded widget " << dwdg << endl;
}
else
{
tab = m_ws->addWidget( w );
m_map.insert( w, tab );
m_revMap.insert( tab, w );
if ( ( ( KDockWidget* ) parentWidget() ) ->mayBeShow() )
( ( KDockWidget* ) parentWidget() ) ->dockBack();
if ( ::tqqt_cast<KDockWidgetHeader*>(w->getHeader()) )
{
kdDebug( 760 ) << k_funcinfo << "The dockwidget we're adding has a header" << endl;
kdDebug( 760 ) << k_funcinfo << "Adding our overlap mode button to it" << endl;
KDockWidgetHeader *hdr = ::tqqt_cast<KDockWidgetHeader*>( w->getHeader() );
KDockButton_Private *btn = new KDockButton_Private( hdr, "OverlapButton" );
TQToolTip::add( btn, i18n( "Switch between overlap and side by side mode", "Overlap" ) );
btn->setToggleButton( true );
btn->setPixmap( const_cast< const char** >( tdemdi_not_close_xpm ) );
hdr->addButton( btn );
m_overlapButtons.insert( w, btn );
btn->setOn( !isOverlapMode() );
connect( btn, TQT_SIGNAL( clicked() ), this, TQT_SLOT( changeOverlapMode() ) );
}
m_tb->appendTab( pixmap.isNull() ? SmallIcon( "misc" ) : pixmap, tab, w->tabPageLabel() );
m_tb->tab( tab )->installEventFilter( this );
kdDebug( 760 ) << k_funcinfo << "Added tab with label " << w->tabPageLabel() <<
" to the tabbar" << endl;
connect( m_tb->tab( tab ), TQT_SIGNAL( clicked( int ) ), this, TQT_SLOT( tabClicked( int ) ) );
mTabCnt++;
m_inserted = tab;
int dummy = 0;
KDockContainer::insertWidget( w, pixmap, text, dummy );
itemNames.append( w->name() );
tabCaptions.insert( w->name(), w->tabPageLabel() );
tabTooltips.insert( w->name(), w->toolTipString() );
}
//FB m_ws->raiseWidget(tab);
}
示例2: insertWidget
void DockContainer::insertWidget(KDockWidget *dwdg, QPixmap pixmap, const QString &text, int &)
{
KDockWidget *w = (KDockWidget *)dwdg;
int tab;
bool alreadyThere = m_map.contains(w);
if(alreadyThere)
{
tab = m_map[w];
if(m_ws->addWidget(w, tab) != tab)
kdDebug(760) << "ERROR COULDN'T READD WIDGET************" << endl;
kdDebug(760) << "READDED WIDGET***********************************" << endl;
/*JOWENN m_tb->setTab(tab,true);
tabClicked(tab);*/
}
else
{
tab = m_ws->addWidget(w);
m_map.insert(w, tab);
m_revMap.insert(tab, w);
if(((KDockWidget *)parentWidget())->mayBeShow())
((KDockWidget *)parentWidget())->dockBack();
if(w->getHeader()->qt_cast("KDockWidgetHeader"))
{
kdDebug(760) << "*** KDockWidgetHeader has been found" << endl;
KDockWidgetHeader *hdr = static_cast< KDockWidgetHeader * >(w->getHeader()->qt_cast("KDockWidgetHeader"));
KDockButton_Private *btn = new KDockButton_Private(hdr, "OverlapButton");
QToolTip::add(btn, i18n("Switch between overlap and side by side mode", "Overlap"));
btn->setToggleButton(true);
btn->setPixmap(const_cast< const char ** >(kmdi_not_close_xpm));
hdr->addButton(btn);
m_overlapButtons.insert(w, btn);
btn->setOn(!isOverlapMode());
connect(btn, SIGNAL(clicked()), this, SLOT(changeOverlapMode()));
}
m_tb->appendTab(pixmap.isNull() ? SmallIcon("misc") : pixmap, tab, w->tabPageLabel());
m_tb->tab(tab)->installEventFilter(this);
kdDebug(760) << "NAMENAMENAMENAME:===========================:" << w->tabPageLabel() << endl;
// FB m_tb->setTab(tab,true);
connect(m_tb->tab(tab), SIGNAL(clicked(int)), this, SLOT(tabClicked(int)));
kdDebug(760) << "DockContainer::insertWidget()" << endl;
// FB m_tb->setTab(oldtab,false);
mTabCnt++;
m_inserted = tab;
int dummy = 0;
// FB tabClicked(tab);
KDockContainer::insertWidget(w, pixmap, text, dummy);
itemNames.append(w->name());
tabCaptions.insert(w->name(), w->tabPageLabel());
tabTooltips.insert(w->name(), w->toolTipString());
}
// FB m_ws->raiseWidget(tab);
}