本文整理汇总了C++中KActionMenu::setObjectName方法的典型用法代码示例。如果您正苦于以下问题:C++ KActionMenu::setObjectName方法的具体用法?C++ KActionMenu::setObjectName怎么用?C++ KActionMenu::setObjectName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KActionMenu
的用法示例。
在下文中一共展示了KActionMenu::setObjectName方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: KexiView
KexiReportView::KexiReportView(QWidget *parent)
: KexiView(parent), m_preRenderer(0), m_reportDocument(0) //! @todo KEXI3, m_kexi(0), m_functions(0)
{
setObjectName("KexiReportDesigner_DataView");
m_reportView = new KReportView(this);
layout()->addWidget(m_reportView);
#ifndef KEXI_MOBILE
m_pageSelector = new KexiRecordNavigator(*m_reportView->scrollArea(), m_reportView);
m_pageSelector->setInsertingButtonVisible(false);
m_pageSelector->setInsertingEnabled(false);
m_pageSelector->setLabelText(xi18nc("Page selector label", "Page:"));
m_pageSelector->setButtonToolTipText(KexiRecordNavigator::ButtonFirst, xi18n("Go to first page"));
m_pageSelector->setButtonWhatsThisText(KexiRecordNavigator::ButtonFirst, xi18n("Goes to first page"));
m_pageSelector->setButtonToolTipText(KexiRecordNavigator::ButtonPrevious, xi18n("Go to previous page"));
m_pageSelector->setButtonWhatsThisText(KexiRecordNavigator::ButtonPrevious, xi18n("Goes to previous page"));
m_pageSelector->setButtonToolTipText(KexiRecordNavigator::ButtonNext, xi18n("Go to next page"));
m_pageSelector->setButtonWhatsThisText(KexiRecordNavigator::ButtonNext, xi18n("Goes to next page"));
m_pageSelector->setButtonToolTipText(KexiRecordNavigator::ButtonLast, xi18n("Go to last page"));
m_pageSelector->setButtonWhatsThisText(KexiRecordNavigator::ButtonLast, xi18n("Goes to last page"));
m_pageSelector->setNumberFieldToolTips(xi18n("Current page number"), xi18n("Number of pages"));
m_pageSelector->setRecordHandler(this);
#endif
// -- setup local actions
QList<QAction*> viewActions;
QAction* a;
#ifndef KEXI_MOBILE
viewActions << (a = new QAction(koIcon("document-print"), xi18n("Print"), this));
a->setObjectName("print_report");
a->setToolTip(xi18n("Print report"));
a->setWhatsThis(xi18n("Prints the current report."));
connect(a, SIGNAL(triggered()), this, SLOT(slotPrintReport()));
KActionMenu *exportMenu = new KActionMenu(koIcon("document-export"), xi18nc("@title:menu","E&xport As"), this);
exportMenu->setObjectName("report_export_as");
exportMenu->setDelayed(false);
#endif
#ifdef KEXI_MOBILE
viewActions << (a = new QAction(xi18n("Export:"), this));
a->setEnabled(false); //!TODO this is a bit of a dirty way to add what looks like a label to the toolbar!
// " ", not "", is said to be needed in maemo, the icon didn't display properly without it
viewActions << (a = new QAction(koIcon("application-vnd.oasis.opendocument.text"), QLatin1String(" "), this));
#else
exportMenu->addAction(a = new QAction(koIcon("application-vnd.oasis.opendocument.text"),
xi18nc("open dialog to export as text document", "Text Document..."), this));
#endif
a->setObjectName("export_as_text_document");
a->setToolTip(xi18n("Export the report as a text document (in OpenDocument Text format)"));
a->setWhatsThis(xi18n("Exports the report as a text document (in OpenDocument Text format)."));
a->setEnabled(true);
connect(a, SIGNAL(triggered()), this, SLOT(slotExportAsTextDocument()));
#ifdef KEXI_MOBILE
viewActions << (a = new QAction(koIcon("application-pdf"), QLatin1String(" "), this));
#else
exportMenu->addAction(a = new QAction(koIcon("application-pdf"),
xi18nc("Portable Document Format...", "PDF..."), this));
#endif
a->setObjectName("export_as_pdf");
a->setToolTip(xi18n("Export as PDF"));
a->setWhatsThis(xi18n("Exports the current report as PDF."));
a->setEnabled(true);
connect(a, SIGNAL(triggered()), this, SLOT(slotExportAsPdf()));
#ifdef KEXI_MOBILE
viewActions << (a = new QAction(koIcon("application-vnd.oasis.opendocument.spreadsheet"), QLatin1String(" "), this));
#else
exportMenu->addAction(a = new QAction(koIcon("application-vnd.oasis.opendocument.spreadsheet"),
xi18nc("open dialog to export as spreadsheet", "Spreadsheet..."), this));
#endif
a->setObjectName("export_as_spreadsheet");
a->setToolTip(xi18n("Export the report as a spreadsheet (in OpenDocument Spreadsheet format)"));
a->setWhatsThis(xi18n("Exports the report as a spreadsheet (in OpenDocument Spreadsheet format)."));
a->setEnabled(true);
connect(a, SIGNAL(triggered()), this, SLOT(slotExportAsSpreadsheet()));
#ifdef KEXI_MOBILE
viewActions << (a = new QAction(koIcon("text-html"), QLatin1String(" "), this));
#else
exportMenu->addAction(a = new QAction(koIcon("text-html"),
xi18nc("open dialog to export as web page", "Web Page..."), this));
#endif
a->setObjectName("export_as_web_page");
a->setToolTip(xi18n("Export the report as a web page (in HTML format)"));
a->setWhatsThis(xi18n("Exports the report as a web page (in HTML format)."));
a->setEnabled(true);
connect(a, SIGNAL(triggered()), this, SLOT(slotExportAsWebPage()));
setViewActions(viewActions);
#ifndef KEXI_MOBILE
// setup main menu actions
QList<QAction*> mainMenuActions;
mainMenuActions << exportMenu;
//.........这里部分代码省略.........