ossimPlanetTextureLayerGroup::ossimPlanetTextureLayerGroup(const ossimPlanetTextureLayerGroup& src)
   :ossimPlanetTextureLayer(src)
{
   
   theChildListener = new ossimPlanetTextureLayerListener(this);
   if(&src != this)
   {
      ossim_uint32 idx = 0;
      
      for(idx = 0; idx < src.theChildrenList.size(); ++idx)
      {
         if(src.theChildrenList[idx].valid())
         {
            osg::ref_ptr<ossimPlanetTextureLayer> layer = src.theChildrenList[idx]->dup();
            addBottom(layer.get());
         }
         else
         {
            // empty for now.  Not sure if we want to push a null layer
         }
      }
   }
   
   theBackgroundColor = src.theBackgroundColor;
   theFillEmptyNullTileMaxLevel = src.theFillEmptyNullTileMaxLevel;
   
   theFillTranslucentPixelsWithBackgroundEnabled = src.theFillTranslucentPixelsWithBackgroundEnabled;
}
Exemple #2
0
/**
 * Callback function to print the options/capabilities
 */
void printCapabilities(unsigned int capabilities){
	// capabilities = 0 => nothing to print
	if(!capabilities)
		return;

	int comma_flag = 0; // flag for comma
	node_t* node;
	linked_list_t *option_list = malloc(sizeof(linked_list_t));

	// handle all the capabilites and push it up the list
	if(capabilities & IFCAP_RXCSUM)
		addBottom(option_list, IFCAP_RXCSUM);
	if(capabilities & IFCAP_TXCSUM)
		addBottom(option_list, IFCAP_TXCSUM);
	if(capabilities & IFCAP_VLAN_MTU)
		addBottom(option_list, IFCAP_VLAN_MTU);
	if(capabilities & IFCAP_VLAN_HWTAGGING)
		addBottom(option_list, IFCAP_VLAN_HWTAGGING);
	if(capabilities & IFCAP_JUMBO_MTU)
		addBottom(option_list, IFCAP_JUMBO_MTU);
	if(capabilities & IFCAP_TSO4)
		addBottom(option_list, IFCAP_TSO4);
	if(capabilities & IFCAP_TSO6)
		addBottom(option_list, IFCAP_TSO6);
	if(capabilities & IFCAP_LRO)
		addBottom(option_list, IFCAP_LRO);
	if(capabilities & IFCAP_AV)
		addBottom(option_list, IFCAP_AV);
	if(capabilities & IFCAP_TXSTATUS)
		addBottom(option_list, IFCAP_TXSTATUS);

	// identical handling as in printFlags()
	for(node = option_list->first; node != NULL; node = node->next){
		// comma is not needed on the first element
		if(comma_flag){
			printf(", ");
		} else {
			comma_flag = 1;
		}
		switch(node->value){
			case IFCAP_RXCSUM:
				printf("RXCSUM");
				break;
			case IFCAP_TXCSUM:
				printf("TXCSUM");
				break;
			case IFCAP_VLAN_MTU:
				printf("VLAN MTU");
				break;
			case IFCAP_JUMBO_MTU:
				printf("JUMBO MTU");
				break;
			case IFCAP_TSO4:
				printf("TS04");
				break;
			case IFCAP_TSO6:
				printf("TS06");
				break;
			case IFCAP_LRO:
				printf("LR0");
				break;
			case IFCAP_AV:
				printf("AV BRIDGING");
				break;
			case IFCAP_TXSTATUS:
				printf("TXSTATUS");
				break;
			default:
				break;
		}
	}
}
Exemple #3
0
/**
 * Callback function to print the flags
 */
void printFlags(unsigned int flags){
	linked_list_t *flag_list = malloc(sizeof(linked_list_t)); // list for flags
	node_t* node;
	int comma_flag = 0; // flag for comma

	// add all the flags to the list
	if(flags){
		if (flags & IFF_UP)
			addBottom(flag_list, IFF_UP);
		if (flags & IFF_BROADCAST)
			addBottom(flag_list, IFF_BROADCAST);
		if (flags & IFF_DEBUG)
			addBottom(flag_list, IFF_DEBUG);
		if (flags & IFF_LOOPBACK)
			addBottom(flag_list, IFF_LOOPBACK);
		if (flags & IFF_POINTOPOINT)
			addBottom(flag_list, IFF_POINTOPOINT);
		if (flags & IFF_NOTRAILERS)
			addBottom(flag_list, IFF_NOTRAILERS);
		if (flags & IFF_RUNNING)
			addBottom(flag_list, IFF_RUNNING);
		if (flags & IFF_NOARP)
			addBottom(flag_list, IFF_NOARP);
		if (flags & IFF_PROMISC)
			addBottom(flag_list, IFF_PROMISC);
		if (flags & IFF_ALLMULTI)
			addBottom(flag_list, IFF_ALLMULTI);
		if (flags & IFF_OACTIVE)
			addBottom(flag_list, IFF_OACTIVE);
		if (flags & IFF_SIMPLEX)
			addBottom(flag_list, IFF_SIMPLEX);
		if (flags & IFF_MULTICAST)
			addBottom(flag_list, IFF_MULTICAST);
	}

	for(node = flag_list->first; node != NULL; node = node->next){
		// comma is not needed on the first element
		if(comma_flag){
			printf(", ");
		} else {
			comma_flag = 1;
		}
		switch(node->value){
			case IFF_UP:
				printf("UP");
				break;
			case IFF_BROADCAST:
				printf("BROADCAST");
				break;
			case IFF_DEBUG:
				printf("DEBUG");
				break;
			case IFF_LOOPBACK:
				printf("LOOPBACK");
				break;
			case IFF_POINTOPOINT:
				printf("POINT-TO-POINT");
				break;
			case IFF_NOTRAILERS:
				printf("NO TRAILERS");
				break;
			case IFF_RUNNING:
				printf("RUNNING");
				break;
			case IFF_NOARP:
				printf("NO ARP");
				break;
			case IFF_PROMISC:
				printf("PROMISCUOUS");
				break;
			case IFF_ALLMULTI:
				printf("ALL MULTICAST");
				break;
			case IFF_OACTIVE:
				printf("ACTIVE");
				break;
			case IFF_SIMPLEX:
				printf("SIMPLEX");
				break;
			case IFF_MULTICAST:
				printf("MULTICAST");
				break;
			default:
				break;
		}
	}
}
Exemple #4
0
TabView::TabView(TraceItemView* parentView,
                 QWidget* parent, const char* name)
  : QWidget(parent), TraceItemView(parentView)
{
  setFocusPolicy(Qt::StrongFocus);
  setObjectName(name);

  _isCollapsed = true;

  QVBoxLayout* vbox = new QVBoxLayout( this );
  vbox->setSpacing( 6 );
  vbox->setMargin( 6 );

  _nameLabel = new QLabel(this); //KSqueezedTextLabel( this);
  _nameLabel->setSizePolicy(QSizePolicy( QSizePolicy::Ignored,
					 QSizePolicy::Fixed ));
  _nameLabel->setObjectName( "nameLabel" );
  _nameLabel->setText(tr("(No profile data file loaded)"));
  vbox->addWidget( _nameLabel );
  updateNameLabel(tr("(No profile data file loaded)"));

  _mainSplitter   = new QSplitter(Qt::Horizontal, this);
  _leftSplitter   = new Splitter(Qt::Vertical, _mainSplitter, "Left");
  vbox->addWidget( _mainSplitter );

  _rightTW = new TabWidget(this, _mainSplitter, "Right");
  connect(_rightTW, SIGNAL(currentChanged(QWidget*)),
          this, SLOT(tabChanged(QWidget*)));
  connect(_rightTW, SIGNAL(visibleRectChanged(TabWidget*)),
          this, SLOT(visibleRectChangedSlot(TabWidget*)));

  _topTW = new TabWidget(this, _leftSplitter, "Top");
  connect(_topTW, SIGNAL(currentChanged(QWidget*)),
          this, SLOT(tabChanged(QWidget*)));
  connect(_topTW, SIGNAL(visibleRectChanged(TabWidget*)),
          this, SLOT(visibleRectChangedSlot(TabWidget*)));

  _bottomSplitter = new Splitter(Qt::Horizontal,
                                  _leftSplitter, "Bottom");

  _leftTW = new TabWidget(this, _bottomSplitter, "Left");
  _leftTW->setTabPosition(QTabWidget::Bottom);
  connect(_leftTW, SIGNAL(currentChanged(QWidget*)),
          this, SLOT(tabChanged(QWidget*)));
  connect(_leftTW, SIGNAL(visibleRectChanged(TabWidget*)),
          this, SLOT(visibleRectChangedSlot(TabWidget*)));

  _bottomTW = new TabWidget(this, _bottomSplitter, "Bottom");
  _bottomTW->setTabPosition(QTabWidget::Bottom);
  connect(_bottomTW, SIGNAL(currentChanged(QWidget*)),
          this, SLOT(tabChanged(QWidget*)));
  connect(_bottomTW, SIGNAL(visibleRectChanged(TabWidget*)),
          this, SLOT(visibleRectChangedSlot(TabWidget*)));

  CallView* callerView = new CallView(true, this);
  CallView* calleeView = new CallView(false, this);
  CoverageView * allCallerView = new CoverageView(true, this);
  CoverageView * allCalleeView = new CoverageView(false, this);

  // Options of visualization views are stored by their view name
  callerView->setObjectName("CallerView");
  calleeView->setObjectName("CalleeView");
  allCallerView->setObjectName("AllCallerView");
  allCalleeView->setObjectName("AllCalleeView");

  // default positions...
  // Keep following order in sync with DEFAULT_xxxTABS defines!

  addTop( addTab( tr("Types"),
		  new EventTypeView(this, 0,
				   "EventTypeView")));
  addTop( addTab( tr("Callers"), callerView) );
  addTop( addTab( tr("All Callers"), allCallerView) );
  addTop( addTab( tr("Callee Map"),
		  new CallMapView(false, this, 0,
				  "CalleeMapView")));
  addTop( addTab( tr("Source Code"),
		  new SourceView(this, 0,
				 "SourceView")));

  addBottom( addTab( tr("Parts"),
		     new PartView(this, 0,
				  "PartView")));
  addBottom( addTab( tr("Callees"), calleeView) );
  addBottom( addTab( tr("Call Graph"),
		     new CallGraphView(this, 0,
				       "CallGraphView")));
  addBottom( addTab( tr("All Callees"), allCalleeView) );
  addBottom( addTab( tr("Caller Map"),
		     new CallMapView(true, this, 0,
				     "CallerMapView")));
  addBottom( addTab( tr("Machine Code"),
		     new InstrView(this, 0,
				   "InstrView")));

  // after all child widgets are created...
  _lastFocus = 0;
  _active = false;
  installFocusFilters();

  updateVisibility();

  this->setWhatsThis( whatsThis() );
}
Exemple #5
0
TabView::TabView(TraceItemView* parentView,
                 QWidget* parent, const char* name)
  : QWidget(parent, name), TraceItemView(parentView)
{
    setFocusPolicy(QWidget::StrongFocus);

  _isCollapsed = true;

  QVBoxLayout* vbox = new QVBoxLayout( this, 6, 6);

  _nameLabel = new KSqueezedTextLabel( this, "nameLabel" );
  _nameLabel->setText(i18n("(No profile data file loaded)"));
  vbox->addWidget( _nameLabel );

  _mainSplitter   = new QSplitter(Qt::Horizontal, this);
  _leftSplitter   = new Splitter(Qt::Vertical, _mainSplitter, "Left");
  vbox->addWidget( _mainSplitter );

  _rightTW = new TabWidget(this, _mainSplitter, "Right");
  connect(_rightTW, SIGNAL(currentChanged(QWidget*)),
          this, SLOT(tabChanged(QWidget*)));
  connect(_rightTW, SIGNAL(visibleRectChanged(TabWidget*)),
          this, SLOT(visibleRectChangedSlot(TabWidget*)));

  _topTW = new TabWidget(this, _leftSplitter, "Top");
  connect(_topTW, SIGNAL(currentChanged(QWidget*)),
          this, SLOT(tabChanged(QWidget*)));
  connect(_topTW, SIGNAL(visibleRectChanged(TabWidget*)),
          this, SLOT(visibleRectChangedSlot(TabWidget*)));

  _bottomSplitter = new Splitter(Qt::Horizontal,
                                  _leftSplitter, "Bottom");

  _leftTW = new TabWidget(this, _bottomSplitter, "Left");
  _leftTW->setTabPosition(QTabWidget::Bottom);
  connect(_leftTW, SIGNAL(currentChanged(QWidget*)),
          this, SLOT(tabChanged(QWidget*)));
  connect(_leftTW, SIGNAL(visibleRectChanged(TabWidget*)),
          this, SLOT(visibleRectChangedSlot(TabWidget*)));

  _bottomTW = new TabWidget(this, _bottomSplitter, "Bottom");
  _bottomTW->setTabPosition(QTabWidget::Bottom);
  connect(_bottomTW, SIGNAL(currentChanged(QWidget*)),
          this, SLOT(tabChanged(QWidget*)));
  connect(_bottomTW, SIGNAL(visibleRectChanged(TabWidget*)),
          this, SLOT(visibleRectChangedSlot(TabWidget*)));


  // default positions...

  addTop( addTab( i18n("Types"),
		  new CostTypeView(this, _topTW,
				   "CostTypeView")));
  addTop( addTab( i18n("Callers"),
		  new CallView(true, this, _topTW,
			       "CallerView")));
  addTop( addTab( i18n("All Callers"),
		  new CoverageView(true, this, _topTW,
				   "AllCallerView")));
  addTop( addTab( i18n("Caller Map"),
		  new CallMapView(true, this, _bottomTW,
				  "CallerMapView")));
  addTop( addTab( i18n("Source"),
		  new SourceView(this, _topTW,
				 "SourceView")));

  addBottom( addTab( i18n("Parts"),
		     new PartView(this, _bottomTW,
				  "PartView")));
  addBottom( addTab( i18n("Call Graph"),
		     new CallGraphView(this, _bottomTW,
				       "CallGraphView")));
  addBottom( addTab( i18n("Callees"),
		     new CallView(false, this, _bottomTW,
				  "CalleeView")));
  addBottom( addTab( i18n("All Callees"),
		     new CoverageView(false, this, _bottomTW,
				      "AllCalleeView")));

  addBottom( addTab( i18n("Callee Map"),
		     new CallMapView(false, this, _topTW,
				     "CalleeMapView")));
  addBottom( addTab( i18n("Assembler"),
		     new InstrView(this, _bottomTW,
				   "InstrView")));

  // after all child widgets are created...
  _lastFocus = 0;
  _active = false;
  installFocusFilters();

  updateVisibility();

  QWhatsThis::add( this, whatsThis() );
}
Exemple #6
0
Value* Procedure::addBottom(Value* value)
{
    return addBottom(value->origin(), value->type());
}