mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-23 14:41:04 -04:00
Merge Filter ComboBox to Header Context Menu in IdDialog.
This commit is contained in:
parent
431dd68509
commit
d3beccf3e2
5 changed files with 430 additions and 374 deletions
|
@ -169,6 +169,11 @@ void RSTreeWidget::addHeaderContextMenuAction(QAction *action)
|
|||
mHeaderContextMenuActions.push_back(action);
|
||||
}
|
||||
|
||||
void RSTreeWidget::addHeaderContextMenuMenu(QMenu *menu)
|
||||
{
|
||||
mHeaderContextMenuMenus.push_back(menu);
|
||||
}
|
||||
|
||||
void RSTreeWidget::headerContextMenuRequested(const QPoint &pos)
|
||||
{
|
||||
QMenu contextMenu(this);
|
||||
|
@ -207,6 +212,13 @@ void RSTreeWidget::headerContextMenuRequested(const QPoint &pos)
|
|||
contextMenu.addActions(mHeaderContextMenuActions);
|
||||
}
|
||||
|
||||
if (!mHeaderContextMenuMenus.isEmpty()) {
|
||||
foreach(QMenu *menu, mHeaderContextMenuMenus) {
|
||||
contextMenu.addSeparator();
|
||||
contextMenu.addMenu(menu);
|
||||
}
|
||||
}
|
||||
|
||||
if (contextMenu.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue