menuCRM::menuCRM(GUIClient *Pparent) : QObject(Pparent) { setObjectName("crmModule"); parent = Pparent; toolBar = new QToolBar(tr("CRM Tools")); toolBar->setObjectName("CRM Tools"); toolBar->setIconSize(QSize(32, 32)); parent->addToolBar(toolBar); // Menus crmMenu = new QMenu(parent); projectsMenu = new QMenu(parent); incidentMenu = new QMenu(parent); todoMenu = new QMenu(parent); reportsMenu = new QMenu(parent); accountsMenu = new QMenu(parent); contactsMenu = new QMenu(parent); addressMenu = new QMenu(parent); utilitiesMenu = new QMenu(parent); masterMenu = new QMenu(parent); masterIncdMenu = new QMenu(parent); opportunityMenu = new QMenu(parent); masterOppMenu = new QMenu(parent); crmMenu->setObjectName("menu.crm"); projectsMenu->setObjectName("menu.crm.projects"); incidentMenu->setObjectName("menu.crm.incident"); todoMenu->setObjectName("menu.crm.todo"); reportsMenu->setObjectName("menu.crm.reports"); accountsMenu->setObjectName("menu.crm.accounts"); contactsMenu->setObjectName("menu.crm.contacts"); addressMenu->setObjectName("menu.crm.address"); utilitiesMenu->setObjectName("menu.crm.utilities"); masterMenu->setObjectName("menu.crm.master"); masterIncdMenu->setObjectName("menu.crm.masterincd"); opportunityMenu->setObjectName("menu.crm.opportunity"); masterOppMenu->setObjectName("menu.crm.masteropp"); actionProperties acts[] = { // CRM | Incident { "menu", tr("&Incident"), (char*)incidentMenu, crmMenu, "true", NULL, NULL, true , NULL }, { "crm.incident", tr("&New..."), SLOT(sIncident()), incidentMenu, "AddIncidents MaintainIncidents", NULL, NULL, true , NULL }, { "separator", NULL, NULL, incidentMenu, "true", NULL, NULL, true , NULL }, { "crm.incidentWorkbench", tr("&Workbench..."), SLOT(sIncidentWorkbench()), incidentMenu, "ViewIncidents MaintainIncidents", QPixmap(":/images/incidents.png"), toolBar, true , tr("Incident Workbench") }, // CRM / To Do { "menu", tr("&To-Do"), (char*)todoMenu, crmMenu, "true", NULL, NULL, true , NULL }, { "crm.todoItem", tr("&New..."), SLOT(sTodoItem()), todoMenu, "MaintainPersonalTodoList", NULL, NULL, true , NULL }, { "crm.todoList", tr("&List..."), SLOT(sTodoList()), todoMenu, "MaintainPersonalTodoList ViewPersonalTodoList", QPixmap(":/images/toDoList.png"), toolBar, true , tr("To-Do List") }, { "crm.todoListCalendar", tr("&Calendar List..."), SLOT(sTodoListCalendar()), todoMenu, "MaintainPersonalTodoList ViewPersonalTodoList", NULL, NULL, true, NULL}, // Project { "menu", tr("Pro&ject"), (char*)projectsMenu, crmMenu, "true", NULL, NULL, true , NULL }, { "pm.newProject", tr("&New..."), SLOT(sNewProject()), projectsMenu, "MaintainProjects", NULL, NULL, true , NULL }, { "pm.projects", tr("&List..."), SLOT(sProjects()), projectsMenu, "ViewProjects", QPixmap(":/images/projects.png"), toolBar, true , tr("List Projects") }, // Opportunity { "menu", tr("&Opportunity"), (char*)opportunityMenu, crmMenu, "true", NULL, NULL, true , NULL }, { "crm.newOpportunity", tr("&New..."), SLOT(sNewOpportunity()), opportunityMenu, "MaintainOpportunities", NULL, NULL, true , NULL }, { "crm.listOpportunity", tr("&List..."), SLOT(sOpportunities()), opportunityMenu, "MaintainOpportunities ViewOpportunities", NULL, NULL, true , NULL }, { "separator", NULL, NULL, crmMenu, "true", NULL, NULL, true , NULL }, // Reports { "menu", tr("&Reports"), (char*)reportsMenu, crmMenu, "true", NULL, NULL, true , NULL }, { "pm.dspOrderActivityByProject", tr("Order &Activity by Project..."), SLOT(sDspOrderActivityByProject()), reportsMenu, "ViewProjects", NULL, NULL, true , NULL }, { "separator", NULL, NULL, reportsMenu, "true", NULL, NULL, true , NULL }, { "crm.dspIncidentsByCRMAccount", tr("&Incidents by CRM Account..."), SLOT(sDspIncidentsByCRMAccount()), reportsMenu, "ViewCRMAccounts+ViewIncidents+ViewOtherTodoLists", NULL, NULL, true , NULL }, { "crm.dspTodoByUserAndIncident", tr("&To-Do List Items by User and Incident..."), SLOT(sDspTodoByUserAndIncident()), reportsMenu, "MaintainOtherTodoLists ViewOtherTodoLists", NULL, NULL, true , NULL }, { "separator", NULL, NULL, crmMenu, "true", NULL, NULL, true , NULL }, // CRM | Account { "menu", tr("&Account"), (char*)accountsMenu, crmMenu, "true", NULL, NULL, true , NULL }, { "crm.crmaccount", tr("&New..."), SLOT(sCRMAccount()), accountsMenu, "MaintainCRMAccounts", NULL, NULL, true , NULL }, { "crm.crmaccounts", tr("&List..."), SLOT(sCRMAccounts()), accountsMenu, "MaintainCRMAccounts ViewCRMAccounts", QPixmap(":/images/accounts.png"), toolBar, true , tr("List Accounts") }, { "crm.crmaccountsearch", tr("&Search..."),SLOT(sSearchForCRMAccount()),accountsMenu, "MaintainCRMAccounts ViewCRMAccounts", NULL, NULL, true , NULL }, // CRM | Contact { "menu", tr("&Contact"), (char*)contactsMenu, crmMenu, "true", NULL, NULL, true , NULL }, { "crm.contact", tr("&New..."), SLOT(sContact()), contactsMenu, "MaintainContacts", NULL, NULL, true , NULL }, { "crm.contacts", tr("&List..."), SLOT(sContacts()), contactsMenu, "MaintainContacts ViewContacts", QPixmap(":/images/contacts.png"), toolBar, true , tr("List Contacts") }, { "crm.contactsearch", tr("&Search..."), SLOT(sSearchForContact()), contactsMenu, "MaintainContacts ViewContacts", NULL, NULL, true , NULL }, // CRM | Address { "menu", tr("A&ddress"), (char*)addressMenu, crmMenu, "true", NULL, NULL, true , NULL }, { "crm.address", tr("&New..."), SLOT(sAddress()), addressMenu, "MaintainAddresses", NULL, NULL, true , NULL }, { "crm.addresses", tr("&List..."), SLOT(sAddresses()), addressMenu, "MaintainAddresses ViewAddresses", NULL, NULL, true , NULL }, { "separator", NULL, NULL, crmMenu, "true", NULL, NULL, true , NULL }, // Master Information { "menu", tr("&Master Information"), (char*)masterMenu, crmMenu, "true", NULL, NULL, true , NULL }, { "crm.honorifics", tr("&Titles..."), SLOT(sHonorifics()), masterMenu, "MaintainTitles ViewTitles", NULL, NULL, true , NULL }, { "menu", tr("&Incident"), (char*)masterIncdMenu, masterMenu, "true", NULL, NULL, true , NULL }, { "crm.incidentCategories", tr("&Categories..."), SLOT(sIncidentCategories()), masterIncdMenu, "MaintainIncidentCategories", NULL, NULL, true , NULL }, { "crm.incidentSeverities", tr("&Severities..."), SLOT(sIncidentSeverities()), masterIncdMenu, "MaintainIncidentSeverities", NULL, NULL, true , NULL }, { "crm.incidentResolutions", tr("&Resolutions..."), SLOT(sIncidentResolutions()), masterIncdMenu, "MaintainIncidentResolutions", NULL, NULL, true , NULL }, { "menu", tr("&Opportunity"), (char*)masterOppMenu, masterMenu, "true", NULL, NULL, true , NULL }, { "crm.opportunitySources", tr("&Sources..."), SLOT(sOpportunitySources()), masterOppMenu, "MaintainOpportunitySources", NULL, NULL, true , NULL }, { "crm.opportunityStages", tr("St&ages..."), SLOT(sOpportunityStages()), masterOppMenu, "MaintainOpportunityStages", NULL, NULL, true , NULL }, { "crm.opportunityTypes", tr("&Types..."), SLOT(sOpportunityTypes()), masterOppMenu, "MaintainOpportunityTypes", NULL, NULL, true , NULL }, { "crm.incidentPriorities", tr("&Priorities..."), SLOT(sIncidentPriorities()), masterMenu, "MaintainIncidentPriorities", NULL, NULL, true , NULL }, { "crm.characteristics", tr("C&haracteristics..."), SLOT(sCharacteristics()), masterMenu, "MaintainCharacteristics ViewCharacteristics", NULL, NULL, true , NULL }, //Utilities { "menu", tr("&Utilities"), (char*)utilitiesMenu, crmMenu, "true", NULL, NULL, true , NULL }, { "crm.replaceOwner", tr("Edit O&wners"), SLOT(sEditOwners()), utilitiesMenu, "EditOwner", NULL, NULL, true, NULL }, { "crm.createRecurringItems",tr("Create &Recurring Items..."), SLOT(sCreateRecurringItems()),utilitiesMenu, "MaintainIncidents MaintainProjects MaintainPersonalTodoList MaintainOthertodoLists", NULL, NULL, true, NULL } }; addActionsToMenu(acts, sizeof(acts) / sizeof(acts[0])); parent->populateCustomMenu(crmMenu, "CRM"); QAction * m = parent->menuBar()->addMenu(crmMenu); if(m) m->setText(tr("C&RM")); }
menuCRM::menuCRM(GUIClient *Pparent) : QObject(Pparent) { setObjectName("crmModule"); parent = Pparent; toolBar = new QToolBar(tr("CRM Tools")); toolBar->setObjectName("CRM Tools"); toolBar->setIconSize(QSize(32, 32)); parent->addToolBar(toolBar); // Menus crmMenu = new QMenu(parent); projectsMenu = new QMenu(parent); incidentMenu = new QMenu(parent); todoMenu = new QMenu(parent); reportsMenu = new QMenu(parent); accountsMenu = new QMenu(parent); contactsMenu = new QMenu(parent); addressMenu = new QMenu(parent); utilitiesMenu = new QMenu(parent); opportunityMenu = new QMenu(parent); crmMenu->setObjectName("menu.crm"); projectsMenu->setObjectName("menu.crm.projects"); incidentMenu->setObjectName("menu.crm.incident"); todoMenu->setObjectName("menu.crm.todo"); reportsMenu->setObjectName("menu.crm.reports"); accountsMenu->setObjectName("menu.crm.accounts"); contactsMenu->setObjectName("menu.crm.contacts"); addressMenu->setObjectName("menu.crm.address"); utilitiesMenu->setObjectName("menu.crm.utilities"); opportunityMenu->setObjectName("menu.crm.opportunity"); actionProperties acts[] = { // CRM | Incident { "menu", tr("&Incident"), (char*)incidentMenu, crmMenu, "true", NULL, NULL, true , NULL }, { "crm.incident", tr("&New..."), SLOT(sIncident()), incidentMenu, "MaintainPersonalIncidents MaintainAllIncidents", NULL, NULL, true , NULL }, { "crm.incidentList", tr("&List..."), SLOT(sIncidentWorkbench()), incidentMenu, "ViewPersonalIncidents MaintainPersonalIncidents ViewAllIncidents MaintainAllIncidents", new QPixmap(":/images/incidents.png"), toolBar, true , tr("Incident List") }, // CRM / To Do { "menu", tr("&To-Do"), (char*)todoMenu, crmMenu, "true", NULL, NULL, true , NULL }, { "crm.todoItem", tr("&New..."), SLOT(sTodoItem()), todoMenu, "MaintainPersonalToDoItems MaintainAllToDoItems", NULL, NULL, true , NULL }, { "crm.todoList", tr("&List..."), SLOT(sTodoList()), todoMenu, "MaintainPersonalToDoItems ViewPersonalToDoItems MaintainAllToDoItems ViewAllToDoItems", new QPixmap(":/images/toDoList.png"), toolBar, true , tr("To-Do List") }, { "crm.todoListCalendar", tr("&Calendar List..."), SLOT(sTodoListCalendar()), todoMenu, "MaintainPersonalToDoItems ViewPersonalToDoItems MaintainAllToDoItems ViewAllToDoItems", NULL, NULL, true, NULL}, // Project { "menu", tr("Pro&ject"), (char*)projectsMenu, crmMenu, "true", NULL, NULL, true , NULL }, { "pm.newProject", tr("&New..."), SLOT(sNewProject()), projectsMenu, "MaintainPersonalProjects MaintainAllProjects", NULL, NULL, true , NULL }, { "pm.projects", tr("&List..."), SLOT(sProjects()), projectsMenu, "ViewPersonalProjects MaintainPersonalProjects ViewAllProjects MaintainAllProjects", new QPixmap(":/images/projects.png"), toolBar, true , tr("List Projects") }, // Opportunity { "menu", tr("&Opportunity"), (char*)opportunityMenu, crmMenu, "true", NULL, NULL, true , NULL }, { "crm.newOpportunity", tr("&New..."), SLOT(sNewOpportunity()), opportunityMenu, "MaintainPersonalOpportunities MaintainAllOpportunities", NULL, NULL, true , NULL }, { "crm.listOpportunity", tr("&List..."), SLOT(sOpportunities()), opportunityMenu, "MaintainPersonalOpportunities ViewPersonalOpportunities MaintainAllOpportunities ViewAllOpportunities", NULL, NULL, true , NULL }, { "separator", NULL, NULL, crmMenu, "true", NULL, NULL, true , NULL }, // Reports { "menu", tr("&Reports"), (char*)reportsMenu, crmMenu, "true", NULL, NULL, true , NULL }, { "pm.dspOrderActivityByProject", tr("Order &Activity by Project..."), SLOT(sDspOrderActivityByProject()), reportsMenu, "ViewAllProjects ViewPersonalProjects", NULL, NULL, true , NULL }, { "separator", NULL, NULL, crmMenu, "true", NULL, NULL, true , NULL }, // CRM | Account { "menu", tr("&Account"), (char*)accountsMenu, crmMenu, "true", NULL, NULL, true , NULL }, { "crm.crmaccount", tr("&New..."), SLOT(sCRMAccount()), accountsMenu, "MaintainPersonalCRMAccounts MaintainAllCRMAccounts", NULL, NULL, true , NULL }, { "crm.crmaccounts", tr("&List..."), SLOT(sCRMAccounts()), accountsMenu, "MaintainPersonalCRMAccounts ViewPersonalCRMAccounts MaintainAllCRMAccounts ViewAllCRMAccounts", new QPixmap(":/images/accounts.png"), toolBar, true , tr("List Accounts") }, // CRM | Contact { "menu", tr("&Contact"), (char*)contactsMenu, crmMenu, "true", NULL, NULL, true , NULL }, { "crm.contact", tr("&New..."), SLOT(sContact()), contactsMenu, "MaintainPersonalContacts MaintainAllContacts", NULL, NULL, true , NULL }, { "crm.contacts", tr("&List..."), SLOT(sContacts()), contactsMenu, "MaintainPersonalContacts ViewPersonalContacts MaintainAllContacts ViewAllContacts", new QPixmap(":/images/contacts.png"), toolBar, true , tr("List Contacts") }, // CRM | Address { "menu", tr("A&ddress"), (char*)addressMenu, crmMenu, "true", NULL, NULL, true , NULL }, { "crm.address", tr("&New..."), SLOT(sAddress()), addressMenu, "MaintainAddresses", NULL, NULL, true , NULL }, { "crm.addresses", tr("&List..."), SLOT(sAddresses()), addressMenu, "MaintainAddresses ViewAddresses", NULL, NULL, true , NULL }, { "separator", NULL, NULL, crmMenu, "true", NULL, NULL, true , NULL }, //Utilities { "menu", tr("&Utilities"), (char*)utilitiesMenu, crmMenu, "true", NULL, NULL, true , NULL }, { "crm.replaceOwner", tr("Edit O&wners"), SLOT(sEditOwners()), utilitiesMenu, "EditOwner", NULL, NULL, true, NULL }, { "crm.createRecurringItems",tr("Create &Recurring Items..."), SLOT(sCreateRecurringItems()),utilitiesMenu, "MaintainPersonalIncidents MaintainPersonalIncidents MaintainAllIncidents MaintainAllProjects MaintainPersonalToDoItems MaintainAllToDoItems", NULL, NULL, true, NULL }, { "crm.contactMerge", tr("&Merge Contacts..."), SLOT(sContactMerge()), utilitiesMenu, "MergeContacts", NULL, NULL, true, NULL }, { "crm.crmaccountMerge", tr("Merge &Accounts..."), SLOT(sCrmaccountMerge()), utilitiesMenu, "MaintainAllCRMAccounts", NULL, NULL, true, NULL }, { "crm.setup", tr("&Setup..."), SLOT(sSetup()), crmMenu, NULL, NULL, NULL, true, NULL} }; addActionsToMenu(acts, sizeof(acts) / sizeof(acts[0])); parent->populateCustomMenu(crmMenu, "CRM"); QAction * m = parent->menuBar()->addMenu(crmMenu); if(m) m->setText(tr("C&RM")); }
vendorWorkBench::vendorWorkBench(QWidget* parent, const char *name, Qt::WFlags fl) : XWidget (parent, name, fl) { setupUi(this); QWidget *hideme = 0; if (_privileges->check("ViewPurchaseOrders")) { _po = new dspPOsByVendor(this, "dspPOsByVendor", Qt::Widget); _poTab->layout()->addWidget(_po); _po->setCloseVisible(false); hideme = _po->findChild<QWidget*>("_vendGroup"); hideme->hide(); VendorGroup *povend = _po->findChild<VendorGroup*>("_vend"); if (povend) { povend->setState(VendorGroup::Selected); connect(povend, SIGNAL(newVendId(int)), _po, SLOT(sFillList())); connect(_vend, SIGNAL(newId(int)), povend, SLOT(setVendId(int))); } _po->show(); } else _tabWidget->setTabEnabled(_tabWidget->indexOf(_poTab), false); if (_privileges->check("ViewPurchaseOrders")) { _receipts = new dspPoItemReceivingsByVendor(this, "dspPoItemReceivingsByVendor", Qt::Widget); _receiptsTab->layout()->addWidget(_receipts); _receipts->setCloseVisible(false); QWidget *rcptvend = _receipts->findChild<QWidget*>("_vendorGroup"); rcptvend->hide(); connect(rcptvend, SIGNAL(newId(int)), _receipts, SLOT(sFillList())); connect(_vend, SIGNAL(newId(int)), rcptvend, SLOT(setId(int))); } else _tabWidget->setTabEnabled(_tabWidget->indexOf(_receiptsTab), false); if (_privileges->check("MaintainPayments")) { _payables = new selectPayments(this, "selectPayments", Qt::Widget); _payablesTab->layout()->addWidget(_payables); hideme = _payables->findChild<QWidget*>("_close"); hideme->hide(); VendorGroup *payvend = _payables->findChild<VendorGroup*>("_vendorgroup"); payvend->setState(VendorGroup::Selected); payvend->hide(); connect(payvend, SIGNAL(newVendId(int)), _payables, SLOT(sFillList())); connect(_vend, SIGNAL(newId(int)), payvend, SLOT(setVendId(int))); } else _tabWidget->setTabEnabled(_tabWidget->indexOf(_payablesTab), false); if (_privileges->check("MaintainAPMemos") || _privileges->check("ViewAPMemos")) { _credits = new unappliedAPCreditMemos(this, "unappliedAPCreditMemos", Qt::Widget); _cmTab->layout()->addWidget(_credits); hideme = _credits->findChild<QWidget*>("_close"); hideme->hide(); VendorGroup *cmvend = _credits->findChild<VendorGroup*>("_vendorgroup"); cmvend->setState(VendorGroup::Selected); cmvend->hide(); connect(cmvend, SIGNAL(newVendId(int)), _credits, SLOT(sFillList())); connect(_vend, SIGNAL(newId(int)), cmvend, SLOT(setVendId(int))); } else _tabWidget->setTabEnabled(_tabWidget->indexOf(_cmTab), false); if (_privileges->check("MaintainPayments")) { _checks = new dspCheckRegister(this, "dspCheckRegister", Qt::Widget); _checksTab->layout()->addWidget(_checks); _checks->findChild<QWidget*>("_close")->hide(); _checks->findChild<QGroupBox*>("_recipGroup")->setChecked(true); _checks->findChild<QGroupBox*>("_recipGroup")->hide(); _checks->findChild<DateCluster*>("_dates")->setStartNull(tr("Earliest"), omfgThis->startOfTime(), TRUE); _checks->findChild<DateCluster*>("_dates")->setEndNull(tr("Latest"), omfgThis->endOfTime(), TRUE); VendorCluster *checkvend = _checks->findChild<VendorCluster*>("_vend"); connect(checkvend, SIGNAL(newId(int)), _checks, SLOT(sFillList())); connect(_vend, SIGNAL(newId(int)), checkvend, SLOT(setId(int))); } else _tabWidget->setTabEnabled(_tabWidget->indexOf(_checksTab), false); if (_privileges->check("ViewAPOpenItems")) { _history = new dspVendorAPHistory(this, "dspVendorAPHistory", Qt::Widget); _historyTab->layout()->addWidget(_history); _history->setCloseVisible(false); _history->findChild<QWidget*>("_vendGroup")->hide(); _history->findChild<DateCluster*>("_dates")->setStartNull(tr("Earliest"), omfgThis->startOfTime(), TRUE); _history->findChild<DateCluster*>("_dates")->setEndNull(tr("Latest"), omfgThis->endOfTime(), TRUE); VendorCluster *histvend = _history->findChild<VendorCluster*>("_vend"); connect(histvend, SIGNAL(newId(int)), _history, SLOT(sFillList())); connect(_vend, SIGNAL(newId(int)), histvend, SLOT(setId(int))); } else _tabWidget->setTabEnabled(_tabWidget->indexOf(_historyTab), false); connect(_crmacct, SIGNAL(clicked()), this, SLOT(sCRMAccount())); connect(_edit, SIGNAL(clicked()), this, SLOT(sVendor())); connect(_print, SIGNAL(clicked()), this, SLOT(sPrint())); connect(_vend, SIGNAL(newId(int)), this, SLOT(sPopulate())); connect(_contact1Button, SIGNAL(clicked()), this, SLOT(sHandleButtons())); connect(_contact2Button, SIGNAL(clicked()), this, SLOT(sHandleButtons())); _edit->setText(_privileges->check("MaintainVendors") ? tr("Edit") : tr("View")); _backlog->setPrecision(omfgThis->moneyVal()); _lastYearsPurchases->setPrecision(omfgThis->moneyVal()); _ytdPurchases->setPrecision(omfgThis->moneyVal()); _openBalance->setPrecision(omfgThis->moneyVal()); clear(); }
menuCRM::menuCRM(OpenMFGGUIClient *Pparent) : QObject(Pparent, "crmModule") { parent = Pparent; toolBar = new QToolBar(tr("CRM Tools")); toolBar->setObjectName("CRM Tools"); toolBar->setIconSize(QSize(32, 32)); if (_preferences->boolean("ShowCRMToolbar")) parent->addToolBar(toolBar); // Menus crmMenu = new QMenu(); projectsMenu = new QMenu(); incidentMenu = new QMenu(); todoMenu = new QMenu(); reportsMenu = new QMenu(); accountsMenu = new QMenu(); contactsMenu = new QMenu(); addressMenu = new QMenu(); utilitiesMenu = new QMenu(); masterMenu = new QMenu(); masterIncdMenu = new QMenu(); opportunityMenu = new QMenu(); masterOppMenu = new QMenu(); actionProperties acts[] = { // CRM | Incident { "menu", tr("&Incident"), (char*)incidentMenu, crmMenu, true, NULL, NULL, true , NULL }, { "crm.incident", tr("&New..."), SLOT(sIncident()), incidentMenu, _privleges->check("AddIncidents") || _privleges->check("MaintainIncidents"), NULL, NULL, true , NULL }, { "separator", NULL, NULL, incidentMenu, true, NULL, NULL, true , NULL }, { "crm.incidentWorkbench", tr("&Workbench..."), SLOT(sIncidentWorkbench()), incidentMenu, _privleges->check("ViewIncidents") || _privleges->check("MaintainIncidents"), new QPixmap(":/images/incidents.png"), toolBar, true , "Incident Workbench" }, // CRM / To Do { "menu", tr("&To-Do"), (char*)todoMenu, crmMenu, true, NULL, NULL, true , NULL }, { "crm.todoItem", tr("&New..."), SLOT(sTodoItem()), todoMenu, _privleges->check("MaintainPersonalTodoList"), NULL, NULL, true , NULL }, { "crm.todoList", tr("&List..."), SLOT(sTodoList()), todoMenu, _privleges->check("MaintainPersonalTodoList") || _privleges->check("ViewPersonalTodoList"),new QPixmap(":/images/toDoList.png"), toolBar, true , "To-Do List"}, // Project { "menu", tr("Pro&ject"), (char*)projectsMenu, crmMenu,true, NULL, NULL, true , NULL }, { "pm.newProject", tr("&New..."), SLOT(sNewProject()), projectsMenu, _privleges->check("MaintainProjects"), NULL, NULL, true , NULL }, { "pm.projects", tr("&List..."), SLOT(sProjects()), projectsMenu, _privleges->check("ViewProjects"), new QPixmap(":/images/projects.png"), toolBar, true , "List Projects" }, // Opportunity { "menu", tr("&Opportunity"), (char*)opportunityMenu, crmMenu, true, NULL, NULL, true , NULL }, { "crm.newOpportunity", tr("&New..."), SLOT(sNewOpportunity()), opportunityMenu, _privleges->check("MaintainOpportunities"), NULL, NULL, true , NULL }, { "crm.listOpportunity", tr("&List..."), SLOT(sOpportunities()), opportunityMenu, (_privleges->check("MaintainOpportunities") || _privleges->check("ViewOpportunities")), NULL, NULL, true , NULL }, { "separator", NULL, NULL, crmMenu, true, NULL, NULL, true , NULL }, // Reports { "menu", tr("&Reports"), (char*)reportsMenu, crmMenu, true, NULL, NULL, true , NULL }, { "pm.dspOrderActivityByProject", tr("Order &Activity by Project..."), SLOT(sDspOrderActivityByProject()), reportsMenu, _privleges->check("ViewProjects"), NULL, NULL, true , NULL }, { "separator", NULL, NULL, reportsMenu, true, NULL, NULL, true , NULL }, { "crm.dspIncidentsByCRMAccount", tr("&Incidents by CRM Account..."), SLOT(sDspIncidentsByCRMAccount()), reportsMenu, _privleges->check("ViewCRMAccounts") && _privleges->check("ViewIncidents") && _privleges->check("ViewOtherTodoLists"), NULL, NULL, true , NULL }, { "crm.dspTodoByUserAndIncident", tr("&To-Do List Items by User and Incident..."), SLOT(sDspTodoByUserAndIncident()), reportsMenu, _privleges->check("MaintainOtherTodoLists") || _privleges->check("ViewOtherTodoLists"), NULL, NULL, true , NULL }, { "separator", NULL, NULL, crmMenu, true, NULL, NULL, true , NULL }, // CRM | Account { "menu", tr("&Account"), (char*)accountsMenu, crmMenu, true, NULL, NULL, true , NULL }, { "crm.crmaccount", tr("&New..."), SLOT(sCRMAccount()), accountsMenu, _privleges->check("MaintainCRMAccounts"), NULL, NULL, true , NULL }, { "crm.crmaccounts", tr("&List..."), SLOT(sCRMAccounts()), accountsMenu, _privleges->check("MaintainCRMAccounts") || _privleges->check("ViewCRMAccounts"),new QPixmap(":/images/accounts.png"), toolBar, true , "List Accounts" }, { "crm.crmaccountsearch", tr("&Search..."),SLOT(sSearchForCRMAccount()),accountsMenu, _privleges->check("MaintainCRMAccounts") || _privleges->check("ViewCRMAccounts"), NULL, NULL, true , NULL }, // CRM | Contact { "menu", tr("&Contact"), (char*)contactsMenu, crmMenu, true, NULL, NULL, true , NULL }, { "crm.contact", tr("&New..."), SLOT(sContact()), contactsMenu, _privleges->check("MaintainContacts"), NULL, NULL, true , NULL }, { "crm.contacts", tr("&List..."), SLOT(sContacts()), contactsMenu, _privleges->check("MaintainContacts") || _privleges->check("ViewContacts"),new QPixmap(":/images/contacts.png"), toolBar, true , "List Contacts" }, { "crm.contactsearch", tr("&Search..."), SLOT(sSearchForContact()), contactsMenu, _privleges->check("MaintainContacts") || _privleges->check("ViewContacts"), NULL, NULL, true , NULL }, // CRM | Address { "menu", tr("A&ddress"), (char*)addressMenu, crmMenu, true, NULL, NULL, true , NULL }, { "crm.address", tr("&New..."), SLOT(sAddress()), addressMenu, _privleges->check("MaintainAddresses"), NULL, NULL, true , NULL }, { "crm.addresses", tr("&List..."), SLOT(sAddresses()), addressMenu, _privleges->check("MaintainAddresses") || _privleges->check("ViewAddresses"), NULL, NULL, true , NULL }, { "separator", NULL, NULL, crmMenu, true, NULL, NULL, true , NULL }, // Master Information { "menu", tr("&Master Information"), (char*)masterMenu, crmMenu, true, NULL, NULL, true , NULL }, { "crm.honorifics", tr("&Titles..."), SLOT(sHonorifics()), masterMenu, _privleges->check("MaintainTitles") || _privleges->check("ViewTitles"), NULL, NULL, true , NULL }, { "menu", tr("&Incident"), (char*)masterIncdMenu, masterMenu, true, NULL, NULL, true , NULL }, { "crm.incidentCategories", tr("&Categories..."), SLOT(sIncidentCategories()), masterIncdMenu, _privleges->check("MaintainIncidentCategories"), NULL, NULL, true , NULL }, { "crm.incidentPriorities", tr("&Priorities..."), SLOT(sIncidentPriorities()), masterIncdMenu, _privleges->check("MaintainIncidentPriorities"), NULL, NULL, true , NULL }, { "crm.incidentSeverities", tr("&Severities..."), SLOT(sIncidentSeverities()), masterIncdMenu, _privleges->check("MaintainIncidentSeverities"), NULL, NULL, true , NULL }, { "crm.incidentResolutions", tr("&Resolutions..."), SLOT(sIncidentResolutions()), masterIncdMenu, _privleges->check("MaintainIncidentResolutions"), NULL, NULL, true , NULL }, { "menu", tr("&Opportunity"), (char*)masterOppMenu, masterMenu, true, NULL, NULL, true , NULL }, { "crm.opportunitySources", tr("&Sources..."), SLOT(sOpportunitySources()), masterOppMenu, _privleges->check("MaintainOpportunitySources"), NULL, NULL, true , NULL }, { "crm.opportunityStages", tr("St&ages..."), SLOT(sOpportunityStages()), masterOppMenu, _privleges->check("MaintainOpportunityStages"), NULL, NULL, true , NULL }, { "crm.opportunityTypes", tr("&Types..."), SLOT(sOpportunityTypes()), masterOppMenu, _privleges->check("MaintainOpportunityTypes"), NULL, NULL, true , NULL }, { "crm.characteristics", tr("C&haracteristics..."), SLOT(sCharacteristics()), masterMenu, _privleges->check("MaintainCharacteristics") || _privleges->check("ViewCharacteristics"), NULL, NULL, true , NULL }, }; addActionsToMenu(acts, sizeof(acts) / sizeof(acts[0])); parent->populateCustomMenu(crmMenu, "CRM"); parent->menuBar()->insertItem(tr("&CRM"), crmMenu); }