kateviewspacecontainer.h
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 class KateSplitter;
00031 class KConfig;
00032 class KateMainWindow;
00033
00034 class KateViewSpaceContainer: public QWidget
00035 {
00036 Q_OBJECT
00037
00038 friend class KateViewSpace;
00039 friend class KateVSStatusBar;
00040
00041 public:
00042 KateViewSpaceContainer (QWidget *parent, KateViewManager *viewManager);
00043
00044 ~KateViewSpaceContainer ();
00045
00046 inline QPtrList<Kate::View> &viewList () { return m_viewList; };
00047
00048 public:
00049
00050 void saveViewConfiguration(KConfig *config,const QString& group);
00051
00052
00053 void restoreViewConfiguration (KConfig *config,const QString& group);
00054
00055 private:
00060 bool createView ( Kate::Document *doc =0L );
00061
00062 bool deleteView ( Kate::View *view, bool delViewSpace = true);
00063
00064 void moveViewtoSplit (Kate::View *view);
00065 void moveViewtoStack (Kate::View *view);
00066
00067
00068
00069
00070
00071 void saveSplitterConfig(KateSplitter* s, int idx=0, KConfig* config=0L, const QString& viewConfGrp="");
00072
00076 void restoreSplitter ( KConfig* config, const QString &group, QWidget* parent , const QString& viewConfGrp);
00077
00078 void removeViewSpace (KateViewSpace *viewspace);
00079
00080 bool showFullPath;
00081
00082 public:
00083 Kate::View* activeView ();
00084 KateViewSpace* activeViewSpace ();
00085
00086 uint viewCount ();
00087 uint viewSpaceCount ();
00088
00089 bool isViewActivationBlocked(){return m_blockViewCreationAndActivation;};
00090
00091 public:
00092 void closeViews(uint documentNumber);
00093 KateMainWindow *mainWindow();
00094 friend class KateViewManager;
00095
00096 private slots:
00097 void activateView ( Kate::View *view );
00098 void activateSpace ( Kate::View* v );
00099 void slotViewChanged();
00100 void reactivateActiveView();
00101 void slotPendingDocumentNameChanged();
00102
00103 void documentCreated (Kate::Document *doc);
00104 void documentDeleted (uint docNumber);
00105
00106 public slots:
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118 void splitViewSpace( KateViewSpace* vs=0L, bool isHoriz=true, bool atTop=false );
00119
00120 bool getShowFullPath() const { return showFullPath; }
00121
00122 void activateView ( uint documentNumber );
00123 void activateView ( int documentNumber ) { activateView((uint) documentNumber); };
00124
00126 void slotSplitViewSpaceHoriz () { splitViewSpace(); }
00128 void slotSplitViewSpaceVert () { splitViewSpace( 0L, false ); }
00129
00130 void slotCloseCurrentViewSpace();
00131
00132 void statusMsg ();
00133
00134 void setActiveSpace ( KateViewSpace* vs );
00135 void setActiveView ( Kate::View* view );
00136
00137 void setShowFullPath(bool enable);
00138
00139 void activateNextView();
00140 void activatePrevView();
00141
00142 signals:
00143 void statusChanged (Kate::View *, int, int, int, bool, int, const QString &);
00144 void statChanged ();
00145 void viewChanged ();
00146
00147 private:
00148 KateViewManager *m_viewManager;
00149 QPtrList<KateViewSpace> m_viewSpaceList;
00150 QPtrList<Kate::View> m_viewList;
00151
00152 QGridLayout *m_grid;
00153 bool m_blockViewCreationAndActivation;
00154
00155 bool m_activeViewRunning;
00156
00157 bool m_pendingViewCreation;
00158 QGuardedPtr<Kate::Document> m_pendingDocument;
00159 };
00160
00161 #endif
This file is part of the documentation for kate Library Version 3.4.3.