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