KDevelop API Documentation

filetreewidget.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2001-2002 by Bernd Gehrmann                             *
00003  *   bernd@kdevelop.org                                                    *
00004  *   Copyright (C) 2003 by Mario Scalas (VCS Support)                      *
00005  *   mario.scalas@libero.it                                                *
00006  *                                                                         *
00007  *   This program is free software; you can redistribute it and/or modify  *
00008  *   it under the terms of the GNU General Public License as published by  *
00009  *   the Free Software Foundation; either version 2 of the License, or     *
00010  *   (at your option) any later version.                                   *
00011  *                                                                         *
00012  ***************************************************************************/
00013 
00014 #ifndef _FILETREEWIDGET_H_
00015 #define _FILETREEWIDGET_H_
00016 
00017 #include <qguardedptr.h>
00018 #include <kfiletreeview.h>
00019 
00020 #include <kdevvcsfileinfoprovider.h>
00021 
00022 class FileViewPart;
00023 class FileTreeViewWidgetImpl;
00024 class KDevVersionControl;
00025 
00047 class FileTreeWidget : public KFileTreeView
00048 {
00049     Q_OBJECT
00050 public:
00051     FileTreeWidget( FileViewPart *part, QWidget *parent, KDevVCSFileInfoProvider *infoProvider );
00052     virtual ~FileTreeWidget();
00053 
00054     void openDirectory(const QString &dirName);
00055     bool shouldBeShown( KFileTreeViewItem* item );
00056 
00057     QString projectDirectory();
00058     QStringList projectFiles();
00059 
00060     FileViewPart *part() const { return m_part; }
00061 
00062     //KDevVCSFileInfoProvider *vcsFileInfoProvider() const;
00063     void applyHidePatterns( const QString &hidePatterns );
00064     QString hidePatterns() const;
00065 
00066     bool showNonProjectFiles() const;
00067 
00068 public slots:
00069     void hideOrShow();
00070 
00071 private slots:
00072     void slotItemExecuted(QListViewItem *item);
00073     void slotContextMenu(KListView *, QListViewItem *item, const QPoint &p);
00074 
00075     void addProjectFiles( QStringList const & fileList, bool constructing = false );
00076     void removeProjectFiles( QStringList const & fileList );
00077 
00080     void slotImplementationInvalidated();
00081 
00082 private:
00083     bool matchesHidePattern(const QString &fileName);
00084     KDevVersionControl *versionControl() const;
00085 
00086     QStringList m_hidePatterns;
00087     QStringList m_projectFiles;
00088 
00089     FileViewPart *m_part;
00090     KFileTreeBranch *m_rootBranch;
00091     QGuardedPtr<FileTreeViewWidgetImpl> m_impl;
00092 };
00093 
00094 #endif
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Feb 22 09:22:41 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003