//
// 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 __PERFORCE_USER_H__
#define __PERFORCE_USER_H__
#include <qpixmap.h>
#include <qdatetime.h>
#include <qlist.h>
#include <qlistview.h>
#include <qstring.h>
namespace Perforce {
class User;
typedef QList< User > UserList;
// Jacob_Gladish <Jacob_Gladish@sellout> (Jacob_Gladish) accessed 2002/09/07
class User
{
public:
static User* createNewUser( const QString& p4out );
virtual ~User();
inline const QString& getUserName() const;
inline const QString& getEmail() const;
inline const QString& getFullName() const;
inline const QDate& getLastAccessed() const;
private:
User( const QString& uname,
const QString& email,
const QString& fullName,
int month,
int day,
int year );
User( const QString& p4Ouput );
QString _userName;
QString _email;
QString _fullName;
QDate _lastAccess;
};
inline const QString& User::getUserName() const { return _userName; }
inline const QString& User::getEmail() const { return _email; }
inline const QString& User::getFullName() const { return _fullName; }
inline const QDate& User::getLastAccessed() const { return _lastAccess; }
}
//========================================================================
// The Widget to display the users.
//
class UserTable : public QListView
{
public:
UserTable( QWidget* parent = 0, const char* name = 0 );
void addUser( const Perforce::User* u );
private:
static QPixmap* _userBitmap;
};
#endif