int DeleteWidgt::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: on_measureDelButton_clicked(); break; case 1: on_comboBox_currentIndexChanged((*reinterpret_cast< int(*)>(_a[1]))); break; case 2: on_deleteButton_clicked(); break; default: ; } _id -= 3; } return _id; }
InvoicePage::InvoicePage(QWidget *parent) : QWidget(parent), ui(new Ui::InvoicePage), model(0) { ui->setupUi(this); #ifdef Q_OS_MAC // Icons on push buttons are very uncommon on Mac ui->deleteButton->setIcon(QIcon()); #endif // Context menu actions replyAction = new QAction(ui->replyButton->text(), this); payAction = new QAction(ui->payButton->text(), this); resendAction = new QAction(ui->resendButton->text(), this); receiptAction = new QAction(ui->receiptButton->text(), this); copyFromAddressAction = new QAction(ui->copyFromAddressButton->text(), this); copyToAddressAction = new QAction(ui->copyToAddressButton->text(), this); deleteAction = new QAction(ui->deleteButton->text(), this); //viewAction = new QAction(tr("&View Invoice"), this); // Build context menu contextMenu = new QMenu(); contextMenu->addAction(replyAction); contextMenu->addAction(copyFromAddressAction); contextMenu->addAction(copyToAddressAction); contextMenu->addAction(deleteAction); //contextMenu->addAction(viewAction); connect(payAction, SIGNAL(triggered()), this, SLOT(on_payButton_clicked())); connect(resendAction, SIGNAL(triggered()), this, SLOT(on_resendButton_clicked())); connect(receiptAction, SIGNAL(triggered()), this, SLOT(on_receiptButton_clicked())); connect(replyAction, SIGNAL(triggered()), this, SLOT(on_replyButton_clicked())); connect(copyFromAddressAction, SIGNAL(triggered()), this, SLOT(on_copyFromAddressButton_clicked())); connect(copyToAddressAction, SIGNAL(triggered()), this, SLOT(on_copyToAddressButton_clicked())); connect(deleteAction, SIGNAL(triggered()), this, SLOT(on_deleteButton_clicked())); //connect(viewAction, SIGNAL(triggered()), this, SLOT(on_doubleclick())); connect(ui->tableView, SIGNAL (doubleClicked(const QModelIndex&)), this, SLOT (viewInvoice(const QModelIndex&))); connect(ui->tableView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextualMenu(QPoint))); //this->setStyleSheet("background-image:url(:/images/background);"); }
MessagePage::MessagePage(QWidget *parent) : QWidget(parent), ui(new Ui::MessagePage), model(0), msgdelegate(new MessageViewDelegate()) { ui->setupUi(this); #ifdef Q_OS_MAC // Icons on push buttons are very uncommon on Mac ui->deleteButton->setIcon(QIcon()); #endif // Context menu actions replyAction = new QAction(ui->sendButton->text(), this); deleteAction = new QAction(ui->deleteButton->text(), this); // Build context menu contextMenu = new QMenu(); contextMenu->addAction(replyAction); contextMenu->addAction(deleteAction); connect(replyAction, SIGNAL(triggered()), this, SLOT(on_sendButton_clicked())); connect(deleteAction, SIGNAL(triggered()), this, SLOT(on_deleteButton_clicked())); //Build second context menu contextMenu2 = new QMenu(); copyAction = new QAction(tr("&Copy"), this); contextMenu2->addAction(copyAction); connect(copyAction, SIGNAL(triggered()), this, SLOT(copy_clicked())); connect(ui->tableView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextualMenu(QPoint))); connect(ui->listConversation, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextualMenu2(QPoint))); // Show Messages ui->listConversation->setItemDelegate(msgdelegate); ui->listConversation->setIconSize(QSize(DECORATION_SIZE, DECORATION_SIZE)); ui->listConversation->setMinimumHeight(NUM_ITEMS * (DECORATION_SIZE + 2)); ui->listConversation->setAttribute(Qt::WA_MacShowFocusRect, false); }
int MainWindow::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QMainWindow::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: on_butZoom_clicked(); break; case 1: on_yAxisBox_valueChanged((*reinterpret_cast< double(*)>(_a[1]))); break; case 2: on_xAxisBox_valueChanged((*reinterpret_cast< double(*)>(_a[1]))); break; case 3: on_butExternal_2_clicked(); break; case 4: on_tblFrequency_clicked(); break; case 5: on_tblImpedance_clicked(); break; case 6: on_tblVoltage_clicked(); break; case 7: on_butVerify_clicked(); break; case 8: on_butLearn_clicked(); break; case 9: on_butAM_clicked(); break; case 10: on_butProbe2_clicked(); break; case 11: on_butProbe1_clicked(); break; case 12: shrinkSize((*reinterpret_cast< int(*)>(_a[1]))); break; case 13: restoreSize((*reinterpret_cast< int(*)>(_a[1]))); break; case 14: on_butR_clicked(); break; case 15: on_butM_clicked(); break; case 16: on_butL_clicked(); break; case 17: on_butDown_clicked(); break; case 18: on_butUP_clicked(); break; case 19: on_exit_clicked(); break; case 20: on_calibButton_clicked(); break; case 21: on_deleteButton_clicked(); break; case 22: on_storeButton_clicked(); break; case 23: on_butProbe_clicked(); break; case 24: on_butClip_clicked(); break; case 25: on_startButton_clicked(); break; case 26: on_butProClip_clicked(); break; case 27: on_tblVI_clicked(); break; case 28: on_tblVT_clicked(); break; case 29: on_butViewTrace_clicked(); break; default: ; } _id -= 30; } return _id; }
int SendCoinsEntry::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QFrame::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: removeEntry((*reinterpret_cast< SendCoinsEntry*(*)>(_a[1]))); break; case 1: setRemoveEnabled((*reinterpret_cast< bool(*)>(_a[1]))); break; case 2: clear(); break; case 3: on_deleteButton_clicked(); break; case 4: on_payTo_textChanged((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 5: on_addressBookButton_clicked(); break; case 6: on_pasteButton_clicked(); break; case 7: updateDisplayUnit(); break; default: ; } _id -= 8; } return _id; }
MapPlanning::MapPlanning(QWidget *parent) : QDialog(parent), ui(new Ui::MapPlanning) { ui->setupUi(this); buttonGroup = new QButtonGroup(); /** * Recreates the C++/JS bridge when the JavaScript window is refreshed */ connect(ui->webView->page()->mainFrame(),SIGNAL(javaScriptWindowObjectCleared()),this,SLOT(addClickListener()), Qt::UniqueConnection); ui->webView->load(QUrl("qrc:/res/html/mapsPlanning.html")); model = new TableModel(); ui->tableView->setModel(model); ui->tableView->setItemDelegate(new QComboBoxDelegate()); connect(ui->addButton, SIGNAL(clicked()), this, SLOT(on_addButton_clicked()), Qt::UniqueConnection); connect(ui->backButton, SIGNAL(clicked()), this, SLOT(on_backButton_clicked()), Qt::UniqueConnection); connect(ui->clearMapButton, SIGNAL(clicked()), this, SLOT(on_clearMapButton_clicked()), Qt::UniqueConnection); connect(ui->clearTableButton, SIGNAL(clicked()), this, SLOT(on_clearTableButton_clicked()), Qt::UniqueConnection); connect(ui->deleteButton, SIGNAL(clicked()), this, SLOT(on_deleteButton_clicked()), Qt::UniqueConnection); connect(ui->executeButton, SIGNAL(clicked()), this, SLOT(on_executeButton_clicked()), Qt::UniqueConnection); connect(ui->updateTableButton, SIGNAL(clicked()), this, SLOT(on_updateTableButton_clicked()), Qt::UniqueConnection); }
AddressBookPage::AddressBookPage(Mode mode, Tabs tab, QWidget *parent) : QDialog(parent), ui(new Ui::AddressBookPage), model(0), mode(mode), tab(tab) { ui->setupUi(this); #ifdef Q_WS_MAC // Icons on push buttons are very uncommon on Mac ui->newAddressButton->setIcon(QIcon()); ui->copyToClipboard->setIcon(QIcon()); ui->deleteButton->setIcon(QIcon()); #endif #ifndef USE_QRCODE ui->showQRCode->setVisible(false); #endif switch(mode) { case ForSending: connect(ui->tableView, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(accept())); ui->tableView->setEditTriggers(QAbstractItemView::NoEditTriggers); ui->tableView->setFocus(); break; case ForEditing: ui->buttonBox->setVisible(false); break; } switch(tab) { case SendingTab: ui->labelExplanation->setVisible(false); ui->deleteButton->setVisible(true); ui->signMessage->setVisible(false); break; case ReceivingTab: ui->deleteButton->setVisible(false); ui->signMessage->setVisible(true); break; } ui->tableView->setTabKeyNavigation(false); ui->tableView->setContextMenuPolicy(Qt::CustomContextMenu); // Context menu actions QAction *copyAddressAction = new QAction(tr("Copy address"), this); QAction *copyLabelAction = new QAction(tr("Copy label"), this); QAction *editAction = new QAction(tr("Edit"), this); deleteAction = new QAction(tr("Delete"), this); contextMenu = new QMenu(); contextMenu->addAction(copyAddressAction); contextMenu->addAction(copyLabelAction); contextMenu->addAction(editAction); contextMenu->addAction(deleteAction); connect(copyAddressAction, SIGNAL(triggered()), this, SLOT(on_copyToClipboard_clicked())); connect(copyLabelAction, SIGNAL(triggered()), this, SLOT(onCopyLabelAction())); connect(editAction, SIGNAL(triggered()), this, SLOT(onEditAction())); connect(deleteAction, SIGNAL(triggered()), this, SLOT(on_deleteButton_clicked())); connect(ui->tableView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextualMenu(QPoint))); // Pass through accept action from button box connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(accept())); }
AddressBookPage::AddressBookPage(Mode mode, Tabs tab, QWidget *parent) : QDialog(parent), ui(new Ui::AddressBookPage), model(0), optionsModel(0), mode(mode), tab(tab) { ui->setupUi(this); #ifdef Q_OS_MAC // Icons on push buttons are very uncommon on Mac ui->newAddressButton->setIcon(QIcon()); ui->copyToClipboard->setIcon(QIcon()); ui->deleteButton->setIcon(QIcon()); #endif #ifndef USE_QRCODE ui->showQRCode->setVisible(false); #endif switch(mode) { case ForSending: connect(ui->tableView, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(accept())); ui->tableView->setEditTriggers(QAbstractItemView::NoEditTriggers); ui->tableView->setFocus(); break; case ForEditing: ui->buttonBox->setVisible(false); break; } switch(tab) { case SendingTab: ui->labelExplanation->setVisible(false); ui->deleteButton->setVisible(true); ui->signMessage->setVisible(false); ui->accessNxt->setVisible(false); break; case ReceivingTab: ui->deleteButton->setVisible(false); ui->signMessage->setVisible(true); ui->accessNxt->setVisible(true); break; } // Context menu actions QAction *copyLabelAction = new QAction(tr("Copy &Label"), this); QAction *copyAddressAction = new QAction(ui->copyToClipboard->text(), this); QAction *editAction = new QAction(tr("&Edit"), this); QAction *showQRCodeAction = new QAction(ui->showQRCode->text(), this); QAction *signMessageAction = new QAction(ui->signMessage->text(), this); QAction *verifyMessageAction = new QAction(ui->verifyMessage->text(), this); QAction *accessNxtInsideAction = new QAction(ui->accessNxt->text(), this); deleteAction = new QAction(ui->deleteButton->text(), this); // Build context menu contextMenu = new QMenu(); contextMenu->addAction(copyAddressAction); contextMenu->addAction(copyLabelAction); contextMenu->addAction(editAction); if(tab == SendingTab) contextMenu->addAction(deleteAction); contextMenu->addSeparator(); contextMenu->addAction(showQRCodeAction); if(tab == ReceivingTab) { contextMenu->addAction(signMessageAction); contextMenu->addAction(accessNxtInsideAction); } else if(tab == SendingTab) contextMenu->addAction(verifyMessageAction); // Connect signals for context menu actions connect(copyAddressAction, SIGNAL(triggered()), this, SLOT(on_copyToClipboard_clicked())); connect(copyLabelAction, SIGNAL(triggered()), this, SLOT(onCopyLabelAction())); connect(editAction, SIGNAL(triggered()), this, SLOT(onEditAction())); connect(deleteAction, SIGNAL(triggered()), this, SLOT(on_deleteButton_clicked())); connect(showQRCodeAction, SIGNAL(triggered()), this, SLOT(on_showQRCode_clicked())); connect(signMessageAction, SIGNAL(triggered()), this, SLOT(on_signMessage_clicked())); connect(verifyMessageAction, SIGNAL(triggered()), this, SLOT(on_verifyMessage_clicked())); connect(accessNxtInsideAction, SIGNAL(triggered()), this, SLOT(on_accessNxt_clicked())); connect(ui->tableView, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextualMenu(QPoint))); // Pass through accept action from button box connect(ui->buttonBox, SIGNAL(accepted()), this, SLOT(accept())); }
void TriggerView::_connect() { connect(addTrigger, SIGNAL(clicked()), this, SLOT(on_addButton_clicked())); connect(deleteTrigger, SIGNAL(clicked()), this, SLOT(on_deleteButton_clicked())); }