Work on plugin mechanism
Context actions have become normal actions in the pluginwidget so the widget knows abot them and can easily do things like enable/disable.
This commit is contained in:
parent
eca8841427
commit
a704332342
24 changed files with 239 additions and 267 deletions
|
|
@ -45,13 +45,15 @@ public:
|
|||
bool canClose() override;
|
||||
|
||||
void generateCode();
|
||||
void exportData(const QString &filename);
|
||||
void exportDataToFilename(const QString &filename);
|
||||
|
||||
QString fileName() const { return m_fileName; }
|
||||
bool isChanged() const { return m_queryTextChanged; }
|
||||
bool isNew() const { return m_new; }
|
||||
void focusEditor();
|
||||
|
||||
QList<QAction *> actions();
|
||||
|
||||
public slots:
|
||||
void execute();
|
||||
/// Save the document under its current name, a file save dialog will be shown if this is a new document
|
||||
|
|
@ -62,10 +64,9 @@ public slots:
|
|||
void saveCopyAs();
|
||||
void copyQueryAsCString();
|
||||
void copyQueryAsRawCppString();
|
||||
void explain();
|
||||
void analyze();
|
||||
void cancel();
|
||||
void exportData();
|
||||
|
||||
private:
|
||||
|
||||
using ResultTabContainer = std::vector<TuplesResultWidget*>;
|
||||
|
|
@ -75,6 +76,16 @@ private:
|
|||
ConnectionConfig m_config;
|
||||
StopWatch m_stopwatch;
|
||||
|
||||
QAction *m_saveSqlAction = nullptr;
|
||||
QAction *m_saveSqlAsAction = nullptr;
|
||||
QAction *m_saveCopyOfSqlAsAction = nullptr;
|
||||
QAction *m_exportDataAction = nullptr;
|
||||
QAction *m_copyQueryAsCStringAction = nullptr;
|
||||
QAction *m_copyQueryAsRawCppStringAction = nullptr;
|
||||
QAction *m_executeAction = nullptr;
|
||||
QAction *m_explainAction = nullptr;
|
||||
QAction *m_analyzeAction = nullptr;
|
||||
|
||||
QueryParamListController *m_queryParamListController = nullptr;
|
||||
|
||||
bool m_new = true;
|
||||
|
|
@ -103,6 +114,7 @@ private:
|
|||
//void setTabCaption(const QString &caption, const QString &tooltip);
|
||||
void clearResult();
|
||||
void markError(const Pgsql::ErrorDetails &details);
|
||||
void initActions();
|
||||
|
||||
private slots:
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue