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


C++ currentId函数代码示例

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


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

示例1: currentId

void
GltxList::performRefresh()
{
    Id gltx_id = currentId();
    QListViewItem* current = NULL;
    clearLists();

    vector<Gltx> gltxs;
    _quasar->db()->select(gltxs, GltxSelect());
    DateValcon dateValcon;

    for (unsigned int i = 0; i < gltxs.size(); i++) {
	Gltx& gltx = gltxs[i];

	ListViewItem* lvi = new ListViewItem(_list, gltx.id());
	lvi->setText(0, dateValcon.format(gltx.postDate()));
	lvi->setText(1, gltx.memo());

	if (gltx.id() == gltx_id)
	    current = lvi;
    }

    if (current == NULL)
	current = _list->firstChild();

    _list->setCurrentItem(current);
    _list->setSelected(current, true);
}
开发者ID:cwarden,项目名称:quasar,代码行数:28,代码来源:gltx_list.cpp

示例2: currentId

void
CompanyList::performRefresh()
{
    bool showInactive = _inactive->isChecked();
    Id company_id = currentId();
    QListViewItem* current = NULL;
    clearLists();

    CompanySelect conditions;
    conditions.activeOnly = !showInactive;
    vector<Company> companies;
    _quasar->db()->select(companies, conditions);

    for (unsigned int i = 0; i < companies.size(); ++i) {
	Company& company = companies[i];

	ListViewItem* lvi = new ListViewItem(_list, company.id());
	lvi->setValue(0, company.name());
	lvi->setValue(1, company.number());
	if (showInactive) lvi->setValue(2, !company.isActive());
	if (company.id() == company_id) current = lvi;
    }

    if (current == NULL) current = _list->firstChild();

    _list->setCurrentItem(current);
    _list->setSelected(current, true);
}
开发者ID:cwarden,项目名称:quasar,代码行数:28,代码来源:company_list.cpp

示例3: switch

void Wizard::showHelp()
{

    QString message;

    switch (currentId())
    {
        case 0:
            message = tr("In this first page you should provide the nifti image to convert and optionally a reference DICOM header from which copy anagraphical data of the patient ");
            break;

        case 1:
            message = tr("In this page you should edit DICOM field filling proper information required for the output header. To do this simply right-click on the proper row. At the end press enter to confirm your change for the selected tag.");
            break;

        case 2:
            message = tr("In this page you would be asked for an output directory where all the dicom slices will be written to and the accession Number. All those fields are mandatory. At the right side of the page you could review the final header. Nothing has been already written to the final files so you can go back to the previous page and edit correctly the header tags");
            break;

        default:
            message = tr("This Dialog will contain information for the current step");
    }

    QMessageBox::information(this, tr("QNifti2Dicom Help dialog"), message);
}
开发者ID:151706061,项目名称:nifti2dicom,代码行数:25,代码来源:wizard.cpp

示例4: currentId

void
TaxList::performEdit()
{
    Id tax_id = currentId();
    TaxMaster* master = new TaxMaster(_main, tax_id);
    master->show();
}
开发者ID:cwarden,项目名称:quasar,代码行数:7,代码来源:tax_list.cpp

示例5: SLOT

void
AddressBook::addToPopup(QPopupMenu* menu)
{
    ActiveList::addToPopup(menu);
    menu->insertItem(tr("Send Email"), this, SLOT(slotEmail()));

    Card card;
    if (!_quasar->db()->lookup(currentId(), card)) return;
    if (card.dataType() == DataObject::PERSONAL) return;
    if (card.dataType() == DataObject::EMPLOYEE) return;

    menu->insertItem(tr("Inquiry"), this, SLOT(slotInquiry()));
    menu->insertItem(tr("Find Tx"), this, SLOT(slotFindTx()));
    if (card.dataType() == DataObject::CUSTOMER) {
	menu->insertItem(tr("Aged List"), this, SLOT(slotAgedAR()));
	menu->insertItem(tr("Sales"), this, SLOT(slotSales()));
	menu->insertItem(tr("Payment"), this, SLOT(slotReceipt()));
	menu->insertItem(tr("Withdraw"), this, SLOT(slotWithdraw()));
	menu->insertItem(tr("Write Cheque"), this, SLOT(slotCheque()));
	menu->insertItem(tr("Allocate"), this, SLOT(slotAllocate()));
    }
    if (card.dataType() == DataObject::VENDOR) {
	menu->insertItem(tr("Aged List"), this, SLOT(slotAgedAP()));
	menu->insertItem(tr("Purchases"), this, SLOT(slotPurchases()));
	menu->insertItem(tr("Payment"), this, SLOT(slotPayment()));
	menu->insertItem(tr("Allocate"), this, SLOT(slotAllocate()));
    }
}
开发者ID:cwarden,项目名称:quasar,代码行数:28,代码来源:address_book.cpp

示例6: closeEvent

void WizardMain::closeEvent(QCloseEvent *event) {
    //!
    //!SLOT: catches the close button event on the wizard and ignore it only on the last page.
    //!

    //!If the user closes the wizard the textual report is saved.

    QString userText;

    if(mode == false) {
          userText = this->field("UserDescription").toString();
          report->setUserText(userText); //User description inserted.
    }

    xml->save();

    //The event is ignored on the last page of the wizard because the user must press 'finished'
    //to execute the last code.

    //The last page changes the id according to the wizard mode.

    if(currentId() == lastPage)
        event->ignore();

    emit rejected(); //The signal is used by sendtextreportform class to close the form.
}
开发者ID:BFeri92,项目名称:OpenGOO,代码行数:26,代码来源:wizardmain.cpp

示例7: currentId

void
AddressBook::performEdit()
{
    Id card_id = currentId();
    Card card;
    if (!_quasar->db()->lookup(card_id, card))
	return;

    QWidget* window = NULL;
    switch (card.dataType()) {
    case DataObject::CUSTOMER:
	window = new CustomerMaster(_main, card_id);
	break;
    case DataObject::EMPLOYEE:
	window = new EmployeeMaster(_main, card_id);
	break;
    case DataObject::PERSONAL:
	window = new PersonalMaster(_main, card_id);
	break;
    case DataObject::VENDOR:
	window = new VendorMaster(_main, card_id);
	break;
    default:
	assert(false);
    }
    window->show();
}
开发者ID:cwarden,项目名称:quasar,代码行数:27,代码来源:address_book.cpp

示例8: switch

void NewWizard::showHelp()
{
	static QString lastMessage;
	QString message;

	switch(currentId()) {
		case Page_New:
				message = tr("You must specify the dimensions of the matrix and "
							 "the configuration of differential transformations");
				break;
		case Page_Matrix:
				message = tr("You must specify each element of the matrix based on "
								" the agreed syntax");
				break;
		default:
				message = tr("This help wasn't a help at all.");
				break;
	}

	if (lastMessage == message) {
			message = tr("Sorry, I've already helped you as much as I could. "
							"Maybe you should ask a human.?");
	}

	QMessageBox::information(this, tr("New Session Wizard Help"), message);
	lastMessage = message;
}
开发者ID:grimmjoe,项目名称:devel,代码行数:27,代码来源:wizards.cpp

示例9: switch

int ConnectFriendWizard::nextId() const
{
    switch ((Page) currentId()) {
    case Page_Intro:
        if (ui->textRadioButton->isChecked()) return Page_Text;
        if (ui->certRadioButton->isChecked()) return Page_Cert;
        if (ui->foffRadioButton->isChecked()) return Page_Foff;
        if (ui->rsidRadioButton->isChecked()) return Page_Rsid;
        if (ui->emailRadioButton->isChecked()) return Page_Email;
        if (ui->friendRecommendationsRadioButton->isChecked()) return Page_FriendRecommendations;
        return ConnectFriendWizard::Page_Foff;
    case Page_Text:
    case Page_Cert:
    case Page_Rsid:
        return error ? ConnectFriendWizard::Page_Conclusion : ConnectFriendWizard::Page_ErrorMessage;
    case Page_Foff:
    case Page_Email:
    case Page_ErrorMessage:
    case Page_Conclusion:
    case Page_FriendRequest:
    case Page_FriendRecommendations:
        return -1;
    }

    return -1;
}
开发者ID:RedCraig,项目名称:retroshare,代码行数:26,代码来源:ConnectFriendWizard.cpp

示例10: skip

void CompleteWiz::skip()
{
    Operate[currentId()]=false;
    if(nextId()!=-1)
        next();
    else
        emit accept();
}
开发者ID:RiccardoDiGuida,项目名称:MetaProcess,代码行数:8,代码来源:completewiz.cpp

示例11: deleteFeed

/*virtual*/ void AddFeedWizard::done(int result)
{
  if (result == QDialog::Rejected) {
    if (progressBar_->isVisible() || (currentId() == 1))
      deleteFeed();
  }
  QWizard::done(result);
}
开发者ID:Nikoli,项目名称:quite-rss,代码行数:8,代码来源:addfeedwizard.cpp

示例12: qCDebug

void AuthenticationWizard::nextState()
{
    qCDebug(KTP_TEXTUI_LIB);
	if(currentId() == Page_Wait1) {
		static_cast<WaitPage*>(currentPage())->ready();
		next();
	}
}
开发者ID:KDE,项目名称:ktp-text-ui,代码行数:8,代码来源:authenticationwizard.cpp

示例13: reject

void CheckoutWizardDialog::reject()
{
    // First click kills, 2nd closes
    if (currentId() == m_progressPageId && m_progressPage->isRunning())
        m_progressPage->terminate();
    else
        QWizard::reject();
}
开发者ID:ZerpHmm,项目名称:qt-creator,代码行数:8,代码来源:checkoutwizarddialog.cpp

示例14: switch

int QtUserSearchWindow::nextId() const {
	switch (currentId()) {
		case 1: return firstPage_->byJID_->isChecked() ? (type_ == AddContact ? 4 : -1) : 2;
		case 2: return 3;
		case 3: return type_ == AddContact ? 4 : -1;
		case 4: return -1;
		default: return -1;
	}
}
开发者ID:bessey,项目名称:picnic-doc-server,代码行数:9,代码来源:QtUserSearchWindow.cpp

示例15: SLOT

void
ActiveList::addToPopup(QPopupMenu* menu)
{
    menu->insertSeparator();
    if (isActive(currentId()))
	menu->insertItem(tr("Set inactive"), this, SLOT(slotSetInactive()));
    else
	menu->insertItem(tr("Set active"), this, SLOT(slotSetActive()));
}
开发者ID:cwarden,项目名称:quasar,代码行数:9,代码来源:active_list.cpp


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