mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2025-09-26 15:12:40 +01:00
Added terminal size overlay
This commit is contained in:
@@ -1058,6 +1058,8 @@ void KTerminalDisplay::updateImageSize()
|
||||
int lines = qMin(oldlin,_lines);
|
||||
int columns = qMin(oldcol,_columns);
|
||||
|
||||
emit terminalSizeChanged();
|
||||
|
||||
if (oldimg)
|
||||
{
|
||||
for (int line = 0; line < lines; line++)
|
||||
|
@@ -68,6 +68,7 @@ class KONSOLEPRIVATE_EXPORT KTerminalDisplay : public QQuickPaintedItem
|
||||
Q_PROPERTY(QFont font READ getVTFont WRITE setVTFont )
|
||||
Q_PROPERTY(bool activeFocusOnClick READ autoFocus WRITE setAutoFocus NOTIFY changedAutoFocus)
|
||||
Q_PROPERTY(bool ShowIMEOnClick READ autoVKB WRITE setAutoVKB NOTIFY changedAutoVKB)
|
||||
Q_PROPERTY(QSize terminalSize READ getTerminalSize NOTIFY terminalSizeChanged)
|
||||
|
||||
|
||||
|
||||
@@ -190,7 +191,12 @@ public:
|
||||
*/
|
||||
int fontWidth() { return _fontWidth; }
|
||||
|
||||
|
||||
/**
|
||||
* Return size of the terminal as columns lines.
|
||||
*/
|
||||
QSize getTerminalSize(){
|
||||
return QSize(columns(), lines());
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets which characters, in addition to letters and numbers,
|
||||
@@ -410,6 +416,8 @@ signals:
|
||||
void updatedImage();
|
||||
void clicked();
|
||||
|
||||
void terminalSizeChanged();
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////
|
||||
/////////////////////////////////////////////////////////////////////////////////////
|
||||
/**
|
||||
|
@@ -60,6 +60,7 @@ Module {
|
||||
Property { name: "font"; type: "QFont" }
|
||||
Property { name: "activeFocusOnClick"; type: "bool" }
|
||||
Property { name: "ShowIMEOnClick"; type: "bool" }
|
||||
Property { name: "terminalSize"; type: "QSize" }
|
||||
Signal {
|
||||
name: "changedScheme"
|
||||
Parameter { name: "scheme"; type: "string" }
|
||||
@@ -110,6 +111,7 @@ Module {
|
||||
name: "changedSession"
|
||||
Parameter { name: "session"; type: "KSession"; isPointer: true }
|
||||
}
|
||||
Signal { name: "terminalSizeChanged" }
|
||||
Signal { name: "updatedImage" }
|
||||
Method { name: "forcedFocus" }
|
||||
Method {
|
||||
|
Reference in New Issue
Block a user