当前位置: 首页>>代码示例>>C++>>正文


C++ currentTab函数代码示例

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


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


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