11#ifndef DISPLAYSCREEN_H
12#define DISPLAYSCREEN_H
14#include <QGraphicsView>
15#include <QGraphicsSceneMouseEvent>
25#include "Models/Colours.h"
26#include "Display/ClickableSvgItem.h"
27#include "Display/LockIndicator.h"
42 QRectF boundingRect()
const override;
44 void paint(QPainter *p,
const QStyleOptionGraphicsItem *, QWidget *)
override;
49 qreal gridWidth()
const;
50 qreal gridHeight()
const;
52 void setSize(
const int x,
const int y);
54 void setChar(
int pos, uchar c,
bool fromKB);
69 void setField(
int pos,
unsigned char c,
bool sfe);
77 bool insertChar(
unsigned char c,
bool insertMode);
91 void setFont(
const QFont &font);
111 void bufferReady(QByteArray &buffer);
112 void cursorMoved(
int x,
int y);
125 void tab(
int offset);
137 const unsigned char twelveBitBufferAddress[64] = {
138 0x40, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7,
139 0xC8, 0xC9, 0x4A, 0x4B, 0x4C, 0x4D, 0x4E, 0x4F,
140 0x50, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7,
141 0xD8, 0xD9, 0x5A, 0x5B, 0x5C, 0x5D, 0x5E, 0x5F,
142 0x60, 0x61, 0xE2, 0xE3, 0xE4, 0xE5, 0xE6, 0xE7,
143 0xE8, 0xE9, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, 0x6F,
144 0xF0, 0xF1, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7,
145 0xF8, 0xF9, 0x7A, 0x7B, 0x7C, 0x7D, 0x7E, 0x7F,
166 Q3270::RulerStyle ruler;
176 Q3270::Highlight highlight;
177 bool highlight_default;
180 Q3270::Colour colNum;
185 QGraphicsRectItem cursor;
186 QGraphicsLineItem crosshair_X;
187 QGraphicsLineItem crosshair_Y;
193 QGraphicsRectItem *myRb;
197 Q3270::FontTweak fontTweak;
205 int findField(
int pos);
206 int findNextField(
int pos);
207 void applyCharAttributes(
int pos,
Cell *field);
208 void updateFontMetrics();
The CodePage class.
Definition CodePage.h:27
Definition DisplayScreen.h:30
void resetExtendedHilite(int pos)
DisplayScreen::resetExtendedHilite - reset the extended highlighting.
Definition DisplayScreen.cpp:573
void cursorBlink()
DisplayScreen::cursorBlink - blink the cursor.
Definition DisplayScreen.cpp:966
void tab(int offset)
DisplayScreen::tab - tab to the next field.
Definition DisplayScreen_Cursor.cpp:114
void resetCharAttr()
DisplayScreen::resetCharAttr - set character attributes to default.
Definition DisplayScreen.cpp:446
void moveCursor(int x, int y)
DisplayScreen::moveCursor - move the cursor.
Definition DisplayScreen_Cursor.cpp:66
int findNextUnprotectedField(int pos)
DisplayScreen::findNextUnprotectedField - find the next unprotected field.
Definition DisplayScreen.cpp:1047
void mouseReleaseEvent(QGraphicsSceneMouseEvent *mEvent) override
DisplayScreen::mouseReleaseEvent - process a mouse release event.
Definition DisplayScreen_Mouse.cpp:103
void blink()
DisplayScreen::blink - blink the display.
Definition DisplayScreen.cpp:952
void setFont(const QFont &font)
DisplayScreen::setFont - change the font on the screen.
Definition DisplayScreen.cpp:161
void dumpDisplay()
DisplayScreen::dumpDisplay - print out a debug replication of the screen.
Definition DisplayScreen.cpp:1243
void resetColours()
DisplayScreen::resetColours - set the colours of each cell.
Definition DisplayScreen.cpp:225
bool insertChar(unsigned char c, bool insertMode)
DisplayScreen::insertChar - Inserts or overwrites the character at the specified position.
Definition DisplayScreen.cpp:663
void setFontTweak(const Q3270::FontTweak f)
DisplayScreen::setFontTweak - change the way zero is displayed.
Definition DisplayScreen.cpp:173
void backspace()
DisplayScreen::backspace - backspace one character.
Definition DisplayScreen_Cursor.cpp:194
int width() const
DisplayScreen::width - return the width of the screen.
Definition DisplayScreen.cpp:118
void cascadeAttrs(int startpos)
DisplayScreen::cascadeAttrs - cascade a field attribute to the cells in the field.
Definition DisplayScreen.cpp:533
void resetMDTs()
DisplayScreen::resetMDTs - reset all the MDTs on the screen.
Definition DisplayScreen.cpp:637
void mouseMoveEvent(QGraphicsSceneMouseEvent *mEvent) override
DisplayScreen::mouseMoveEvent - process a mouse move event.
Definition DisplayScreen_Mouse.cpp:51
void dumpInfo()
DisplayScreen::dumpInfo - display information about the Cell at pos.
Definition DisplayScreen.cpp:1273
void setField(int pos, unsigned char c, bool sfe)
DisplayScreen::setField - Start Field or Start Field Extended.
Definition DisplayScreen.cpp:490
void setExtendedReverse(int pos)
DisplayScreen::setExtendedReverse - switch reverse on.
Definition DisplayScreen.cpp:615
void setChar(int pos, uchar c, bool fromKB)
DisplayScreen::setChar - place a character on the screen.
Definition DisplayScreen.cpp:266
void setGraphicEscape()
DisplayScreen::setGraphicEscape - indicate that the next character is a graphic one.
Definition DisplayScreen.cpp:460
void setRuler()
DisplayScreen::setRuler - set the ruler style and redraw it in case it needs to move.
Definition DisplayScreen_Cursor.cpp:280
int height() const
DisplayScreen::height - return the height the screen.
Definition DisplayScreen.cpp:131
void rulerMode(bool on)
DisplayScreen::rulerMode - display/hide the ruler.
Definition DisplayScreen_Cursor.cpp:252
void processAID(int aid, bool shortread)
DisplayScreen::processAID - process an attention key.
Definition DisplayScreen.cpp:901
bool isFieldStart(int pos) const
DisplayScreen::isFieldStart - is this Cell a Field Start.
Definition DisplayScreen.cpp:784
int findPrevUnprotectedField(int pos)
DisplayScreen::findPrevUnprotectedField - find the previous unprotected field.
Definition DisplayScreen.cpp:1076
bool isAskip(int pos) const
DisplayScreen::isAskip - does this Cell have autoskip enabled.
Definition DisplayScreen.cpp:760
~DisplayScreen()
DisplayScreen::~DisplayScreen.
Definition DisplayScreen.cpp:100
void backtab()
DisplayScreen::backtab - back to the previous field start.
Definition DisplayScreen_Cursor.cpp:125
void clear()
DisplayScreen::clear - clear the screen.
Definition DisplayScreen.cpp:239
void getModifiedFields(QByteArray &buffer)
DisplayScreen::getModifiedFields - extract all modified fields from the screen.
Definition DisplayScreen.cpp:1111
void copyText()
DisplayScreen::copyText - copy the text within the rubberband to the clipboard.
Definition DisplayScreen_Mouse.cpp:131
void setCharAttr(unsigned char c, unsigned char d)
DisplayScreen::setCharAttr - set character attributes.
Definition DisplayScreen.cpp:361
void setExtendedColour(int pos, bool foreground, unsigned char c)
DisplayScreen::setExtendedColour - set the extended colour attributes.
Definition DisplayScreen.cpp:587
void setCursorColour(bool inherit)
DisplayScreen::setCursorColour - set the cursor colour.
Definition DisplayScreen_Cursor.cpp:218
void addPosToBuffer(QByteArray &buffer, int pos)
DisplayScreen::addPosToBuffer - insert 'pos' into 'buffer' as two bytes, doubling 0xFF if needed.
Definition DisplayScreen.cpp:1166
void resetExtended(int pos)
DisplayScreen::resetExtended - reset extended attributes ready for a Start Field Extended.
Definition DisplayScreen.cpp:553
void showCursor()
DisplayScreen::showCursor - display cursor.
Definition DisplayScreen_Cursor.cpp:84
void mousePressEvent(QGraphicsSceneMouseEvent *mEvent) override
DisplayScreen::mousePressEvent - process a mouse event.
Definition DisplayScreen_Mouse.cpp:21
void setCursor(const int x, const int y)
DisplayScreen::setCursor - position cursor.
Definition DisplayScreen_Cursor.cpp:36
void newline()
DisplayScreen::newline - move the cursor to the first input field after the current line.
Definition DisplayScreen_Cursor.cpp:94
void setExtendedBlink(int pos)
DisplayScreen::setExtendedBlink - switch blink on.
Definition DisplayScreen.cpp:604
void dumpFields()
DisplayScreen::dumpFields - debug routine to print out all fields.
Definition DisplayScreen.cpp:1207
void setRulerStyle(Q3270::RulerStyle rulerStyle)
DisplayScreen::setRulerStyle - change ruler style.
Definition DisplayScreen_Cursor.cpp:269
void home()
DisplayScreen::home - move the cursor to the first field on the screen.
Definition DisplayScreen_Cursor.cpp:178
void toggleRuler()
DisplayScreen::toggleRuler - toggle the ruler on or off.
Definition DisplayScreen_Cursor.cpp:238
void getScreen(QByteArray &buffer)
DisplayScreen::getScreen - place the screen buffer into the 3270 data stream.
Definition DisplayScreen.cpp:1314
void eraseEOF()
DisplayScreen::eraseEOF - clear the Cells starting at pos until the end of the field.
Definition DisplayScreen.cpp:834
bool isProtected(int pos) const
DisplayScreen::isProtected - is this Cell protected?
Definition DisplayScreen.cpp:772
void setExtendedUscore(int pos)
DisplayScreen::setExtendedUscore - switch underscore on.
Definition DisplayScreen.cpp:626
void interruptProcess()
ProcessDataStream::interruptProcess - interrupt the current process.
Definition DisplayScreen.cpp:937
void deleteChar()
DisplayScreen::deleteChar - delete the character at the specified position.
Definition DisplayScreen.cpp:797
void endline()
DisplayScreen::endline - move the cursor to the end of the current input field.
Definition DisplayScreen_Cursor.cpp:135
void eraseUnprotected(int start, int end, Q3270::EraseResetMDT resetMDT)
DisplayScreen::eraseUnprotected - erase unprotected fields between addresses.
Definition DisplayScreen.cpp:864