| 21 | } |
| 22 | |
| 23 | bool Recent::start() |
| 24 | { |
| 25 | qInfo() << __FUNCTION__; |
| 26 | auto &ctx = dpfInstance.serviceContext(); |
| 27 | WindowService *windowService = ctx.service<WindowService>(WindowService::name()); |
| 28 | |
| 29 | if (windowService) { |
| 30 | QObject::connect(RecentProxy::instance(), &RecentProxy::saveOpenedProject, |
| 31 | RecentDisplayWidget::instance(), &RecentDisplayWidget::addProject); |
| 32 | QObject::connect(RecentProxy::instance(), &RecentProxy::saveOpenedFile, |
| 33 | RecentDisplayWidget::instance(), &RecentDisplayWidget::addDocument); |
| 34 | |
| 35 | QAction *action = new QAction(MWNA_RECENT, this); |
| 36 | action->setIcon(QIcon::fromTheme("recent-navigation")); |
| 37 | windowService->addNavigationItem(new AbstractAction(action), Priority::highest); |
| 38 | |
| 39 | auto recentWidgetImpl = new AbstractWidget(RecentDisplayWidget::instance()); |
| 40 | windowService->registerWidgetToMode("recentWindow", recentWidgetImpl, CM_RECENT, Position::FullWindow, true, true); |
| 41 | } |
| 42 | return true; |
| 43 | } |
| 44 | |
| 45 | dpf::Plugin::ShutdownFlag Recent::stop() |
| 46 | { |
no test coverage detected