QGIS API Documentation 3.32.0-Lima (311a8cb8a6)
qgsdbqueryhistoryprovider.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsdbqueryhistoryprovider.h
3 --------------------------
4 begin : April 2023
5 copyright : (C) 2023 by Nyall Dawson
6 email : nyall dot dawson at gmail dot com
7 ***************************************************************************/
8/***************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 ***************************************************************************/
16#ifndef QGSDBQUERYHISTORYPROVIDER_H
17#define QGSDBQUERYHISTORYPROVIDER_H
18
19#include "qgis_gui.h"
20#include "qgis_sip.h"
21
22#include "qgshistoryprovider.h"
23#include "qgshistoryentrynode.h"
24
25#define SIP_NO_FILE
26
36{
37 Q_OBJECT
38
39 public:
40
42
43 QString id() const override;
44
46 void updateNodeForEntry( QgsHistoryEntryNode *node, const QgsHistoryEntry &entry, const QgsHistoryWidgetContext &context ) override;
47
51 void emitOpenSqlDialog( const QString &connectionUri, const QString &provider, const QString &sql );
52
53 signals:
54
58 void openSqlDialog( const QString &connectionUri, const QString &provider, const QString &sql );
59
60};
61
62#endif //QGSDBQUERYHISTORYPROVIDER_H
63
64
65
Abstract base class for objects which track user history (i.e.
virtual QString id() const =0
Returns the provider's unique id, which is used to associate existing history entries with the provid...
virtual void updateNodeForEntry(QgsHistoryEntryNode *node, const QgsHistoryEntry &entry, const QgsHistoryWidgetContext &context)
Updates an existing history node for the given entry.
virtual QgsHistoryEntryNode * createNodeForEntry(const QgsHistoryEntry &entry, const QgsHistoryWidgetContext &context)
Creates a new history node for the given entry.
History provider for operations database queries.
void openSqlDialog(const QString &connectionUri, const QString &provider, const QString &sql)
Emitted when the provider wants to trigger a SQL execution dialog.
Base class for nodes representing a QgsHistoryEntry.
Encapsulates a history entry.
Contains settings which reflect the context in which a history widget is shown, e....
#define SIP_FACTORY
Definition: qgis_sip.h:76