mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-29 18:06:37 +00:00
Add a project explorer to the python scripting window
* This displays the current UI extension files, some built-in examples, and recently opened loose files
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QDir>
|
||||
#include <QFrame>
|
||||
#include "Code/Interface/QRDInterface.h"
|
||||
#include "scintilla/include/qt/ScintillaEdit.h"
|
||||
@@ -34,6 +35,8 @@ class RDToolTip;
|
||||
class QTimer;
|
||||
class QCompleter;
|
||||
class QStringListModel;
|
||||
class QFileSystemWatcher;
|
||||
class RDTreeWidgetItem;
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
@@ -107,6 +110,8 @@ private slots:
|
||||
void on_abortRun_clicked();
|
||||
void on_outputContext_currentIndexChanged(int idx);
|
||||
|
||||
void on_projectExplorer_itemActivated(RDTreeWidgetItem *item, int column);
|
||||
|
||||
bool checkAllowClose();
|
||||
|
||||
// manual slots
|
||||
@@ -121,6 +126,10 @@ private slots:
|
||||
void editorTab_Changed(int index);
|
||||
void doSyntaxCheck();
|
||||
|
||||
void openFileModified(const QString &path);
|
||||
void updateExtensionProjects();
|
||||
void editorTab_Menu(const QPoint &pos);
|
||||
|
||||
private:
|
||||
Ui::PythonShell *ui;
|
||||
ICaptureContext &m_Ctx;
|
||||
@@ -134,6 +143,10 @@ private:
|
||||
bool m_ContextMenuVisible = false;
|
||||
bool m_HelpPrinting = false;
|
||||
|
||||
RDTreeWidgetItem *m_UIExtensions, *m_Examples, *m_RecentFiles;
|
||||
|
||||
QFileSystemWatcher *m_Watcher = NULL;
|
||||
|
||||
QTimer *m_SyntaxCheckTimer;
|
||||
|
||||
QCompleter *m_InteractiveCompleter;
|
||||
@@ -161,10 +174,17 @@ private:
|
||||
|
||||
QList<ScintillaEdit *> m_Scintillas;
|
||||
|
||||
void setupTabs();
|
||||
|
||||
ScintillaEdit *curEditor();
|
||||
ScintillaEdit *makeEditor();
|
||||
ScintillaEdit *makeEditor(rdcstr filename);
|
||||
void updateEditorCloseButton();
|
||||
|
||||
void addRecentFile(rdcstr filename);
|
||||
void updateRecentFiles(bool added);
|
||||
|
||||
void addExtensionDirItems(RDTreeWidgetItem *root, QDir dir);
|
||||
|
||||
bool eventFilter(QObject *watched, QEvent *event) override;
|
||||
|
||||
void updateScriptOutput(bool fullRefresh);
|
||||
|
||||
Reference in New Issue
Block a user