Ejemplo n.º 1
0
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);
}
Ejemplo n.º 2
0
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;
}