LogViewer
A modern log viewer with AI-assisted analysis (Qt 6)
Loading...
Searching...
No Matches
ui::qt::BookmarksPanel Class Reference

Enhanced bookmark and annotation panel (v1.10.0). More...

#include <BookmarksPanel.hpp>

Inheritance diagram for ui::qt::BookmarksPanel:
Inheritance graph
Collaboration diagram for ui::qt::BookmarksPanel:
Collaboration graph

Classes

struct  Bookmark
 
struct  Category
 

Public Slots

void AddBookmarkForRow (int actualRow)
 Bookmark the given event row (called from the events-table context menu).
 

Signals

void NavigateToEvent (int actualRow)
 

Public Member Functions

 BookmarksPanel (db::EventsContainer &events, EventsTableView *eventsView, QWidget *parent=nullptr)
 
nlohmann::json GetSessionData () const
 
void LoadSessionData (const nlohmann::json &data)
 

Private Slots

void OnCurrentRowChanged (int actualRow)
 
void OnAddBookmark ()
 
void OnGoTo ()
 
void OnRemove ()
 
void OnExport ()
 
void OnImport ()
 
void OnSearchTextChanged (const QString &text)
 
void OnCategoryFilterChanged (const QString &category)
 
void OnAddCategory ()
 
void OnRemoveCategory ()
 

Private Member Functions

void BuildLayout ()
 
void DoAddBookmark (int actualRow, const std::string &label, const std::string &category)
 
void RebuildTable ()
 
void RebuildCategoryFilter ()
 
void UpdateCategoryCounts ()
 
int SelectedTableRow () const
 Returns the selected table row, or -1 if nothing is selected.
 
void ApplyFilters ()
 Apply search and category filters to visible bookmarks.
 

Static Private Member Functions

static std::vector< Category > GetDefaultCategories ()
 Get default categories.
 

Private Attributes

db::EventsContainer & m_events
 
EventsTableView * m_eventsView
 
int m_currentRow {-1}
 Currently selected event in events view.
 
std::vector< Category > m_categories
 
std::unordered_map< std::string, int > m_categoryColorMap
 
QLineEdit * m_labelEdit {nullptr}
 
QComboBox * m_categoryCombo {nullptr}
 
QPushButton * m_addCategoryBtn {nullptr}
 
QPushButton * m_removeCategoryBtn {nullptr}
 
QPushButton * m_addBtn {nullptr}
 
QTableWidget * m_table {nullptr}
 
QLineEdit * m_searchEdit {nullptr}
 
QComboBox * m_categoryFilterCombo {nullptr}
 
QPushButton * m_goToBtn {nullptr}
 
QPushButton * m_removeBtn {nullptr}
 
QPushButton * m_exportBtn {nullptr}
 
QPushButton * m_importBtn {nullptr}
 
QLabel * m_statusLabel {nullptr}
 
std::vector< Bookmark > m_bookmarks
 
std::vector< Bookmark > m_filteredBookmarks
 

Detailed Description

Enhanced bookmark and annotation panel (v1.10.0).

Improvements:

  • Categories: Organize bookmarks by type (Bug, TODO, Performance, etc.)
  • Color coding: Each category has a color for visual organization
  • Search/Filter: Find bookmarks by keyword or category
  • Sorting: Sort by row, category, timestamp, or label
  • Import/Export: Save/load bookmark sets as JSON files
  • Statistics: Quick count by category

Users can mark events with labels and assign categories. Bookmarks persist in JSON across sessions with category and color metadata.

Constructor & Destructor Documentation

◆ BookmarksPanel()

ui::qt::BookmarksPanel::BookmarksPanel ( db::EventsContainer &  events,
EventsTableView *  eventsView,
QWidget *  parent = nullptr 
)
explicit
Here is the call graph for this function:

Member Function Documentation

◆ AddBookmarkForRow

void ui::qt::BookmarksPanel::AddBookmarkForRow ( int  actualRow)
slot

Bookmark the given event row (called from the events-table context menu).

Here is the call graph for this function:

◆ ApplyFilters()

void ui::qt::BookmarksPanel::ApplyFilters ( )
private

Apply search and category filters to visible bookmarks.

Here is the caller graph for this function:

◆ BuildLayout()

void ui::qt::BookmarksPanel::BuildLayout ( )
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ DoAddBookmark()

void ui::qt::BookmarksPanel::DoAddBookmark ( int  actualRow,
const std::string &  label,
const std::string &  category 
)
private
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetDefaultCategories()

std::vector< BookmarksPanel::Category > ui::qt::BookmarksPanel::GetDefaultCategories ( )
staticprivate

Get default categories.

Here is the caller graph for this function:

◆ GetSessionData()

nlohmann::json ui::qt::BookmarksPanel::GetSessionData ( ) const

◆ LoadSessionData()

void ui::qt::BookmarksPanel::LoadSessionData ( const nlohmann::json &  data)
Here is the call graph for this function:

◆ NavigateToEvent

void ui::qt::BookmarksPanel::NavigateToEvent ( int  actualRow)
signal

Emitted when the user activates a bookmark. MainWindow switches to the Events tab and scrolls to actualRow.

Here is the caller graph for this function:

◆ OnAddBookmark

void ui::qt::BookmarksPanel::OnAddBookmark ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnAddCategory

void ui::qt::BookmarksPanel::OnAddCategory ( )
privateslot
Here is the caller graph for this function:

◆ OnCategoryFilterChanged

void ui::qt::BookmarksPanel::OnCategoryFilterChanged ( const QString &  category)
privateslot
Here is the caller graph for this function:

◆ OnCurrentRowChanged

void ui::qt::BookmarksPanel::OnCurrentRowChanged ( int  actualRow)
privateslot
Here is the caller graph for this function:

◆ OnExport

void ui::qt::BookmarksPanel::OnExport ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnGoTo

void ui::qt::BookmarksPanel::OnGoTo ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnImport

void ui::qt::BookmarksPanel::OnImport ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnRemove

void ui::qt::BookmarksPanel::OnRemove ( )
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnRemoveCategory

void ui::qt::BookmarksPanel::OnRemoveCategory ( )
privateslot
Here is the caller graph for this function:

◆ OnSearchTextChanged

void ui::qt::BookmarksPanel::OnSearchTextChanged ( const QString &  text)
privateslot
Here is the caller graph for this function:

◆ RebuildCategoryFilter()

void ui::qt::BookmarksPanel::RebuildCategoryFilter ( )
private
Here is the caller graph for this function:

◆ RebuildTable()

void ui::qt::BookmarksPanel::RebuildTable ( )
private
Here is the caller graph for this function:

◆ SelectedTableRow()

int ui::qt::BookmarksPanel::SelectedTableRow ( ) const
private

Returns the selected table row, or -1 if nothing is selected.

Here is the caller graph for this function:

◆ UpdateCategoryCounts()

void ui::qt::BookmarksPanel::UpdateCategoryCounts ( )
private
Here is the caller graph for this function:

Member Data Documentation

◆ m_addBtn

QPushButton* ui::qt::BookmarksPanel::m_addBtn {nullptr}
private

◆ m_addCategoryBtn

QPushButton* ui::qt::BookmarksPanel::m_addCategoryBtn {nullptr}
private

◆ m_bookmarks

std::vector<Bookmark> ui::qt::BookmarksPanel::m_bookmarks
private

◆ m_categories

std::vector<Category> ui::qt::BookmarksPanel::m_categories
private

◆ m_categoryColorMap

std::unordered_map<std::string, int> ui::qt::BookmarksPanel::m_categoryColorMap
private

◆ m_categoryCombo

QComboBox* ui::qt::BookmarksPanel::m_categoryCombo {nullptr}
private

◆ m_categoryFilterCombo

QComboBox* ui::qt::BookmarksPanel::m_categoryFilterCombo {nullptr}
private

◆ m_currentRow

int ui::qt::BookmarksPanel::m_currentRow {-1}
private

Currently selected event in events view.

◆ m_events

db::EventsContainer& ui::qt::BookmarksPanel::m_events
private

◆ m_eventsView

EventsTableView* ui::qt::BookmarksPanel::m_eventsView
private

◆ m_exportBtn

QPushButton* ui::qt::BookmarksPanel::m_exportBtn {nullptr}
private

◆ m_filteredBookmarks

std::vector<Bookmark> ui::qt::BookmarksPanel::m_filteredBookmarks
private

◆ m_goToBtn

QPushButton* ui::qt::BookmarksPanel::m_goToBtn {nullptr}
private

◆ m_importBtn

QPushButton* ui::qt::BookmarksPanel::m_importBtn {nullptr}
private

◆ m_labelEdit

QLineEdit* ui::qt::BookmarksPanel::m_labelEdit {nullptr}
private

◆ m_removeBtn

QPushButton* ui::qt::BookmarksPanel::m_removeBtn {nullptr}
private

◆ m_removeCategoryBtn

QPushButton* ui::qt::BookmarksPanel::m_removeCategoryBtn {nullptr}
private

◆ m_searchEdit

QLineEdit* ui::qt::BookmarksPanel::m_searchEdit {nullptr}
private

◆ m_statusLabel

QLabel* ui::qt::BookmarksPanel::m_statusLabel {nullptr}
private

◆ m_table

QTableWidget* ui::qt::BookmarksPanel::m_table {nullptr}
private

The documentation for this class was generated from the following files: