Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members

projectview.h

00001 /***************************************************************************
00002                           projectview.h  -  Projekt docklet
00003                              -------------------
00004     begin                : Mon Feb 16 17:53:49 CEST 2004
00005     copyright            : (C) 2004 by Heiko Köhler
00006     email                : heicom@users.sourceforge.net
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017  
00018 #ifndef __PROJECTVIEW_H__
00019 #define __PROJECTVIEW_H__
00020 
00021 #include <qlistview.h>
00022 #include <qpopupmenu.h>
00023 
00024 class ProjectView;
00025 
00026 class ProjectFileItem : public QListViewItem
00027 {
00028     friend class ProjectView;
00029 public:
00030     ProjectFileItem( ProjectView *parent, QString file );
00031 private:
00032     QString fileName;
00033     ProjectView *view;
00034 };
00035 
00036 class ProjectView : public QListView
00037 {
00038     Q_OBJECT
00039     friend class ProjectFileItem;
00040 public:
00041     ProjectView( QWidget *parent, const char *name );
00042 public slots:
00043     void addFile( QString file );
00044     void removeFile( QString file );
00045     void setProjectDir( QString dir ) { projectDir = dir; }
00046 protected slots:
00047     void slotRemoveFile();
00048 protected:
00049     void contentsMouseDoubleClickEvent( QMouseEvent *e );
00050     void contextMenuEvent( QContextMenuEvent *e );
00051 signals:
00052     void loadFile(QString);
00053     void removedFile(QString);
00054 private:
00055     QString projectDir;
00056     QPopupMenu *contextMenu;
00057 };
00058 
00059 #endif

Generated on Sun May 2 20:02:58 2004 by doxygen 1.3.2