//
// QPerforce is a gui interface to the perforce revision control
// system. It is based on the qt library, and should be easily portable
// across any platform that has this toolkit available.
//
// Copyright (C) 2002 Jacob Gladish
//
// TODO: find legit copyright.
//
#ifndef __CHANGE_H__
#define __CHANGE_H__
#include "FileEntry.h"
#include "IUpdateable.h"
#include "P4Item.h"
namespace Perforce {
class Change;
typedef QList< Change > ChangesList;
typedef enum ChangeStatus {
All,
Pending,
Submitted
};
class Change : public P4Item
{
public:
virtual ~Change() { }
static const ChangesList& getChanges();
static const ChangesList& getPendingChanges();
static void updateAllOpenedFiles();
inline int getChangeNumber( void ) const
{ return ( _name == "default" ? -1 : _name.toInt() ); }
inline const QString& getUser( void ) const
{ return _user; }
inline const QString& getClient( void ) const
{ return _client; }
const FileEntryList& getOpenedFiles() const
{ return _openedFiles; }
private:
QString _user;
QString _client;
/// List of possible opened files.
FileEntryList _openedFiles;
bool addOpenedFile( FileEntry* f );
private:
static Change* create_change( StrDict* varList );
struct ChangesCache : public IUpdateable< ChangesList > {
void updateCache();
void OutputStat( StrDict* varList );
void HandleError( Error* err );
void getChange( int n );
};
struct PendingChangesCache : public IUpdateable< ChangesList > {
void updateCache();
void updateOpenedFiles();
bool userHasDefaultChange( const QString& client );
void OutputStat( StrDict* varList );
void HandleError( Error* err );
};
struct OpenedFilesUI : public ClientUser {
ChangesList* _changes;
Change* getOpenedFileParent( const QString& name, const QString& client );
void HandleError( Error* err );
void OutputStat( StrDict* varList );
};
friend ChangesCache;
friend PendingChangesCache;
friend OpenedFilesUI;
static ChangesCache _changesCache;
static PendingChangesCache _pendingChangesCache;
};
} // end namespace
#endif
# |
Change |
User |
Description |
Committed |
|
#3
|
2147 |
Jacob Gladish |
Added more functionality to the pending changes list, and added asynchronous access to the server. |
|
|
#2
|
2145 |
Jacob Gladish |
Added PendingChanges listview |
|
|
#1
|
2128 |
Jacob Gladish |
Renamed changelist to change |
|
|
//guest/jacob_gladish/qperforce/include/ChangeList.h |
#1
|
2127 |
Jacob Gladish |
Added client's table. |
|
|
//guest/jacob_gladish/qperforce/include/SubmittedChangeList.h |
#2
|
2118 |
Jacob Gladish |
changed server interface to use perforce c++ api instead of p4 command. |
|
|
#1
|
2095 |
Jacob Gladish |
Added ability to view submitted changelists. |
|
|