AutoConfigStreamPage::AutoConfigStreamPage(QWidget *parent) : QWizardPage (parent), ui (new Ui_AutoConfigStreamPage) { ui->setupUi(this); ui->bitrateLabel->setVisible(false); ui->bitrate->setVisible(false); ui->connectAccount2->setVisible(false); ui->disconnectAccount->setVisible(false); int vertSpacing = ui->topLayout->verticalSpacing(); QMargins m = ui->topLayout->contentsMargins(); m.setBottom(vertSpacing / 2); ui->topLayout->setContentsMargins(m); m = ui->loginPageLayout->contentsMargins(); m.setTop(vertSpacing / 2); ui->loginPageLayout->setContentsMargins(m); m = ui->streamkeyPageLayout->contentsMargins(); m.setTop(vertSpacing / 2); ui->streamkeyPageLayout->setContentsMargins(m); setTitle(QTStr("Basic.AutoConfig.StreamPage")); setSubTitle(QTStr("Basic.AutoConfig.StreamPage.SubTitle")); LoadServices(false); connect(ui->service, SIGNAL(currentIndexChanged(int)), this, SLOT(ServiceChanged())); connect(ui->customServer, SIGNAL(textChanged(const QString &)), this, SLOT(ServiceChanged())); connect(ui->doBandwidthTest, SIGNAL(toggled(bool)), this, SLOT(ServiceChanged())); connect(ui->service, SIGNAL(currentIndexChanged(int)), this, SLOT(UpdateServerList())); connect(ui->service, SIGNAL(currentIndexChanged(int)), this, SLOT(UpdateKeyLink())); connect(ui->key, SIGNAL(textChanged(const QString &)), this, SLOT(UpdateCompleted())); connect(ui->regionUS, SIGNAL(toggled(bool)), this, SLOT(UpdateCompleted())); connect(ui->regionEU, SIGNAL(toggled(bool)), this, SLOT(UpdateCompleted())); connect(ui->regionAsia, SIGNAL(toggled(bool)), this, SLOT(UpdateCompleted())); connect(ui->regionOther, SIGNAL(toggled(bool)), this, SLOT(UpdateCompleted())); }
extern "C" __declspec(dllexport) int Load(void) { mir_getLP(&pluginInfoEx); MyCreateTextServices = 0; hMsfteditDll = LoadLibrary(_T("msftedit.dll")); if (hMsfteditDll) MyCreateTextServices = (pfnMyCreateTextServices)GetProcAddress(hMsfteditDll, "CreateTextServices"); LoadEmfCache(); LoadRichEdit(); LoadTextUsers(); LoadServices(); MTextControl_RegisterClass(); return 0; }
extern "C" __declspec(dllexport) int Load() { mir_getLP(&pluginInfo); char fileName[MAX_PATH]; GetModuleFileNameA(hInstance, fileName, MAX_PATH); WIN32_FIND_DATAA findData; FindClose(FindFirstFileA(fileName, &findData)); findData.cFileName[strlen(findData.cFileName) - 4] = 0; strncpy_s(protoName, findData.cFileName, _TRUNCATE); PROTOCOLDESCRIPTOR pd = { PROTOCOLDESCRIPTOR_V3_SIZE }; pd.szName = protoName; pd.type = PROTOTYPE_PROTOCOL; Proto_RegisterModule(&pd); LoadServices(); return 0; }
void AutoConfigStreamPage::UpdateServerList() { QString serviceName = ui->service->currentText(); bool showMore = ui->service->currentData().toInt() == (int)ListOpt::ShowAll; if (showMore) { LoadServices(true); ui->service->showPopup(); return; } else { lastService = serviceName; } obs_properties_t *props = obs_get_service_properties("rtmp_common"); obs_property_t *services = obs_properties_get(props, "service"); OBSData settings = obs_data_create(); obs_data_release(settings); obs_data_set_string(settings, "service", QT_TO_UTF8(serviceName)); obs_property_modified(services, settings); obs_property_t *servers = obs_properties_get(props, "server"); ui->server->clear(); size_t servers_count = obs_property_list_item_count(servers); for (size_t i = 0; i < servers_count; i++) { const char *name = obs_property_list_item_name(servers, i); const char *server = obs_property_list_item_string(servers, i); ui->server->addItem(name, server); } obs_properties_destroy(props); }
Installer::Installer(QWidget *parent) : QMainWindow(parent, Qt::Window | Qt::FramelessWindowHint | Qt::WindowStaysOnBottomHint) { setupUi(this); //Setup the window if(!DEBUG){ this->setGeometry( QApplication::primaryScreen()->geometry() ); }//full screen else{ this->setWindowFlags(Qt::Window); } //don't keep on bottom/frameless for testing translator = new QTranslator(); connect(backButton, SIGNAL(clicked()), this, SLOT(slotBack())); connect(nextButton, SIGNAL(clicked()), this, SLOT(slotNext())); connect(helpButton, SIGNAL(clicked()), this, SLOT(slotHelp())); connect(pushTouchKeyboard, SIGNAL(clicked()), this, SLOT(slotPushVirtKeyboard())); connect(pushChangeKeyLayout, SIGNAL(clicked()), this, SLOT(slotPushKeyLayout())); connect(lineHostname,SIGNAL(textChanged(const QString)),this,SLOT(slotCheckHost())); connect(lineDomainName, SIGNAL(textChanged(const QString &)), this, SLOT(slotCheckDomainName()) ); connect(lineRootPW, SIGNAL(textChanged ( const QString &)), this, SLOT(slotCheckRootPW())); connect(lineRootPW2, SIGNAL(textChanged ( const QString &)), this, SLOT(slotCheckRootPW())); connect(lineName,SIGNAL(textChanged(const QString)),this,SLOT(slotCheckUser())); connect(lineName,SIGNAL(editingFinished()),this,SLOT(slotSuggestUsername())); connect(lineUsername,SIGNAL(textChanged(const QString)),this,SLOT(slotCheckUser())); connect(linePW,SIGNAL(textChanged(const QString)),this,SLOT(slotCheckUser())); connect(linePW2,SIGNAL(textChanged(const QString)),this,SLOT(slotCheckUser())); connect(line_PCpass, SIGNAL(textChanged(const QString)), this, SLOT(slotCheckUser())) ; connect(line_PCpass_repeat, SIGNAL(textChanged(const QString)), this, SLOT(slotCheckUser())) ; connect(group_usePC, SIGNAL(toggled(bool)), this, SLOT(slotCheckUser()) ); connect(push_PC_device, SIGNAL(clicked()), this, SLOT(slotGetPCDevice()) ); connect(tool_testAudio, SIGNAL(clicked()), this, SLOT(slotPlayAudioTest()) ); connect(slider_volume, SIGNAL(valueChanged(int)), this, SLOT(slotAudioVolumeChanged()) ); connect(combo_audiodevice, SIGNAL(currentIndexChanged(int)), this, SLOT(slotSetAudioDev()) ); backButton->setText(tr("&Back")); nextButton->setText(tr("&Next")); // Load the keyboard info keyModels = Scripts::Backend::keyModels(); keyLayouts = Scripts::Backend::keyLayouts(); // If we have a saved keyboard layout from installation, use it first QString kD; if ( QFile::exists("/var/.wizardKeyboard") ) { QFile kFile("/var/.wizardKeyboard"); if ( kFile.open(QIODevice::ReadOnly | QIODevice::Text) ) { kD = kFile.readLine().simplified(); kFile.close(); kbMod = kD.section(" ", 0, 0); kbLay = kD.section(" ", 1, 1); kbVar = kD.section(" ", 2, 2); Scripts::Backend::changeKbMap(kbMod, kbLay, kbVar); } } // Load the timezones comboBoxTimezone->clear(); QString curZone = Scripts::Backend::guessTimezone(); comboBoxTimezone->addItems(Scripts::Backend::timezones()); if ( ! curZone.isEmpty() ) { int index = comboBoxTimezone->findText(curZone, Qt::MatchStartsWith); if (index != -1) { comboBoxTimezone->setCurrentIndex(index); } else { // Set America/New_York to default index = comboBoxTimezone->findText("America/New_York", Qt::MatchStartsWith); if (index != -1) comboBoxTimezone->setCurrentIndex(index); } } else { // Set America/New_York to default int index = comboBoxTimezone->findText("America/New_York", Qt::MatchStartsWith); if (index != -1) comboBoxTimezone->setCurrentIndex(index); } // Load the hostname lineHostname->setText(pcbsd::Utils::getConfFileValue("/etc/rc.conf", "hostname=", 1).section(".",0,0)); // Load the domain name lineDomainName->setText(pcbsd::Utils::getConfFileValue("/etc/rc.conf", "hostname=",1).section(".",1,100)); //Load the available Services into the UI LoadServices(); // Start on the first screen installStackWidget->setCurrentIndex(0); backButton->setVisible(false); // Update the status bar // This makes the status text more "visible" instead of using the blue background //statusBar()->setStyleSheet("background: white"); //Load the audio settings values combo_audiodevice->clear(); QStringList devs = pcbsd::Utils::runShellCommand("pc-sysconfig list-audiodev").join("").split(", "); int def = -1; bool found = false; for(int i=0; i<devs.length(); i++){ combo_audiodevice->addItem(devs[i], devs[i].section(":",0,0)); //<full text>, <pcmID> if(devs[i].contains(" default")){ found = true; def = i; } } if(def<0 && !devs.isEmpty()){ def=0; } if(def<0){ //No audio devices found - disable this functionality Page_Audio->setEnabled(false); //just do the whole page - nothing will work }else{ combo_audiodevice->setCurrentIndex(def); //make sure this item is initially selected if(!found){ slotSetAudioDev(); } //make sure to run the setup command initially } slider_volume->setValue(100); slotAudioVolumeChanged(); //update the volume % label }
void CBouquetManager::saveBouquets(const CZapitClient::bouquetMode bouquetMode) { /* // printf("[zapit] b size %d\n", Bouquets.size()); if (bouquetMode == CZapitClient::BM_CREATESATELLITEBOUQUET) { // printf("[zapit] b mode sat \n"); while (Bouquets.size() > 1) { BouquetList::iterator it = Bouquets.begin() + 1; Bouquets[0]->tvChannels.insert(Bouquets[0]->tvChannels.end(), (*it)->tvChannels.begin(), (*it)->tvChannels.end()); Bouquets[0]->radioChannels.insert(Bouquets[0]->radioChannels.end(), (*it)->radioChannels.begin(), (*it)->radioChannels.end()); delete (*it); Bouquets.erase(it); } // printf("[zapit] b mode sat \n"); if(Bouquets.size() > 0) Bouquets[0]->Name = providerName; } */ // printf("[zapit] b mode sat \n"); if ((bouquetMode == CZapitClient::BM_UPDATEBOUQUETS) || (bouquetMode == CZapitClient::BM_CREATESATELLITEBOUQUET)) { BouquetList storedBouquets; storedBouquets = Bouquets; Bouquets.clear(); remainChannels = NULL; LoadServices(frontend->getInfo()->type, frontend->getDiseqcType(), false); loadBouquets(); deleteBouquet(remainChannels); remainChannels = NULL; for (unsigned int i = 0; i < Bouquets.size(); i++) { unsigned int j; for (j = 0; j < Bouquets[i]->tvChannels.size(); j++) Bouquets[i]->tvChannels[j] = new CZapitChannel(*(Bouquets[i]->tvChannels[j])); for (j = 0; j < Bouquets[i]->radioChannels.size(); j++) Bouquets[i]->radioChannels[j] = new CZapitChannel(*(Bouquets[i]->radioChannels[j])); } allchans.clear(); while (!(storedBouquets.empty())) { int dest = existsBouquet(storedBouquets[0]->Name.c_str()); if (dest != -1) { while (!(storedBouquets[0]->tvChannels.empty())) { if (!(existsChannelInBouquet(dest, storedBouquets[0]->tvChannels[0]->getChannelID()))) { Bouquets[dest]->addService(storedBouquets[0]->tvChannels[0]); storedBouquets[0]->removeService(storedBouquets[0]->tvChannels[0]); } else { delete storedBouquets[0]->tvChannels[0]; storedBouquets[0]->tvChannels.erase(storedBouquets[0]->tvChannels.begin()); } } while (!(storedBouquets[0]->radioChannels.empty())) { if (!(existsChannelInBouquet(dest, storedBouquets[0]->radioChannels[0]->getChannelID()))) { Bouquets[dest]->addService(storedBouquets[0]->radioChannels[0]); storedBouquets[0]->removeService(storedBouquets[0]->radioChannels[0]); } else { delete storedBouquets[0]->radioChannels[0]; storedBouquets[0]->radioChannels.erase(storedBouquets[0]->radioChannels.begin()); } } delete storedBouquets[0]; } else { Bouquets.push_back(storedBouquets[0]); } storedBouquets.erase(storedBouquets.begin()); } } saveBouquets(); }