// // 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. // #include "UserMenu.h" #include "P4Process.h" #include "todo.h" #include "User.h" #include "WidgetId.h" ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// UserMenu::UserMenu( QWidget* parent, const char* name ) : QPopupMenu( parent, name ) { insertItem( "New..", this, SLOT(slotNew()) ); insertItem( "Edit...", this, SLOT(slotEdit()) ); insertItem( "Describe...", this, SLOT(slotDescribe()) ); insertItem( "Delete", this, SLOT(slotDelete()) ); insertSeparator(); insertItem( "Set Password for...", this, SLOT(slotSetPasswordFor()) ); insertItem( "Switch to User", this, SLOT(slotSwitchToUser()) ); insertItem( "Set Default User", this, SLOT(slotSetDefaultUser()) ); insertSeparator(); insertItem( "View Changes by", this, SLOT(slotViewChangesBy()) ); insertItem( "View Users", this, SLOT(slotViewUsers()) ); } UserMenu::~UserMenu() { } void UserMenu::slotNew() { TODO(); } void UserMenu::slotEdit() { TODO(); } void UserMenu::slotDescribe() { TODO(); } void UserMenu::slotDelete() { TODO(); } void UserMenu::slotSetPasswordFor() { TODO(); } void UserMenu::slotSwitchToUser() { TODO(); } void UserMenu::slotSetDefaultUser() { TODO(); } void UserMenu::slotViewChangesBy() { TODO(); } void UserMenu::setListView( UserTable* view ) { ASSERT( view != NULL ); _myView = view; } void UserMenu::slotViewUsers() { // if the users list is empty, and wants to be refreshed updateCacheIfNecessary(); _myView->clear(); for (Perforce::User* u = _cache.first(); u != NULL; u = _cache.next()) { // do something with these guys. ASSERT( u != NULL ); ASSERT( _myView != NULL ); _myView->addUser( u ); // qDebug( "%s %s %s %s", // u->getFullName().latin1(), // u->getUserName().latin1(), // u->getEmail().latin1(), // u->getLastAccessed().toString().latin1() ); } // signal that we're showing the users emit showUsers( USERS_TABLE ); } void UserMenu::updateCache() { qDebug( "Updating user cache" ); P4Process p4; _cache = p4.getUsers(); }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#9 | 3782 | Jacob Gladish | I have no clue... | ||
#8 | 2152 | Jacob Gladish | Added a couple more images, and non-blocking server communication | ||
#7 | 2147 | Jacob Gladish | Added more functionality to the pending changes list, and added asynchronous access to the server. | ||
#6 | 2128 | Jacob Gladish | Renamed changelist to change | ||
#5 | 2118 | Jacob Gladish | changed server interface to use perforce c++ api instead of p4 command. | ||
#4 | 2103 | Jacob Gladish | Added Job table | ||
#3 | 2098 | Jacob Gladish |
changed the IUpdateable abstract class to be a template. The template parameter is the structure that backs the storage for the class. |
||
#2 | 2095 | Jacob Gladish | Added ability to view submitted changelists. | ||
#1 | 2092 | Jacob Gladish | Importing initial code |