diff options
author | Michele Calgaro <[email protected]> | 2016-03-10 18:35:21 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2016-03-10 18:35:21 +0900 |
commit | e528df3eb1ee48c55535fc09e7d016a83b38b02e (patch) | |
tree | e5f5bc61231714080fc49abc0cb5409ebba41f9b /kate/app/katesession.h | |
parent | 93c96f301cc324ea0a38df701f70dc7bfce4b314 (diff) | |
download | tdebase-e528df3eb1ee48c55535fc09e7d016a83b38b02e.tar.gz tdebase-e528df3eb1ee48c55535fc09e7d016a83b38b02e.zip |
Kate session panel: added move up/down and rename functionality.
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'kate/app/katesession.h')
-rw-r--r-- | kate/app/katesession.h | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/kate/app/katesession.h b/kate/app/katesession.h index 28cabea75..077ad1fda 100644 --- a/kate/app/katesession.h +++ b/kate/app/katesession.h @@ -194,6 +194,7 @@ class KateSessionManager : public TQObject * @param sessionId the id of the session to activate * @param saveCurr if true, save the current session before activating the new one * @return whether the session was activated or not + * @emit sessionActivated */ bool activateSession(int sessionId, bool saveCurr = true); @@ -202,6 +203,7 @@ class KateSessionManager : public TQObject * @param sessionName new session name * @param activate if true, activate the new session after creation * @return the id of the newly created session + * @emit sessionCreated */ int newSession(const TQString &sessionName = TQString::null, bool activate = true); @@ -221,9 +223,29 @@ class KateSessionManager : public TQObject * Delete the specified session * @param sessionId the id of the session to delete * @return whether the session has been deleted or not + * @emit sessionDeleted */ bool deleteSession(int sessionId); + /** + * Move the specified session forward in the session list (by one position) + * @param sessionId the id of the session to move + */ + void moveSessionForward(int sessionId); + + /** + * Move the specified session backward in the session list (by one position) + * @param sessionId the id of the session to move + */ + void moveSessionBackward(int sessionId); + + /** + * Rename the specified session + * @param sessionId the id of the session to rename + * @param newSessionName the new session name + */ + void renameSession(int sessionId, const TQString &newSessionName); + signals: /** @@ -245,10 +267,26 @@ class KateSessionManager : public TQObject */ void sessionDeleted(int sessionId); + /** + * Emitted once the position of the two sessions have been swapped + * @param sessionIdMin the smallest id of the session couple + * @param sessionIdMax the biggest id of the session couple + */ + void sessionsSwapped(int sessionIdMin, int sessionIdMax); - private: + + protected: KateSessionManager(); + /** + * Swap the position of the two specified sessions in the session list + * @param sessionId1 the id of the first session + * @param sessionId2 the id of the second session + * @emit sessionsSwapped + */ + void swapSessionsPosition(int sessionId1, int sessionId2); + + TQString m_baseDir; // folder where session files are stored TQString m_configFile; // file where the session list config is stored int m_activeSessionId; // index of the active session |