QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
gui
history
qgshistorywidget.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgshistorywidget.h
3
------------------
4
Date : April 2023
5
Copyright : (C) 2023 Nyall Dawson
6
Email : nyall dot dawson at gmail dot com
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
16
#ifndef QGSHISTORYWIDGET_H
17
#define QGSHISTORYWIDGET_H
18
19
#include "ui_qgshistorywidgetbase.h"
20
21
#include "
qgis.h
"
22
#include "qgis_gui.h"
23
#include "
qgshistorywidgetcontext.h
"
24
#include "
qgspanelwidget.h
"
25
26
#include <QSortFilterProxyModel>
27
28
class
QgsHistoryProviderRegistry
;
29
class
QgsHistoryEntryModel
;
30
class
QgsMessageBar
;
31
32
#ifndef SIP_RUN
33
35
class
GUI_EXPORT QgsHistoryEntryProxyModel :
public
QSortFilterProxyModel
36
{
37
Q_OBJECT
38
public
:
39
QgsHistoryEntryProxyModel( QObject *parent =
nullptr
);
40
41
void
setFilter(
const
QString &filter );
42
bool
filterAcceptsRow(
int
source_row,
const
QModelIndex &source_parent )
const override
;
43
44
private
:
45
QString mFilter;
46
};
48
#endif
49
55
class
GUI_EXPORT
QgsHistoryWidget
:
public
QgsPanelWidget
,
private
Ui::QgsHistoryWidgetBase
56
{
57
Q_OBJECT
58
59
public
:
70
QgsHistoryWidget
(
71
const
QString &providerId = QString(),
72
Qgis::HistoryProviderBackends
backends =
Qgis::HistoryProviderBackend::LocalProfile
,
73
QgsHistoryProviderRegistry
*registry =
nullptr
,
74
const
QgsHistoryWidgetContext
&context =
QgsHistoryWidgetContext
(),
75
QWidget *parent =
nullptr
76
);
77
78
private
slots:
79
80
void
currentItemChanged(
const
QModelIndex &selected,
const
QModelIndex &previous );
81
void
nodeDoubleClicked(
const
QModelIndex &index );
82
void
showNodeContextMenu(
const
QPoint &pos );
83
void
urlClicked(
const
QUrl &url );
84
85
private
:
86
QgsHistoryEntryModel
*mModel =
nullptr
;
87
QgsHistoryEntryProxyModel *mProxyModel =
nullptr
;
88
QgsHistoryWidgetContext
mContext;
89
};
90
91
#endif
// QGSHISTORYWIDGET_H
Qgis::HistoryProviderBackend::LocalProfile
@ LocalProfile
Local profile.
Definition
qgis.h:3742
Qgis::HistoryProviderBackends
QFlags< HistoryProviderBackend > HistoryProviderBackends
Definition
qgis.h:3746
QgsHistoryEntryModel
An item model representing history entries in a hierarchical tree structure.
Definition
qgshistoryentrymodel.h:44
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
QgsMessageBar
A bar for displaying non-blocking messages to the user.
Definition
qgsmessagebar.h:61
QgsPanelWidget::QgsPanelWidget
QgsPanelWidget(QWidget *parent=nullptr)
Base class for any widget that can be shown as an inline panel.
Definition
qgspanelwidget.cpp:30
qgis.h
qgshistorywidgetcontext.h
qgspanelwidget.h
Generated on
for QGIS API Documentation by
1.17.0