Ejemplo n.º 1
0
void FlyEmSplitControlForm::createMenu()
{
  m_mainMenu = new QMenu(this);
  ui->menuPushButton->setMenu(m_mainMenu);

  QAction *queryPixelAction = new QAction("Go to Position", this);
  m_mainMenu->addAction(queryPixelAction);
  connect(queryPixelAction, SIGNAL(triggered()), this, SLOT(goToPosition()));

  QMenu *seedMenu = m_mainMenu->addMenu("Seed");
  QAction *recoverSeedAction = new QAction("Recover", this);
  seedMenu->addAction(recoverSeedAction);
  connect(recoverSeedAction, SIGNAL(triggered()), this, SLOT(recoverSeed()));

  QAction *selectSeedAction = new QAction("Select by Label", this);
  seedMenu->addAction(selectSeedAction);
  connect(selectSeedAction, SIGNAL(triggered()), this, SLOT(selectSeed()));

  QAction *selectAllSeedAction = new QAction("Select All", this);
  seedMenu->addAction(selectAllSeedAction);
  connect(selectAllSeedAction, SIGNAL(triggered()), this, SLOT(selectAllSeed()));

  QAction *exportSeedAction = new QAction("Export", this);
  seedMenu->addAction(exportSeedAction);
  connect(exportSeedAction, SIGNAL(triggered()), this, SLOT(exportSeed()));

  QAction *importSeedAction = new QAction("Import", this);
  seedMenu->addAction(importSeedAction);
  connect(importSeedAction, SIGNAL(triggered()), this, SLOT(importSeed()));

  QAction *crop3DAction = new QAction("Coarse Body Crop", this);
  m_mainMenu->addAction(crop3DAction);
  connect(crop3DAction, SIGNAL(triggered()), this, SLOT(cropCoarseBody3D()));
}
QString VESPERSEXAFSScanConfiguration::headerText() const
{
	QString header("Configuration of the Scan\n\n");

	header.append("Scanned Edge:\t" + edge() + "\n");
	header.append(fluorescenceHeaderString(fluorescenceDetector()));
	header.append(incomingChoiceHeaderString(incomingChoice()));
	header.append(transmissionChoiceHeaderString(transmissionChoice()));

	header.append(QString("Automatically moved to a specific location (used when setting up the workflow)?\t%1").arg(goToPosition() ? "Yes\n" : "No\n\n"));

	if (goToPosition()){

		header.append(QString("Horizontal Position:\t%1 mm\n").arg(x()));
		header.append(QString("Vertical Position:\t%1 mm\n\n").arg(y()));
	}

	header.append(regionOfInterestHeaderString(roiList()));
	header.append("\n");
	header.append("Regions Scanned\n");

	for (int i = 0; i < regionCount(); i++){

		if (exafsRegions()->type(i) == AMEXAFSRegion::kSpace && useFixedTime())
			header.append(QString("Start: %1 eV\tDelta: %2 k\tEnd: %3 k\tTime: %4 s\n")
						  .arg(exafsRegions()->startByType(i, AMEXAFSRegion::Energy))
						  .arg(exafsRegions()->delta(i))
						  .arg(exafsRegions()->endByType(i, AMEXAFSRegion::kSpace))
						  .arg(regions_->time(i)));

		else if (exafsRegions()->type(i) == AMEXAFSRegion::kSpace && !useFixedTime())
			header.append(QString("Start: %1 eV\tDelta: %2 k\tEnd: %3 k\tMaximum time (used with variable integration time): %4 s\n")
						  .arg(exafsRegions()->startByType(i, AMEXAFSRegion::Energy))
						  .arg(exafsRegions()->delta(i))
						  .arg(exafsRegions()->endByType(i, AMEXAFSRegion::kSpace))
						  .arg(exafsRegions()->time(i)));

		else
			header.append(QString("Start: %1 eV\tDelta: %2 eV\tEnd: %3 eV\tTime: %4 s\n")
						  .arg(regionStart(i))
						  .arg(regionDelta(i))
						  .arg(regionEnd(i))
						  .arg(regionTime(i)));
	}

	return header;
}
Ejemplo n.º 3
0
void printBattLevel(void){
    
    // go to x=123, y=1 and print the battery level sprite
    goToPosition(123,1);
    
    if((tempBat/9.0)*100.00 < 10.0){
        LCDprint(Batt10);
    }else if((tempBat/9.0)*100.00 >= 10.0 ||(tempBat/9.0)*100.00 <30.0){
        LCDprint(Batt30);
    }else if((tempBat/9.0)*100.00 >= 30.0 ||(tempBat/9.0)*100.00 <45.0){
        LCDprint(Batt45);
    }else if((tempBat/9.0)*100.00 >= 45.0 ||(tempBat/9.0)*100.00 <60.0){
        LCDprint(Batt60);
    }else if((tempBat/9.0)*100.00 >= 60.0 ||(tempBat/9.0)*100.00 <75.0){
        LCDprint(Batt75);
    }else if((tempBat/9.0)*100.00 >= 75.0){
        LCDprint(FullBatt);  
    }
    
}
Ejemplo n.º 4
0
void drawButton(const Button* button){
	if(button == NULL) return;
	GLuint textureId = 0;
	
	switch(button->action){
	case PUT_GUN : textureId = GAME_TEXTURES_ID.GUN_BUTTON_ID;
	break;
	case PUT_HYBRID : textureId = GAME_TEXTURES_ID.HYBRID_BUTTON_ID;
	break;
	case PUT_LASER : textureId = GAME_TEXTURES_ID.LASER_BUTTON_ID;
	break;
	case PUT_ROCKET : textureId = GAME_TEXTURES_ID.ROCKET_BUTTON_ID;
	break;
	case QUIT_GAME : textureId = GAME_TEXTURES_ID.QUIT_GAME_ID;
	break;
	case AIDE_MENU : textureId = MENU_TEXTURES_ID.AIDE_BUTTON;
	break;
	case CHOIX_MENU : textureId = MENU_TEXTURES_ID.MAP_CHOICE_BUTTON;
	break;
	case PLAY_MENU : textureId = MENU_TEXTURES_ID.PLAY_BUTTON;
	break;
	case MAP_MENU :
		goToPosition(BUTTON_OF_MENU.lstMapTextureIndex, BUTTON_OF_MENU.lstMapButton->position);
		textureId = *((GLuint*)currentData(BUTTON_OF_MENU.lstMapTextureIndex));
	break;
	case CLOSE_RULES_MENU : textureId = MENU_TEXTURES_ID.RULES_CLOSE;
	break;

	
	default : return;
	break;
	}

	glPushMatrix();
	glTranslatef(button->position.x , button->position.y , button->position.z);
	glScalef(button->width, button->height,1.);
	drawTexturedQuad(textureId);
	glPopMatrix();
}
Ejemplo n.º 5
0
void printXbeeSymbol(void){
    // Print the XBee symbol
    goToPosition(117,1);
    LCDprint(Connected_XBee_Symbol);
}
Ejemplo n.º 6
0
void printPCSymbol(void){
    
    // Print the PC symbol
    goToPosition(117,1);
    LCDprint(Connected_PC_Symbol);
}
Ejemplo n.º 7
0
void printDebugSymbol(void){
    
    // Print the Debug Symbol
    goToPosition(117,1);
    LCDprint('D');
}
Ejemplo n.º 8
0
void printUSBSTORE(void){
    goToPosition(111,1);
    LCDprint(USB_Store_Symbol);
}