kateprojecttreeview.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef __KATE_PROJECTTREEVIEW_H__
00022 #define __KATE_PROJECTTREEVIEW_H__
00023
00024 #include "katemain.h"
00025
00026 #include "../interfaces/project.h"
00027
00028 #include <klistview.h>
00029
00030 #include <qvbox.h>
00031 #include <qstringlist.h>
00032 #include <qdict.h>
00033
00034 class KateProjectTreeView;
00035
00036 class KateProjectTreeViewItem : public KListViewItem
00037 {
00038 public:
00039 KateProjectTreeViewItem (QDict<KateProjectTreeViewItem> *dict, KateProjectTreeView * parent, Kate::Project *prj, const QString &name, const QString &fullname, bool dir = false);
00040 KateProjectTreeViewItem (QDict<KateProjectTreeViewItem> *dict, KateProjectTreeViewItem * parent, Kate::Project *prj, const QString &name, const QString &fullname, bool dir = false);
00041 ~KateProjectTreeViewItem ();
00042
00043 void init ();
00044
00045 bool isDir () { return m_dir; };
00046
00047 QString name () { return m_name; };
00048
00049 QString fullName () { return m_fullName; };
00050
00051 int compare ( QListViewItem *i, int, bool ) const;
00052
00053 private:
00054 QString m_name;
00055 QString m_fullName;
00056 Kate::Project *m_project;
00057 bool m_dir;
00058 QDict<KateProjectTreeViewItem> *m_dict;
00059 };
00060
00061 class KateProjectTreeView : public KListView
00062 {
00063 Q_OBJECT
00064
00065 public:
00066 KateProjectTreeView (Kate::Project *project, class KateMainWindow *mainwin, QWidget *parent);
00067 ~KateProjectTreeView ();
00068
00069 void addDir (KateProjectTreeViewItem *parent, const QString &dir);
00070
00071 private slots:
00072 void slotDoubleClicked( QListViewItem *i, const QPoint &pos, int c );
00073
00074 void dirsAdded (const QString &dir, const QStringList &dirs);
00075 void dirsRemoved (const QString &dir, const QStringList &dirs);
00076
00077 void filesAdded (const QString &dir, const QStringList &files);
00078 void filesRemoved (const QString &dir, const QStringList &files);
00079
00080 void slotContextMenuRequested ( QListViewItem * item, const QPoint & pos, int col );
00081
00082 void removeIt ();
00083 void addIt ();
00084
00085
00086 void execute( QListViewItem * );
00087
00088 private:
00089 Kate::Project *m_project;
00090 class KateMainWindow *m_mainWin;
00091 QDict<KateProjectTreeViewItem> m_dirDict;
00092 };
00093
00094 class KateProjectTreeViewContainer : public QVBox
00095 {
00096 Q_OBJECT
00097 public:
00098 KateProjectTreeViewContainer( Kate::Project *project, class KateMainWindow *mainwin, QWidget*, const char* name=0 );
00099 ~KateProjectTreeViewContainer();
00100
00101 KateProjectTreeView * tree();
00102
00103 protected:
00104 bool eventFilter( QObject *, QEvent * );
00105
00106 private slots:
00107 void qfTextChanged( const QString & );
00108
00109 private:
00110 QString oldtext;
00111 class KLineEdit *m_leQF;
00112 KateProjectTreeView *m_tree;
00113 };
00114
00115 #endif
This file is part of the documentation for kate Library Version 3.3.90.