本文整理汇总了C++中KMPrinter::isRemote方法的典型用法代码示例。如果您正苦于以下问题:C++ KMPrinter::isRemote方法的具体用法?C++ KMPrinter::isRemote怎么用?C++ KMPrinter::isRemote使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KMPrinter
的用法示例。
在下文中一共展示了KMPrinter::isRemote方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: slotPrinterSelected
void KMMainView::slotPrinterSelected(const QString &prname)
{
KMPrinter *p = KMManager::self()->findPrinter(prname);
m_current = p;
if(p && !p->isSpecial())
KMFactory::self()->manager()->completePrinter(p);
m_printerpages->setPrinter(p);
// update actions state (only if toolbar enabled, workaround for toolbar
// problem).
// if (m_toolbar->isEnabled())
//{
int mask = (m_manager->hasManagement() ? m_manager->printerOperationMask() : 0);
bool sp = !(p && p->isSpecial());
m_actions->action("printer_remove")->setEnabled(!sp || ((mask & KMManager::PrinterRemoval) && p && p->isLocal() && !p->isImplicit()));
m_actions->action("printer_configure")->setEnabled(!sp || ((mask & KMManager::PrinterConfigure) && p && !p->isClass(true) /*&& p->isLocal()*/));
m_actions->action("printer_hard_default")
->setEnabled((sp && (mask & KMManager::PrinterDefault) && p && !p->isClass(true) && !p->isHardDefault() && p->isLocal()));
m_actions->action("printer_soft_default")->setEnabled((p && !p->isSoftDefault()));
m_actions->action("printer_test")->setEnabled((sp && (mask & KMManager::PrinterTesting) && p && !p->isClass(true)));
bool stmask = (sp && (mask & KMManager::PrinterEnabling) && p);
m_actions->action("printer_state_change")->setEnabled(stmask && p->isLocal());
m_actions->action("printer_spool_change")->setEnabled(stmask);
m_actions->action("printer_start")->setEnabled((stmask && p->state() == KMPrinter::Stopped));
m_actions->action("printer_stop")->setEnabled((stmask && p->state() != KMPrinter::Stopped));
m_actions->action("printer_enable")->setEnabled((stmask && !p->acceptJobs()));
m_actions->action("printer_disable")->setEnabled((stmask && p->acceptJobs()));
m_actions->action("printer_add")->setEnabled((mask & KMManager::PrinterCreation));
mask = m_manager->serverOperationMask();
m_actions->action("server_restart")->setEnabled((mask & KMManager::ServerRestarting));
m_actions->action("server_configure")->setEnabled((mask & KMManager::ServerConfigure));
KMFactory::self()->manager()->validatePluginActions(m_actions, p);
//}
m_actions->action("printer_tool")->setEnabled(p && !p->isClass(true) && !p->isRemote() && !p->isSpecial());
}