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

Left-dock panel for defining named actors by regular expression. More...

#include <ActorDefinitionsPanel.hpp>

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

Public Slots

void UpdateActorDirection (const QString &defName, const QString &actorName, bool isSubActor, const QString &target)
 

Signals

void DefinitionsChanged (const std::vector< ActorDefinition > &defs)
 
void RequestApplyFilter ()
 
void RequestClearFilter ()
 Emitted when the user clicks "Clear Filter".
 

Public Member Functions

 ActorDefinitionsPanel (QWidget *parent=nullptr)
 
const std::vector< ActorDefinition > & Definitions () const
 
void SetEventsSource (db::EventsContainer *events)
 

Private Slots

void HandleAdd ()
 
void HandleEdit ()
 
void HandleRemove ()
 
void HandleSave ()
 
void HandleSaveAs ()
 
void HandleLoad ()
 
void HandleDiscover ()
 
void HandleSelectionChanged ()
 
void HandleItemChanged (QTableWidgetItem *item)
 

Private Member Functions

void BuildLayout ()
 
void RebuildTable ()
 
void EmitAndSave ()
 
void SetStatus (const QString &msg, bool isError)
 
bool EditDefinition (ActorDefinition &def, bool isNew)
 Open an add/edit dialog; returns false if user cancelled.
 

Static Private Member Functions

static std::string DefaultFilePath ()
 Default file path in the application config directory.
 

Private Attributes

QTableWidget * m_table {nullptr}
 
QPushButton * m_editBtn {nullptr}
 
QPushButton * m_removeBtn {nullptr}
 
QPushButton * m_applyFilterBtn {nullptr}
 
QPushButton * m_clearFilterBtn {nullptr}
 
QLabel * m_statusLabel {nullptr}
 
std::vector< ActorDefinition > m_definitions
 
std::string m_currentFilePath
 last saved/loaded path
 
bool m_rebuilding {false}
 true while RebuildTable runs
 
db::EventsContainer * m_events {nullptr}
 

Detailed Description

Left-dock panel for defining named actors by regular expression.

Each actor definition specifies:

  • A display name
  • A QRegularExpression pattern
  • An optional log field to match against (empty = search all fields)

Definitions can be saved to / loaded from a JSON file. When the definition list changes the DefinitionsChanged signal is emitted so the Actors panel can refresh its results.

Constructor & Destructor Documentation

◆ ActorDefinitionsPanel()

ui::qt::ActorDefinitionsPanel::ActorDefinitionsPanel ( QWidget *  parent = nullptr)
explicit
Here is the call graph for this function:

Member Function Documentation

◆ BuildLayout()

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

◆ DefaultFilePath()

std::string ui::qt::ActorDefinitionsPanel::DefaultFilePath ( )
staticprivate

Default file path in the application config directory.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Definitions()

const std::vector< ActorDefinition > & ui::qt::ActorDefinitionsPanel::Definitions ( ) const
inline

◆ DefinitionsChanged

void ui::qt::ActorDefinitionsPanel::DefinitionsChanged ( const std::vector< ActorDefinition > &  defs)
signal
Here is the caller graph for this function:

◆ EditDefinition()

bool ui::qt::ActorDefinitionsPanel::EditDefinition ( ActorDefinition &  def,
bool  isNew 
)
private

Open an add/edit dialog; returns false if user cancelled.

Here is the caller graph for this function:

◆ EmitAndSave()

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

◆ HandleAdd

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

◆ HandleDiscover

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

◆ HandleEdit

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

◆ HandleItemChanged

void ui::qt::ActorDefinitionsPanel::HandleItemChanged ( QTableWidgetItem *  item)
privateslot
Here is the call graph for this function:
Here is the caller graph for this function:

◆ HandleLoad

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

◆ HandleRemove

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

◆ HandleSave

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

◆ HandleSaveAs

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

◆ HandleSelectionChanged

void ui::qt::ActorDefinitionsPanel::HandleSelectionChanged ( )
privateslot
Here is the caller graph for this function:

◆ RebuildTable()

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

◆ RequestApplyFilter

void ui::qt::ActorDefinitionsPanel::RequestApplyFilter ( )
signal

Emitted when the user clicks "Apply Filter" — caller should filter events to those matching the current enabled actor definitions.

Here is the caller graph for this function:

◆ RequestClearFilter

void ui::qt::ActorDefinitionsPanel::RequestClearFilter ( )
signal

Emitted when the user clicks "Clear Filter".

Here is the caller graph for this function:

◆ SetEventsSource()

void ui::qt::ActorDefinitionsPanel::SetEventsSource ( db::EventsContainer *  events)
inline
Here is the caller graph for this function:

◆ SetStatus()

void ui::qt::ActorDefinitionsPanel::SetStatus ( const QString &  msg,
bool  isError 
)
private
Here is the caller graph for this function:

◆ UpdateActorDirection

void ui::qt::ActorDefinitionsPanel::UpdateActorDirection ( const QString &  defName,
const QString &  actorName,
bool  isSubActor,
const QString &  target 
)
slot

Called from ActorsPanel when the user sets or clears a directed-to relationship via the context menu in the Actors tree.

Here is the call graph for this function:

Member Data Documentation

◆ m_applyFilterBtn

QPushButton* ui::qt::ActorDefinitionsPanel::m_applyFilterBtn {nullptr}
private

◆ m_clearFilterBtn

QPushButton* ui::qt::ActorDefinitionsPanel::m_clearFilterBtn {nullptr}
private

◆ m_currentFilePath

std::string ui::qt::ActorDefinitionsPanel::m_currentFilePath
private

last saved/loaded path

◆ m_definitions

std::vector<ActorDefinition> ui::qt::ActorDefinitionsPanel::m_definitions
private

◆ m_editBtn

QPushButton* ui::qt::ActorDefinitionsPanel::m_editBtn {nullptr}
private

◆ m_events

db::EventsContainer* ui::qt::ActorDefinitionsPanel::m_events {nullptr}
private

◆ m_rebuilding

bool ui::qt::ActorDefinitionsPanel::m_rebuilding {false}
private

true while RebuildTable runs

◆ m_removeBtn

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

◆ m_statusLabel

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

◆ m_table

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

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