You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
AppFlow/GUIFrame/MainMenu.h

68 lines
1.5 KiB
C

/**
* @file MenuWidget.h
* @brief
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-06-11
*/
#ifndef __MAINMENU_H__
#define __MAINMENU_H__
#include "GUIWidget/MainMenuBase.h"
#include <QMenuBar>
#include <QToolBar>
namespace GUI
{
/**
* @brief
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-06-11
*/
class MainMenu : public MainMenuBase
{
Q_OBJECT
public:
/**
* @brief
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-06-11
*/
MainMenu(MainWindow *mainWindow);
/**
* @brief
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-06-11
*/
~MainMenu() = default;
/**
* @brief
* @param title
* @param actions actions
* @param parent
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-06-11
*/
void addMenu(QString title, QList<MenuActionItem*> actions, QMenu* parent) override;
/**
* @brief
* @param title
* @param actions actions
* @param style
* @author YanZhiHui (chanyuantiandao@126.com)
* @date 2024-06-11
*/
void addToolMenu(QString title, QList<MenuActionItem*> actions, Qt::ToolButtonStyle style = Qt::ToolButtonStyle::ToolButtonIconOnly) override;
protected:
QMenuBar* m_MenuBar{};
QHash<QString, QToolBar*> m_MenuToolBars{};
QHash<QString, QActionGroup*> m_ActionGroups{};
};
}
#endif // !__MAINMENU_H__