Logo Search packages:      
Sourcecode: qtoctave version File versions  Download package

QMenu * MainWindow::createMenu ( QString  menu_name,
const char *  name,
QString  icon = QString() 
)

Creates new menu. Menus are added to menus variable.

Parameters:
action_name Name of menu. Only for internal use.
name Label of menu.
icon Icon path of menu.
Returns:
New menu.
See also:
menus.

Definition at line 218 of file mainwindow.cpp.

References menubar, and menus.

Referenced by MainWindow(), and show_menu_base().

{
      if( menus.contains(menu_name) ) return menus[menu_name];
      QMenu *a = new QMenu(menubar);
      if( !icon.isEmpty() ) a->setIcon(QIcon(icon));
      a->setTitle(QApplication::tr(name));
      menus[menu_name]=a;
      return a;
}


Generated by  Doxygen 1.6.0   Back to index