Hi to all!

I am developing an application that will have a lot of menus. Now, I've prepared following code snippet:

Qt Code:
  1. m_pDataSourceAction=new QAction(tr("&Data source ..."), this);
  2. Q_CHECK_PTR(m_pDataSourceAction);
  3. m_pDataSourceAction->setShortcut(tr("Ctrl+D"));
  4. m_pDataSourceAction->setStatusTip(tr("Selects data source"));
  5. connect(m_pDataSourceAction, SIGNAL(triggered()), this, SLOT(dataSourceSelection()));
To copy to clipboard, switch view to plain text mode 

How do I transform this code snipper into an flexible method - method with paramateres ActionText, ShortcutCombo, StatusTipText, SourceSignal, TargetSlot. Now, method should return pointer to QAction, I am aware of that. But how do I declare signal and slot as a parameter of method?