swift
src
gui
lineedithistory.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright (C) 2017 swift Project Community / Contributors
2
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3
5
6
#ifndef SWIFT_GUI_LINEEDITHISTORY_H
7
#define SWIFT_GUI_LINEEDITHISTORY_H
8
9
#include <QLineEdit>
10
#include <QStringList>
11
12
#include "
gui/swiftguiexport.h
"
13
14
namespace
swift::gui
15
{
20
class
SWIFT_GUI_EXPORT
CLineEditHistory
:
public
QLineEdit
21
{
22
Q_OBJECT
23
24
public
:
26
using
QLineEdit::QLineEdit;
27
29
QString getLastEnteredLine()
const
;
30
32
QString getLastEnteredLineFormatted()
const
;
33
35
void
clearHistory();
36
37
signals:
40
void
returnPressedUnemptyLine
();
41
42
protected
:
44
virtual
void
keyPressEvent(QKeyEvent *event)
override
;
45
47
virtual
void
contextMenuEvent(QContextMenuEvent *event)
override
;
48
49
private
:
50
QStringList m_history;
51
int
m_position = 0;
52
};
53
}
// namespace swift::gui
54
55
#endif
// SWIFT_GUI_LINEEDITHISTORY_H
swift::gui::CLineEditHistory
Line edit with history.
Definition:
lineedithistory.h:21
swift::gui::CLineEditHistory::returnPressedUnemptyLine
void returnPressedUnemptyLine()
Return has been pressed, line is NOT empty (spaces are trimmed)
swift::gui
GUI related classes.
Definition:
altitudeedit.cpp:13
swiftguiexport.h
SWIFT_GUI_EXPORT
#define SWIFT_GUI_EXPORT
Export a class or function from the library.
Definition:
swiftguiexport.h:19
Generated on Mon Mar 24 2025 16:42:20 for swift by
1.9.1