19 #ifndef __KATE_SESSIONPANEL_H__
20 #define __KATE_SESSIONPANEL_H__
30 #include <tdetoolbar.h>
31 #include <tdelistview.h>
33 #include <tqlineedit.h>
34 #include <tqcheckbox.h>
35 #include <kdialogbase.h>
38 class KateViewManager;
40 class TDEActionCollection;
46 class KateSessionNameChooser :
public KDialogBase
52 KateSessionNameChooser(TQWidget *parent,
bool showSwitchTo);
53 ~KateSessionNameChooser() {}
55 TQString getSessionName();
56 bool getActivateFlag();
62 void slotTextChanged();
65 TQLineEdit *m_sessionNameLE;
66 TQCheckBox *m_activateCB;
73 class KateSessionPanelToolBarParent:
public TQFrame
78 KateSessionPanelToolBarParent(TQWidget *parent) : TQFrame(parent), m_tbar(0) {}
79 ~KateSessionPanelToolBarParent() {}
80 void setToolBar(TDEToolBar *tbar);
83 virtual void resizeEvent (TQResizeEvent*);
92 class KateSessionPanelItem :
public TDEListViewItem
95 KateSessionPanelItem(TQListView *listview,
const TQString &sessionName,
int sessionId)
96 : TDEListViewItem(listview, sessionName), m_sessionId(sessionId) {}
97 KateSessionPanelItem(TQListView *listview, TQListViewItem *after,
const TQString &sessionName,
int sessionId)
98 : TDEListViewItem(listview, after, sessionName), m_sessionId(sessionId) {}
100 int getSessionId() {
return m_sessionId; }
101 void setSessionId(
int sessionId) { m_sessionId = sessionId; }
110 class KateSessionPanel :
public TQVBox
114 friend class KateMainWindow;
118 KateSessionPanel(KateMainWindow *mainWindow=0, KateViewManager *viewManager=0,
119 TQWidget *parent=0,
const char *name=0);
120 ~KateSessionPanel() {}
126 void selectionChanged();
130 void slotNewSession();
131 void slotSaveSession();
132 void slotSaveSessionAs();
133 void slotRenameSession();
134 void slotDeleteSession();
135 void slotReloadSession();
136 void slotActivateSession();
137 void slotSessionToggleReadOnly();
138 void slotSessionMoveUp();
139 void slotSessionMoveDown();
140 void slotItemExecuted(TQListViewItem *item);
142 void slotSelectionChanged();
143 void slotSessionActivated(
int newSessionId,
int oldSessionId);
144 void slotSessionCreated(
int sessionId);
145 void slotSessionDeleted(
int sessionId);
146 void slotSessionsSwapped(
int sessionIdMin,
int sessionIdMax);
147 void slotSessionRenamed(
int sessionId);
148 void slotLVSessionRenamed(TQListViewItem *item);
151 void setup_toolbar();
162 int handleSessionSwitch();
165 TDEActionCollection *m_actionCollection;
166 TDEToolBar *m_toolbar;
167 TDEListView *m_listview;
The Kate session manager.