kate
kateviewspacecontainer.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __KATE_VIEWSPACE_CONTAINER_H__
00022 #define __KATE_VIEWSPACE_CONTAINER_H__
00023
00024 #include "katemain.h"
00025 #include "../interfaces/viewmanager.h"
00026
00027 #include <kate/view.h>
00028 #include <kate/document.h>
00029
00030 #include "katemdi.h"
00031
00032 class KConfig;
00033 class KateMainWindow;
00034
00035 class KateViewSpaceContainer: public QVBox
00036 {
00037 Q_OBJECT
00038
00039 friend class KateViewSpace;
00040 friend class KateVSStatusBar;
00041
00042 public:
00043 KateViewSpaceContainer (QWidget *parent, KateViewManager *viewManager);
00044
00045 ~KateViewSpaceContainer ();
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 private:
00061 bool createView ( Kate::Document *doc =0L );
00062
00063 bool deleteView ( Kate::View *view, bool delViewSpace = true);
00064
00065 void moveViewtoSplit (Kate::View *view);
00066 void moveViewtoStack (Kate::View *view);
00067
00068
00069
00070
00071
00072 void saveSplitterConfig(KateMDI::Splitter* s, int idx=0, KConfig* config=0L, const QString& viewConfGrp="");
00073
00077 void restoreSplitter ( KConfig* config, const QString &group, QWidget* parent , const QString& viewConfGrp);
00078
00079 void removeViewSpace (KateViewSpace *viewspace);
00080
00081 bool showFullPath;
00082
00083 public:
00084 Kate::View* activeView ();
00085 KateViewSpace* activeViewSpace ();
00086
00087 uint viewCount ();
00088 uint viewSpaceCount ();
00089
00090 bool isViewActivationBlocked(){return m_blockViewCreationAndActivation;};
00091
00092 public:
00093 void closeViews(uint documentNumber);
00094 KateMainWindow *mainWindow();
00095 friend class KateViewManager;
00096
00097 private slots:
00098 void activateView ( Kate::View *view );
00099 void activateSpace ( Kate::View* v );
00100 void slotViewChanged();
00101 void reactivateActiveView();
00102 void slotPendingDocumentNameChanged();
00103
00104 void documentCreated (Kate::Document *doc);
00105 void documentDeleted (uint docNumber);
00106
00107 public slots:
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119 void splitViewSpace( KateViewSpace* vs=0L, bool isHoriz=true, bool atTop=false );
00120
00121 bool getShowFullPath() const { return showFullPath; }
00122
00123 void activateView ( uint documentNumber );
00124 void activateView ( int documentNumber ) { activateView((uint) documentNumber); };
00125
00127 void slotSplitViewSpaceHoriz () { splitViewSpace(); }
00129 void slotSplitViewSpaceVert () { splitViewSpace( 0L, false ); }
00130
00131 void slotCloseCurrentViewSpace();
00132
00133 void statusMsg ();
00134
00135 void setActiveSpace ( KateViewSpace* vs );
00136 void setActiveView ( Kate::View* view );
00137
00138 void setShowFullPath(bool enable);
00139
00140 void activateNextView();
00141 void activatePrevView();
00142
00143 signals:
00144 void statusChanged (Kate::View *, int, int, int, bool, int, const QString &);
00145 void statChanged ();
00146 void viewChanged ();
00147
00148 private:
00149 KateViewManager *m_viewManager;
00150 QPtrList<KateViewSpace> m_viewSpaceList;
00151 QPtrList<Kate::View> m_viewList;
00152
00153 bool m_blockViewCreationAndActivation;
00154
00155 bool m_activeViewRunning;
00156
00157 bool m_pendingViewCreation;
00158 QGuardedPtr<Kate::Document> m_pendingDocument;
00159 };
00160
00161 #endif