本文整理汇总了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);
}
示例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);
}
示例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);
}
示例4: currentId
void
TaxList::performEdit()
{
Id tax_id = currentId();
TaxMaster* master = new TaxMaster(_main, tax_id);
master->show();
}
示例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()));
}
}
示例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.
}
示例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();
}
示例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;
}
示例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;
}
示例10: skip
void CompleteWiz::skip()
{
Operate[currentId()]=false;
if(nextId()!=-1)
next();
else
emit accept();
}
示例11: deleteFeed
/*virtual*/ void AddFeedWizard::done(int result)
{
if (result == QDialog::Rejected) {
if (progressBar_->isVisible() || (currentId() == 1))
deleteFeed();
}
QWizard::done(result);
}
示例12: qCDebug
void AuthenticationWizard::nextState()
{
qCDebug(KTP_TEXTUI_LIB);
if(currentId() == Page_Wait1) {
static_cast<WaitPage*>(currentPage())->ready();
next();
}
}
示例13: reject
void CheckoutWizardDialog::reject()
{
// First click kills, 2nd closes
if (currentId() == m_progressPageId && m_progressPage->isRunning())
m_progressPage->terminate();
else
QWizard::reject();
}
示例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;
}
}
示例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()));
}