QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
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#include "qgshistoryentrynode.h"
22#include "qgshistoryprovider.h"
23#include "qgshistorywidget.h"
24
25#define SIP_NO_FILE
26
36{
37 Q_OBJECT
38
39 public:
49
53 void emitSqlTriggered( const QString &connectionUri, const QString &provider, const QString &sql );
54
55 signals:
56
60 void sqlTriggered( const QString &connectionUri, const QString &provider, const QString &sql );
61};
62
63
73{
74 Q_OBJECT
75
76 public:
78
79 QString id() const override;
80
82 void updateNodeForEntry( QgsHistoryEntryNode *node, const QgsHistoryEntry &entry, const QgsHistoryWidgetContext &context ) override;
83};
84
85#endif //QGSDBQUERYHISTORYPROVIDER_H
@ LocalProfile
Local profile.
Definition qgis.h:3504
QFlags< HistoryProviderBackend > HistoryProviderBackends
Definition qgis.h:3508
Abstract base class for objects which track user history (i.e.
void updateNodeForEntry(QgsHistoryEntryNode *node, const QgsHistoryEntry &entry, const QgsHistoryWidgetContext &context) override
Updates an existing history node for the given entry.
QString id() const override
Returns the provider's unique id, which is used to associate existing history entries with the provid...
QgsHistoryEntryNode * createNodeForEntry(const QgsHistoryEntry &entry, const QgsHistoryWidgetContext &context) override
Creates a new history node for the given entry.
QgsDatabaseQueryHistoryWidget(Qgis::HistoryProviderBackends backends=Qgis::HistoryProviderBackend::LocalProfile, QgsHistoryProviderRegistry *registry=nullptr, const QgsHistoryWidgetContext &context=QgsHistoryWidgetContext(), QWidget *parent=nullptr)
Constructor for QgsDatabaseQueryHistoryWidget, with the specified parent widget.
void sqlTriggered(const QString &connectionUri, const QString &provider, const QString &sql)
Emitted when the user has triggered a previously executed SQL statement in the widget.
void emitSqlTriggered(const QString &connectionUri, const QString &provider, const QString &sql)
Causes the widget to emit the sqlTriggered() signal.
Base class for nodes representing a QgsHistoryEntry.
Encapsulates a history entry.
A registry for objects which track user history (i.e.
Contains settings which reflect the context in which a history widget is shown, e....
QgsHistoryWidget(const QString &providerId=QString(), Qgis::HistoryProviderBackends backends=Qgis::HistoryProviderBackend::LocalProfile, QgsHistoryProviderRegistry *registry=nullptr, const QgsHistoryWidgetContext &context=QgsHistoryWidgetContext(), QWidget *parent=nullptr)
Constructor for QgsHistoryWidget, with the specified parent widget.
#define SIP_FACTORY
Definition qgis_sip.h:84