void RelaysPlugin::onInstalled() { qff::MainWindow *fwk = qff::MainWindow::frameWork(); m_partWidget = new ThisPartWidget(); fwk->addPartWidget(m_partWidget, manifest()->featureId()); connect(eventPlugin(), &Event::EventPlugin::dbEventNotify, this, &RelaysPlugin::onDbEventNotify); emit nativeInstalled(); }
void CompetitorsPlugin::onInstalled() { qff::MainWindow *fwk = qff::MainWindow::frameWork(); m_partWidget = new ThisPartWidget(); fwk->addPartWidget(m_partWidget, manifest()->featureId()); { m_registrationsDockWidget = new qff::DockWidget(nullptr); m_registrationsDockWidget->setObjectName("registrationsDockWidget"); m_registrationsDockWidget->setWindowTitle(tr("Registrations")); fwk->addDockWidget(Qt::RightDockWidgetArea, m_registrationsDockWidget); m_registrationsDockWidget->hide(); connect(m_registrationsDockWidget, &qff::DockWidget::visibilityChanged, this, &CompetitorsPlugin::onRegistrationsDockVisibleChanged); auto *a = m_registrationsDockWidget->toggleViewAction(); //a->setCheckable(true); a->setShortcut(QKeySequence("ctrl+shift+R")); fwk->menuBar()->actionForPath("view")->addActionInto(a); } emit nativeInstalled(); }