本文整理汇总了C++中KMPrinter::printerName方法的典型用法代码示例。如果您正苦于以下问题:C++ KMPrinter::printerName方法的具体用法?C++ KMPrinter::printerName怎么用?C++ KMPrinter::printerName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KMPrinter
的用法示例。
在下文中一共展示了KMPrinter::printerName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: slotMove
void KMJobViewer::slotMove(int prID)
{
if (prID >= 0 && prID < (int)(m_printers.count()))
{
KMPrinter *p = m_printers.at(prID);
send(KMJob::Move,i18n("Move to %1").arg(p->printerName()),p->printerName());
}
}
示例2: slotTest
void KMInstancePage::slotTest()
{
KMTimer::self()->hold();
QString src = m_view->currentText();
if(!src.isEmpty())
{
if(src == i18n("(Default)"))
src = QString::null;
KMPrinter *mpr = KMFactory::self()->virtualManager()->findInstance(m_printer, src);
if(!mpr)
KMessageBox::error(this, i18n("Internal error: printer not found."));
else if(KMessageBox::warningContinueCancel(this,
i18n("You are about to print a test page on %1. Do you want to continue?").arg(mpr->printerName()),
QString::null, i18n("Print Test Page"), "printTestPage")
== KMessageBox::Continue)
{
if(!KMFactory::self()->virtualManager()->testInstance(mpr))
KMessageBox::error(this, i18n("Unable to send test page to %1.").arg(mpr->printerName()));
else
KMessageBox::information(this, i18n("Test page successfully sent to printer %1.").arg(mpr->printerName()));
}
}
KMTimer::self()->release(false);
}
示例3: initialize
void PrintMenu::initialize()
{
if (initialized()) clear();
setInitialized(true);
int ID = PRINTER_LIST_ID;
// just to be sure the plugin is loaded -> icons are available
KMManager::self();
if ((KMManager::self()->printerOperationMask() & KMManager::PrinterCreation) && KMManager::self()->hasManagement())
insertItem(KIcon("wizard"), i18n("Add Printer..."), ADD_PRINTER_ID);
insertItem(KIcon("kdeprint-configmgr"), i18n("KDE Print Settings"), KDEPRINT_SETTINGS_ID);
if (KMManager::self()->serverOperationMask() & KMManager::ServerConfigure)
insertItem(KIcon("kdeprint-configsrv"), i18n("Configure Server"), CONFIG_SERVER_ID);
addSeparator();
insertItem(KIcon("kcontrol"), i18n("Print Manager"), PRINT_MANAGER_ID);
insertItem(KIcon("konqueror"), i18n("Print Browser (Konqueror)"), PRINT_BROWSER_ID);
addSeparator();
insertItem(KIcon("document-print"), i18n("Print File..."), KPRINTER_ID);
// printer list
QList<KMPrinter*> l = KMManager::self()->printerList();
if (!l.isEmpty())
{
bool separatorInserted = false;
QListIterator<KMPrinter*> it(l);
while (it.hasNext())
{
KMPrinter *itprt = it.next();
// no special, implicit or pure instances
if (itprt->isSpecial() || itprt->isVirtual())
continue;
if (!separatorInserted)
{
// we insert a separator only when we find the first
// printer
addSeparator();
separatorInserted = true;
}
insertItem(KIcon(itprt->pixmap()),
itprt->printerName(), ID++);
}
}
}