-
Notifications
You must be signed in to change notification settings - Fork 351
/
Copy pathstructuretreeview.h
82 lines (64 loc) · 2.3 KB
/
structuretreeview.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
#ifndef STRUCTURETREEVIEW_H
#define STRUCTURETREEVIEW_H
#include "mostQtHeaders.h"
struct StructureEntry;
class Editors;
class LatexDocuments;
class LatexDocument;
class ConfigManager;
class StructureTreeView : public QTreeView
{
Q_OBJECT
public:
// TODO: We've still got dependencies to Editors, LatexDocuments, ConfigManager
// from the refactoring. Can we get rid of them?
explicit StructureTreeView(Editors *edts, const LatexDocuments &docs, const ConfigManager &config, QWidget *parent = Q_NULLPTR);
signals:
// all these request signals are used to delegate the actual action
void requestCloseDocument(LatexDocument *document);
void requestToggleMasterDocument(LatexDocument *document);
void requestOpenAllRelatedDocuments(LatexDocument *document);
void requestCloseAllRelatedDocuments(LatexDocument *document);
void requestGotoLine(LatexDocument *document, int line, int col);
void requestOpenExternalFile(const QString &filename);
void insertText(const QString &text);
void findLabelUsages(LatexDocument *doc, const QString &labelText);
void createLabelForStructureEntry(const StructureEntry *entry);
protected slots:
void showContextMenu(const QPoint &point);
void expandSubitems();
void collapseSubitems();
void expandAllDocuments();
void collapseAllDocuments();
void closeDocument();
void toggleMasterDocument();
void openAllRelatedDocuments();
void closeAllRelatedDocuments();
void gotoLineFromAction();
void openExternalFileFromAction();
void moveDocumentToFront();
void moveDocumentToEnd();
void toggleSingleDocMode();
void showInGraphicalShell_();
void insertTextFromAction();
void findLabelUsagesFromAction();
void createLabelFromAction();
// TODO: most logic of the following edit operations should probably be moved to LatexDocument or LatexEditorView
void editSectionCopy();
void editSectionCut();
void editSectionPasteAfter();
void editSectionPasteBefore();
void editIndentSection();
void editUnIndentSection();
void copyFileName();
void copyFilePath();
protected:
LatexDocument *contextEntryToDoc();
private:
StructureEntry *contextEntry;
QModelIndex contextIndex;
Editors *editors;
const LatexDocuments &documents;
const ConfigManager &configManager;
};
#endif // STRUCTURETREEVIEW_H