void ossimQtPropertyDateItem::showEditor()
{
   if(!getOssimProperty()) return;
   
   ossimQtPropertyItem::showEditor();
   ossimDateProperty* dateProperty = PTR_CAST(ossimDateProperty,
                                          getOssimProperty().get());
   if(dateProperty)
   {
      
      QTime time(dateProperty->getDate().getHour(),
                 dateProperty->getDate().getMin(),
                 dateProperty->getDate().getSec());
      QDate date(dateProperty->getDate().getYear(),
                 dateProperty->getDate().getMonth(),
                 dateProperty->getDate().getDay());
      
      QDateTime dateTime(date, time);
      
      dateTimeEditor()->blockSignals(TRUE);
      dateTimeEditor()->setDateTime(dateTime);
      dateTimeEditor()->blockSignals(FALSE);
      
      placeEditor(dateTimeEditor());
      
      dateTimeEditor()->show();
      dateTimeEditor()->setFocus();
   }
}
void ossimQtPropertyStringListItem::showEditor()
{
   ossimQtPropertyItem::showEditor();
   placeEditor( theBox );
   
   if ( !theBox->isVisible() )
   {
      theBox->show();
   }
}
Exemplo n.º 3
0
void QmvListItem::showEditor()
{
    QmvItem::showEditor();
    if ( !comb )
        combo();
    
    placeEditor( combo() );
    if ( !combo()->isVisible()  || !combo()->hasFocus() ) {
	combo()->show();
	setFocus( combo() );
    }
}
Exemplo n.º 4
0
void QmvBoolItem::showEditor()
{
    QmvItem::showEditor();
    if ( !comb ) {
	combo()->blockSignals( TRUE );
	if ( value() == str_true )
	    combo()->setCurrentItem( 0 );
	else
	    combo()->setCurrentItem( 1 );
	combo()->blockSignals( FALSE );
    }
    placeEditor( combo() );
    if ( !combo()->isVisible()  || !combo()->hasFocus() ) {
	combo()->show();
	setFocus( combo() );
    }
}
void ossimQtPropertyNumericItem::showEditor()
{
   if(!getOssimProperty()) return;
   
    ossimQtPropertyItem::showEditor();
    if ( !theLineEditor || theLineEditor->text().length() == 0 )
    {
       lineEditor()->blockSignals( TRUE );
       lineEditor()->setText( getOssimProperty()->valueToString().c_str() );
       lineEditor()->blockSignals( FALSE );
    }

    placeEditor( lineEditor() );
    if ( !lineEditor()->isVisible() || !lineEditor()->hasFocus() )
    {
       lineEditor()->show();
       lineEditor()->setFocus();
    }
}
Exemplo n.º 6
0
void QmvTextItem::showEditor()
{
    QmvItem::showEditor();
    if ( !lin ) {
	lined()->blockSignals( TRUE );
	lined()->setText( value() );
	lined()->blockSignals( FALSE );
    }
    QWidget* w;
    if ( hasMultiLines )
	w = box;
    else
	w= lined();

    placeEditor( w );
    if ( !w->isVisible() || !lined()->hasFocus() ) {
	w->show();
	setFocus( lined() );
    }
}
Exemplo n.º 7
0
void K3bListView::showEditor( K3bListViewItem* item, int col )
{
  if( !item )
    return;

  if( item->needButton( col ) || item->editorType(col) != K3bListViewItem::NONE ) {
    m_currentEditColumn = col;
    m_currentEditItem = item;
  }

  placeEditor( item, col );
  if( item->needButton( col ) ) {
    m_editorButton->show();
  }
  switch( item->editorType(col) ) {
  case K3bListViewItem::COMBO:
    m_editorComboBox->show();
    m_editorComboBox->setFocus();
    m_editorComboBox->setValidator( item->validator(col) );
    break;
  case K3bListViewItem::LINE:
    m_editorLineEdit->show();
    m_editorLineEdit->setFocus();
    m_editorLineEdit->setValidator( item->validator(col) );
    break;
  case K3bListViewItem::SPIN:
    m_editorSpinBox->show();
    m_editorSpinBox->setFocus();
    break;
  case K3bListViewItem::MSF:
    m_editorMsfEdit->show();
    m_editorMsfEdit->setFocus();
    break;
  default:
    break;
  }
}