void HotkeysTreeViewContextMenu::slotAboutToShow() { clear(); if (_index.isValid()) { KHotKeys::ActionDataBase *element = _view->model()->indexToActionDataBase(_index); KHotKeys::ActionDataGroup *group = _view->model()->indexToActionDataGroup(_index); bool isGroup = group; // Is the current element a group if (!isGroup) { group = element->parent(); } // Create the create actions createTriggerMenus(group->allowedTriggerTypes(), group->allowedActionTypes()); // It is not allowed to create a subgroup for a system group. if (!group->is_system_group()) { addAction( i18n("New Group") , this, SLOT(newGroupAction()) ); } // It is not allowed to delete a system group if (!(isGroup && group->is_system_group())) { // Item related actions addAction( i18n("Delete"), this, SLOT(deleteAction()) ); } } else { createTriggerMenus(KHotKeys::Trigger::AllTypes, KHotKeys::Action::AllTypes); addAction( i18n("New Group") , this, SLOT(newGroupAction()) ); } addSeparator(); addAction( i18n("Export Group..."), this, SLOT(exportAction()) ); addAction( i18n("Import..."), this, SLOT(importAction()) ); }
void EvalMainWindow::onActionWholePeakToClipboard() { emit exportAction(DataAccumulatorMsgs::ExportAction::WHOLE_PEAK_TO_CLIPBOARD); }
void EvalMainWindow::onActionExportDataTableCsv() { emit exportAction(DataAccumulatorMsgs::ExportAction::EXPORT_DATATABLE_CSV); }
void EvalMainWindow::onActionExportPlotAsImage() { emit exportAction(DataAccumulatorMsgs::ExportAction::EXPORT_PLOT); }
void ExportService::startUSBExport() { // Logger::instance()->writeRecord(Logger::severity_level::debug, "Exporter Module", Q_FUNC_INFO, "Starting Exporter Service"); /* * Creates the object of the classes and then move these objects to execute as thread. * Make the connection between threads. Starts both threads. */ // m_exporter->moveToThread(m_exportThread); // QObject::connect(m_exportThread, SIGNAL(started()), m_exporter, SLOT(startExport())); DeviceThread::instance()->moveToThread(m_daemonThread); QObject::connect(m_daemonThread, SIGNAL(started()), DeviceThread::instance(), SLOT(startListening())); QObject::connect(DeviceThread::instance(), SIGNAL(exportToDevice(QString)), m_exporter, SLOT(exportAction(QString))); QObject::connect(DeviceThread::instance(), SIGNAL(turnLedOff()), m_exporter, SLOT(turnOffLed())); // m_exportThread->start(); m_daemonThread->start(); m_exporter->startExport(); }