filelist.h

Go to the documentation of this file.
00001 /*
00002         Author: Marco Costalba (C) 2005-2006
00003 
00004         Copyright: See COPYING file that comes with this distribution
00005 */
00006 #ifndef FILELIST_H
00007 #define FILELIST_H
00008 
00009 #include <qobject.h>
00010 #include <qlistbox.h>
00011 #include "common.h"
00012 
00013 class Domain;
00014 class StateInfo;
00015 class Git;
00016 
00017 class ListBoxFileItem: public QListBoxText {
00018 public:
00019         ListBoxFileItem(QListBox* lb, SCRef t, const QColor& c);
00020         virtual void paint(QPainter* p);
00021 
00022 private:
00023         QColor myColor;
00024 };
00025 
00026 class ListBoxFiles: public QObject {
00027 Q_OBJECT
00028 public:
00029         ListBoxFiles(Domain* mi, Git* g, QListBox* l);
00030 
00031         void clear();
00032         void update(const RevFile* files, bool newFiles);
00033 
00034 signals:
00035         void contextMenu(const QString&, int);
00036 
00037 private slots:
00038         void on_currentChanged(QListBoxItem* item);
00039         void on_contextMenuRequested(QListBoxItem* item);
00040         void on_mouseButtonPressed(int, QListBoxItem*, const QPoint&);
00041         void on_clicked(QListBoxItem*);
00042         void on_onItem(QListBoxItem*);
00043         void on_onViewport();
00044 
00045 private:
00046         void insertFiles(const RevFile* files);
00047         void mouseMoved();
00048 
00049         Domain* d;
00050         Git* git;
00051         QListBox* lb;
00052         StateInfo* st;
00053         QString dragFileName;
00054 };
00055 
00056 #endif

Generated on Fri Dec 7 21:57:37 2007 for QGit by  doxygen 1.5.3