void Input::loadConfiguration() { Gorgon::Core::Log::get().writeFormatted("C++ -> Input::loadConfiguration()\n"); std::fstream* file; file = new std::fstream("data/input.cfg",std::ios::in|std::ios::binary); if(!file->is_open()) { Gorgon::Core::Log::get().writeFormatted("C++ -> Input::loadConfiguration(): data/input.cfg ... Error\n"); createDefaultConfiguration(); saveConfiguration(); } else { file->read( (char*)&mKey_start , sizeof(int) ); file->read( (char*)&mKey_up , sizeof(int) ); file->read( (char*)&mKey_down , sizeof(int) ); file->read( (char*)&mKey_left , sizeof(int) ); file->read( (char*)&mKey_right , sizeof(int) ); file->read( (char*)&mKey_button1 , sizeof(int) ); file->read( (char*)&mKey_button2 , sizeof(int) ); file->read( (char*)&mKey_button3 , sizeof(int) ); file->read( (char*)&mKey_button4 , sizeof(int) ); file->read( (char*)&mKey_button5 , sizeof(int) ); file->read( (char*)&mKey_button6 , sizeof(int) ); file->read( (char*)&mKey_button7 , sizeof(int) ); file->read( (char*)&mKey_button8 , sizeof(int) ); Gorgon::Core::Log::get().writeFormatted("C++ -> Input::loadConfiguration(): data/input.cfg ... Done\n"); } file->close(); delete file; }
void TabsManager::init() { kdebugf(); setState(StateNotLoaded); createDefaultConfiguration(); connect(m_chatWidgetRepository, SIGNAL(chatWidgetRemoved(ChatWidget*)), this, SLOT(onDestroyingChat(ChatWidget *))); TabDialog = m_pluginInjectedFactory->makeInjected<TabWidget>(this); TabDialog->setContextMenuPolicy(Qt::CustomContextMenu); connect(TabDialog, SIGNAL(currentChanged(int)), this, SLOT(onTabChange(int))); connect(TabDialog, SIGNAL(contextMenu(QWidget *, const QPoint &)), this, SLOT(onContextMenu(QWidget *, const QPoint &))); connect(Title, SIGNAL(titleChanged()), this, SLOT(onTitleChanged())); new WindowGeometryManager(new ConfigFileVariantWrapper(m_configuration, "Chat", "TabWindowsGeometry"), QRect(30, 30, 550, 400), TabDialog); makePopupMenu(); // pozycja tabów configurationUpdated(); m_menuInventory ->menu("buddy-list") ->addAction(m_openInNewTabAction, KaduMenu::SectionChat, 20) ->update(); openStoredChatTabs(); kdebugf2(); }
void StandardUrlExpanderConfigurator::setStandardUrlExpander(StandardUrlExpander *standardUrlExpander) { ConfigurableStandardUrlExpander = standardUrlExpander; createDefaultConfiguration(); configurationUpdated(); }
MPDConfig::MPDConfig() { MainConfigurationWindow::registerUiFile(dataPath("kadu/modules/configuration/mpd_config.ui")); createDefaultConfiguration(); host = config_file.readEntry("MediaPlayer", "MPDHost"); port = config_file.readEntry("MediaPlayer", "MPDPort"); timeout = config_file.readEntry("MediaPlayer", "MPDTimeout"); }
SpellChecker::SpellChecker() { connect(ChatWidgetManager::instance(), SIGNAL(chatWidgetCreated(ChatWidget *)), this, SLOT(chatCreated(ChatWidget *))); // prepare configuration of spellchecker spellConfig = new_aspell_config(); aspell_config_replace(spellConfig, "encoding", "utf-8"); createDefaultConfiguration(); // load mark settings buildMarkTag(); }
FileDescription::FileDescription() { kdebugf(); createDefaultConfiguration(); timer = new QTimer(); connect(timer, SIGNAL(timeout()), this, SLOT(checkTitle())); timer->start(500); fileDescStatusChanger = new FileDescStatusChanger(); StatusChangerManager::instance()->registerStatusChanger(fileDescStatusChanger); }
DesktopDock::DesktopDock(QObject *parent) : QObject(parent) { kdebugf(); createDefaultConfiguration(); DockWindow = new DesktopDockWindow(); MoveMenuAction = new QAction(tr("Move"), DockWindow); connect(MoveMenuAction, SIGNAL(triggered()), DockWindow, SLOT(startMoving())); if (config_file.readBoolEntry("Desktop Dock", "MoveInMenu")) createMenu(); kdebugf2(); }
History::History() : QObject(0), SyncEnabled(true), SaveThread(0), CurrentStorage(0), HistoryDialog(new HistoryWindow()) { kdebugf(); createActionDescriptions(); connect(AccountManager::instance(), SIGNAL(accountRegistered(Account)), this, SLOT(accountRegistered(Account))); connect(AccountManager::instance(), SIGNAL(accountUnregistered(Account)), this, SLOT(accountUnregistered(Account))); connect(ChatWidgetManager::instance(), SIGNAL(chatWidgetCreated(ChatWidget *)), this, SLOT(chatCreated(ChatWidget *))); createDefaultConfiguration(); configurationUpdated(); kdebugf2(); }
OSSPlayerSlots::OSSPlayerSlots(QObject *parent) : QObject(parent) { kdebugf(); createDefaultConfiguration(); connect(sound_manager, SIGNAL(openDeviceImpl(SoundDeviceType, int, int, SoundDevice*)), this, SLOT(openDevice(SoundDeviceType, int, int, SoundDevice*)), Qt::DirectConnection); connect(sound_manager, SIGNAL(closeDeviceImpl(SoundDevice)), this, SLOT(closeDevice(SoundDevice))); connect(sound_manager, SIGNAL(playSampleImpl(SoundDevice, const qint16 *, int, bool *)), this, SLOT(playSample(SoundDevice, const qint16 *, int, bool *)), Qt::DirectConnection); connect(sound_manager, SIGNAL(setFlushingEnabledImpl(SoundDevice, bool)), this, SLOT(setFlushingEnabled(SoundDevice, bool))); kdebugf2(); }
void MediaPlayer::init() { kdebugf(); // Initialization playerInfo = 0; playerCommands = 0; statusInterval = CHECK_STATUS_INTERVAL; // MediaPlayer menus in chats m_menu = new QMenu(); popups[0] = m_menu->addAction(tr("Put formated string"), this, SLOT(insertFormattedSong())); popups[1] = m_menu->addAction(tr("Put song title"), this, SLOT(insertSongTitle())); popups[2] = m_menu->addAction(tr("Put song file name"), this, SLOT(insertSongFilename())); popups[3] = m_menu->addAction(tr("Send all playlist titles"), this, SLOT(insertPlaylistTitles())); popups[4] = m_menu->addAction(tr("Send all playlist files"), this, SLOT(insertPlaylistFilenames())); // Title checking timer timer = new QTimer(this); connect(timer, SIGNAL(timeout()), this, SLOT(checkTitle())); DockedMediaplayerStatus = 0; // Initial values of some object variables winKeyPressed = false; Changer = new MediaPlayerStatusChanger(this); m_statusChangerManager->registerStatusChanger(Changer); connect(m_statusChangerManager, SIGNAL(manualStatusAboutToBeChanged(StatusContainer*,Status)), this, SLOT(statusAboutToBeChanged())); setControlsEnabled(false); isPaused = true; Changer->changePositionInStatus((MediaPlayerStatusChanger::ChangeDescriptionTo)m_configuration->deprecatedApi()->readNumEntry("MediaPlayer", "statusPosition")); createDefaultConfiguration(); configurationUpdated(); }
Filtering::Filtering(): QWidget(kadu) { kdebugf(); kadu->mainLayout ()->insertWidget (0, this); filter = new UserGroup(userlist->toUserListElements()); QHBoxLayout *l = new QHBoxLayout(this, 0, 5); #ifdef Q_OS_MAC setContentsMargins(0, 2, 0, 0); search = new QMacSearchBox(this); search->setMinimumHeight(24); l->addWidget(search); connect(search, SIGNAL(textChanged(const QString&)), this, SLOT(on_textLE_textChanged(const QString&))); #else l->addWidget (clearPB = new QPushButton(this, "clearPB")); clearPB->setPixmap (QPixmap (dataPath ("kadu/modules/data/filtering/clear.png"))); l->addWidget (new QLabel (tr("Filter") + ":", this, "filterLBL")); l->addWidget (textLE = new QLineEdit(this, "textLE")); connect(clearPB, SIGNAL(clicked()), this, SLOT(on_clearPB_clicked())); connect(textLE, SIGNAL(textChanged(const QString&)), this, SLOT(on_textLE_textChanged(const QString&))); connect(textLE, SIGNAL(returnPressed()), this, SLOT(on_textLE_returnPressed())); connect(kadu, SIGNAL(keyPressed(QKeyEvent*)), this, SLOT(on_kadu_keyPressed(QKeyEvent*))); #endif kadu->userbox ()->installEventFilter (this); createDefaultConfiguration(); configurationUpdated(); kdebugf2(); }
Firewall::Firewall() : FloodMessages(0) { kdebugf(); pattern.setCaseSensitivity(Qt::CaseSensitive); import_0_6_5_configuration(); createDefaultConfiguration(); configurationUpdated(); LastMsg.start(); LastNotify.start(); triggerAllAccountsRegistered(); connect(ChatWidgetManager::instance(), SIGNAL(chatWidgetDestroying(ChatWidget *)), this, SLOT(chatDestroyed(ChatWidget *))); kdebugf2(); }
SimpleViewConfigUi::SimpleViewConfigUi() { createDefaultConfiguration(); }
void ImageLinkConfigurator::init() { createDefaultConfiguration(); }
void DockingConfigurationProvider::init() { createDefaultConfiguration(); configurationUpdated(); }
void ChatNotifyPluginObject::init() { createDefaultConfiguration(); m_notificationManager->registerNotifier(m_chatNotifier); }
void ChatWidgetMessageHandlerConfigurator::init() { createDefaultConfiguration(); }
void SoundManager::init() { createDefaultConfiguration(); setMute(!m_configuration->deprecatedApi()->readBoolEntry("Sounds", "PlaySound")); }
static bool caerInputDVS128Init(caerModuleData moduleData) { caerLog(CAER_LOG_DEBUG, moduleData->moduleSubSystemString, "Initializing module ..."); // USB port/bus/SN settings/restrictions. // These can be used to force connection to one specific device at startup. sshsNodePutShortIfAbsent(moduleData->moduleNode, "BusNumber", 0); sshsNodePutShortIfAbsent(moduleData->moduleNode, "DevAddress", 0); sshsNodePutStringIfAbsent(moduleData->moduleNode, "SerialNumber", ""); // Add auto-restart setting. sshsNodePutBoolIfAbsent(moduleData->moduleNode, "Auto-Restart", true); // Start data acquisition, and correctly notify mainloop of new data and module of exceptional // shutdown cases (device pulled, ...). char *serialNumber = sshsNodeGetString(moduleData->moduleNode, "SerialNumber"); moduleData->moduleState = caerDeviceOpen(moduleData->moduleID, CAER_DEVICE_DVS128, U8T(sshsNodeGetShort(moduleData->moduleNode, "BusNumber")), U8T(sshsNodeGetShort(moduleData->moduleNode, "DevAddress")), serialNumber); free(serialNumber); if (moduleData->moduleState == NULL) { // Failed to open device. return (false); } // Put global source information into SSHS. struct caer_dvs128_info devInfo = caerDVS128InfoGet(moduleData->moduleState); sshsNode sourceInfoNode = sshsGetRelativeNode(moduleData->moduleNode, "sourceInfo/"); sshsNodePutShort(sourceInfoNode, "logicVersion", devInfo.logicVersion); sshsNodePutBool(sourceInfoNode, "deviceIsMaster", devInfo.deviceIsMaster); sshsNodePutShort(sourceInfoNode, "dvsSizeX", devInfo.dvsSizeX); sshsNodePutShort(sourceInfoNode, "dvsSizeY", devInfo.dvsSizeY); // Put source information for "virtual" APS frame that can be used to display and debug filter information. sshsNodePutShort(sourceInfoNode, "apsSizeX", devInfo.dvsSizeX); sshsNodePutShort(sourceInfoNode, "apsSizeY", devInfo.dvsSizeY); caerModuleSetSubSystemString(moduleData, devInfo.deviceString); // Ensure good defaults for data acquisition settings. // No blocking behavior due to mainloop notification, and no auto-start of // all producers to ensure cAER settings are respected. caerDeviceConfigSet(moduleData->moduleState, CAER_HOST_CONFIG_DATAEXCHANGE, CAER_HOST_CONFIG_DATAEXCHANGE_BLOCKING, false); caerDeviceConfigSet(moduleData->moduleState, CAER_HOST_CONFIG_DATAEXCHANGE, CAER_HOST_CONFIG_DATAEXCHANGE_START_PRODUCERS, false); caerDeviceConfigSet(moduleData->moduleState, CAER_HOST_CONFIG_DATAEXCHANGE, CAER_HOST_CONFIG_DATAEXCHANGE_STOP_PRODUCERS, true); // Create default settings and send them to the device. createDefaultConfiguration(moduleData); sendDefaultConfiguration(moduleData); // Start data acquisition. bool ret = caerDeviceDataStart(moduleData->moduleState, &mainloopDataNotifyIncrease, &mainloopDataNotifyDecrease, caerMainloopGetReference(), &moduleShutdownNotify, moduleData->moduleNode); if (!ret) { // Failed to start data acquisition, close device and exit. caerDeviceClose((caerDeviceHandle *) &moduleData->moduleState); return (false); } return (true); }
void Autoaway::init() { createDefaultConfiguration(); configurationUpdated(); }
ExternalPlayer::ExternalPlayer() { createDefaultConfiguration(); }
AntistringConfiguration::AntistringConfiguration() { createDefaultConfiguration(); configurationUpdated(); }
void AutoresponderConfigurator::init() { createDefaultConfiguration(); configurationUpdated(); }
ChatWindowStorageConfigurator::ChatWindowStorageConfigurator() { createDefaultConfiguration(); }
PCSpeaker::PCSpeaker() { notification_manager->registerNotifier(QT_TRANSLATE_NOOP("@default", "PC Speaker"), this); createDefaultConfiguration(); }