/*! Add the toolbar item */ void AgendaEventView::addToolBarItem(AgendaEventViewer::Actions action) { OstTraceFunctionEntry0( AGENDAEVENTVIEW_ADDTOOLBARITEM_ENTRY ); HbToolBar *toolBar = qobject_cast<HbToolBar *> ( mDocLoader->findWidget(AGENDA_EVENT_VIEWER_TOOLBAR)); // Load all the actions for event viewer if ((action == AgendaEventViewer::ActionEditDelete) || (action == AgendaEventViewer::ActionEdit)) { HbAction *editAction = new HbAction(); editAction->setIcon(HbIcon("qtg_mono_edit")); connect(editAction, SIGNAL(triggered()), this, SLOT(edit())); toolBar->addAction(editAction); } if ((action == AgendaEventViewer::ActionEditDelete) || (action == AgendaEventViewer::ActionDelete)) { HbAction *deleteAction = new HbAction(); deleteAction->setIcon(HbIcon("qtg_mono_delete")); connect(deleteAction, SIGNAL(triggered()), this, SLOT(deleteAgendaEntry())); toolBar->addAction(deleteAction); } if (action == AgendaEventViewer::ActionSave) { HbAction *saveAction = new HbAction(); saveAction->setIcon(HbIcon("qtg_mono_add_to_calendar")); connect(saveAction, SIGNAL(triggered()), this, SLOT(saveAgendaEntry())); toolBar->addAction(saveAction); } OstTraceFunctionExit0( AGENDAEVENTVIEW_ADDTOOLBARITEM_EXIT ); }
void QtSyncStatusLogView::createMenu() { HbMenu* myMenu = menu(); connect( myMenu->addAction( tr("Update")), SIGNAL( triggered() ), SLOT( updateView() ) ); connect( myMenu->addAction( tr("Delete log")), SIGNAL( triggered() ), SLOT( deleteLog() ) ); connect( myMenu->addAction( tr("Back")), SIGNAL( triggered() ), SLOT( goToMainView() ) ); HbToolBar* myToolBar = toolBar(); connect( myToolBar->addAction( tr("Update")), SIGNAL( triggered() ), SLOT( updateView() ) ); connect( myToolBar->addAction( tr("Delete log")), SIGNAL( triggered() ), SLOT( deleteLog() ) ); connect( myToolBar->addAction( tr("Back")), SIGNAL( triggered() ), SLOT( goToMainView() ) ); }
HbServiceClientView::HbServiceClientView(QGraphicsItem *parent) : HbView(parent) { XQSERVICE_DEBUG_PRINT("HbServiceClientView::HbServiceClientView"); setTitle(tr("HB Service client view")); QGraphicsLinearLayout* layout = new QGraphicsLinearLayout(Qt::Vertical,this); layout->addItem(new HbLabel("Call service",this)); mNumberEdit = new HbLineEdit(this); mNumberEdit->setText("+35850123456789"); layout->addItem(mNumberEdit); mServiceEdit = new HbLineEdit(this); mServiceEdit->setText("com.nokia.services.hbserviceprovider.Dialer"); layout->addItem(mServiceEdit); /* mServiceEmbedded = HbCheckBox("Embedded",this) mServiceEmbedded->setTristate(true); layout->addItem(mServiceEmbedded); */ mRetValue = new HbLineEdit(this); mRetValue->setText("*****"); layout->addItem(mRetValue); layout->addItem(new HbLabel("Map service",this)); mAddressEdit = new HbLineEdit(this); mAddressEdit->setText("Karakaari 13"); layout->addItem(mAddressEdit); mCityEdit = new HbLineEdit(this); mCityEdit->setText("Espoo"); layout->addItem(mCityEdit); mCountryEdit = new HbLineEdit(this); mCountryEdit->setText("Finland"); layout->addItem(mCountryEdit); mServiceMapEdit = new HbLineEdit(this); mServiceMapEdit->setText("com.nokia.services.hbserviceprovider.Map"); layout->addItem(mServiceMapEdit); mRetMapValue = new HbLineEdit(this); mRetMapValue->setText("*****"); layout->addItem(mRetMapValue); setLayout(layout); HbToolBar* toolBar = this->toolBar(); HbAction* callAction = new HbAction("Call"); connect(callAction, SIGNAL(triggered()), this, SLOT(callContact())); HbAction* callEmbeddedAction = new HbAction("Call Embedded"); connect(callEmbeddedAction, SIGNAL(triggered()), this, SLOT(callContactEmbedded())); HbAction* showAddressesAction = new HbAction("Select contacts"); connect(showAddressesAction, SIGNAL(triggered()), this, SLOT(launchContactSelecting())); toolBar->addAction(callAction); toolBar->addAction(callEmbeddedAction); toolBar->addAction(showAddressesAction); sndAsync = NULL; }