Ejemplo n.º 1
0
// -----------------------------------------------------------------------------
//
// -----------------------------------------------------------------------------
void PMFileGenerator::pluginNameChanged(const QString& pluginName)
{
//  qDebug() << "PMFileGenerator::pluginNameChanged" << "\n";

  QString pin = cleanName(pluginName);

  if (pin.isEmpty() == true)
  {
    setPluginName("Unknown Plugin Name");
  }
  else
  {
    setPluginName(pin);
  }

  if (isNameChangeable() == false)
  {
    return;
  }
  m_FileName = pin + getDisplaySuffix();

  if (NULL != getTreeWidgetItem())
  {
    getTreeWidgetItem()->setText(0, m_FileName );
  }


}
Ejemplo n.º 2
0
TRasterMapPlugin::TRasterMapPlugin()
   : TMapPlugin<TRasterMapAdapter>(TImageManager::Consts::RasterMap, false)
{
setPluginName(tr("Raster Map"));
setSourceType(TMapAdapter::Consts::RasterMap);
setMapType(Consts::TypeRasterMap);
}
    void ModelVisualization::setModelPath(QString const& path)
    {
        osg::ref_ptr<osg::Node> node = osgDB::readNodeFile(path.toStdString());
        {
            boost::mutex::scoped_lock lock(updateMutex);
            model = node;

            if(model)
                model_path = path;
            else
                model_path = "";
        }
        if(vizkit3d_plugin_name.isEmpty())
            setPluginName(QFileInfo(model_path).baseName());
        setDirty();
        emit propertyChanged("model_path");
    }