#include "menu.h"

Menu::Menu(QMenu *fileMenu, QMenu *settingMenu, QMenu *aboutMenu)
{
    this->fileMenu = fileMenu;
    openFileAction = new QAction;
    openFileAction->setText("打开文件");
    exitAction = new QAction;
    exitAction->setText("退出");
    this->fileMenu->addAction(openFileAction);
    this->fileMenu->addSeparator();
    this->fileMenu->addAction(exitAction);

    this->settingMenu = settingMenu;
    navigationVisibleAction = new QAction("导航栏");
    mapxVisibleAction = new QAction;
    layerControlAction = new QAction;
    infoControlAction = new QAction;
    mapxVisibleAction->setText("鹰眼图");
    layerControlAction->setText("图层控制");    
    infoControlAction->setText("信息控制");
    this->settingMenu->addAction(mapxVisibleAction);
    this->settingMenu->addAction(navigationVisibleAction);
    this->settingMenu->addSeparator();
    this->settingMenu->addAction(layerControlAction);
    this->settingMenu->addSeparator();
    this->settingMenu->addAction(infoControlAction);

    this->aboutMenu = aboutMenu;
    aboutProgramAction = new QAction;
    aboutProgramAction->setText("关于程序");
    this->aboutMenu->addAction(aboutProgramAction);
}
