Power Bookmarks 1.0.0
Save and Share camera views with ease
Loading...
Searching...
No Matches
UFtsViewBookmarkEditorSubsystem Class Reference

Editor subsystem to handle bookmark collections. More...

#include <FtsViewBookmarkEditorSubsystem.h>

Inheritance diagram for UFtsViewBookmarkEditorSubsystem:

Public Member Functions

bool RenameBookmarkCategory (const FString &CurrentName, const FString &NewName)
 Renames a category by renaming prefixes on all matching bookmarks. Aborts if new category name is already in use.
FString GetUniqueCategoryName (const FString &SuggestedName)
 Checks if a given name is already in use and appends numbers to make it unique if needed.
void DeleteBookmarkCategory (FString Name)
 Deletes all bookmarks belonging to a given category and thereby the category itself.
bool FindBookmarksInCategory (FString CategoryName, TArray< FFtsViewBookmark > &OutBookmarks)
 Searches through bookmarks to find all that share the given category.
void GetAllCategoryNames (TArray< FString > &OutNames)
 Checks all bookmarks to find unique categories.
void GetAllBookmarkNames (TArray< FString > &OutNames)
 Get a list of all bookmark ids.
FString FindUniqueBookmarkName (const FString &SuggestedName)
 Checks if a given name is already in use for a bookmark and appends numbers to make it unique if needed.
bool AddBookmark (const FFtsViewBookmark &NewBookmark)
 Adds a new bookmark to the management. Will prevent doubles by id.
void RenameBookmarkFast (const int32 Index, const FString &NewBookmarkName)
 Renames a bookmark without doing any checks whether the index or the name id are valid.
bool RenameBookmark (const FString &CurrentBookmarkName, const FString &NewBookmarkName)
 Changes the name of a bookmark. Checks for duplicates.
bool FindBookmarkIndex (FString BookmarkName, int32 &OutIndex)
 Searches the bookmarks list for a specified id.
bool UpdateBookmark (const FString &BookmarkName, const FFtsViewBookmark &NewBookmark)
 Updates an existing bookmark with new data by replacing it.
bool SetBookmarkMetaDataEntry (const FString &BookmarkName, const FString &Key, const FString &Value)
 Sets a new value to a given key for the bookmarks meta data.
bool GetBookmarkMetaDataEntry (const FString &BookmarkName, const FString &Key, FString &OutValue)
 Gets the value that fits the key for a bookmarks meta data if it exists.
bool DeleteBookmarkMetaDataEntry (const FString &BookmarkName, const FString &Key)
 Deletes a value from the bookmarks meta data.
bool GetBookmark (const FString &BookmarkName, FFtsViewBookmark &OutBookmark)
 Get bookmark data from the list.
bool DeleteBookmark (const FString &BookmarkName)
 Delete bookmark data from the list.
void SaveBookmarksConfig ()
 Saves changes to ini. Tries to checkout file if source control is enabled.

Static Public Member Functions

static FString GetBookmarkCategory (const FFtsViewBookmark &Bookmark)
 Splits a bookmark id to get the category part.

Protected Attributes

TArray< FFtsViewBookmarkBookmarks
 List of managed bookmarks.
FFtsBookmarkRenameSignature OnBookmarkRenamed
 Called when a bookmark is renamed.

Detailed Description

Editor subsystem to handle bookmark collections.

Bookmarks only have an id name, but this system sorts them into categories by naming them "Category.Bookmark". UI is handled through Blueprint Editor Widgets. Saves bookmarks to config file.

Member Function Documentation

◆ AddBookmark()

bool UFtsViewBookmarkEditorSubsystem::AddBookmark ( const FFtsViewBookmark & NewBookmark)

Adds a new bookmark to the management. Will prevent doubles by id.

Parameters
NewBookmarkBookmark to add
Returns
True if bookmark could be added

◆ DeleteBookmark()

bool UFtsViewBookmarkEditorSubsystem::DeleteBookmark ( const FString & BookmarkName)

Delete bookmark data from the list.

Parameters
BookmarkNameId of the bookmark
Returns
True if bookmark was deleted

◆ DeleteBookmarkCategory()

void UFtsViewBookmarkEditorSubsystem::DeleteBookmarkCategory ( FString Name)

Deletes all bookmarks belonging to a given category and thereby the category itself.

Parameters
NameCategory to delete

◆ DeleteBookmarkMetaDataEntry()

bool UFtsViewBookmarkEditorSubsystem::DeleteBookmarkMetaDataEntry ( const FString & BookmarkName,
const FString & Key )

Deletes a value from the bookmarks meta data.

Parameters
BookmarkNameBookmark to modify
KeyKey of value to delete from data

◆ FindBookmarkIndex()

bool UFtsViewBookmarkEditorSubsystem::FindBookmarkIndex ( FString BookmarkName,
int32 & OutIndex )

Searches the bookmarks list for a specified id.

Parameters
BookmarkNameBookmark to find
OutIndexIndex in the list where the bookmark is
Returns
True if bookmark was found

◆ FindBookmarksInCategory()

bool UFtsViewBookmarkEditorSubsystem::FindBookmarksInCategory ( FString CategoryName,
TArray< FFtsViewBookmark > & OutBookmarks )

Searches through bookmarks to find all that share the given category.

Parameters
CategoryNameCategory to find bookmarks for
OutBookmarksBookmarks in the category
Returns
True if any bookmarks could be found

◆ FindUniqueBookmarkName()

FString UFtsViewBookmarkEditorSubsystem::FindUniqueBookmarkName ( const FString & SuggestedName)

Checks if a given name is already in use for a bookmark and appends numbers to make it unique if needed.

Parameters
SuggestedNameName to ideally use
Returns
Name guaranteed to be unused

◆ GetAllBookmarkNames()

void UFtsViewBookmarkEditorSubsystem::GetAllBookmarkNames ( TArray< FString > & OutNames)

Get a list of all bookmark ids.

Parameters
OutNamesAll bookmark ids

◆ GetAllCategoryNames()

void UFtsViewBookmarkEditorSubsystem::GetAllCategoryNames ( TArray< FString > & OutNames)

Checks all bookmarks to find unique categories.

Parameters
OutNamesAll unique categories

◆ GetBookmark()

bool UFtsViewBookmarkEditorSubsystem::GetBookmark ( const FString & BookmarkName,
FFtsViewBookmark & OutBookmark )

Get bookmark data from the list.

Parameters
BookmarkNameId of the bookmark
OutBookmarkBookmark data
Returns
True if bookmark was found

◆ GetBookmarkCategory()

FString UFtsViewBookmarkEditorSubsystem::GetBookmarkCategory ( const FFtsViewBookmark & Bookmark)
static

Splits a bookmark id to get the category part.

Parameters
BookmarkBookmark to read category from
Returns
Category part of the id

◆ GetBookmarkMetaDataEntry()

bool UFtsViewBookmarkEditorSubsystem::GetBookmarkMetaDataEntry ( const FString & BookmarkName,
const FString & Key,
FString & OutValue )

Gets the value that fits the key for a bookmarks meta data if it exists.

Parameters
BookmarkNameBookmark reference to get meta data from
KeyKey to get value for
OutValueMeta data value
Returns
True if bookmark has data for the given key

◆ GetUniqueCategoryName()

FString UFtsViewBookmarkEditorSubsystem::GetUniqueCategoryName ( const FString & SuggestedName)

Checks if a given name is already in use and appends numbers to make it unique if needed.

Parameters
SuggestedNameName to ideally use
Returns
Name guaranteed to be unused

◆ RenameBookmark()

bool UFtsViewBookmarkEditorSubsystem::RenameBookmark ( const FString & CurrentBookmarkName,
const FString & NewBookmarkName )

Changes the name of a bookmark. Checks for duplicates.

Parameters
CurrentBookmarkNameName that is currently being used
NewBookmarkNameName to change to
Returns
True if successful.

◆ RenameBookmarkCategory()

bool UFtsViewBookmarkEditorSubsystem::RenameBookmarkCategory ( const FString & CurrentName,
const FString & NewName )

Renames a category by renaming prefixes on all matching bookmarks. Aborts if new category name is already in use.

Parameters
CurrentNameName the category has at the moment
NewNameName to change it to
Returns
True if category was renamed

◆ RenameBookmarkFast()

void UFtsViewBookmarkEditorSubsystem::RenameBookmarkFast ( const int32 Index,
const FString & NewBookmarkName )

Renames a bookmark without doing any checks whether the index or the name id are valid.

Parameters
IndexIndex of bookmark in the list
NewBookmarkNameNew name

◆ SetBookmarkMetaDataEntry()

bool UFtsViewBookmarkEditorSubsystem::SetBookmarkMetaDataEntry ( const FString & BookmarkName,
const FString & Key,
const FString & Value )

Sets a new value to a given key for the bookmarks meta data.

Parameters
BookmarkNameBookmark reference to write to
KeyMeta data key to set
ValueValue to set for key

◆ UpdateBookmark()

bool UFtsViewBookmarkEditorSubsystem::UpdateBookmark ( const FString & BookmarkName,
const FFtsViewBookmark & NewBookmark )

Updates an existing bookmark with new data by replacing it.

Parameters
BookmarkNameName of the bookmark
NewBookmarkReplacement data
Returns
True if update was successful

The documentation for this class was generated from the following files:
  • Plugins/FtsViewBookmarks/Source/FtsViewBookmarksEditor/Public/FtsViewBookmarkEditorSubsystem.h
  • Plugins/FtsViewBookmarks/Source/FtsViewBookmarksEditor/Private/FtsViewBookmarkEditorSubsystem.cpp