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

QAction * MainWindow::createAction ( QString  action_name,
const char *  name,
QString  icon = QString() 
)

Creates new action. Actions are added to actions variable.

Parameters:
action_name Name of action. Only for internal use.
name Label of action in menues.
icon Icon path of action in menues.
Returns:
New action.
See also:
actions.

Definition at line 203 of file mainwindow.cpp.

References actions.

Referenced by show_config_help_menus(), and show_menu_base().

{
      if( actions.contains(action_name) ) return actions[action_name];
      QAction *a = new QAction(this);
      if( !icon.isEmpty() ) a->setIcon(QIcon(icon));
      a->setText(QApplication::tr(name));
      actions[action_name]=a;
      return a;
}


Generated by  Doxygen 1.6.0   Back to index