kateviewmanager.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __KATE_VIEWMANAGER_H__
00022 #define __KATE_VIEWMANAGER_H__
00023
00024 #include "katemain.h"
00025 #include "../interfaces/viewmanager.h"
00026
00027 #include <kate/view.h>
00028 #include <kate/document.h>
00029 #include <kmdi/tabwidget.h>
00030 #include <qguardedptr.h>
00031
00032 class KateSplitter;
00033 class KateMainWindow;
00034 class KateViewSpaceContainer;
00035
00036 class KConfig;
00037 class KAction;
00038
00039 class QToolButton;
00040
00041 class KateViewManager : public QObject
00042 {
00043 Q_OBJECT
00044
00045 public:
00046 KateViewManager (KateMainWindow *parent);
00047 ~KateViewManager ();
00048
00049 Kate::ViewManager *viewManager () const { return m_viewManager; };
00050
00051 KateViewSpaceContainer *activeContainer () { return m_currentContainer; }
00052
00053 QPtrList<KateViewSpaceContainer> *containers() { return &m_viewSpaceContainerList; }
00054
00055 void updateViewSpaceActions ();
00056
00057 private:
00061 void setupActions ();
00062
00063 public:
00064
00065 void saveViewConfiguration(KConfig *config,const QString& group);
00066
00067
00068 void restoreViewConfiguration (KConfig *config,const QString& group);
00069
00070 uint openURL (const KURL &url, const QString& encoding, bool activate = true);
00071
00072 public slots:
00073 void openURL (const KURL &url);
00074
00075 private:
00076 void removeViewSpace (KateViewSpace *viewspace);
00077
00078 bool showFullPath;
00079
00080 public:
00081 Kate::View* activeView ();
00082 KateViewSpace* activeViewSpace ();
00083
00084 uint viewCount ();
00085 uint viewSpaceCount ();
00086
00087 void setViewActivationBlocked (bool block);
00088
00089 public:
00090 void closeViews(uint documentNumber);
00091 KateMainWindow *mainWindow();
00092
00093 private slots:
00094 void activateView ( Kate::View *view );
00095 void activateSpace ( Kate::View* v );
00096
00097 void tabChanged(QWidget*);
00098
00099 public slots:
00100 bool getShowFullPath() const { return showFullPath; }
00101
00102 void activateView ( uint documentNumber );
00103 void activateView ( int documentNumber ) { activateView((uint) documentNumber); };
00104
00105 void slotDocumentNew ();
00106 void slotDocumentOpen ();
00107 void slotDocumentClose ();
00108
00110 void slotSplitViewSpaceHoriz ();
00112 void slotSplitViewSpaceVert ();
00113
00114 void slotNewTab();
00115 void slotCloseTab ();
00116 void activateNextTab ();
00117 void activatePrevTab ();
00118
00119 void slotCloseCurrentViewSpace();
00120
00121 void setActiveSpace ( KateViewSpace* vs );
00122 void setActiveView ( Kate::View* view );
00123
00124 void setShowFullPath(bool enable);
00125
00126 void activateNextView();
00127 void activatePrevView();
00128
00129 protected:
00130 friend class KateViewSpaceContainer;
00131
00132 bool eventFilter(QObject *o,QEvent *e);
00133
00134 QGuardedPtr<Kate::View> guiMergedView;
00135
00136 signals:
00137 void statusChanged (Kate::View *, int, int, int, bool, int, const QString &);
00138 void statChanged ();
00139 void viewChanged ();
00140
00141 private:
00142 Kate::ViewManager *m_viewManager;
00143 QPtrList<KateViewSpaceContainer> m_viewSpaceContainerList;
00144 KateViewSpaceContainer *m_currentContainer;
00145
00146 KateMainWindow *m_mainWindow;
00147 bool m_init;
00148
00149 QToolButton *m_closeTabButton;
00150 KAction *m_closeView;
00151 KAction *m_closeTab;
00152 KAction *m_activateNextTab;
00153 KAction *m_activatePrevTab;
00154 KAction *goNext;
00155 KAction *goPrev;
00156 };
00157
00158 #endif
This file is part of the documentation for kate Library Version 3.4.3.