Q3270
A Qt-based 3270 Terminal Emulator
Loading...
Searching...
No Matches
Terminal Class Reference
Inheritance diagram for Terminal:

Public Slots

void closeConnection (QString message="")
 Terminal::closeConnection - terminate a connection.
 
void closeEvent (QCloseEvent *closeEvent) override
 Terminal::closeEvent - close the window.
 
void setCurrentFont (QFont f)
 Terminal::setCurrentFont - temporarily change the font on the current screen.
 
void rulerStyle (Q3270::RulerStyle r)
 Terminal::rulerStyle - change the ruler style.
 
void rulerChanged (bool on)
 Terminal::rulerChanged - toggle the ruler.
 
void changeCodePage (QString codepage)
 Terminal::changeCodePage - change the code page.
 
void setFont (QFont font)
 Terminal::setFont - change the font on the primary and alternate screens.
 
void setFontTweak (Q3270::FontTweak f)
 
void toggleRuler ()
 Terminal::toggleRuler - toggle the ruler.
 
void resetStatusXSystem ()
 Terminal::resetStatusXSystem - Clear X System condition if possible.
 
void setStatusInsert (const bool insert)
 Terminal::setStatusInsert - update the status bar with insert mode.
 
void setTWait ()
 Terminal::setTWait - Set the TWAIT condition.
 
void clearTWait ()
 Terminal::clearTWait - Clear the TWAIT condition.
 
void setColourTheme (const Colours &colours)
 Terminal::setColourTheme - switch the colour theme.
 
void copyText ()
 

Signals

void connectionEstablished ()
 
void disconnected ()
 
void windowClosed (Terminal *t)
 

Public Member Functions

 Terminal (QGraphicsView *screen, ActiveSettings &activeSettings, CodePage &cp, Keyboard &kb, const Colours &cs)
 Terminal::Terminal - the terminal in the Qt window.
 
 ~Terminal ()
 Terminal::~Terminal - destructor.
 
void connectSession ()
 Terminal::connectSession - connect to a host.
 
int terminalWidth (bool alternate)
 
int terminalHeight (bool alternate)
 
int gridWidth (bool alternate)
 
int gridHeight (bool alternate)
 
void setBlink (bool blink)
 Terminal::setBlink - turn cursor blinking on or off.
 
void setBlinkSpeed (int speed)
 Terminal::setBlinkSpeed - change the blink speed of the cursor.
 
void setScreenStretch (bool scale)
 Terminal::setScreenStretch - toggle the screen stretch and fit the content.
 
DisplayScreensetAlternateScreen (bool alt)
 Terminal::setAlternateScreen - switch screens.
 
void fit ()
 Terminal::fit - fit the window content according to user preference.
 
bool isConnected ()
 
QList< QSslCertificate > getCertDetails ()
 
void blinkText ()
 Terminal::blinkText - blink any text.
 
void blinkCursor ()
 Terminal::blinkCursor - blink the cursor.
 
bool eventFilter (QObject *obj, QEvent *event)
 Terminal::eventFilter - handle a change of internal geometry.
 

Constructor & Destructor Documentation

◆ Terminal()

Terminal::Terminal ( QGraphicsView *  screen,
ActiveSettings activeSettings,
CodePage cp,
Keyboard kb,
const Colours cs 
)

Terminal::Terminal - the terminal in the Qt window.

Parameters
layout- the central widget in which the QGraphicsView which shows the terminal
activeSettings- currently active settings
cp- shared CodePage object
kb- shared Keyboard object
cs- shared ColourTheme object
sessionName- the session name

This is the controlling widget for the terminal. It comprises a QGraphicsView which is used to display the 3270 matrix and connects the Keyboard. It handles the opening and closing of connections (to show the "Not Connected" display) and switches between primary and alternate displays.

There are two displays built; the primary one is always 24x80, and the alternate is defined by the user, based on the Terminal Model type selected.

◆ ~Terminal()

Terminal::~Terminal ( )

Terminal::~Terminal - destructor.

Delete the objects obtained via new.

Member Function Documentation

◆ blinkCursor()

void Terminal::blinkCursor ( )

Terminal::blinkCursor - blink the cursor.

Slot signalled by the cursor blink timer when it reaches zero. Each iteration switches from on to off and back.

◆ blinkText()

void Terminal::blinkText ( )

Terminal::blinkText - blink any text.

Slot signalled by the character blink timer when it reaches zero. Each iteration switches from on to off and back.

◆ changeCodePage

void Terminal::changeCodePage ( QString  codepage)
slot

Terminal::changeCodePage - change the code page.

Called when the CodePage preference is changed.

◆ clearTWait

void Terminal::clearTWait ( )
slot

Terminal::clearTWait - Clear the TWAIT condition.

clearTWait is called when the host has responded. It does not clear X System.

◆ closeConnection

void Terminal::closeConnection ( QString  message = "")
slot

Terminal::closeConnection - terminate a connection.

Close the connection, disconnect the Keyboard and delete the primary and alternate screens, the ProcessDataStream and the SocketConnection. Switch to the 'Not Connected' screen and stop the blinking timers.

◆ closeEvent

void Terminal::closeEvent ( QCloseEvent *  closeEvent)
overrideslot

Terminal::closeEvent - close the window.

Parameters
closeEvent- the close event

Close the window when the user clicks the 'X' on the top right.

◆ connectSession()

void Terminal::connectSession ( )

Terminal::connectSession - connect to a host.

Connect to a host. Build the ProcessDataStream, the SocketConnection, the display matrix and connect the Keyboard. Set the fonts and colours of the screens.

Start timers to blink the cursor and any blinking characters on screen.

◆ eventFilter()

bool Terminal::eventFilter ( QObject *  obj,
QEvent *  event 
)

Terminal::eventFilter - handle a change of internal geometry.

Parameters
obj- the object having the event
event- the event
Returns

This routine gains control when the internal size of the scene changes. This is purely to handle the toolbar being shown/hidden, so that the display matrix can be resized properly.

◆ fit()

void Terminal::fit ( )

Terminal::fit - fit the window content according to user preference.

Fit the terminal display into the window, either fixed at 4:3 ratio or stretched to fill the window. If the 'Not Connected' display is shown, it's always stretched to fill the window.

◆ resetStatusXSystem

void Terminal::resetStatusXSystem ( )
slot

Terminal::resetStatusXSystem - Clear X System condition if possible.

resetStatusXSystem is called when the user presses the Reset key or the host has responded to a previous data stream. If TWAIT is set, this is ignored.

◆ rulerChanged

void Terminal::rulerChanged ( bool  on)
slot

Terminal::rulerChanged - toggle the ruler.

Parameters
on- true to show, false to hide

Called when the ruler is switched on or off in active settings.

◆ rulerStyle

void Terminal::rulerStyle ( Q3270::RulerStyle  rulerStyle)
slot

Terminal::rulerStyle - change the ruler style.

Parameters
rulerStyle- the style of ruler

Called when the ruler style is changed in active settings.

◆ setAlternateScreen()

DisplayScreen * Terminal::setAlternateScreen ( bool  alt)

Terminal::setAlternateScreen - switch screens.

Parameters
alt- true for alternate, false for primary
Returns
the screen switched to

Resize the screen matrix, and ensure it fits into the window, according to user preference.

◆ setBlink()

void Terminal::setBlink ( bool  blink)

Terminal::setBlink - turn cursor blinking on or off.

Parameters
blink- true to blink, false to stay static

Called when the cursor blink preference changes. The cursor is shown if the display is connected to the host to ensure the cursor doesn't stay hidden if it happened to be in the 'off' state of a blink.

◆ setBlinkSpeed()

void Terminal::setBlinkSpeed ( int  speed)

Terminal::setBlinkSpeed - change the blink speed of the cursor.

Parameters
speed- the speed

The speed is 1 - 4, with 4 being the fastest blink.

◆ setColourTheme

void Terminal::setColourTheme ( const Colours colours)
slot

Terminal::setColourTheme - switch the colour theme.

Parameters
themeName- the new theme

Called when the user changes the ColourTheme used.

◆ setCurrentFont

void Terminal::setCurrentFont ( QFont  f)
slot

Terminal::setCurrentFont - temporarily change the font on the current screen.

Parameters
f- the chosen font

Called to dynamically change the font on the currently displayed screen. Used during the Preferences dialog display to show the different fonts as they are selected by the user.*

◆ setFont

void Terminal::setFont ( QFont  font)
slot

Terminal::setFont - change the font on the primary and alternate screens.

Parameters
font- the chosen font

Called when the user changes the font.

◆ setScreenStretch()

void Terminal::setScreenStretch ( bool  stretch)

Terminal::setScreenStretch - toggle the screen stretch and fit the content.

Parameters
stretch- true to stretch to fit the window, false to maintain 4:3 ratio

Called when the user has switched from stretching the screen to fit the window or to maintain a 4:3 ratio.

◆ setStatusInsert

void Terminal::setStatusInsert ( const bool  insert)
slot

Terminal::setStatusInsert - update the status bar with insert mode.

Parameters
insert- Q3270::InsertMode or Q3270::OvertypeMode

setStatusInsert is called when the user toggles the insert mode with the insert key.

◆ setTWait

void Terminal::setTWait ( )
slot

Terminal::setTWait - Set the TWAIT condition.

setTWait is called when the terminal is waiting for a response from the host. TWAIT is when the 'X <clock>' is shown.

◆ toggleRuler

void Terminal::toggleRuler ( )
slot

Terminal::toggleRuler - toggle the ruler.

Called when the ruler is switched on or off from the keyboard. The display update is delegated to the signal connected to the active settings update.


The documentation for this class was generated from the following files: