void BtOpenWorkActionMenu::postBuildMenu() { addSeparator(); m_groupingMenu = new BtBookshelfGroupingMenu(false, this); connect(m_groupingMenu, SIGNAL(signalGroupingOrderChanged(BtBookshelfTreeModel::Grouping)), this, SLOT(slotGroupingActionTriggered(BtBookshelfTreeModel::Grouping))); retranslateUi(); addMenu(m_groupingMenu); }
void BtBookshelfWidget::initMenus() { // Grouping menu: m_groupingMenu = new BtBookshelfGroupingMenu(this); BT_CONNECT(m_groupingMenu, SIGNAL(signalGroupingOrderChanged( BtBookshelfTreeModel::Grouping)), this, SLOT(slotGroupingActionTriggered( BtBookshelfTreeModel::Grouping))); // Context menu m_contextMenu = new QMenu(this); m_contextMenu->addMenu(m_groupingMenu); m_contextMenu->addAction(m_showHideAction); // Item context menu m_itemContextMenu = m_contextMenu; }
void BtBookshelfGroupingMenu::slotGroupingActionTriggered(QAction *action) { emit signalGroupingOrderChanged(getActionRef(action)); }