feat: add Widebar::InsertWidgetBefore method
Signed-off-by: leo78913 <leo3758@riseup.net>
This commit is contained in:
parent
b9df10c8bd
commit
3da1d6a464
@ -111,6 +111,16 @@ void WideBar::insertActionAfter(QAction* after, QAction* action)
|
|||||||
m_menu_state = MenuState::Dirty;
|
m_menu_state = MenuState::Dirty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void WideBar::insertWidgetBefore(QAction* before, QWidget* widget)
|
||||||
|
{
|
||||||
|
auto iter = getMatching(before);
|
||||||
|
if (iter == m_entries.end())
|
||||||
|
return;
|
||||||
|
|
||||||
|
BarEntry entry;
|
||||||
|
entry.bar_action = insertWidget(iter->bar_action, widget);
|
||||||
|
}
|
||||||
|
|
||||||
void WideBar::insertSpacer(QAction* action)
|
void WideBar::insertSpacer(QAction* action)
|
||||||
{
|
{
|
||||||
auto iter = getMatching(action);
|
auto iter = getMatching(action);
|
||||||
|
@ -22,6 +22,7 @@ class WideBar : public QToolBar {
|
|||||||
void insertSeparator(QAction* before);
|
void insertSeparator(QAction* before);
|
||||||
void insertActionBefore(QAction* before, QAction* action);
|
void insertActionBefore(QAction* before, QAction* action);
|
||||||
void insertActionAfter(QAction* after, QAction* action);
|
void insertActionAfter(QAction* after, QAction* action);
|
||||||
|
void insertWidgetBefore(QAction* before, QWidget* widget);
|
||||||
|
|
||||||
QMenu* createContextMenu(QWidget* parent = nullptr, const QString& title = QString());
|
QMenu* createContextMenu(QWidget* parent = nullptr, const QString& title = QString());
|
||||||
void showVisibilityMenu(const QPoint&);
|
void showVisibilityMenu(const QPoint&);
|
||||||
|
Loading…
Reference in New Issue
Block a user