BassPlayer::BassPlayer(QWidget * parent) : IPlayer(parent), chan(0), openChannelWatcher(0) { if (HIWORD(BASS_GetVersion()) != BASSVERSION) throw "An incorrect version of BASS.DLL was loaded"; if (HIWORD(BASS_FX_GetVersion()) != BASSVERSION) throw "An incorrect version of BASS_FX.DLL was loaded"; // BASS_SetVolume(1); initOutputDevice(identifyOutputDevice()); loadPlugins(); setUserAgent(DEFAULT_AGENT); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), currentInstrument(0) { window = this; initBackgroundBrush(); createGUI(); resize(800, 600); setWindowTitle(tr("Paint")); setWindowIcon(QIcon(":paint.png")); loadPlugins(); }
//初始化插件 void MainWindow::loadplugin() { QString DirPath=QApplication::applicationDirPath(); //DirPath=DirPath.left(DirPath.lastIndexOf("/")); QString pluginfilename = DirPath+"/baseplugind.dll"; qDebug() << "pluginfilename = " << pluginfilename; testwidget = loadPlugins( pluginfilename, this ); }
void MudGameView::loadProfile(const tstring& name, const tstring& group, tstring* error) { assert(error); Profile current(m_manager.getProfile()); if ((current.group == group || group.empty()) && current.name == name) { error->assign(L"Попытка загрузить текущий профиль."); return; } Profile profile; profile.name = name; profile.group = current.group; if (!group.empty()) profile.group = group; if (!m_manager.checkProfile(profile)) { error->assign(L"Нет такого профиля."); return; } saveClientWindowPos(); savePluginWindowPos(); unloadPlugins(); if (!m_manager.saveProfile()) { error->assign(L"Не получилось сохранить текущий профиль, чтобы загрузить новый."); loadClientWindowPos(); loadPlugins(); return; } if (!m_manager.loadProfile(profile, error)) { //error->assign(L"Не получилось загрузить профиль."); tstring dummy; m_manager.loadProfile(current, &dummy); } updateProps(); loadClientWindowPos(); loadPlugins(); m_bar.reset(); }
MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) ,ui(new Ui::MainWindow) ,mStartDelay( 0 ) ,mPrevMode( 0 ) ,mLastCapture( 0 ) { ui->setupUi(this); ui->previewLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); ui->previewLabel->setAlignment(Qt::AlignCenter); ui->previewLabel->setMinimumSize(240, 160); pProgress = new QProgressBar(0); statusBar()->addPermanentWidget( pProgress ); QMenu *saveMenu = new QMenu( this ); QAction *pAct; #ifdef WITH_ANIMATED_GIF pAct = saveMenu->addAction( tr( "Save GIF" ), this, SLOT(saveGif()) ); pAct = saveMenu->addAction( tr( "Save customized GIF" ), this, SLOT(saveGifCustom()) ); pAct->setEnabled( false ); #endif // WITH_ANIMATED_GIF pAct = saveMenu->addAction( tr( "Save separated PNGs" ), this, SLOT(saveSeria()) ); pAct = saveMenu->addAction( tr( "Copy last to clipboard" ), this, SLOT(saveCopy()) ); pAct = saveMenu->addAction( tr( "Send to" ), this, SLOT(saveSendTo()) ); pAct->setEnabled( false ); ui->saveButton->setMenu( saveMenu ); pGrabber = new LSCCapturer( this ); showSaveProgress( 0,0 ); if( !loadPlugins() ) { qWarning() << "Not found plugins! Aborting."; QTimer::singleShot( 10, qApp, SLOT(quit()) ) ; } pGrabber->setAreaSelector( plugins.at( 0 ) ); connect( pGrabber, SIGNAL(finished()), this, SLOT(finishCapturing()) ); connect( pGrabber, SIGNAL(savingProgress(int, int, QString)), this, SLOT(showSaveProgress( int, int, QString ))); on_snapshotOneBtn_clicked(); }
QStringList TLoggerFactory::keys() { QMutexLocker locker(&mutex); loadPlugins(); QStringList ret; ret << TFileLogger().key(); for (QListIterator<TLoggerInterface *> i(*ssifs); i.hasNext(); ) { ret << i.next()->keys(); } return ret; }
bool MudGameView::loadProfile(const Profile& profile) { bool reload_same_profile = false; Profile current(m_manager.getProfile()); if (current.group == profile.group && current.name == profile.name) { int result = msgBox(m_hWnd, L"Вы действительно хотите перечитать текущий профиль ?", MB_YESNO|MB_ICONQUESTION); if (result != IDYES) return false; reload_same_profile = true; } saveClientWindowPos(); savePluginWindowPos(); unloadPlugins(); if (!reload_same_profile) { if (!m_manager.saveProfile()) { msgBox(m_hWnd, IDS_ERROR_CURRENTSAVEPROFILE_FAILED, MB_OK|MB_ICONSTOP); loadClientWindowPos(); loadPlugins(); return false; } } tstring error; if (!m_manager.loadProfile(profile, &error)) { msgBox(m_hWnd, IDS_ERROR_LOADPROFILE_FAILED, error, MB_OK|MB_ICONSTOP); if (!reload_same_profile) m_manager.loadProfile(current, &error); } updateProps(); if (!reload_same_profile) loadClientWindowPos(); loadPlugins(); m_bar.reset(); return (error.empty()); }
/* * Creates a new Transformation2D object with the given SBMLNamespaces. * * @param sbmlns The SBML namespace for the object. */ Transformation2D::Transformation2D (RenderPkgNamespaces* renderns): Transformation(renderns) { this->updateMatrix2D(); // set the element namespace of this object setElementNamespace(renderns->getURI()); // connect child elements to this element. connectToChild(); // load package extensions bound with this object (if any) loadPlugins(renderns); }
/* * Constructor which creates a GlobalStyle with the given @p id * and all lists empty. * * @param id the new id for the GlobalStyle. * * This constructor is deprecated. The new libsbml API only has * constructors which take the SBML level and version or one that takes * an SBMLNamespaces object. */ GlobalStyle::GlobalStyle(RenderPkgNamespaces* renderns, const std::string& id):Style(renderns,id) { #ifdef DEPRECATION_WARNINGS std::cerr << "Warning. GlobalStyle::GlobalStyle(const std::string& id) is deprecated." << std::endl; #endif // DEPRECATION_WARNINGS // set the element namespace of this object setElementNamespace(renderns->getURI()); // connect child elements to this element. connectToChild(); // load package extensions bound with this object (if any) loadPlugins(renderns); }
S3D_PLUGIN_MANAGER::S3D_PLUGIN_MANAGER() { // create the initial file filter list entry m_FileFilters.push_back( _( "All Files (*.*)|*.*" ) ); // discover and load plugins loadPlugins(); #ifdef DEBUG if( !m_ExtMap.empty() ) { std::multimap< const wxString, KICAD_PLUGIN_LDR_3D* >::const_iterator sM = m_ExtMap.begin(); std::multimap< const wxString, KICAD_PLUGIN_LDR_3D* >::const_iterator eM = m_ExtMap.end(); wxLogTrace( MASK_3D_PLUGINMGR, " * Extension [plugin name]:\n" ); while( sM != eM ) { wxLogTrace( MASK_3D_PLUGINMGR, " + '%s' [%s]\n", sM->first.ToUTF8(), sM->second->GetKicadPluginName() ); ++sM; } } else { wxLogTrace( MASK_3D_PLUGINMGR, " * No plugins available\n" ); } if( !m_FileFilters.empty() ) { /// list of file filters std::list< wxString >::const_iterator sFF = m_FileFilters.begin(); std::list< wxString >::const_iterator eFF = m_FileFilters.end(); wxLogTrace( MASK_3D_PLUGINMGR, " * File filters:\n" ); while( sFF != eFF ) { wxLogTrace( MASK_3D_PLUGINMGR, " + '%s'\n", (*sFF).ToUTF8() ); ++sFF; } } else { wxLogTrace( MASK_3D_PLUGINMGR, " * No file filters available\n" ); } #endif // DEBUG return; }
/* * Creates a new Style object with the given SBMLNamespaces. * * @param sbmlns The SBML namespace for the object. */ Style::Style (RenderPkgNamespaces* renderns): SBase(renderns) ,mId("") ,mGroup(renderns) { // set the element namespace of this object setElementNamespace(renderns->getURI()); // connect child elements to this element. connectToChild(); // load package extensions bound with this object (if any) loadPlugins(renderns); }
/*! Returns the list of valid keys, i.e.\ the available session stores. */ QStringList TSessionStoreFactory::keys() { QMutexLocker locker(&mutex); QStringList ret; loadPlugins(); ret << TSessionSqlObjectStore().key().toLower() << TSessionCookieStore().key().toLower() << TSessionFileStore().key().toLower() << TSessionRedisStore().key().toLower() << sessIfMap->keys(); return ret; }
/* * Creates a new GlobalRenderInformation object with the given SBMLNamespaces. * * @param sbmlns The SBML namespace for the object. */ GlobalRenderInformation::GlobalRenderInformation (RenderPkgNamespaces* renderns): RenderInformationBase(renderns), mListOfStyles(renderns) { if (!hasValidLevelVersionNamespaceCombination()) throw SBMLConstructorException(); // set the element namespace of this object setElementNamespace(renderns->getURI()); // connect child elements to this element. connectToChild(); // load package extensions bound with this object (if any) loadPlugins(renderns); }
void RazorPanelPrivate::init() { Q_Q(RazorPanel); // Read settings ............................ mSettings->beginGroup(CFG_PANEL_GROUP); mPosition = strToPosition(mSettings->value(CFG_KEY_POSITION).toString(), RazorPanel::PositionBottom); mScreenNum = mSettings->value(CFG_KEY_SCREENNUM, QApplication::desktop()->primaryScreen()).toInt(); mSettings->endGroup(); q->setLayout(mLayout); loadPlugins(); reTheme(); }
void ABAdminFactory::loadPlugins( const QString & path ) { QFileInfo fi(path); if( fi.isFile() ) { ABAdminPlugin * plugin = tryLoadPlugin(path); if( plugin ) registerPlugin(plugin); } else if( fi.isDir() ) { QDir dir = fi.dir(); QStringList entries = dir.entryList(); foreach( QString entry, entries ) { QString entryPath = path + QDir::separator() + entry; if( QFileInfo(entryPath).isFile() ) loadPlugins( entryPath ); }
/* * Creates a new RenderCubicBezier object with the given SBMLNamespaces. * * @param sbmlns The SBML namespace for the object. */ RenderCubicBezier::RenderCubicBezier (RenderPkgNamespaces* renderns): RenderPoint(renderns) { if (!hasValidLevelVersionNamespaceCombination()) throw SBMLConstructorException(); // set the element namespace of this object setElementNamespace(renderns->getURI()); // connect child elements to this element. connectToChild(); // load package extensions bound with this object (if any) loadPlugins(renderns); }
Viewer::Viewer(int &argc, char** argv, char** appDefaults) : Vrui::Application(argc, argv, appDefaults), tools(ToolList()), model(NULL), frameRateDialog(NULL), positionDialog(NULL), parameterDialog(NULL), currentOptionsDialog(NULL), optionsDialogs(DialogArray()), elapsedTime(0.0), stepSizeVersion(0), modelVersion(0), masterout(std::cout), nodeout(std::cout), debugout(std::cerr) { // load ToolBox ToolBox::ToolBoxFactory::instance(); // load dynamics plugins try { model_names=loadPlugins(); } catch (std::runtime_error& e) { std::cerr << "ERROR: " << e.what() << std::endl; } catch (...) { std::cerr << "UNDEFINED ERROR." << std::endl; } // alphabetize the names list std::sort(model_names.begin(), model_names.end()); // initialize the model dynamics (first one alphabetically) //model=Factory[model_names[0]](); // load lorenz std::string name = "Lorenz Attractor"; model = Factory[name](); // create and set the main menu mainMenu=createMainMenu(); Vrui::setMainMenu(mainMenu); // create other dialogs frameRateDialog = new FrameRateDialog(mainMenu); positionDialog = new PositionDialog(mainMenu); // create and assign associated parameter dialog parameterDialog=model->createParameterDialog(mainMenu); // Make sure the correct system is toggled setRadioToggles(dynamicsToggleButtons, name + "toggle"); // center the display resetNavigationCallback(0); }
/// This will initialize the game effectively and then call onCreate() void GameCore::PrimaryCreate() { // Prepare our screen contents uxScreen->window = getWindow(); uxScreen->GDI = getRenderer(); uxScreen->width = getWindow()->width(); uxScreen->height = getWindow()->height(); // Plugins are ready when the game starts to construct loadPlugins(); onCreate(); }
QStringList TSessionStoreFactory::keys() { QMutexLocker locker(&mutex); loadPlugins(); QStringList ret; ret << TSessionSqlObjectStore().key() << TSessionCookieStore().key() << TSessionFileStore().key(); for (QListIterator<TSessionStoreInterface *> i(*ssifs); i.hasNext(); ) { ret << i.next()->keys(); } return ret; }
VideoInformation::VideoInformation(QString pluginsDir) { setObjectName("VideoInformation"); // plugins plugins = new QList<VideoInformationPlugin *>; if (!pluginsDir.isEmpty()) loadPlugins(pluginsDir); // init data videoItem = NULL; blockAdultContent = false; // update lastThis reference lastVideoInformationInstance = this; // create plugins catcher faviconsCatcher = new VideoInformationPluginIconsCatcher(this); faviconsCatcher->downloadFavicons(); }
bool Program::initializeAudioDevice() { BASS_Free(); if (BASS_Init(-1, 44100, BASS_DEVICE_3D, NULL, NULL)) { loadPlugins(); BASS_SetConfig(BASS_CONFIG_NET_PLAYLIST, 1); BASS_SetConfig(BASS_CONFIG_NET_TIMEOUT, settings->connectTimeout); BASS_SetConfig(BASS_CONFIG_WMA_BASSFILE, 1); BASS_SetEAXParameters(-1, 0.0f, -1.0f, -1.0f); return true; } logText(boost::str(boost::format("Error initializing audio device: %1%") % core->getAudio()->getErrorMessage())); return false; }
/* * Constructor with id and values for the matrix. */ Transformation2D::Transformation2D(RenderPkgNamespaces* renderns, const double matrix[6]):Transformation(renderns) { #ifdef DEPRECATION_WARNINGS std::cerr << "Warning. Transformation2D::Transformation2D(const double matrix[6]) is deprecated." << std::endl; #endif // DEPRECATION_WARNINGS this->setMatrix2D(matrix); // set the element namespace of this object setElementNamespace(renderns->getURI()); // connect child elements to this element. connectToChild(); // load package extensions bound with this object (if any) loadPlugins(renderns); }
void MetaInfoPrivate::initialize() { // make sure QmlGraphicsItemsModule gets initialized, that is // QmlGraphicsItemsModule::defineModule called QDeclarativeEngine engine; Q_UNUSED(engine); loadPlugins(&engine); parseQmlTypes(); parseNonQmlTypes(); parseValueTypes(); parseXmlFiles(); m_isInitialized = true; }
/* * Creates a new point with the given ccordinates. * * @param x x coordinate of the RenderPoint object * @param y y coordinate of the RenderPoint object * @param z z coordinate of the RenderPoint object * If the z value is omitted, it is set to 0. */ RenderPoint::RenderPoint(RenderPkgNamespaces* renderns, const RelAbsVector& x, const RelAbsVector& y, const RelAbsVector& z) : SBase (renderns) , mXOffset(x) , mYOffset(y) , mZOffset(z) , mElementName("element") { // set the element namespace of this object setElementNamespace(renderns->getURI()); // connect child elements to this element. connectToChild(); // load package extensions bound with this object (if any) loadPlugins(renderns); }
/* * Creates a curve with the given LayoutPkgNamespaces and an empty list of segments. */ Curve::Curve (LayoutPkgNamespaces *layoutns) : SBase (layoutns) ,mCurveSegments(layoutns) { // // set the element namespace of this object // setElementNamespace(layoutns->getURI()); connectToChild(); // // load package extensions bound with this object (if any) // loadPlugins(layoutns); }
bool ApplicationManager::init() { if (mInitialised) return true; LOG("Initializing ApplicationManager"); if (!mCanBeInit) return false; if (!mPluginsLoaded) loadPlugins(); setupSystems(); mInitialised = initSystems(); if (!mInitialised) return mInitialised; mInitialised = loadAssets(); return mInitialised; }
JuffEd::JuffEd() : Juff::PluginNotifier(), Juff::DocHandlerInt() { mw_ = new JuffMW(); initActions(); viewer_ = new Juff::DocViewer(this); mw_->setMainWidget(viewer_); settingsDlg_ = new SettingsDlg(mw_); connect(settingsDlg_, SIGNAL(applied()), SLOT(onSettingsApplied())); connect(viewer_, SIGNAL(docActivated(Juff::Document*)), SLOT(onDocActivated(Juff::Document*))); connect(mw_, SIGNAL(closeRequested(bool&)), SLOT(onCloseRequested(bool&))); // UI must be initialized before engines and plugins because // we need menus to be already created when loading engines and plugins. initUI(); loadEngines(); pluginMgr_ = new PluginManager(this, this); // buildUI() *must* go before loadPlugins() because // it creates structures and widgets expected by loadPlugins() buildUI(); loadPlugins(); search_ = new SearchEngine(this, mw_); setSessionName( MainSettings::get( MainSettings::LastSession ) ); if ( !loadSession() ) { slotFileNew(); } if ( viewer_->docCount(Juff::PanelAll) == 0 ) { openDoc("", Juff::PanelLeft); viewer_->hidePanel(Juff::PanelRight); } else if ( viewer_->docCount(Juff::PanelLeft) == 0 ) { viewer_->hidePanel(Juff::PanelLeft); } else if ( viewer_->docCount(Juff::PanelRight) == 0 ) { viewer_->hidePanel(Juff::PanelRight); } onSettingsApplied(); mw_->restoreState(); }
QByteArray IrcDecoder::initialize() { bool loaded = loadPlugins(); QByteArray pluginKey = irc_plugin_key; if (!pluginKey.isEmpty() && !irc_codec_plugins()->contains(pluginKey)) { qWarning() << "IrcDecoder:" << pluginKey << "plugin not loaded"; if (loaded) qWarning() << "IrcDecoder: available plugins:" << irc_codec_plugins()->keys(); } if (!loaded) qWarning() << "IrcDecoder: no plugins available"; if (pluginKey.isEmpty() && !irc_codec_plugins()->isEmpty()) pluginKey = irc_codec_plugins()->keys().first(); return pluginKey; }
/* * Creates a new RenderCurve object with the given SBMLNamespaces. * * @param sbmlns The SBML namespace for the object. */ RenderCurve::RenderCurve (RenderPkgNamespaces* renderns): GraphicalPrimitive1D(renderns) ,mStartHead("") ,mEndHead("") ,mListOfElements(renderns) { if (!hasValidLevelVersionNamespaceCombination()) throw SBMLConstructorException(); // set the element namespace of this object setElementNamespace(renderns->getURI()); // connect child elements to this element. connectToChild(); // load package extensions bound with this object (if any) loadPlugins(renderns); }
/* * Creates a new RenderCurve object with the given SBML level * and SBML version. * * @param level SBML level of the new object * @param level SBML version of the new object */ RenderCurve::RenderCurve (unsigned int level, unsigned int version, unsigned int pkgVersion) : GraphicalPrimitive1D(level,version, pkgVersion) ,mStartHead("") ,mEndHead("") ,mListOfElements(level, version, pkgVersion) { if (!hasValidLevelVersionNamespaceCombination()) throw SBMLConstructorException(); RenderPkgNamespaces* renderns = new RenderPkgNamespaces(level, version, pkgVersion); setSBMLNamespacesAndOwn(renderns); connectToChild(); loadPlugins(renderns); }