Exemple #1
0
void FormWindowBase::resourceSetActivated(QtResourceSet *resource, bool resourceSetChanged)
{
    if (resource == resourceSet() && resourceSetChanged) {
        reloadProperties();
        emit pixmapCache()->reloaded();
        emit iconCache()->reloaded();
        if (QDesignerPropertyEditor *propertyEditor = qobject_cast<QDesignerPropertyEditor *>(core()->propertyEditor()))
            propertyEditor->reloadResourceProperties();
    }
}
   void	DataManagerPropertyView::dataChanged( const QModelIndex & topLeft, const QModelIndex & /* bottomRight */)
   {
      if((topLeft.column() == 1)&&m_node.valid()&&propertyInterface())
      {
         QStandardItemModel* itemModel = (QStandardItemModel*)topLeft.model();
         DataManagerProperty* propertyItem = dynamic_cast<DataManagerProperty*>(itemModel->itemFromIndex(topLeft));
         if(propertyItem)
         {
            ossimRefPtr<ossimProperty> property = propertyItem->property();
            if(property.valid())
            {
               QVariant v = propertyItem->data(Qt::EditRole);
               if(v.isValid())
               {
                  property->setValue(v.toString().toAscii().data());
#if 0 /* warning C4065: switch statement contains 'default' but no 'case' labels (drb) */
                  switch(v.type())
                  {
                     default:
                     {
                        property->setValue(v.toString().toAscii().data());
                        break;
                     }
                  }
#endif
                  
                  DataManagerProperty* rootItem = propertyItem->rootProperty();
                  if(rootItem)
                  {
                     if(propertyInterface())
                     {
                        
                        propertyInterface()->setProperty(rootItem->property());
                     }
                  }
                  if(property->isCacheRefresh())
                  {
                     fireRefresh(ossimRefreshEvent::REFRESH_PIXELS);
                  }
                  else if(property->isFullRefresh())
                  {
                     fireRefresh(ossimRefreshEvent::REFRESH_GEOMETRY);
                  }
                  if(property->affectsOthers())
                  {
                     reloadProperties();
                  }
               }
            }
         }
      }
   }