kate Library API Documentation

kateviewspace.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2001 Christoph Cullmann <cullmann@kde.org>
00003    Copyright (C) 2001 Joseph Wenninger <jowenn@kde.org>
00004    Copyright (C) 2001 Anders Lund <anders.lund@lund.tdcadsl.dk>
00005 
00006    This library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Library General Public
00008    License version 2 as published by the Free Software Foundation.
00009 
00010    This library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00018    Boston, MA 02111-1307, USA.
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 );
00050 
00051    protected:
00052       virtual bool eventFilter (QObject*,QEvent *);
00053       virtual void showMenu ();
00054 
00055    private:
00056       QLabel* m_lineColLabel;
00057       QLabel* m_modifiedLabel;
00058       QLabel* m_insertModeLabel;
00059       QLabel* m_selectModeLabel;
00060       KSqueezedTextLabel* m_fileNameLabel;
00061       QPixmap m_modPm, m_modDiscPm, m_modmodPm, m_noPm;
00062       class KateViewSpace *m_viewSpace;
00063 };
00064 
00065 class KateViewSpace : public QVBox
00066 {
00067   friend class KateViewManager;
00068   friend class KateVSStatusBar;
00069 
00070   Q_OBJECT
00071 
00072   public:
00073     KateViewSpace(KateViewManager *, QWidget* parent=0, const char* name=0);
00074     ~KateViewSpace();
00075     bool isActiveSpace();
00076     void setActive(bool b, bool showled=false);
00077     QWidgetStack* stack;
00078     void addView(Kate::View* v, bool show=true);
00079     void removeView(Kate::View* v);
00080     bool showView(Kate::View* v);
00081     bool showView(uint docID);
00082     Kate::View* currentView();
00083     int viewCount() const { return mViewList.count(); }
00084 
00085     void saveConfig (KConfig* config, int myIndex,const QString& viewConfGrp);
00086     void restoreConfig ( class KateViewManager *viewMan, KConfig* config, const QString &group );
00087 
00088 
00089   protected:
00092     bool event( QEvent * );
00093 
00094   private:
00095     bool mIsActiveSpace;
00096     KateVSStatusBar* mStatusBar;
00097     QLabel* l;
00098     QPixmap i_active;
00099     QPixmap i_empty;
00100     QPtrList<Kate::View> mViewList;
00101     int mViewCount;
00102     KVSSBSep *sep;
00103     KateViewManager *m_viewManager;
00104     QString m_group;
00105 
00106   private slots:
00107     void slotStatusChanged (Kate::View *view, int r, int c, int ovr, bool block, int mod, const QString &msg);
00108 
00109   public slots:
00110     void polish();
00111     void modifiedOnDisc(Kate::Document *, bool, unsigned char);
00112 };
00113 
00114 #endif
00115 // kate: space-indent on; indent-width 2; replace-tabs on;
KDE Logo
This file is part of the documentation for kate Library Version 3.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Sep 8 02:43:14 2005 by doxygen 1.3.6 written by Dimitri van Heesch, © 1997-2003