// // 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 // #include "ViewMenu.h" #include "ConfigOptions.h" #include "ImageManager.h" #include "qperforceWindow.h" #include "todo.h" #include <qcheckbox.h> #include <qmainwindow.h> #include <qpixmap.h> #include <qstatusbar.h> ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// ViewMenu::ViewMenu( QWidget* parent, const char* name ) : QPopupMenu( parent, name ) { setCheckable( true ); QString pixmapDir = ConfigOptions::getInstance()->getImageDir(); //====================================================================== // branchspec _showBranchSpecId = insertItem( ImageManager::getInstance()->getPixmap("branch.png"), "BranchSpecs"); setAccel( Key_F8, _showBranchSpecId ); //====================================================================== // changelists _changeLists = new QPopupMenu(); CHECK_PTR( _changeLists ); _showPendingChangeListsId = _changeLists->insertItem( ImageManager::getInstance()->getPixmap( "delta.png" ), "Pending Changelists", Key_F6 ); _showSubmittedChangeListsId = _changeLists->insertItem( ImageManager::getInstance()->getPixmap("delta.png"), "Submitted Changelists", Key_F7 ); insertItem( "ChangeLists", _changeLists ); _showClientSpecsId = insertItem( ImageManager::getInstance()->getPixmap("client.png"), "ClientSpecs" ); setAccel( Key_F10, _showClientSpecsId ); _showJobsId = insertItem( ImageManager::getInstance()->getPixmap("job.png"), "Jobs" ); setAccel( Key_F12, _showJobsId ); //====================================================================== // labels _showLabelsId = insertItem( ImageManager::getInstance()->getPixmap("label.png"), "Labels" ); setAccel( Key_F9, _showLabelsId ); //====================================================================== // users _usersId = insertItem( ImageManager::getInstance()->getPixmap("/people.png"), "Users" ); setAccel( Key_F11, _usersId ); insertSeparator(); insertItem( "Client View of Depot", this, SLOT(slotClientViewOfDepot()) ); insertItem( "Local View of Depot", this, SLOT(slotLocalViewOfDepot()) ); insertItem( "Local View of Client Tree", this, SLOT(slotLocalViewOfClientTree()) ); insertItem( "Entire Depot", this, SLOT(slotEntireDepot()) ); insertSeparator(); insertItem( "Filter Depot...", this, SLOT(slotFilterDepot()) ); insertItem( "Clear Filter", this, SLOT(slotClearFilter()) ); insertSeparator(); _showToolBarId = insertItem( "Show Toolbar", this, SLOT(slotShowToolBar()) ); setItemChecked( _showToolBarId, true ); _showStatusBarId = insertItem( "Show Status Bar", this, SLOT(slotShowStatusBar()) ); setItemChecked( _showStatusBarId, true ); insertSeparator(); _bookMarks = new QPopupMenu(); CHECK_PTR( _bookMarks ); _bookMarks->insertItem( "Add Bookmark", this, SLOT(slotAddBoomark()) ); _bookMarks->insertItem( "Organize Bookmarks", this, SLOT(slotOrganizeBookmarks()) ); insertItem( "Bookmarks", _bookMarks, CTRL+Key_B ); insertItem( "View Warnings and Errors...", this, SLOT(slotViewWarningsAndErrors()) ); insertItem( "Refresh Active Pane", this, SLOT(slotRefreshActivePane()), CTRL+Key_F5 ); } ViewMenu::~ViewMenu() { } void ViewMenu::slotClientViewOfDepot() { TODO(); } void ViewMenu::slotLocalViewOfDepot() { TODO(); } void ViewMenu::slotLocalViewOfClientTree() { TODO(); } void ViewMenu::slotEntireDepot() { TODO(); } void ViewMenu::slotFilterDepot() { TODO(); } void ViewMenu::slotClearFilter() { TODO(); } void ViewMenu::slotShowToolBar() { TODO(); } void ViewMenu::slotShowStatusBar() { QMainWindow* win = qperforceWindow::getInstance(); ASSERT( win != NULL ); QStatusBar* statusBar = win->statusBar(); ASSERT( statusBar != NULL ); bool b = isItemChecked( _showStatusBarId ); setItemChecked( _showStatusBarId, !b ); if (b) { statusBar->hide(); } else { statusBar->show(); } } void ViewMenu::slotAddBoomark() { TODO(); } void ViewMenu::slotOrganizeBookmarks() { TODO(); } void ViewMenu::slotViewWarningsAndErrors() { TODO(); } void ViewMenu::slotRefreshActivePane() { TODO(); }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#9 | 2217 | Jacob Gladish |
More work on the configuration options dialog box. Added the sub-class that will implement all the slot functionality (ConfigOptionsDialogImpl) |
||
#8 | 2216 | Jacob Gladish | Added the .ui/xml file for the Configuration Dialog box. | ||
#7 | 2145 | Jacob Gladish | Added PendingChanges listview | ||
#6 | 2141 | Jacob Gladish |
Begun adding toolbar buttons, and added connection info. Added some missing files from project. |
||
#5 | 2127 | Jacob Gladish | Added client's table. | ||
#4 | 2118 | Jacob Gladish | changed server interface to use perforce c++ api instead of p4 command. | ||
#3 | 2103 | Jacob Gladish | Added Job table | ||
#2 | 2100 | Jacob Gladish | Adding more menu's, tables, and a few icons. | ||
#1 | 2092 | Jacob Gladish | Importing initial code |