16#include <QFileSystemModel>
20#include <QPropertyAnimation>
21#include <QGraphicsOpacityEffect>
30 explicit MainWindow(QWidget* parent =
nullptr);
37 void addToolButton(
const QString& text,
const QString& toolTip,
const QIcon& icon,
38 const char* slot, QObject* receiver);
40 void addWidget(QWidget* widget, Qt::Alignment alignment = Qt::Alignment());
57 bool eventFilter(QObject* obj, QEvent* event)
override;
Represents the results of an audit for a specific file.
Definition audit_result.hpp:6
Definition cli_options_panel.hpp:11
Definition syntax_highlighter.hpp:19
A custom QTreeView for displaying and managing files.
Definition file_tree_view.hpp:10
Definition main_window.hpp:26
void addWidget(QWidget *widget, Qt::Alignment alignment=Qt::Alignment())
Adds a widget to the main layout.
Definition main_window.cpp:499
bool autosaveEnabled
Definition main_window.hpp:82
QAction * saveAction
Definition main_window.hpp:79
void setupStatusBar()
Sets up the status bar.
Definition main_window.cpp:166
void setupMenuBar()
Sets up the menu bar and its actions.
Definition main_window.cpp:113
void addToolButton(const QString &text, const QString &toolTip, const QIcon &icon, const char *slot, QObject *receiver)
Adds a tool button to the toolbar.
Definition main_window.cpp:479
QTimer * blinkTimer
Definition main_window.hpp:95
void showSecurityNotification(const AuditResult &result)
Shows a prominent security notification for the given result.
Definition main_window.cpp:957
QSplitter * mainSplitter
Definition main_window.hpp:69
CliOptionsPanel * cliPanel
Definition main_window.hpp:76
void hideSecurityNotification()
Hides the security notification with fade-out animation.
Definition main_window.cpp:1030
void createSecurityNotificationWidget()
Creates and sets up the security notification widget.
Definition main_window.cpp:869
QString currentFilePath
Definition main_window.hpp:83
void clearSecurityHighlights()
Clears all security issue highlights from the text editor.
Definition main_window.cpp:848
QVBoxLayout * mainLayout
Definition main_window.hpp:72
void saveCurrentFile()
Saves the current file being edited.
Definition main_window.cpp:514
QList< QTextEdit::ExtraSelection > currentHighlights
Definition main_window.hpp:94
QGraphicsOpacityEffect * notificationOpacity
Definition main_window.hpp:93
QLabel * securityNotificationText
Definition main_window.hpp:90
QFileSystemModel * fileSystemModel
Definition main_window.hpp:75
void animateHighlight(const QTextCursor &cursor, const QString &severity)
Creates an animated highlight effect for the specified cursor position.
Definition main_window.cpp:1053
QLabel * securityNotificationIcon
Definition main_window.hpp:89
QTextEdit * textEditor
Definition main_window.hpp:74
void addToolSeparator()
Adds a separator to the toolbar.
Definition main_window.cpp:490
void findNext()
Opens a search dialog and highlights all occurrences of the search term.
Definition main_window.cpp:576
CppHighlighter * syntaxHighlighter
Definition main_window.hpp:85
QList< UIComponent * > uiComponents
Definition main_window.hpp:84
void setupUi()
Sets up the UI for the main window.
Definition main_window.cpp:104
void setProjectRoot(const QString &path)
Sets the root path for the project.
Definition main_window.cpp:507
bool blinkState
Definition main_window.hpp:96
FileTreeView * getFileTreeView() const
Definition main_window.hpp:42
OutputDisplay * outputDisplay
Definition main_window.hpp:77
QTimer * notificationTimer
Definition main_window.hpp:91
void setupCentralWidget()
Sets up the central widget and its layout.
Definition main_window.cpp:174
QWidget * centralWidget
Definition main_window.hpp:71
QAction * importAction
Definition main_window.hpp:80
QPropertyAnimation * notificationAnimation
Definition main_window.hpp:92
void toggleCliPanel()
Toggles the visibility of the CLI panel.
Definition main_window.cpp:408
void setupToolBar()
Sets up the toolbar and its actions.
Definition main_window.cpp:149
void show()
Displays the main window.
Definition main_window.cpp:431
QFrame * securityNotificationFrame
Definition main_window.hpp:88
~MainWindow()
Destructor for MainWindow.
Definition main_window.cpp:88
bool eventFilter(QObject *obj, QEvent *event) override
Event filter to handle keyboard shortcuts and focus events.
Definition main_window.cpp:376
QToolBar * mainToolBar
Definition main_window.hpp:70
QAction * toggleCliPanelAction
Definition main_window.hpp:78
QAction * autosaveAction
Definition main_window.hpp:81
void highlightSecurityIssue(const AuditResult &result)
Highlights a security issue in the text editor with enhanced visual effects.
Definition main_window.cpp:640
void importFile()
Opens a folder and sets it as the project root.
Definition main_window.cpp:539
void toggleAutosave()
Toggles the autosave feature.
Definition main_window.cpp:557
QTextEdit * getTextEditor() const
Definition main_window.hpp:43
void updateAuditResults(const QList< AuditResult > &results)
Updates the audit results in the UI.
Definition main_window.cpp:439
FileTreeView * fileTree
Definition main_window.hpp:73
Definition output_display.hpp:8