QGIS API Documentation
3.41.0-Master (af5edcb665c)
Loading...
Searching...
No Matches
src
gui
codeeditors
qgscodeeditorhistorydialog.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgscodeeditorhistorydialog.h
3
----------------------
4
begin : October 2022
5
copyright : (C) 2022 by 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 QGSCODEEDITORHISTORYDIALOG_H
17
#define QGSCODEEDITORHISTORYDIALOG_H
18
19
#include "ui_qgscodeditorhistorydialogbase.h"
20
#include <QDialog>
21
#include <QPointer>
22
#include <QStringListModel>
23
#include "qgis_gui.h"
24
#include "
qgis_sip.h
"
25
26
#define SIP_NO_FILE
27
28
class
QgsCodeEditor
;
29
30
32
33
class
CodeHistoryModel :
public
QStringListModel
34
{
35
Q_OBJECT
36
37
public
:
38
CodeHistoryModel( QObject *parent );
39
QVariant data(
const
QModelIndex &index,
int
role = Qt::DisplayRole )
const override
;
40
41
private
:
42
QFont mFont;
43
};
44
46
47
55
class
GUI_EXPORT
QgsCodeEditorHistoryDialog
:
public
QDialog,
private
Ui::QgsCodeEditorHistoryDialogBase
56
{
57
Q_OBJECT
58
59
public
:
65
QgsCodeEditorHistoryDialog
(
QgsCodeEditor
*editor, QWidget *parent
SIP_TRANSFERTHIS
=
nullptr
);
66
67
private
slots:
68
69
void
executeSelectedHistory();
70
void
runCommand(
const
QModelIndex &index );
71
void
saveHistory();
72
void
reloadHistory();
73
void
deleteItem();
74
75
private
:
76
QPointer<QgsCodeEditor> mEditor;
77
CodeHistoryModel *mModel =
nullptr
;
78
};
79
80
#endif
// QGSCODEEDITORHISTORYDIALOG_H
QgsCodeEditorHistoryDialog
A dialog for displaying and managing command history for a QgsCodeEditor widget.
Definition
qgscodeeditorhistorydialog.h:56
QgsCodeEditor
A text editor based on QScintilla2.
Definition
qgscodeeditor.h:98
qgis_sip.h
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition
qgis_sip.h:53
Generated on Thu Dec 26 2024 02:19:01 for QGIS API Documentation by
1.9.8