//
// 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
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//
#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:
User( const QString& uname,
const QString& email,
const QString& fullName,
int month,
int day,
int year );
User( const QString& p4Ouput );
virtual ~User();
inline const QString& getUserName() const;
inline const QString& getEmail() const;
inline const QString& getFullName() const;
inline const QDate& getLastAccessed() const;
private:
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