This repository has been archived by the owner on Feb 5, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathlogtableview.h
128 lines (112 loc) · 3.85 KB
/
logtableview.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
#ifndef LOGTABLEVIEW_H
#define LOGTABLEVIEW_H
#include <QMutex>
#include <QStringList>
#include <QWidget>
#include "codeeditortabwidget.h"
#include "extension.h"
#include "quickwidgetapi.h"
#include "sqlite3helper.h"
class MainWindow;
class LogModel;
struct StatisticItem;
QT_BEGIN_NAMESPACE
class QTableView;
class QSplitter;
class QTimer;
class QQmlEngine;
class QJSEngine;
QT_END_NAMESPACE
class LogTableView : public QWidget
{
Q_OBJECT
public:
LogTableView(QWidget *parent, Sqlite3HelperPtr sqlite3Helper);
LogModel * getModel();
const QString &path() const;
void setPath(const QString &path);
void loadFromFiles(const QStringList &fileNames);
void copyCurrentCell();
void copyCurrentRow();
void copySelectedCells();
void copySelectedRows();
void copyCurrentCellWithXMLFormatted();
void copyCurrentRowWithXMLFormatted();
void copySelectedCellsWithXMLFormatted();
void copySelectedRowsWithXMLFormatted();
void addCurrentRowToBookmark();
void removeCurrentRowFromBookmark();
void addSelectedRowsToBookmark();
void removeSelectedRowsFromBookmark();
void removeAllBookmarks();
void gotoFirstBookmark();
void gotoPreviousBookmark();
void gotoNextBookmark();
void gotoLastBookmark();
void scrollToTop();
void scrollToBottom();
void gotoById(int i);
int rowCount();
void enableRegexpMode(bool enabled);
void inputKeyword();
void searchFieldContent();
void searchFieldID();
void searchFieldDateTime();
void searchFieldThread();
void searchFieldCategory();
void searchFieldSourceFile();
void searchFieldMethod();
void searchFieldLogFile();
void searchFieldLine();
void searchFieldLevel();
void onRunExtension(ExtensionPtr e);
signals:
void dataLoaded();
void databaseCreated(const QString &);
void rowCountChanged();
void runExtension(ExtensionPtr e);
void itemDoubleClicked(const QModelIndex &index);
void gotoLogLine(int line, const QString &filePath);
void extractContent(const QString &text);
void openLog(const QString &filePath);
void openSourceFileWithBuiltinEditor(const QString &filePath, int line);
void openSourceFileInVS(const QString &filePath, int line);
void openSourceFileWithOpenGrok(const QString &filePath, int line);
public slots:
void onClearKeyword();
void onShowLogItemsBetweenSelectedRows();
private slots:
void onSearchKeywordOptions();
void onDoubleClicked(const QModelIndex &index);
void onDataLoaded();
void onRowCountChanged();
void onCustomContextMenuRequested(const QPoint &pos);
void onHHeaderCustomContextMenuRequested(const QPoint &pos);
void onBrowseSourceFileWithOpenGrok();
void onSourceFilePreview();
void onOpenSourceFileInVS();
void onContentPreview();
void onLogFilePreview();
void onCbKeywordEditTextChanged(const QString &);
void onCbKeywordCurrentIndexChanged(const QString &);
void onHHeaderContextMenuActionTriggered();
private:
QuickWidgetAPIPtr m_api;
QTableView * m_logsTableView;
LogModel * m_logModel;
QComboBox * m_cbSearchKeyword;
QQuickWidget * m_extraToolPanel;
QToolButton * m_inputKeywordlLockButton;
QToolButton * m_extraToolPanelVisibleButton;
QTimer * m_keywordChangedTimer;
QString m_path;
int m_lastId;
int m_lastColumn;
QModelIndex m_beginAnchor;
QModelIndex m_endAnchor;
QList<bool> m_hheaderColumnHidden;
void openSourceFile(const QModelIndex &index, std::function<void(const QString &, int)> callback);
void filter(const QString &keyword);
void initialize();
};
#endif // LOGTABLEVIEW_H