KNMusicPlugin::KNMusicPlugin(QObject *parent) : KNAbstractMusicPlugin(parent) { //Initial infrastructure. initialInfrastructure(); //Load detail info first. loadDetailInfo(new KNMusicDetailDialog); //Initial parser. initialParser(); //Initial menus. initialSoloMenu(new KNMusicSoloMenu); initialMultiMenu(new KNMusicMultiMenu); //Load plugins. loadSearch(new KNMusicSearch); #ifdef ENABLE_LIBBASS loadBackend(new KNMusicBackendBass); #endif #ifdef ENABLE_LIBVLC loadBackend(new KNMusicBackendVLC); #endif loadDetailTooptip(new KNMusicDetailTooltip); loadNowPlaying(new KNMusicNowPlaying); loadHeaderPlayer(new KNMusicHeaderPlayer); loadHeaderLyrics(new KNMusicHeaderLyrics); loadLibrary(new KNMusicLibrary); loadPlaylistManager(new KNMusicPlaylistManager); //Connect retranslate request. connect(KNLocaleManager::instance(), &KNLocaleManager::requireRetranslate, this, &KNMusicPlugin::retranslate); }
FunctionHelper::FunctionHelper (LPTSTR raw, DWORD color, FUNC_TYPE type) { initialParser(); this->_raw = new TCHAR[128]; wcscpy(this->_raw, raw); this->_color = color; this->_type = type; if (type == FUNC) { char *buffer = new char[128]; wcstombs(buffer, raw, 128); this->_func = preProcessing(buffer); this->_rpn = getRPN(this->_func); } }
FunctionHelper::FunctionHelper() { initialParser(); }