예제 #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()));
}
void FlyEmBodySplitProjectDialog::createMenu()
{
  m_mainMenu = new QMenu(this);
  ui->menuPushButton->setMenu(m_mainMenu);

  m_showBodyMaskAction = new QAction("Show Body Mask", this);
  m_mainMenu->addAction(m_showBodyMaskAction);
  m_showBodyMaskAction->setCheckable(true);
  connect(m_showBodyMaskAction, SIGNAL(triggered(bool)),
          this, SLOT(showBodyMask(bool)));

  QAction *removeBookmarkAction = new QAction("Remove All Bookmarks", this);
  m_mainMenu->addAction(removeBookmarkAction);
  /*
  connect(removeBookmarkAction, SIGNAL(triggered()),
          this, SLOT(removeAllBookmark()));
*/
  QAction *exportSplitAction = new QAction("Export splits", this);
  m_mainMenu->addAction(exportSplitAction);
  connect(exportSplitAction, SIGNAL(triggered()), this, SLOT(exportSplits()));

  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", this);
  seedMenu->addAction(selectSeedAction);
  connect(selectSeedAction, SIGNAL(triggered()), this, SLOT(selectSeed()));

  QMenu *batchMenu = m_mainMenu->addMenu("Batch");
  QAction *allSeedSummaryAction = new QAction("Check Work Progress", this);
  batchMenu->addAction(allSeedSummaryAction);
  connect(allSeedSummaryAction, SIGNAL(triggered()),
          this, SLOT(checkAllSeed()));

  QAction *allSeedProcessAction = new QAction("Process All Seeds", this);
  batchMenu->addAction(allSeedProcessAction);
  connect(allSeedProcessAction, SIGNAL(triggered()),
          this, SLOT(processAllSeed()));
}