Exemple #1
0
IDEApplication::IDEApplication(int& argc, char **argv)
    : QApplication(argc, argv),
      mSettings(NULL)
{
    setOrganizationName(PROJECT_ORGANIZATION);
    setApplicationName(PROJECT_NAME);
    setApplicationVersion(PROJECT_VERSION);
    setWindowIcon(QIcon(":/images/arduide.png"));

    // translation support
    initializeTranslator();

    // fix the data path
    mDataPath = QDir(DATA_PATH).absolutePath();

    registerMetaTypes();

    // initialize Grantlee
    initializeTemplates();

    // start the GUI
    initializeGui();

    // check the settings are correct, or start the wizard
    initializeSettings();

    // further gui initialization
    mMainWindow->initialize();

    // initialize the plugins
    initializePlugins();
}
Exemple #2
0
int main(void) {
    printf("Hello world!\n");
    
    PLUGINDLL* plugin1 = malloc(sizeof(PLUGINDLL));
    plugin1->filename = "examplePlugin.dll";
    
    int pluginCount = 1;
    PLUGINDLL* plugins[] = {
        plugin1
    };
    
    writeLog("Main", info, "Loading plugins...");
    loadPlugins(pluginCount, plugins);
    
    writeLog("Main", info, "Initializing plugins...");
    initializePlugins(pluginCount, plugins);
    
    writeLog("Main", info, "Starting plugins...");
    startPlugins(pluginCount, plugins);
    
    writeLog("Main", info, "Stopping plugins...");
    stopPlugins(pluginCount, plugins);
    
    free(plugin1);
    
    return 0;
}
void QDesignerIntegrationPrivate::updateCustomWidgetPlugins()
{
    QDesignerFormEditorInterface *formEditor = q->core();
    if (QDesignerPluginManager *pm = formEditor->pluginManager())
        pm->registerNewPlugins();

    initializePlugins(formEditor);

    // Do not just reload the last file as the WidgetBox merges the compiled-in resources
    // and $HOME/.designer/widgetbox.xml. This would also double the scratchpad.
    if (QDesignerWidgetBox *wb = qobject_cast<QDesignerWidgetBox*>(formEditor->widgetBox())) {
        const QDesignerWidgetBox::LoadMode oldLoadMode = wb->loadMode();
        wb->setLoadMode(QDesignerWidgetBox::LoadCustomWidgetsOnly);
        wb->load();
        wb->setLoadMode(oldLoadMode);
    }
}