Changeset View
Changeset View
Standalone View
Standalone View
src/TerminalDisplay.h
Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Line(s) | |||||
48 | class QTimerEvent; | 48 | class QTimerEvent; | ||
49 | 49 | | |||
50 | class KMessageWidget; | 50 | class KMessageWidget; | ||
51 | 51 | | |||
52 | namespace Konsole { | 52 | namespace Konsole { | ||
53 | class FilterChain; | 53 | class FilterChain; | ||
54 | class TerminalImageFilterChain; | 54 | class TerminalImageFilterChain; | ||
55 | class SessionController; | 55 | class SessionController; | ||
56 | class IncrementalSearchBar; | ||||
57 | | ||||
rizzitello: New Empty line | |||||
56 | /** | 58 | /** | ||
57 | * A widget which displays output from a terminal emulation and sends input keypresses and mouse activity | 59 | * A widget which displays output from a terminal emulation and sends input keypresses and mouse activity | ||
58 | * to the terminal. | 60 | * to the terminal. | ||
59 | * | 61 | * | ||
60 | * When the terminal emulation receives new output from the program running in the terminal, | 62 | * When the terminal emulation receives new output from the program running in the terminal, | ||
61 | * it will update the display by calling updateImage(). | 63 | * it will update the display by calling updateImage(). | ||
62 | * | 64 | * | ||
63 | * TODO More documentation | 65 | * TODO More documentation | ||
64 | */ | 66 | */ | ||
65 | class KONSOLEPRIVATE_EXPORT TerminalDisplay : public QWidget | 67 | class KONSOLEPRIVATE_EXPORT TerminalDisplay : public QWidget | ||
66 | { | 68 | { | ||
67 | Q_OBJECT | 69 | Q_OBJECT | ||
68 | 70 | | |||
69 | public: | 71 | public: | ||
70 | /** Constructs a new terminal display widget with the specified parent. */ | 72 | /** Constructs a new terminal display widget with the specified parent. */ | ||
71 | explicit TerminalDisplay(QWidget *parent = nullptr); | 73 | explicit TerminalDisplay(QWidget *parent = nullptr); | ||
72 | ~TerminalDisplay() Q_DECL_OVERRIDE; | 74 | ~TerminalDisplay() Q_DECL_OVERRIDE; | ||
73 | 75 | | |||
74 | /** Returns the terminal color palette used by the display. */ | 76 | /** Returns the terminal color palette used by the display. */ | ||
75 | const ColorEntry *colorTable() const; | 77 | const ColorEntry *colorTable() const; | ||
76 | /** Sets the terminal color palette used by the display. */ | 78 | /** Sets the terminal color palette used by the display. */ | ||
77 | void setColorTable(const ColorEntry table[]); | 79 | void setColorTable(const ColorEntry table[]); | ||
80 | | ||||
rizzitello: Missing Documentation for new function. | |||||
81 | QScrollBar *scrollBar() const; | ||||
78 | /** | 82 | /** | ||
79 | * Sets the seed used to generate random colors for the display | 83 | * Sets the seed used to generate random colors for the display | ||
80 | * (in color schemes that support them). | 84 | * (in color schemes that support them). | ||
81 | */ | 85 | */ | ||
82 | void setRandomSeed(uint randomSeed); | 86 | void setRandomSeed(uint randomSeed); | ||
83 | /** | 87 | /** | ||
84 | * Returns the seed used to generate random colors for the display | 88 | * Returns the seed used to generate random colors for the display | ||
85 | * (in color schemes that support them). | 89 | * (in color schemes that support them). | ||
▲ Show 20 Lines • Show All 987 Lines • ▼ Show 20 Line(s) | |||||
1073 | private: | 1077 | private: | ||
1074 | QWidget *widget() const | 1078 | QWidget *widget() const | ||
1075 | { | 1079 | { | ||
1076 | return static_cast<QWidget *>(parent()); | 1080 | return static_cast<QWidget *>(parent()); | ||
1077 | } | 1081 | } | ||
1078 | 1082 | | |||
1079 | int _timerId; | 1083 | int _timerId; | ||
1080 | }; | 1084 | }; | ||
1085 | | ||||
rizzitello: Document | |||||
1086 | class TerminalWidget : public QWidget { | ||||
1087 | Q_OBJECT | ||||
1088 | public: | ||||
1089 | TerminalWidget(int sessionId, QWidget *parent = nullptr); | ||||
1090 | TerminalDisplay *terminalDisplay() const; | ||||
1091 | IncrementalSearchBar *searchBar() const; | ||||
1092 | | ||||
1093 | protected: | ||||
1094 | void repositionSearchBar(QSize windowSize); | ||||
1095 | void resizeEvent(QResizeEvent *event) override; | ||||
1096 | void focusInEvent(QFocusEvent *event) override; | ||||
1097 | private: | ||||
1098 | TerminalDisplay *_terminalDisplay; | ||||
1099 | IncrementalSearchBar *_searchBar; | ||||
1100 | }; | ||||
1101 | | ||||
1081 | } | 1102 | } | ||
1082 | 1103 | | |||
1083 | #endif // TERMINALDISPLAY_H | 1104 | #endif // TERMINALDISPLAY_H |
New Empty line