/
githubmirror
/
x64dbg
Обзор
Документация
Войти
/
githubmirror
/
x64dbg
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
development
src/gui/Src/Gui/LogView.h
76 строк
2 KB
Duncan Ogilvie
Refactor parent = 0 -> parent = nullptr
19 сен 2023, 07:25
19 сен 2023, 07:25
663bfbb
Код
Авторство
О чём код?
#pragma once #include <QTextBrowser> #include <cstdio> #include "LineEditDialog.h" class LogView : public QTextBrowser { Q_OBJECT public: explicit LogView(QWidget* parent = nullptr); ~LogView(); void setupContextMenu(); void contextMenuEvent(QContextMenuEvent* event) override; void showEvent(QShowEvent* event) override; void hideEvent(QHideEvent* event) override; static void handleLink(QWidget* parent, const QUrl & link); static void linkify(QString & msg); public slots: void refreshShortcutsSlot(); void updateStyle(); void addMsgToLogSlot(QByteArray msg); /* Non-HTML Log Function*/ void addMsgToLogHtmlSlot(QByteArray msg); /* HTML accepting Log Function */ void stopRedirectLogSlot(); void redirectLogToFileSlot(QString filename); void redirectLogSlot(); void setLoggingEnabled(bool enabled); void autoScrollSlot(); void findInLogSlot(); void findNextInLogSlot(); void findPreviousInLogSlot(); void copyToGlobalNotes(); void copyToDebuggeeNotes(); void pasteSlot(); bool getLoggingEnabled(); void onAnchorClicked(const QUrl & link); void clearLogSlot(); void saveToFileSlot(QString filename); void saveSlot(); void toggleLoggingSlot(); void flushTimerSlot(); void flushLogSlot(); private: static const int MAX_LOG_BUFFER_SIZE = 1024 * 1024; void addMsgToLogSlotRaw(QByteArray msg, bool htmlEscape); /* Non-HTML Log Function*/ bool loggingEnabled; bool autoScroll; bool utf16Redirect = false; QAction* actionCopy; QAction* actionPaste; QAction* actionSelectAll; QAction* actionClear; QAction* actionSave; QAction* actionToggleLogging; QAction* actionRedirectLog; QAction* actionAutoScroll; QMenu* menuCopyToNotes; QAction* actionCopyToGlobalNotes; QAction* actionCopyToDebuggeeNotes; QAction* actionFindInLog; QAction* actionFindNext; QAction* actionFindPrevious; LineEditDialog* dialogFindInLog; FILE* logRedirection; QString logBuffer; QTimer* flushTimer; bool flushLog; QString lastFindText; };