コード例 #1
0
void PerspectivesPreferencePage::RevertPerspective()
{
  PerspectiveDescriptor::Pointer desc = GetSelectedPerspective();
  if (desc.IsNotNull() && !perspToRevert.contains(desc))
  {
    perspToRevert.push_back(desc);
  }
  UpdateButtons();
}
コード例 #2
0
void PerspectivesPreferencePage::MakeDefaultPerspective()
{
  PerspectiveDescriptor::Pointer desc = GetSelectedPerspective();
  if (desc.IsNotNull() && !perspToDelete.contains(desc))
  {
    int row = perspectives.indexOf(desc);
    defaultPerspectiveId = desc->GetId();
    UpdatePerspectivesTable();
    ui->perspectivesListWidget->item(row)->setSelected(true);
  }
  UpdateButtons();
}
コード例 #3
0
void PerspectivesPreferencePage::DeletePerspective()
{
  PerspectiveDescriptor::Pointer desc = GetSelectedPerspective();
  if (desc.IsNotNull() && !perspToDelete.contains(desc))
  {
    if (!FindOpenInstance(desc))
    {
      perspToDelete.push_back(desc);
      perspToRevert.removeAll(desc);
      perspectives.removeAll(desc);
      UpdatePerspectivesTable();
    }
  }
  UpdateButtons();
}