diff options
author | Michele Calgaro <[email protected]> | 2016-10-08 23:57:24 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2016-10-08 23:57:24 +0900 |
commit | 6131095c14221ddbd16805059a9f3b3fc6c58225 (patch) | |
tree | ab3f49608e1141e8e61b2e65da8c6eee5953e2a8 /kate/app/katemainwindow.h | |
parent | 67642abd943f30babeea0c44397cc40e7c2c1b9e (diff) | |
download | tdebase-6131095c14221ddbd16805059a9f3b3fc6c58225.tar.gz tdebase-6131095c14221ddbd16805059a9f3b3fc6c58225.zip |
Kate session panel: added "Sessions" menu support.
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'kate/app/katemainwindow.h')
-rw-r--r-- | kate/app/katemainwindow.h | 50 |
1 files changed, 35 insertions, 15 deletions
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; |