Пример #1
0
/*
 *  Constructs a currencyConversions as a child of 'parent', with the
 *  name 'name' and widget flags set to 'f'.
 *
 */
currencyConversions::currencyConversions(QWidget* parent, const char* name, Qt::WFlags fl)
    : XMainWindow(parent, name, fl)
{
    setupUi(this);

    (void)statusBar();

    // signals and slots connections
    connect(_close, SIGNAL(clicked()), this, SLOT(sClose()));
    connect(_conversionRates, SIGNAL(populateMenu(QMenu*,QTreeWidgetItem*,int)), this, SLOT(sPopulateMenu(QMenu*)));
    connect(_delete, SIGNAL(clicked()), this, SLOT(sDelete()));
    connect(_edit, SIGNAL(clicked()), this, SLOT(sEdit()));
    connect(_new, SIGNAL(clicked()), this, SLOT(sNew()));
    connect(_newCurrency, SIGNAL(clicked()), this, SLOT(sNewCurrency()));
    connect(_print, SIGNAL(clicked()), this, SLOT(sPrint()));
    connect(_view, SIGNAL(clicked()), this, SLOT(sView()));
    connect(_query, SIGNAL(clicked()), this, SLOT(sFillList()));
    init();
}
Пример #2
0
moduleMC::moduleMC(OpenMFGGUIClient *Pparent) :
  QObject(Pparent, "mcModule")
{
  QAction *actThis;

  parent = Pparent;

//  Currencies
  currenciesMenu = new QPopupMenu();

  actThis = new QAction(tr("New Currency..."), 0, currenciesMenu);
  connect(actThis, SIGNAL(activated()), SLOT(sNewCurrency()));
  actThis->addTo(currenciesMenu);

  actThis = new QAction(tr("Currencies..."), 0, currenciesMenu);
  connect(actThis, SIGNAL(activated()), SLOT(sCurrencies()));
  actThis->addTo(currenciesMenu);


//  Exchange Rates
  exchangeRatesMenu = new QPopupMenu();

  actThis = new QAction(tr("Post Exchange Rate..."), 0, exchangeRatesMenu);
  connect(actThis, SIGNAL(activated()), SLOT(sPostExchangeRate()));
  actThis->addTo(exchangeRatesMenu);


//  Displays
  displaysMenu = new QPopupMenu();


//  Reports
  reportsMenu = new QPopupMenu();

  mainMenu = new QPopupMenu();
  mainMenu->insertItem(tr("Currencies"), currenciesMenu);
  mainMenu->insertItem(tr("Exchange Rates"), exchangeRatesMenu);
  mainMenu->insertItem(tr("Displays"), displaysMenu);
  mainMenu->insertItem(tr("Reports"), reportsMenu);

  parent->menuBar()->insertItem(tr("M/C"), mainMenu);
}