代码拉取完成,页面将自动刷新
#ifndef JSEDITOR_H
#define JSEDITOR_H
#include <QWidget>
#include <QFileSystemWatcher>
#include <client/dbclient.h>
#include "ui_ScriptEditor.h"
//#include "sqlparser/tosqlparse.h"
using namespace mongo;
class QTextDocument;
class QLabel;
class QProgressDialog;
class JsEditor : public QMainWindow
{
Q_OBJECT
protected:
DBClientConnection* clientConnection;
public:
JsEditor(QWidget * parent = 0);
~JsEditor(){}
void saveOnExit();
void setFileName(const QString & fname);
QString fileName() { return m_fileName; }
void setStatusMessage(const QString & message = 0);
void setConnection(DBClientConnection* connect);
signals:
void showJsResult(QString command);
void jsScriptStart();
void showJsScriptResult(QString line);
void buildTree();
void rebuildViewTree(QString schema, QString name);
private:
Ui::ScriptEditor ui;
QString m_fileName;
QFileSystemWatcher * m_fileWatcher;
QLabel * changedLabel;
QLabel * cursorLabel;
QString cursorTemplate;
bool canceled;
bool m_scriptCancelled;
QProgressDialog * progress;
bool setProgress(int p);
void showEvent(QShowEvent * event);
bool changedConfirm();
void saveFile();
void open(const QString & newFile);
QString query();
void find(QString ttf, bool forward/*, bool backward*/);
void setFileWatcher(const QString & newFileName);
private slots:
void action_Run_Js_triggered();
void actionRun_Explain_triggered();
void actionRun_as_Script_triggered();
void action_Open_triggered();
void action_Save_triggered();
void action_New_triggered();
void actionSave_As_triggered();
void actionCreateView_triggered();
void jsTextEdit_cursorPositionChanged(int,int);
void documentChanged(bool state);
void cancel();
// searching
void actionSearch_triggered();
void searchEdit_textChanged(const QString & text);
void findPrevious();
void findNext();
void externalFileChange(const QString & path);
//
void scriptCancelled();
};
#endif
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。