//added by Rolando 04-11-08 void QtFlagsListWidget::keyReleaseEvent ( QKeyEvent * event ) { switch (event->key()) { case Qt::Key_Enter: case Qt::Key_Return: currentFlagChanged(getCurrentCountryName()); close(); break; default: QDialog::keyReleaseEvent(event); } }
QtVoxOxCallBarFrame::QtVoxOxCallBarFrame(QWidget * parent): VoxOxFrame(parent) { _ui = new Ui::VoxOxCallBarFrame(); _ui->setupUi(this); //VOXOX CHANGE by Rolando - 2009.06.16 setStyleSheet( QString("QtVoxOxCallBarFrame{ background: #000000; border: 1px solid #ababab; border-radius: 5px; } ") + QString( "QComboBox#callBarComboBox{ border: 1px solid black; border-radius: 5px; background: black; } ") + QString( "QComboBox::drop-down:editable { background: black; border: black; } ") + QString( "QFrame#flagFrame{ background-color: #808080; border: 1px solid #666666; border-radius: 2px; }")); Config & config = ConfigManager::getInstance().getCurrentConfig(); _voxOxToolTipLineEdit = new VoxOxToolTipLineEdit(this); SAFE_CONNECT(_voxOxToolTipLineEdit, SIGNAL(keyPressedSignal(int)), SLOT(keyPressedSlot(int))); //_voxOxToolTipLineEdit->setText(DEFAULT_CALLBAR_MESSAGE); _voxOxToolTipLineEdit->setToolTipDefaultText(DEFAULT_CALLBAR_MESSAGE); _ui->callBarComboBox->setLineEdit(_voxOxToolTipLineEdit); _voxOxToolTipLineEdit->displayToolTipMessage(); repaint(); _qtFlagsManager = new QtFlagsManager(); _qtFlagsListWidget = new QtFlagsListWidget(); initFlagListWidget(); SAFE_CONNECT(_qtFlagsListWidget, SIGNAL(currentFlagChanged(QString)), SLOT(currentFlagChangedSlot(QString))); SAFE_CONNECT(_ui->callBarComboBox, SIGNAL(editTextChanged(QString)), SLOT(comboBoxTextChangedSlot(QString))); SAFE_CONNECT(_ui->callBarComboBox, SIGNAL(activated(int)), SLOT(itemActivatedComboBoxSlot(int))); SAFE_CONNECT(_ui->flagLabel, SIGNAL(clicked()), SLOT(flagClickedSlot()));//VOXOX CHANGE Rolando 03-24-09 SAFE_CONNECT(_ui->flagDropLabel, SIGNAL(clicked()), SLOT(flagClickedSlot()));//VOXOX CHANGE Rolando 03-24-09 SAFE_CONNECT(_ui->areaCodeLabel, SIGNAL(clicked()), SLOT(flagClickedSlot()));//VOXOX CHANGE Rolando 03-24-09 #ifdef OS_WINDOWS//VOXOX CHANGE by Rolando - 2009.07.13 _ui->callbarFrameLayout->setHorizontalSpacing (5);//VOXOX CHANGE by Rolando - 2009.07.13 _ui->callbarFrameLayout->setVerticalSpacing (0);//VOXOX CHANGE by Rolando - 2009.07.13 _ui->callbarFrameLayout->setContentsMargins( 1, 1, 2, 1 );//VOXOX CHANGE by Rolando - 2009.07.13 setMinimumHeight(23);//VOXOX CHANGE by Rolando - 2009.07.13 _ui->flagFrame->setMaximumSize(16777215,19);//VOXOX CHANGE by Rolando - 2009.07.13 _ui->areaCodeLabel->setMinimumHeight(19);//VOXOX CHANGE by Rolando - 2009.07.13 _ui->areaCodeLabel->setMaximumHeight(19);//VOXOX CHANGE by Rolando - 2009.07.13 #endif }
void QtFlagsListWidget::currentTextChangedSlot( QString currentText ) { currentFlagChanged(getCurrentCountryName()); }
void QtFlagsListWidget::focusOutEvent ( QFocusEvent * ) { currentFlagChanged(getCurrentCountryName()); close(); }
//added by Rolando 04-11-08 void QtFlagsListWidget::leaveEvent ( QEvent * e ) { currentFlagChanged(getCurrentCountryName()); close(); }