// // 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. // #include "ChangeListMenu.h" #include "P4Process.h" #include "SubmittedChangeList.h" #include "todo.h" #include "WidgetId.h" #include <qbuttongroup.h> #include <qradiobutton.h> #define ADD_BUTTON_TO_GROUP( B, G, POPUP )\ G->insert(B);\ POPUP->insertItem(B); ChangeListMenu::ChangeListMenu( QWidget* parent, const char* name ) : QPopupMenu( parent, name ) { insertItem( "New...", this, SLOT(slotNew()) ); insertItem( "Edit Spec...", this, SLOT(slotEditSpec()) ); insertItem( "Describe...", this, SLOT(slotDescribe()) ); insertItem( "Describe Changelist...", this, SLOT(slotDescribeChangeList()) ); insertItem( "Delete", this, SLOT(slotDelete()) ); insertItem( "Submit...", this, SLOT(slotSubmit()) ); insertSeparator(); insertItem( "Add Job Fix...", this, SLOT(slotAddJobFix()) ); insertItem( "Describe Job Fix...", this, SLOT(slotDescribeJobFix()) ); insertItem( "Remove Job Fix", this, SLOT(slotRemoveJobFix()) ); insertItem( "Revert Unchanged Files", this, SLOT(slotRevertUnchangedFiles()) ); insertItem( "Sync to Changelist...", this, SLOT(slotSyncToChangeList()) ); // TODO: make sub-men insertItem( "Integrate", this, SLOT(slotIntegrate()) ); insertSeparator(); insertItem( "Sort Files in Pending Changelists by Extension", this, SLOT(slotSortFilesInPendingChangelistsByExtension()) ); insertItem( "Sort Changes by User", this, SLOT(slotSortChangesByUser()) ); insertSeparator(); //====================================================================== // filter radio buttons // _buttonGroup = new QButtonGroup(); QObject::connect( _buttonGroup, SIGNAL(clicked(int)), this, SLOT(slotFilterChangelists(int)) ); _unfilteredSubmittedChangelists = new QRadioButton( "Unfiltered Submitted Changelists", _buttonGroup ); ADD_BUTTON_TO_GROUP( _unfilteredSubmittedChangelists, _buttonGroup, this ); _fscForSelectedFiles = new QRadioButton( "Filtered Submitted Changelists for Selected Files", _buttonGroup ); ADD_BUTTON_TO_GROUP( _fscForSelectedFiles, _buttonGroup, this ); _fscForSelectedFilesIncludingIntegrations = new QRadioButton( "Filtered Submitted Changelists for Selected Files, including Integrations", _buttonGroup ); ADD_BUTTON_TO_GROUP( _fscForSelectedFilesIncludingIntegrations, _buttonGroup, this ); _fscByClient = new QRadioButton( "Filtered Submitted Changelists by Client...", _buttonGroup ); ADD_BUTTON_TO_GROUP( _fscByClient, _buttonGroup, this ); _fscByUser = new QRadioButton( "Filtered Submitted Changelists by User...", _buttonGroup ); ADD_BUTTON_TO_GROUP( _fscByUser, _buttonGroup, this ); //====================================================================== insertSeparator(); insertItem( "View Pending Changelists", this, SLOT(slotViewPendingChangelists()) ); insertItem( "View Submitted Changelists", this, SLOT(slotViewSubmittedChangelists()) ); } ChangeListMenu::~ChangeListMenu() { } void ChangeListMenu::slotNew() { TODO(); } void ChangeListMenu::slotEditSpec() { TODO(); } void ChangeListMenu::slotDescribe() { TODO(); } void ChangeListMenu::slotDescribeChangeList() { TODO(); } void ChangeListMenu::slotDelete() { TODO(); } void ChangeListMenu::slotSubmit() { TODO(); } void ChangeListMenu::slotAddJobFix() { TODO(); } void ChangeListMenu::slotDescribeJobFix() { TODO(); } void ChangeListMenu::slotRemoveJobFix() { TODO(); } void ChangeListMenu::slotRevertUnchangedFiles() { TODO(); } void ChangeListMenu::slotSyncToChangeList() { TODO(); } void ChangeListMenu::slotIntegrate() { TODO(); } void ChangeListMenu::slotSortFilesInPendingChangelistsByExtension() { TODO(); } void ChangeListMenu::slotSortChangesByUser() { TODO(); } void ChangeListMenu::slotFilterChangelists( int n ) { TODO(); } void ChangeListMenu::slotViewPendingChangelists() { TODO(); } void ChangeListMenu::slotViewSubmittedChangelists() { ASSERT( _submittedChangeListsTable != NULL ); _submittedChangeListCache.updateCacheIfNecessary(); _submittedChangeListsTable->clear(); Perforce::SubmittedChangeList* c; Perforce::SubmittedChangeListList changes = _submittedChangeListCache.getCache(); for (c = changes.first(); c != NULL; c = changes.next()) { _submittedChangeListsTable->addSubmittedChangeList( c ); } emit showSubmittedChangeLists( SUBMITTED_CHANGELISTS_TABLE ); } void ChangeListMenu::setSubmittedChangeListsView( SubmittedChangeListsTable* t ) { ASSERT( t != NULL ); this->_submittedChangeListsTable = t; } ChangeListMenu::SubmittedChangeListCache::SubmittedChangeListCache() { } void ChangeListMenu::SubmittedChangeListCache::updateCache() { P4Process p4; _cache = p4.getSubmittedChangeLists(); }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#10 | 2190 | Jacob Gladish | Added more functionality to the DepotView tree | ||
#9 | 2152 | Jacob Gladish | Added a couple more images, and non-blocking server communication | ||
#8 | 2147 | Jacob Gladish | Added more functionality to the pending changes list, and added asynchronous access to the server. | ||
#7 | 2145 | Jacob Gladish | Added PendingChanges listview | ||
#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 | 2100 | Jacob Gladish | Adding more menu's, tables, and a few icons. | ||
#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 | 2094 | Jacob Gladish | Added the Changelist menu |