#pragma once #include #include class LexerGroupActionMenu : public KActionMenu { Q_OBJECT public: LexerGroupActionMenu(const QString &text, QChar grp, QObject *parent) : KActionMenu(text, parent) { m_group = nullptr; m_languageGroup = grp.toLower(); connect(menu(), &QMenu::aboutToShow, this, &LexerGroupActionMenu::slotAboutToShow); setPopupMode(QToolButton::InstantPopup); } static std::list groups(); static QString displayName(const QString & lexerName); signals: void lexerSelected(const QString lexerName); private: QActionGroup *m_group; QChar m_languageGroup; public: void slotAboutToShow(); };