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
00030 class KateSplitter;
00031 class KConfig;
00032 class KateMainWindow;
00033
00034 class KateViewManager : public QWidget
00035 {
00036 Q_OBJECT
00037
00038 friend class KateViewSpace;
00039 friend class KateVSStatusBar;
00040
00041 public:
00042 KateViewManager (QWidget *parent=0, KateDocManager *docManager=0,KateMainWindow* mainWindow=0);
00043 ~KateViewManager ();
00044
00045 Kate::ViewManager *viewManager () const { return m_viewManager; };
00046
00047 inline QPtrList<Kate::View> &viewList () { return m_viewList; };
00048
00049 public:
00050
00051 void saveViewConfiguration(KConfig *config,const QString& group);
00052
00053
00054 void restoreViewConfiguration (KConfig *config,const QString& group);
00055
00056 uint openURL (const KURL &url, const QString& encoding, bool activate = true);
00057
00058 public slots:
00059 void openURL (const KURL &url);
00060
00061 private:
00062 bool useOpaqueResize;
00063
00068 bool createView ( Kate::Document *doc =0L );
00069
00070 bool deleteView ( Kate::View *view, bool delViewSpace = true);
00071
00072 void moveViewtoSplit (Kate::View *view);
00073 void moveViewtoStack (Kate::View *view);
00074
00075
00076
00077
00078
00079 void saveSplitterConfig(KateSplitter* s, int idx=0, KConfig* config=0L, const QString& viewConfGrp="");
00080
00084 void restoreSplitter ( KConfig* config, const QString &group, QWidget* parent , const QString& viewConfGrp);
00085
00086 void removeViewSpace (KateViewSpace *viewspace);
00087
00088 bool showFullPath;
00089
00090 public:
00091 virtual Kate::View* activeView ();
00092 KateViewSpace* activeViewSpace ();
00093
00094 uint viewCount ();
00095 uint viewSpaceCount ();
00096
00097 bool isViewActivationBlocked(){return m_blockViewCreationAndActivation;};
00098
00099 public:
00100 void closeViews(uint documentNumber);
00101 KateMainWindow *mainWindow();
00102
00103 private slots:
00104 void activateView ( Kate::View *view );
00105 void activateSpace ( Kate::View* v );
00106 void slotViewChanged();
00107 void openNewIfEmpty();
00108
00109 public slots:
00110 void deleteLastView ();
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123 void splitViewSpace( KateViewSpace* vs=0L, bool isHoriz=true, bool atTop=false );
00124
00125 bool getShowFullPath() const { return showFullPath; }
00126
00127 void activateView ( uint documentNumber );
00128 void activateView ( int documentNumber ) { activateView((uint) documentNumber); };
00129
00130 void slotDocumentCloseAll ();
00131 void slotDocumentSaveAll();
00132
00133 void slotDocumentNew ();
00134 void slotDocumentOpen ();
00135 void slotDocumentClose ();
00137 void slotSplitViewSpaceHoriz () { splitViewSpace(); }
00139 void slotSplitViewSpaceVert () { splitViewSpace( 0L, false ); }
00140
00141 void slotCloseCurrentViewSpace();
00142
00143 void statusMsg ();
00144
00145 void setActiveSpace ( KateViewSpace* vs );
00146 void setActiveView ( Kate::View* view );
00147
00148 void setShowFullPath(bool enable);
00149
00150 void activateNextView();
00151 void activatePrevView();
00152
00153 signals:
00154 void statusChanged (Kate::View *, int, int, int, bool, int, const QString &);
00155 void statChanged ();
00156 void viewChanged ();
00157
00158 private:
00159 Kate::ViewManager *m_viewManager;
00160 QPtrList<KateViewSpace> m_viewSpaceList;
00161 QPtrList<Kate::View> m_viewList;
00162
00163 KateDocManager *m_docManager;
00164 QGridLayout *m_grid;
00165 bool m_blockViewCreationAndActivation;
00166
00167 bool m_activeViewRunning;
00168 KateMainWindow *m_mainWindow;
00169 };
00170
00171 #endif
This file is part of the documentation for kate Library Version 3.2.2.