QGIS API Documentation
3.99.0-Master (2fe06baccd8)
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
21
#include "qgis_gui.h"
22
#include "
qgis_sip.h
"
23
24
#include <QDialog>
25
#include <QPointer>
26
#include <QStringListModel>
27
28
#define SIP_NO_FILE
29
30
class
QgsCodeEditor
;
31
32
34
35
class
CodeHistoryModel :
public
QStringListModel
36
{
37
Q_OBJECT
38
39
public
:
40
CodeHistoryModel( QObject *parent );
41
QVariant data(
const
QModelIndex &index,
int
role = Qt::DisplayRole )
const override
;
42
43
private
:
44
QFont mFont;
45
};
46
48
49
57
class
GUI_EXPORT
QgsCodeEditorHistoryDialog
:
public
QDialog,
private
Ui::QgsCodeEditorHistoryDialogBase
58
{
59
Q_OBJECT
60
61
public
:
67
QgsCodeEditorHistoryDialog
(
QgsCodeEditor
*editor, QWidget *parent
SIP_TRANSFERTHIS
=
nullptr
);
68
69
private
slots:
70
71
void
executeSelectedHistory();
72
void
runCommand(
const
QModelIndex &index );
73
void
saveHistory();
74
void
reloadHistory();
75
void
deleteItem();
76
77
private
:
78
QPointer<QgsCodeEditor> mEditor;
79
CodeHistoryModel *mModel =
nullptr
;
80
};
81
82
#endif
// QGSCODEEDITORHISTORYDIALOG_H
QgsCodeEditorHistoryDialog::QgsCodeEditorHistoryDialog
QgsCodeEditorHistoryDialog(QgsCodeEditor *editor, QWidget *parent=nullptr)
Constructor for QgsCodeEditorHistoryDialog.
Definition
qgscodeeditorhistorydialog.cpp:25
QgsCodeEditor
A text editor based on QScintilla2.
Definition
qgscodeeditor.h:99
qgis_sip.h
SIP_TRANSFERTHIS
#define SIP_TRANSFERTHIS
Definition
qgis_sip.h:53
Generated on
for QGIS API Documentation by
1.15.0