本文整理汇总了C++中KMPrinter::setEdited方法的典型用法代码示例。如果您正苦于以下问题:C++ KMPrinter::setEdited方法的具体用法?C++ KMPrinter::setEdited怎么用?C++ KMPrinter::setEdited使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KMPrinter
的用法示例。
在下文中一共展示了KMPrinter::setEdited方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: slotSettings
void KMInstancePage::slotSettings()
{
KMTimer::self()->hold();
QString src = m_view->currentText();
if(!src.isEmpty())
{
if(src == i18n("(Default)"))
src = QString::null;
KMPrinter *pr = KMFactory::self()->virtualManager()->findInstance(m_printer, src);
if(!pr)
KMessageBox::error(this, i18n("Unable to find instance %1.").arg(m_view->currentText()));
else if(!pr->isSpecial() && !KMFactory::self()->manager()->completePrinterShort(pr))
KMessageBox::error(
this,
i18n("Unable to retrieve printer information. Message from printing system: %1.").arg(KMFactory::self()->manager()->errorMsg()));
else
{
int oldAppType = KMFactory::self()->settings()->application;
KMFactory::self()->settings()->application = -1;
KPrinterPropertyDialog::setupPrinter(pr, this);
KMFactory::self()->settings()->application = oldAppType;
if(pr->isEdited())
{ // printer edited, need to save changes
pr->setDefaultOptions(pr->editedOptions());
pr->setEditedOptions(QMap< QString, QString >());
pr->setEdited(false);
KMFactory::self()->virtualManager()->triggerSave();
}
}
}
else
KMessageBox::error(this, i18n("The instance name is empty. Please select an instance."));
KMTimer::self()->release();
}