本文整理汇总了C++中QWizard::setFinishEnabled方法的典型用法代码示例。如果您正苦于以下问题:C++ QWizard::setFinishEnabled方法的具体用法?C++ QWizard::setFinishEnabled怎么用?C++ QWizard::setFinishEnabled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QWizard
的用法示例。
在下文中一共展示了QWizard::setFinishEnabled方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setRequestId
void ICQSearchResult::setRequestId(unsigned short id)
{
m_id = id;
setStatus();
QWizard *wizard = static_cast<QWizard*>(topLevelWidget());
wizard->setFinishEnabled(this, (m_id == 0) || (m_id == SEARCH_FAIL));
}
示例2: setText
void ICQSearchResult::setText(const QString &text)
{
lblStatus->setText(text);
tblUser->hide();
QWizard *wizard = static_cast<QWizard*>(topLevelWidget());
wizard->setFinishEnabled(this, true);
}
示例3: clear
void ICQSearchResult::clear()
{
setRequestId(SEARCH_DONE, SEARCH_DONE);
m_nFound = 0;
tblUser->clear();
QWizard *wizard = static_cast<QWizard*>(topLevelWidget());
wizard->setFinishEnabled(this, false);
}
示例4: finishEnable
void AddResult::finishEnable(bool state)
{
QWizard *w = NULL;
for (QWidget *p = parentWidget(); p; p = p->parentWidget()){
if (p->inherits("QWizard")){
w = static_cast<QWizard*>(p);
break;
}
}
if (w == NULL)
return;
if (state != m_bConnect){
m_bConnect = state;
if (m_bConnect){
connect(w->finishButton(), SIGNAL(clicked()), this, SLOT(finish()));
}else{
disconnect(w->finishButton(), SIGNAL(clicked()), this, SLOT(finish()));
}
}
w->setFinishEnabled(this, state);
}
示例5: ICQSearchResultBase
ICQSearchResult::ICQSearchResult(QWidget *parent, ICQClient *client)
: ICQSearchResultBase(parent)
{
m_id1 = SEARCH_DONE;
m_id2 = SEARCH_DONE;
m_nFound = 0;
m_client = client;
int wChar = QFontMetrics(font()).width('0');
tblUser->addColumn("", -10*wChar);
tblUser->setColumnAlignment(0, AlignRight);
tblUser->addColumn(i18n("Alias"), 20*wChar);
tblUser->addColumn(i18n("Name"));
tblUser->setExpandingColumn(COL_NAME);
tblUser->setSorting(COL_SCREEN);
tblUser->setMenu(MenuSearchResult);
tblUser->header()->hide();
connect(tblUser, SIGNAL(dragStart()), this, SLOT(dragStart()));
connect(tblUser, SIGNAL(doubleClicked(QListViewItem*)), this, SLOT(doubleClicked(QListViewItem*)));
connect(tblUser, SIGNAL(selectionChanged()), this, SLOT(selectChanged()));
QWizard *wizard = static_cast<QWizard*>(topLevelWidget());
wizard->setFinishEnabled(this, false);
connect(wizard->finishButton(), SIGNAL(clicked()), this, SLOT(finishClicked()));
}
示例6: selectionChanged
void ICQSearchResult::selectionChanged()
{
QWizard *wizard = static_cast<QWizard*>(topLevelWidget());
wizard->setFinishEnabled(this, (tblUser->selectedItem() != NULL));
}