GenerateTTFileDlg::GenerateTTFileDlg(const HostEntry& entry, QWidget * parent/* = 0*/) : QDialog(parent, QT_DEFAULT_DIALOG_HINTS) , m_hostentry(entry) { ui.setupUi(this); setWindowIcon(QIcon(APPICON)); setWindowTitle(windowTitle() + " - " + entry.ipaddr + ":" + QString::number(entry.tcpport)); ui.usernameEdit->setText(m_hostentry.username); ui.passwordEdit->setText(m_hostentry.password); connect(ui.saveBtn, SIGNAL(clicked()), SLOT(slotSaveTTFile())); connect(ui.closeBtn, SIGNAL(clicked()), SLOT(accept())); connect(ui.overrideChkBox, SIGNAL(clicked(bool)), ui.nicknameEdit, SLOT(setEnabled(bool))); connect(ui.overrideChkBox, SIGNAL(clicked(bool)), ui.maleRadioButton, SLOT(setEnabled(bool))); connect(ui.overrideChkBox, SIGNAL(clicked(bool)), ui.femaleRadioButton, SLOT(setEnabled(bool))); connect(ui.overrideChkBox, SIGNAL(clicked(bool)), ui.pttChkBox, SLOT(setEnabled(bool))); connect(ui.overrideChkBox, SIGNAL(clicked(bool)), ui.setupkeysButton, SLOT(setEnabled(bool))); connect(ui.pttChkBox, SIGNAL(clicked(bool)), ui.setupkeysButton, SLOT(setEnabled(bool))); connect(ui.pttChkBox, SIGNAL(clicked(bool)), ui.keycompEdit, SLOT(setEnabled(bool))); connect(ui.setupkeysButton, SIGNAL(clicked()), SLOT(slotSetupHotkey())); }
GenerateTTFileDlg::GenerateTTFileDlg(const HostEntry& entry, QWidget * parent/* = 0*/) : QDialog(parent, QT_DEFAULT_DIALOG_HINTS) , m_hostentry(entry) { ui.setupUi(this); setWindowIcon(QIcon(APPICON)); setWindowTitle(windowTitle() + " - " + entry.ipaddr + ":" + QString::number(entry.tcpport)); ui.usernameEdit->setText(m_hostentry.username); ui.passwordEdit->setText(m_hostentry.password); connect(ui.saveBtn, SIGNAL(clicked()), SLOT(slotSaveTTFile())); connect(ui.closeBtn, SIGNAL(clicked()), SLOT(accept())); connect(ui.overrideChkBox, SIGNAL(clicked(bool)), ui.nicknameEdit, SLOT(setEnabled(bool))); connect(ui.overrideChkBox, SIGNAL(clicked(bool)), ui.maleRadioButton, SLOT(setEnabled(bool))); connect(ui.overrideChkBox, SIGNAL(clicked(bool)), ui.femaleRadioButton, SLOT(setEnabled(bool))); connect(ui.overrideChkBox, SIGNAL(clicked(bool)), ui.pttChkBox, SLOT(setEnabled(bool))); connect(ui.overrideChkBox, SIGNAL(clicked(bool)), ui.voiceactChkBox, SLOT(setEnabled(bool))); connect(ui.overrideChkBox, SIGNAL(clicked(bool)), ui.captureformatsBox, SLOT(setEnabled(bool))); connect(ui.overrideChkBox, SIGNAL(clicked(bool)), ui.vidcodecBox, SLOT(setEnabled(bool))); connect(ui.pttChkBox, SIGNAL(clicked(bool)), ui.setupkeysButton, SLOT(setEnabled(bool))); connect(ui.pttChkBox, SIGNAL(clicked(bool)), ui.keycompEdit, SLOT(setEnabled(bool))); connect(ui.setupkeysButton, SIGNAL(clicked()), SLOT(slotSetupHotkey())); connect(ui.vidcodecBox, SIGNAL(currentIndexChanged(int)), SLOT(slotVideoCodecChange(int))); loadVideoFormats(); ui.captureformatsBox->addItem(tr("Any"), 0); for(int i=1;i<m_vidcap_fmts.size();i++) { int fps = m_vidcap_fmts[i].nFPS_Denominator == 0? 0 : m_vidcap_fmts[i].nFPS_Numerator / m_vidcap_fmts[i].nFPS_Denominator; QString res = QString("%1x%2, FPS %3").arg(m_vidcap_fmts[i].nWidth) .arg(m_vidcap_fmts[i].nHeight).arg(fps); ui.captureformatsBox->addItem(res, i); } ui.vidcodecBox->addItem(tr("Any"), NO_CODEC); ui.vidcodecBox->addItem("WebM VP8", WEBM_VP8_CODEC); ui.vidbitrateSpinBox->setValue(DEFAULT_WEBMVP8_BITRATE); }