QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
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
35
class
GUI_EXPORT
QgsDatabaseQueryHistoryWidget
:
public
QgsHistoryWidget
36
{
37
Q_OBJECT
38
39
public
:
48
QgsDatabaseQueryHistoryWidget
(
49
Qgis::HistoryProviderBackends
backends =
Qgis::HistoryProviderBackend::LocalProfile
,
50
QgsHistoryProviderRegistry
*registry =
nullptr
,
51
const
QgsHistoryWidgetContext
&context =
QgsHistoryWidgetContext
(),
52
QWidget *parent =
nullptr
53
);
54
58
void
emitSqlTriggered
(
const
QString &connectionUri,
const
QString &provider,
const
QString &sql );
59
60
signals:
61
65
void
sqlTriggered
(
const
QString &connectionUri,
const
QString &provider,
const
QString &sql );
66
};
67
68
77
class
GUI_EXPORT
QgsDatabaseQueryHistoryProvider
:
public
QgsAbstractHistoryProvider
78
{
79
Q_OBJECT
80
81
public
:
82
QgsDatabaseQueryHistoryProvider
();
83
84
QString
id
()
const override
;
85
86
QgsHistoryEntryNode
*
createNodeForEntry
(
const
QgsHistoryEntry
&entry,
const
QgsHistoryWidgetContext
&context )
override
SIP_FACTORY
;
87
void
updateNodeForEntry
(
QgsHistoryEntryNode
*node,
const
QgsHistoryEntry
&entry,
const
QgsHistoryWidgetContext
&context )
override
;
88
};
89
90
#endif
//QGSDBQUERYHISTORYPROVIDER_H
Qgis::HistoryProviderBackend::LocalProfile
@ LocalProfile
Local profile.
Definition
qgis.h:3742
Qgis::HistoryProviderBackends
QFlags< HistoryProviderBackend > HistoryProviderBackends
Definition
qgis.h:3746
QgsAbstractHistoryProvider
Abstract base class for objects which track user history (i.e.
Definition
qgshistoryprovider.h:38
QgsDatabaseQueryHistoryProvider::updateNodeForEntry
void updateNodeForEntry(QgsHistoryEntryNode *node, const QgsHistoryEntry &entry, const QgsHistoryWidgetContext &context) override
Updates an existing history node for the given entry.
Definition
qgsdbqueryhistoryprovider.cpp:209
QgsDatabaseQueryHistoryProvider::QgsDatabaseQueryHistoryProvider
QgsDatabaseQueryHistoryProvider()
Definition
qgsdbqueryhistoryprovider.cpp:196
QgsDatabaseQueryHistoryProvider::id
QString id() const override
Returns the provider's unique id, which is used to associate existing history entries with the provid...
Definition
qgsdbqueryhistoryprovider.cpp:199
QgsDatabaseQueryHistoryProvider::createNodeForEntry
QgsHistoryEntryNode * createNodeForEntry(const QgsHistoryEntry &entry, const QgsHistoryWidgetContext &context) override
Creates a new history node for the given entry.
Definition
qgsdbqueryhistoryprovider.cpp:204
QgsDatabaseQueryHistoryWidget::QgsDatabaseQueryHistoryWidget
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.
Definition
qgsdbqueryhistoryprovider.cpp:221
QgsDatabaseQueryHistoryWidget::sqlTriggered
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.
QgsDatabaseQueryHistoryWidget::emitSqlTriggered
void emitSqlTriggered(const QString &connectionUri, const QString &provider, const QString &sql)
Causes the widget to emit the sqlTriggered() signal.
Definition
qgsdbqueryhistoryprovider.cpp:225
QgsHistoryEntryNode
Base class for nodes representing a QgsHistoryEntry.
Definition
qgshistoryentrynode.h:42
QgsHistoryEntry
Encapsulates a history entry.
Definition
qgshistoryentry.h:37
QgsHistoryProviderRegistry
A registry for objects which track user history (i.e.
Definition
qgshistoryproviderregistry.h:44
QgsHistoryWidgetContext
Contains settings which reflect the context in which a history widget is shown, e....
Definition
qgshistorywidgetcontext.h:33
QgsHistoryWidget::QgsHistoryWidget
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.
Definition
qgshistorywidget.cpp:35
qgis_sip.h
SIP_FACTORY
#define SIP_FACTORY
Definition
qgis_sip.h:83
qgshistoryentrynode.h
qgshistoryprovider.h
qgshistorywidget.h
Generated on
for QGIS API Documentation by
1.17.0