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 );
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 // kate: space-indent on; indent-width 2; replace-tabs on;
KDE Logo
This file is part of the documentation for kate Library Version 3.4.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Jun 14 01:19:51 2006 by doxygen 1.4.0 written by Dimitri van Heesch, © 1997-2003