void CDockableDataViews::ClearTabData() { for (StringResultMap::iterator itr = m_dataTabs.begin(); itr != m_dataTabs.end(); ++itr) { itr->second->SetData(NULL, false, roxie::CSearchRowVector()); } SetTabSelection(_T("Data"), roxie::CSearchRowVector()); }
void SDistributionCurveEditor::TabNameCommitted(const FText& CommentText, ETextCommit::Type CommitInfo) { if (CommitInfo == ETextCommit::OnEnter) { if (CommentText.IsEmpty()) { FMessageDialog::Open(EAppMsgType::Ok, FText( LOCTEXT( "EmptyTabName", "Tab must be given a name") ) ); } else { bool bFound = false; // Verify that the name is not already in use for (int32 TabIndex = 0; TabIndex < SharedData->EdSetup->Tabs.Num(); TabIndex++) { FCurveEdTab* Tab = &SharedData->EdSetup->Tabs[TabIndex]; if (Tab->TabName == CommentText.ToString()) { FFormatNamedArguments Arguments; Arguments.Add(TEXT("Name"), CommentText); FMessageDialog::Open(EAppMsgType::Ok, FText::Format( LOCTEXT( "TabNameInUse", "Name '{Name}' already in use!" ), Arguments )); bFound = true; break; } } if (!bFound) { // Add the tab, and set the active tab to it. SharedData->EdSetup->CreateNewTab( *CommentText.ToString() ); SharedData->EdSetup->ActiveTab = TabNames.Num(); TabNames.Add(MakeShareable(new FString( *CommentText.ToString() ))); SelectedTab = TabNames[TabNames.Num() - 1]; TabNamesComboBox->RefreshOptions(); SetTabSelection(SelectedTab, true); } } } CloseEntryPopup(); }
void SDistributionCurveEditor::OnDeleteTab() { if (TabNamesComboBox->GetSelectedItem().IsValid()) { if (TabNamesComboBox->GetSelectedItem() == TabNames[0]) { FSlateNotificationManager::Get().AddNotification( FNotificationInfo( LOCTEXT("DefaultTabCannotBeDeleted", "Default tab can not be deleted!") ) ); return; } // Remove the tab... FString Name = *TabNamesComboBox->GetSelectedItem(); SharedData->EdSetup->RemoveTab(Name); TabNames.Remove(TabNamesComboBox->GetSelectedItem()); // Force a reset of the combo contents SelectedTab = TabNames[0]; TabNamesComboBox->RefreshOptions(); SetTabSelection(SelectedTab, true); } }
void SDistributionCurveEditor::TabSelectionChanged(TSharedPtr<FString> NewSelection, ESelectInfo::Type SelectInfo) { SetTabSelection(NewSelection, false); }
void CDataView::SetData(const ITable * data, bool hasRowNum, const roxie::CSearchRowVector & searchResults) { m_data = data == NULL ? NULL : const_cast<ITable *>(data); m_grid.SetData(m_data, hasRowNum); SetTabSelection(searchResults); }