Ejemplo n.º 1
0
void SheetBuilderPlugin::extensionsInitialized()
{
	Core::MenuManager *menuManager = Core::ICore::instance()->menuManager();

	QMenu *sheetMenu = menuManager->menu(Core::Constants::M_SHEET);
	QAction *sheetBuilderAction = sheetMenu->addAction(tr("Sheet builder"));
	menuManager->registerAction(sheetBuilderAction, "SheetBuilder");
	connect(sheetBuilderAction, SIGNAL(triggered()), this, SLOT(execBuilderDialog()));
}
Ejemplo n.º 2
0
void GUIEditorWindow::createMenus()
{
    Core::MenuManager *mm = Core::ICore::instance()->menuManager();
    //QAction *newAction = mm->action( Core::Constants::NEW );
    QAction *saveAction = mm->action( Core::Constants::SAVE );
    QAction *saveAsAction = mm->action( Core::Constants::SAVE_AS );
    QAction *closeAction = mm->action( Core::Constants::CLOSE );

    //if( newAction != NULL )
    //	newAction->setEnabled( true );
    if( saveAction != NULL )
        saveAction->setEnabled( true );
    if( saveAsAction != NULL )
        saveAsAction->setEnabled( true );
    if( closeAction != NULL )
        closeAction->setEnabled( true );

    QMenu *menu = mm->menu( Core::Constants::M_TOOLS );
    if( menu != NULL )
    {
        QMenu *m = menu->addMenu( "GUI Editor" );

        QAction *a = new QAction( "Widget Properties", this );
        connect( a, SIGNAL( triggered( bool ) ), widgetProps, SLOT( show() ) );
        m->addAction( a );

        a = new QAction( "Link Editor", this );
        connect( a, SIGNAL( triggered( bool ) ), linkList, SLOT( show() ) );
        m->addAction( a );

        a = new QAction( "Procedure Editor", this );
        connect( a, SIGNAL( triggered( bool ) ), procList, SLOT( show() ) );
        m->addAction( a );

        a = new QAction( "Project Window", this );
        connect( a, SIGNAL( triggered( bool ) ), projectWindow, SLOT( show() ) );
        m->addAction( a );
    }
}