From 192b7af94830ff981760570254cce1a27a81d341 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Mon, 10 Aug 2015 16:45:54 +0900 Subject: Added Kate session panel. This commit contains the GUI elements. The logic will be added in a separate commit. Signed-off-by: Michele Calgaro --- kate/app/katemainwindow.h | 1 + 1 file changed, 1 insertion(+) (limited to 'kate/app/katemainwindow.h') diff --git a/kate/app/katemainwindow.h b/kate/app/katemainwindow.h index 157b4e57d..15b7f35c6 100644 --- a/kate/app/katemainwindow.h +++ b/kate/app/katemainwindow.h @@ -198,6 +198,7 @@ class KateMainWindow : public KateMDI::MainWindow, virtual public KParts::PartBa KateFileList *filelist; KateFileSelector *fileselector; + KateSessionPanel *sessionpanel; TDEActionMenu* documentOpenWith; -- cgit v1.2.3 From 6131095c14221ddbd16805059a9f3b3fc6c58225 Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sat, 8 Oct 2016 23:57:24 +0900 Subject: Kate session panel: added "Sessions" menu support. Signed-off-by: Michele Calgaro --- kate/app/katemainwindow.h | 50 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 35 insertions(+), 15 deletions(-) (limited to 'kate/app/katemainwindow.h') diff --git a/kate/app/katemainwindow.h b/kate/app/katemainwindow.h index 15b7f35c6..aa2a6cee7 100644 --- a/kate/app/katemainwindow.h +++ b/kate/app/katemainwindow.h @@ -68,7 +68,6 @@ class KateMainWindow : public KateMDI::MainWindow, virtual public KParts::PartBa /** * Accessor methodes for interface and child objects */ - public: Kate::MainWindow *mainWindow () { return m_mainWindow; } Kate::ToolViewManager *toolViewManager () { return m_toolViewManager; } @@ -79,7 +78,6 @@ class KateMainWindow : public KateMDI::MainWindow, virtual public KParts::PartBa /** * various methodes to get some little info out of this */ - public: /** Returns the URL of the current document. * anders: I add this for use from the file selector. */ KURL activeDocumentUrl(); @@ -101,14 +99,27 @@ class KateMainWindow : public KateMDI::MainWindow, virtual public KParts::PartBa */ KateTabWidget *tabWidget (); - public: void readProperties(TDEConfig *config); void saveProperties(TDEConfig *config); - void saveGlobalProperties( TDEConfig* sessionConfig ); - public: bool queryClose_internal(); + void openURL (const TQString &name=0L); + + public slots: + /** + * update "Sessions" menu status when selection in session panel has changed + */ + void slotSelectionChanged(); + + /** + * activate the specified session. When there is the need to activate a session + * from the outside (for example from DCOP), using this method assures that + * the session activation is consistent with the behavior of the session panel + * @param sessionId the id of the session to activate + */ + void activateSession(int sessionId); + private: void setupMainWindow(); void setupActions(); @@ -127,11 +138,11 @@ class KateMainWindow : public KateMDI::MainWindow, virtual public KParts::PartBa void dragEnterEvent( TQDragEnterEvent * ); void dropEvent( TQDropEvent * ); + private slots: /** * slots used for actions in the menus/toolbars * or internal signal connections */ - private slots: void newWindow (); void slotConfigure(); @@ -163,18 +174,12 @@ class KateMainWindow : public KateMDI::MainWindow, virtual public KParts::PartBa void pluginHelp(); void slotFullScreen(bool); - public: - void openURL (const TQString &name=0L); - - private slots: void updateGrepDir (bool visible); - + void slotDocumentCloseAll(); + protected: bool event( TQEvent * ); - private slots: - void slotDocumentCloseAll(); - private: static uint uniqueID; uint myID; @@ -198,7 +203,7 @@ class KateMainWindow : public KateMDI::MainWindow, virtual public KParts::PartBa KateFileList *filelist; KateFileSelector *fileselector; - KateSessionPanel *sessionpanel; + KateSessionPanel *m_sessionpanel; TDEActionMenu* documentOpenWith; @@ -214,6 +219,21 @@ class KateMainWindow : public KateMDI::MainWindow, virtual public KParts::PartBa KateTabWidget *m_tabWidget; }; +class KateSessionListActionMenu : public TDEActionMenu +{ + Q_OBJECT + + public: + KateSessionListActionMenu(KateMainWindow *mw, const TQString &text, TQObject *parent = NULL, const char *name = NULL); + ~KateSessionListActionMenu() {} + + public slots: + void slotAboutToShow(); + + protected: + KateMainWindow *m_mainWindow; +}; + #endif // kate: space-indent on; indent-width 2; replace-tabs on; -- cgit v1.2.3