katefilelist.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __KATE_FILELIST_H__
00022 #define __KATE_FILELIST_H__
00023
00024 #include "katemain.h"
00025
00026 #include <kate/document.h>
00027
00028 #include <klistbox.h>
00029
00030 #include <qtooltip.h>
00031 #include <qcolor.h>
00032
00033 class KateFileListItem : public QListBoxItem
00034 {
00035 public:
00036 KateFileListItem( KateDocManager *_docManager, Kate::Document *doc, uint documentNumber, const QString& text);
00037 ~KateFileListItem();
00038
00039 uint documentNumber ();
00040
00041 void setText(const QString &text);
00042
00043 int height( const QListBox* lb ) const;
00044
00045 int width( const QListBox* lb ) const;
00046
00047 protected:
00048 void paint( QPainter *painter );
00049
00050 private:
00051 uint myDocID;
00052 Kate::Document *doc;
00053 KateDocManager *docManager;
00054 };
00055
00056 class KateFileList : public KListBox
00057 {
00058 Q_OBJECT
00059
00060 public:
00061 KateFileList (KateDocManager *_docManager, KateViewManager *_viewManager, QWidget * parent = 0, const char * name = 0 );
00062 ~KateFileList ();
00063
00069 void tip( const QPoint &p, QRect &r, QString &str );
00070
00071 void setSortType (int s);
00072 int sortType () const { return m_sort; };
00073 void updateSort ();
00074
00075 enum sorting {
00076 sortByID = 0,
00077 sortByName = 1
00078 };
00079
00080 public slots:
00081 void slotNextDocument();
00082 void slotPrevDocument();
00083
00084 private:
00085 KateDocManager *docManager;
00086 KateViewManager *viewManager;
00087 int m_sort;
00088 bool notify;
00089
00090 private slots:
00091 void slotDocumentCreated (Kate::Document *doc);
00092 void slotDocumentDeleted (uint documentNumber);
00093 void slotActivateView( QListBoxItem *item );
00094 void slotModChanged (Kate::Document *doc);
00095 void slotModifiedOnDisc (Kate::Document *doc, bool b, unsigned char reason);
00096 void slotNameChanged (Kate::Document *doc);
00097 void slotViewChanged ();
00098 void slotMenu ( QListBoxItem *item, const QPoint &p );
00099
00100 private:
00102
00103
00104
00106
00107 {
00108 public:
00109 KFLToolTip(QWidget *parent);
00110
00111 protected:
00112 void maybeTip( const QPoint & );
00113 };
00114 KFLToolTip* tooltip;
00115 };
00116
00117 #endif
This file is part of the documentation for kate Library Version 3.2.2.