Logo Search packages:      
Sourcecode: caret version File versions  Download package

void GuiDisplayControlDialog::createScenePage (  )  [private]

create the scene page

Create the region page.

Definition at line 7246 of file GuiDisplayControlDialog.cxx.

References QtUtilities::makeButtonsSameSize(), pageSceneMain, pageWidgetStack, readSceneSelections(), sceneListBox, scenePreserveFociCheckBox, sceneWindowPositionComboBox, slotAppendScenePushButton(), slotCheckAllScenesPushButton(), slotCreateSpecFromSelectedScenesPushButton(), slotDeleteScenePushButton(), slotInsertScenePushButton(), slotReplaceScenePushButton(), slotSceneListBox(), slotShowScenePushButton(), slotTransferIdentityWindowFiltersPushButton(), DisplaySettingsScene::WINDOW_POSITIONS_IGNORE_ALL, DisplaySettingsScene::WINDOW_POSITIONS_IGNORE_MAIN_OTHERS_RELATIVE, and DisplaySettingsScene::WINDOW_POSITIONS_USE_ALL.

Referenced by showDisplayControlPage().

{
   //
   // Widget for scene items
   //
   pageSceneMain = new QWidget;
   pageWidgetStack->addWidget(pageSceneMain); //, PAGE_NAME_SCENE); // adds to dialog
   QVBoxLayout* sceneLayout = new QVBoxLayout(pageSceneMain);
   
   //
   // List box for scenes
   //
   sceneListBox = new QListWidget;
   sceneListBox->setMinimumWidth(700);
   sceneListBox->setFixedHeight(350);
   sceneListBox->setSelectionMode(QListWidget::ExtendedSelection);
   QObject::connect(sceneListBox, SIGNAL(itemActivated(QListWidgetItem*)),
                    this, SLOT(slotSceneListBox(QListWidgetItem*)));
   sceneLayout->addWidget(sceneListBox);
                    
   //
   // Show scene push button
   //
   QPushButton* showScenePushButton = new QPushButton("Show Selected Scene...");
   showScenePushButton->setAutoDefault(false);
   showScenePushButton->setToolTip(
                 "Show the selected scene.");
   QObject::connect(showScenePushButton, SIGNAL(clicked()),
                    this, SLOT(slotShowScenePushButton()));
                    
   //
   // Append scene push button
   //
   QPushButton* appendScenePushButton = new QPushButton("Append New Scene...");
   appendScenePushButton->setAutoDefault(false);
   appendScenePushButton->setToolTip(
                 "Create and add a new scene at\n"
                 "the end of the list of scenes.");
   QObject::connect(appendScenePushButton, SIGNAL(clicked()),
                    this, SLOT(slotAppendScenePushButton()));
                    
   //
   // Insert scene push button
   //
   QPushButton* insertScenePushButton = new QPushButton("Insert New Scene...");
   insertScenePushButton->setAutoDefault(false);
   insertScenePushButton->setToolTip( 
                 "Create and insert a new scene\n"
                 "into the list of scenes after\n"
                 "the selected scene.");
   QObject::connect(insertScenePushButton, SIGNAL(clicked()),
                    this, SLOT(slotInsertScenePushButton()));
                    
   //
   // Replace scene push button
   //
   QPushButton* replaceScenePushButton = new QPushButton("Replace Selected Scene...");
   replaceScenePushButton->setAutoDefault(false);
   replaceScenePushButton->setToolTip(
                 "Replace the selected\n"
                 "scene with the current\n"
                 "display settings.");
   QObject::connect(replaceScenePushButton, SIGNAL(clicked()),
                    this, SLOT(slotReplaceScenePushButton()));
                    
   //
   // Delete scene push button
   //
   QPushButton* deleteScenePushButton = new QPushButton("Delete Selected Scene...");
   deleteScenePushButton->setAutoDefault(false);
   deleteScenePushButton->setToolTip(
                 "Delete the selected scene(s).");
   QObject::connect(deleteScenePushButton, SIGNAL(clicked()),
                    this, SLOT(slotDeleteScenePushButton()));
    
   //
   // Check all scenes button
   //
   QPushButton* checkAllScenesPushButton = new QPushButton("Check All Scenes...");
   checkAllScenesPushButton->setAutoDefault(false);
   checkAllScenesPushButton->setToolTip(
                 "This will verify that all\n"
                 "scenes successfully display.");
   QObject::connect(checkAllScenesPushButton, SIGNAL(clicked()),
                    this, SLOT(slotCheckAllScenesPushButton()));
                    
   //
   // Unload all files (except scene)
   //
   QPushButton* unloadFilesPushButton = new QPushButton("Unload All Files Except Scene...");
   unloadFilesPushButton->setAutoDefault(false);
   unloadFilesPushButton->setToolTip( 
                 "Remove all loaded data\n"
                 "except the scenes.");
   QObject::connect(unloadFilesPushButton, SIGNAL(clicked()),
                    theMainWindow, SLOT(slotCloseSpecFileKeepSceneAndSpec()));
   
   //
   // Create a spec file from selected scenes
   //
   QPushButton* createSpecFromSelectedScenesPushButton = new QPushButton("Create Spec From Selected Scenes...");
   createSpecFromSelectedScenesPushButton->setAutoDefault(false);
   createSpecFromSelectedScenesPushButton->setToolTip("Create a Spec File from\n"
                                                      "the data files listed in\n"
                                                      "the selected scenes.");
   QObject::connect(createSpecFromSelectedScenesPushButton, SIGNAL(clicked()),
                    this, SLOT(slotCreateSpecFromSelectedScenesPushButton()));
                    
   //
   // Transfer Identify Window Filters
   //
   QPushButton* transferIdentityWindowFiltersPushButton = new QPushButton("Transfer Identify Window Filters...");
   transferIdentityWindowFiltersPushButton->setAutoDefault(false);
   transferIdentityWindowFiltersPushButton->setToolTip("Choose a scene from a dialog\n"
                                                       "that will be popped-up and its\n"
                                                       "identity window filters will be\n"
                                                       "transferred to the selected scenes.");
   QObject::connect(transferIdentityWindowFiltersPushButton, SIGNAL(clicked()),
                    this, SLOT(slotTransferIdentityWindowFiltersPushButton()));
                    

   //
   // Make all of the buttons the same size
   //
   std::vector<QPushButton*> buttVect;
   buttVect.push_back(showScenePushButton);
   buttVect.push_back(appendScenePushButton);
   buttVect.push_back(insertScenePushButton);
   buttVect.push_back(replaceScenePushButton);
   QtUtilities::makeButtonsSameSize(buttVect);
   buttVect.clear();
   buttVect.push_back(deleteScenePushButton);
   buttVect.push_back(checkAllScenesPushButton);
   buttVect.push_back(unloadFilesPushButton);
   buttVect.push_back(createSpecFromSelectedScenesPushButton);
   buttVect.push_back(transferIdentityWindowFiltersPushButton);
   QtUtilities::makeButtonsSameSize(buttVect);
   
   //
   // Grid for buttons
   //
   QGridLayout* buttonsLayout = new QGridLayout;
   sceneLayout->addLayout(buttonsLayout, 0);
   sceneLayout->setAlignment(buttonsLayout, Qt::AlignLeft);
   sceneLayout->setSpacing(0);
   buttonsLayout->addWidget(showScenePushButton, 0, 0);
   buttonsLayout->addWidget(appendScenePushButton, 1, 0);
   buttonsLayout->addWidget(insertScenePushButton, 2, 0);
   buttonsLayout->addWidget(replaceScenePushButton, 3, 0);
   buttonsLayout->addWidget(deleteScenePushButton, 0, 1);
   buttonsLayout->addWidget(checkAllScenesPushButton, 1, 1);
   buttonsLayout->addWidget(unloadFilesPushButton, 2, 1);
   buttonsLayout->addWidget(createSpecFromSelectedScenesPushButton, 3, 1);
   buttonsLayout->addWidget(transferIdentityWindowFiltersPushButton, 4, 1);
   
/*
   QVBoxLayout* buttonsLayout = new QVBoxLayout;
   sceneLayout->addLayout(buttonsLayout);
   sceneLayout->setSpacing(0);
   buttonsLayout->addWidget(showScenePushButton, 0, Qt::AlignHCenter);
   buttonsLayout->addWidget(appendScenePushButton, 0, Qt::AlignHCenter);
   buttonsLayout->addWidget(insertScenePushButton, 0, Qt::AlignHCenter);
   buttonsLayout->addWidget(replaceScenePushButton, 0, Qt::AlignHCenter);
   buttonsLayout->addWidget(deleteScenePushButton, 0, Qt::AlignHCenter);
   if (sendScenePushButton != NULL) {
      buttonsLayout->addWidget(sendScenePushButton, 0, Qt::AlignHCenter);
   }
   if (sendSettingsPushButton != NULL) {
      buttonsLayout->addWidget(sendSettingsPushButton, 0, Qt::AlignHCenter);
   }
   buttonsLayout->addWidget(checkAllScenesPushButton, 0, Qt::AlignHCenter);
   buttonsLayout->addWidget(unloadFilesPushButton, 0, Qt::AlignHCenter);
*/   
   
/*
   QtUtilities::makeButtonsSameSize(showScenePushButton,
                                    createScenePushButton, 
                                    replaceScenePushButton, 
                                    deleteScenePushButton,
                                    unloadFilesPushButton,
                                    sendScenePushButton);
*/

   //
   // Preserve foci, foci colors, study metadata option
   //   
   scenePreserveFociCheckBox = new QCheckBox("Preserve Foci, Foci Colors, and Study Metadata");
   QObject::connect(scenePreserveFociCheckBox, SIGNAL(toggled(bool)),
                    this, SLOT(readSceneSelections()));
   sceneLayout->addWidget(scenePreserveFociCheckBox);
   
   //
   // window positions
   //
   sceneWindowPositionComboBox = new QComboBox;
   sceneWindowPositionComboBox->insertItem(DisplaySettingsScene::WINDOW_POSITIONS_USE_ALL,
                                           "Use All Window Positions From Scene");
   sceneWindowPositionComboBox->insertItem(DisplaySettingsScene::WINDOW_POSITIONS_IGNORE_MAIN_OTHERS_RELATIVE,
                                           "Do Not Move Main Window, All Other Windows Relative to Main Window");
   sceneWindowPositionComboBox->insertItem(DisplaySettingsScene::WINDOW_POSITIONS_IGNORE_ALL,
                                           "Ignore All Window Positions in Scene");
   QObject::connect(sceneWindowPositionComboBox, SIGNAL(activated(int)),
                    this, SLOT(readSceneSelections()));
   QGroupBox* windowPosGroupBox = new QGroupBox("Window Positioning");
   QVBoxLayout* windowPosGroupLayout = new QVBoxLayout(windowPosGroupBox);
   windowPosGroupLayout->addWidget(sceneWindowPositionComboBox);
   sceneLayout->addWidget(windowPosGroupBox);
                     
   //
   // Put extra space at bottom of dialog
   //
   sceneLayout->addStretch();
   pageSceneMain->setFixedSize(pageSceneMain->sizeHint());
}


Generated by  Doxygen 1.6.0   Back to index