kateviewspace.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_H__
00022 #define __KATE_VIEWSPACE_H__
00023
00024 #include "katemain.h"
00025
00026 #include <kate/view.h>
00027 #include <kate/document.h>
00028
00029 #include <qptrlist.h>
00030 #include <qwidget.h>
00031 #include <qvbox.h>
00032 #include <kstatusbar.h>
00033
00034 class KVSSBSep;
00035
00036 class KConfig;
00037 class KSqueezedTextLabel;
00038
00039 class KateVSStatusBar : public KStatusBar
00040 {
00041 Q_OBJECT
00042
00043 public:
00044 KateVSStatusBar ( KateViewSpace *parent = 0L, const char *name = 0L );
00045 virtual ~KateVSStatusBar ();
00046
00047 public slots:
00048 void setStatus( int r, int c, int ovr, bool block, int mod, const QString &msg );
00049 void updateMod( bool );
00054 void modifiedChanged();
00055
00056 protected:
00057 virtual bool eventFilter (QObject*,QEvent *);
00058 virtual void showMenu ();
00059
00060 private:
00061 QLabel* m_lineColLabel;
00062 QLabel* m_modifiedLabel;
00063 QLabel* m_insertModeLabel;
00064 QLabel* m_selectModeLabel;
00065 KSqueezedTextLabel* m_fileNameLabel;
00066 QPixmap m_modPm, m_modDiscPm, m_modmodPm, m_noPm;
00067 class KateViewSpace *m_viewSpace;
00068 };
00069
00070 class KateViewSpace : public QVBox
00071 {
00072 friend class KateViewSpaceContainer;
00073 friend class KateVSStatusBar;
00074
00075 Q_OBJECT
00076
00077 public:
00078 KateViewSpace(KateViewSpaceContainer *, QWidget* parent=0, const char* name=0);
00079 ~KateViewSpace();
00080 bool isActiveSpace();
00081 void setActive(bool b, bool showled=false);
00082 QWidgetStack* stack;
00083 void addView(Kate::View* v, bool show=true);
00084 void removeView(Kate::View* v);
00085 bool showView(Kate::View* v);
00086 bool showView(uint docID);
00087 Kate::View* currentView();
00088 int viewCount() const { return mViewList.count(); }
00089
00090 void saveConfig (KConfig* config, int myIndex,const QString& viewConfGrp);
00091 void restoreConfig ( class KateViewSpaceContainer *viewMan, KConfig* config, const QString &group );
00092
00093
00094 protected:
00097 bool event( QEvent * );
00098
00099 private:
00100 bool mIsActiveSpace;
00101 KateVSStatusBar* mStatusBar;
00102 QLabel* l;
00103 QPixmap i_active;
00104 QPixmap i_empty;
00105 QPtrList<Kate::View> mViewList;
00106 int mViewCount;
00107 KVSSBSep *sep;
00108 KateViewSpaceContainer *m_viewManager;
00109 QString m_group;
00110
00111 private slots:
00112 void slotStatusChanged (Kate::View *view, int r, int c, int ovr, bool block, int mod, const QString &msg);
00113
00114 public slots:
00115 void polish();
00116 void modifiedOnDisc(Kate::Document *, bool, unsigned char);
00117 };
00118
00119 #endif
00120
This file is part of the documentation for kate Library Version 3.4.0.