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")); }