1
0
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:
Filippo Scognamiglio
2014-04-17 13:27:41 +02:00
parent 2af093220f
commit 115171e969
8 changed files with 69 additions and 9 deletions

View File

@@ -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++)

View File

@@ -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();
/////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////
/**

View File

@@ -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 {