• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ currentTab函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中currentTab函数的典型用法代码示例。如果您正苦于以下问题:C++ currentTab函数的具体用法?C++ currentTab怎么用?C++ currentTab使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了currentTab函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: i

void ChatWindow::closeTab()
{
	QString tooltip=ui->tab->tabToolTip(ui->tab->currentIndex());
	QString txt=ui->tab->tabText(ui->tab->currentIndex());

	if(txt==tooltip)
	{
		QMapIterator<QString, QTextEdit*> i(serveurs[tooltip]->conversations);

		int count=ui->tab->currentIndex()+1;

		while(i.hasNext())
		{
			i.next();
			ui->tab->removeTab(count);
		}

		currentTab()->abort();
		ui->tab->removeTab(ui->tab->currentIndex());
	}
	else
	{

        ui->tab->removeTab(ui->tab->currentIndex());
		currentTab()->conversations.remove(txt);
	}
}
开发者ID:Crestington,项目名称:Colossuscoin2test,代码行数:27,代码来源:chatwindow.cpp


示例2: QString

QString MainWindow::selectedText() const
{
    if (!currentTab())
        return QString();

    return currentTab()->view()->selectedText();
}
开发者ID:Fxrh,项目名称:rekonq,代码行数:7,代码来源:mainwindow.cpp


示例3: currentTab

void MainWindow::openPrevious(Qt::MouseButtons mouseButtons, Qt::KeyboardModifiers keyboardModifiers)
{
    QWebHistory *history = currentTab()->view()->history();
    QWebHistoryItem *item = 0;

    if (currentTab()->page()->isOnRekonqPage())
    {
        item = new QWebHistoryItem(history->currentItem());
    }
    else
    {
        if (history->canGoBack())
        {
            item = new QWebHistoryItem(history->backItem());
        }
    }

    if(!item)
        return;

    if (mouseButtons == Qt::MidButton || keyboardModifiers == Qt::ControlModifier)
    {
        Application::instance()->loadUrl(item->url(), Rekonq::NewTab);
    }
    else
    {
        history->goToItem(*item);
    }

    updateActions();
}
开发者ID:Fxrh,项目名称:rekonq,代码行数:31,代码来源:mainwindow.cpp


示例4: assert

void ExtendedDialog::saveConfig()
{
    assert( currentTab() == AUDIO_TAB || currentTab() == VIDEO_TAB );
    QHash<QString, QVariant> *hashConfig = &m_hashConfigs[currentTab()];

    for( QHash<QString, QVariant>::iterator i = hashConfig->begin();
         i != hashConfig->end(); ++i )
    {
        QVariant &value = i.value();
        switch( static_cast<QMetaType::Type>(value.type()) )
        {
            case QMetaType::QString:
                config_PutPsz( p_intf, qtu(i.key()), qtu(value.toString()) );
                break;
            case QMetaType::Int:
                config_PutInt( p_intf, qtu(i.key()), value.toInt() ) ;
                break;
            case QMetaType::Double:
            case QMetaType::Float:
                config_PutFloat( p_intf, qtu(i.key()), value.toFloat() ) ;
                break;
            default:
                vlc_assert_unreachable();
        }
    }
    config_SaveConfigFile( p_intf );
    hashConfig->clear();
    m_applyButton->setEnabled( false );
}
开发者ID:chouquette,项目名称:vlc,代码行数:29,代码来源:extended.cpp


示例5: search

void MainWindow::search()
{
  if(currentTab() && currentTab()->textEdit())
  {
    searchDialog->setEditor(currentTab()->textEdit());
    searchDialog->show();
  }
}
开发者ID:thibault7249,项目名称:dbmaster,代码行数:8,代码来源:mainwindow.cpp


示例6: switchToNextTab

void MainWindow::switchToNextTab()
{
    if (currentTab() != (tabs.size() - 1)) {
        ui->tabWidget->setCurrentIndex(currentTab() + 1);
    }else {
        ui->tabWidget->setCurrentIndex(0);
    }
}
开发者ID:BenDoan,项目名称:BenPad,代码行数:8,代码来源:mainwindow.cpp


示例7: switchToPrevTab

void MainWindow::switchToPrevTab()
{
    if (currentTab() != 0) {
        ui->tabWidget->setCurrentIndex(currentTab() - 1);
    }
    else {
        ui->tabWidget->setCurrentIndex(tabs.size() - 1);
    }
}
开发者ID:BenDoan,项目名称:BenPad,代码行数:9,代码来源:mainwindow.cpp


示例8: currentTab

void MainWindow::print()
{
  if(currentTab()->availableActions() && AbstractTabWidget::Print)
  {
    QPrinter *printer = currentTab()->printer();
    QPrintDialog *printDialog = new QPrintDialog(printer, this);
    if(printDialog->exec() == QDialog::Accepted)
      currentTab()->print();
  }
}
开发者ID:thibault7249,项目名称:dbmaster,代码行数:10,代码来源:mainwindow.cpp


示例9: currentTab

void ChatWindow::sendCommand() {
    QString tooltip = ui->tab->tabToolTip(ui->tab->currentIndex());
    QString txt = ui->tab->tabText(ui->tab->currentIndex());
    if (txt == tooltip) {
        currentTab()->sendData(currentTab()->parseCommand(ui->lineEdit->text(), true));
    } else {
        currentTab()->sendData(currentTab()->parseCommand(ui->lineEdit->text()));
    }
    ui->lineEdit->clear();
    ui->lineEdit->setFocus();
}
开发者ID:jlcurby,项目名称:NobleCoin,代码行数:11,代码来源:chatwindow.cpp


示例10: currentTab

void YaTabBarBase::updateSendButton()
{
#ifndef WIDGET_PLUGIN
	// hack in order to get YaChatSendButtonExtra into correct position
	if (currentTab()) {
		YaChatSendButton* sendButton = currentTab()->findChild<YaChatSendButton*>();
		if (sendButton) {
			sendButton->updatePosition();
		}
	}
#endif
}
开发者ID:mblsha,项目名称:yapsi-psi-snapshot,代码行数:12,代码来源:yatabbarbase.cpp


示例11: if

void ConnectionViewWidget::resetItemViews()
{
    if (currentTab() == ConnectionTab) {
        ui->connectionView->selectionModel()->clear();

    } else if (currentTab() == BindingTab) {
        ui->bindingView->selectionModel()->clear();

    } else if (currentTab() == DynamicPropertiesTab) {
        ui->dynamicPropertiesView->selectionModel()->clear();
    }
    invalidateButtonStatus();
}
开发者ID:raphaelcotty,项目名称:qt-creator,代码行数:13,代码来源:connectionviewwidget.cpp


示例12: kDebug

void MainWindow::updateActions()
{
    kDebug() << "updating actions..";
    bool rekonqPage = currentTab()->page()->isOnRekonqPage();

    QAction *historyBackAction = actionByName(KStandardAction::name(KStandardAction::Back));
    if( rekonqPage && currentTab()->view()->history()->count() > 0 )
        historyBackAction->setEnabled(true);
    else
        historyBackAction->setEnabled(currentTab()->view()->history()->canGoBack());

    QAction *historyForwardAction = actionByName(KStandardAction::name(KStandardAction::Forward));
    historyForwardAction->setEnabled(currentTab()->view()->history()->canGoForward());
}
开发者ID:Fxrh,项目名称:rekonq,代码行数:14,代码来源:mainwindow.cpp


示例13: file

void MainWindow::saveFile()
{
    QFile file(tabs[currentTab()].path);
    if (file.open(QIODevice::WriteOnly|QIODevice::Text)) {
        file.write(ui->textEdit->toPlainText().toUtf8());
    }
}
开发者ID:BenDoan,项目名称:BenPad,代码行数:7,代码来源:mainwindow.cpp


示例14: KILE_DEBUG

void SideBar::shrink()
{
	KILE_DEBUG();
	if(isMinimized()) {
		return;
	}

	int currentIndex = currentTab(); // before changing m_minimized!
	m_tabStack->setVisible(false);
	m_minimized = true;

	if(m_orientation == Qt::Horizontal) {
		m_directionalSize = height();
		setFixedHeight(m_tabBar->sizeHint().height());
	}
	else if(m_orientation == Qt::Vertical) {
		m_directionalSize = width();
		setFixedWidth(m_tabBar->sizeHint().width());
	}

	// deselect the currect tab
	m_tabBar->setTab(currentIndex, false);

	emit visibilityChanged(false);
}
开发者ID:fagu,项目名称:kileip,代码行数:25,代码来源:sidebar.cpp


示例15: currentTab

void MainWindow::noticeMessageReceived(IrcNoticeMessage *message)
{
  AbstractTab *tab = currentTab();
  if (tab == NULL) {
    tab = (AbstractTab *) m_ui.serverTab;
  }
  tab->noticeMessageReceived(message);
}
开发者ID:viking,项目名称:smirch-qt,代码行数:8,代码来源:mainwindow.cpp


示例16: on_actionSave_triggered

void MainWindow::on_actionSave_triggered()
{
  if (tabs[currentTab()].path.isEmpty())
  {
      saveFileAs();
  }else {
      saveFile();
  }
}
开发者ID:BenDoan,项目名称:BenPad,代码行数:9,代码来源:mainwindow.cpp


示例17: find

void MainWindow::find(const QString & search)
{
    if (!currentTab())
        return;
    m_lastSearch = search;

    updateHighlight();
    findNext();
}
开发者ID:Fxrh,项目名称:rekonq,代码行数:9,代码来源:mainwindow.cpp


示例18: setEnabledRemoveButton

void ConnectionViewWidget::invalidateButtonStatus()
{
    if (currentTab() == ConnectionTab) {
        setEnabledRemoveButton(ui->connectionView->selectionModel()->hasSelection());
        setEnabledAddButton(true);
    } else if (currentTab() == BindingTab) {
        setEnabledRemoveButton(ui->bindingView->selectionModel()->hasSelection());
        BindingModel *bindingModel = qobject_cast<BindingModel*>(ui->bindingView->model());
        setEnabledAddButton(bindingModel->connectionView()->model() &&
            bindingModel->connectionView()->selectedModelNodes().count() == 1);

    } else if (currentTab() == DynamicPropertiesTab) {
        setEnabledRemoveButton(ui->dynamicPropertiesView->selectionModel()->hasSelection());
        DynamicPropertiesModel *dynamicPropertiesModel = qobject_cast<DynamicPropertiesModel*>(ui->dynamicPropertiesView->model());
        setEnabledAddButton(dynamicPropertiesModel->connectionView()->model() &&
            dynamicPropertiesModel->connectionView()->selectedModelNodes().count() == 1);
    }
}
开发者ID:raphaelcotty,项目名称:qt-creator,代码行数:18,代码来源:connectionviewwidget.cpp


示例19: dynamicPropertiesTableViewSelectionChanged

void ConnectionViewWidget::dynamicPropertiesTableViewSelectionChanged(const QModelIndex &current, const QModelIndex & /*previous*/)
{
    if (currentTab() == DynamicPropertiesTab) {
        if (current.isValid()) {
            setEnabledRemoveButton(true);
        } else {
            setEnabledRemoveButton(false);
        }
    }
}
开发者ID:raphaelcotty,项目名称:qt-creator,代码行数:10,代码来源:connectionviewwidget.cpp


示例20: KUrl

void MainWindow::homePage(Qt::MouseButtons mouseButtons, Qt::KeyboardModifiers keyboardModifiers)
{
    KUrl homeUrl = ReKonfig::useNewTabPage()
        ? KUrl( QL1S("about:home") )
        : KUrl( ReKonfig::homePage() );

    if (mouseButtons == Qt::MidButton || keyboardModifiers == Qt::ControlModifier)
        Application::instance()->loadUrl( homeUrl, Rekonq::NewTab);
    else
        currentTab()->view()->load( homeUrl );
}
开发者ID:Fxrh,项目名称:rekonq,代码行数:11,代码来源:mainwindow.cpp



注:本文中的currentTab函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ currentText函数代码示例发布时间:2022-05-30
下一篇:
C++ currentSourceLocation函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap