Use window title from session. Fixes #167

This commit is contained in:
Santtu Lakkala
2014-10-27 09:28:27 +02:00
parent 08ade0eb6f
commit 4b5827cb3e
5 changed files with 15 additions and 2 deletions

View File

@@ -35,6 +35,7 @@ KSession::KSession(QObject *parent) :
QObject(parent), m_session(createSession("KSession"))
{
connect(m_session, SIGNAL(finished()), this, SLOT(sessionFinished()));
connect(m_session, SIGNAL(titleChanged()), this, SIGNAL(titleChanged()));
}
KSession::~KSession()
@@ -238,4 +239,7 @@ QString KSession::keyBindings()
return m_session->keyBindings();
}
QString KSession::getTitle()
{
return m_session->userTitle();
}

View File

@@ -35,6 +35,7 @@ class KSession : public QObject
Q_OBJECT
Q_PROPERTY(QString kbScheme READ getKeyBindings WRITE setKeyBindings NOTIFY changedKeyBindings)
Q_PROPERTY(QString initialWorkingDirectory READ getInitialWorkingDirectory WRITE setInitialWorkingDirectory)
Q_PROPERTY(QString title READ getTitle NOTIFY titleChanged)
public:
KSession(QObject *parent = 0);
@@ -84,6 +85,8 @@ public:
//! Return current key bindings
QString keyBindings();
QString getTitle();
signals:
void finished();
void copyAvailable(bool);
@@ -95,6 +98,7 @@ signals:
void changedKeyBindings(QString kb);
void titleChanged();
public slots:
/*! Set named key binding for given widget