00001 /* 00002 Author: Marco Costalba (C) 2005-2006 00003 00004 Copyright: See COPYING file that comes with this distribution 00005 00006 */ 00007 #ifndef REVSVIEW_H 00008 #define REVSVIEW_H 00009 00010 #include <qguardedptr.h> 00011 #include "revbase.h" // needed by moc_* file to understand tab() function 00012 #include "common.h" 00013 #include "domain.h" 00014 00015 class MainImpl; 00016 class Git; 00017 class FileHistory; 00018 class ListView; 00019 class ListBoxFiles; 00020 class PatchView; 00021 class TreeView; 00022 00023 class RevsView : public Domain { 00024 Q_OBJECT 00025 public: 00026 RevsView(MainImpl* parent, Git* git); 00027 ~RevsView(); 00028 void clear(bool keepState); 00029 void viewPatch(bool newTab); 00030 void setEnabled(bool b); 00031 virtual TabRev* tab() { return revTab; } 00032 00033 private slots: 00034 void on_loadCompleted(const FileHistory*, const QString& stats); 00035 void on_lanesContextMenuRequested(const QStringList&, const QStringList&); 00036 void on_droppedRevisions(const QStringList&); 00037 void on_updateRevDesc(); 00038 00039 protected: 00040 virtual bool doUpdate(bool force); 00041 00042 private: 00043 friend class MainImpl; 00044 00045 bool listBoxFiles_mouseMoveEvent(); 00046 bool listBoxFiles_mouseReleaseEvent(); 00047 void updateLineEditSHA(bool clear = false); 00048 00049 TabRev* revTab; 00050 QGuardedPtr<PatchView> linkedPatchView; 00051 TreeView* treeView; 00052 ListView* listViewLog; 00053 ListBoxFiles* listBoxFiles; 00054 }; 00055 00056 #endif