OSPlugin::OSPlugin( int & argc, char ** argv ) : QApplication(argc, argv, true), m_sketchUpWidget(NULL) { //LOG(Trace, "OSPlugin"); //QThread* ct = QThread::currentThread(); //LOG(Trace, "OSPlugin, currentThread = " << ct); //QThread* thread = this->thread(); //LOG(Trace, "OSPlugin, thread = " << thread); QFile f(":/library/OpenStudioPolicy.xml"); openstudio::model::AccessPolicyStore::Instance().loadFile(f); QFile data(":/openstudiolib.qss"); QString style; if(data.open(QFile::ReadOnly)) { QTextStream styleIn(&data); style = styleIn.readAll(); data.close(); setStyleSheet(style); } m_startupView = boost::shared_ptr<openstudio::StartupView>(new openstudio::StartupView()); bool test; test = connect( m_startupView.get(), SIGNAL( newFromTemplate( NewFromTemplateEnum ) ), this, SLOT( newForLastKey( NewFromTemplateEnum ) ) ) ; OS_ASSERT(test); test = connect( m_startupView.get(), SIGNAL( openClicked() ), this, SLOT( openForLastKey() ) ) ; OS_ASSERT(test); test = connect( m_startupView.get(), SIGNAL( importClicked() ), this, SLOT( importIdfForLastKey() ) ) ; OS_ASSERT(test); }
ParserMaker::ParserMaker(QWidget *parent, ParserManager *pd, SiilihaiSettings &s, SiilihaiProtocol &p) : QMainWindow(parent), pdb(pd), settings(s), protocol(p), nam(this), engine(this, 0, 0, &nam) { ui.setupUi(this); loginMatcher = new PatternMatcher(this, true); groupListEditor = new GroupListPatternEditor(engine, &parser, &subscription, this); ui.tabWidget->addTab(groupListEditor, groupListEditor->tabIcon(), groupListEditor->tabName()); threadListEditor = new ThreadListPatternEditor(engine, &parser, &subscription, this); ui.tabWidget->addTab(threadListEditor, threadListEditor->tabIcon(), threadListEditor->tabName()); threadListEditor->setEnabled(false); messageListEditor = new MessageListPatternEditor(engine, &parser, &subscription, this); ui.tabWidget->addTab(messageListEditor, threadListEditor->tabIcon(), messageListEditor->tabName()); messageListEditor->setEnabled(false); connect(groupListEditor, SIGNAL(groupSelected(ForumGroup*)), threadListEditor, SLOT(setGroup(ForumGroup*))); connect(threadListEditor, SIGNAL(threadSelected(ForumThread*)), messageListEditor, SLOT(setThread(ForumThread*))); connect(&protocol, SIGNAL(saveParserFinished(int, QString)), this, SLOT(saveParserFinished(int, QString))); connect(ui.openParserButton, SIGNAL(clicked()), this, SLOT(openClicked())); connect(ui.newFromRequestButton, SIGNAL(clicked()), this, SLOT(newFromRequestClicked())); connect(ui.saveChangesButton, SIGNAL(clicked()), this, SLOT(saveClicked())); connect(ui.saveAsNewButton, SIGNAL(clicked()), this, SLOT(saveAsNewClicked())); connect(ui.testForumUrlButton, SIGNAL(clicked()), this, SLOT(testForumUrlClicked())); connect(ui.forumUrl, SIGNAL(textEdited(QString)), this, SLOT(updateState())); connect(ui.parserName, SIGNAL(textEdited(QString)), this, SLOT(updateState())); connect(ui.parserType, SIGNAL(currentIndexChanged(int)), this, SLOT(updateState())); connect(ui.viewThreadPath, SIGNAL(textEdited(QString)), this, SLOT(updateState())); connect(ui.threadListPath, SIGNAL(textEdited(QString)), this, SLOT(updateState())); connect(ui.viewMessagePath, SIGNAL(textEdited(QString)), this, SLOT(updateState())); connect(ui.loginPath, SIGNAL(textEdited(QString)), this, SLOT(updateState())); connect(ui.loginTypeCombo, SIGNAL(currentIndexChanged(int)), this, SLOT(updateState())); connect(ui.tryLoginButton, SIGNAL(clicked()), this, SLOT(tryLogin())); connect(ui.tryWithoutLoginButton, SIGNAL(clicked()), this, SLOT(tryWithoutLogin())); connect(ui.verifyLoginPattern, SIGNAL(textEdited(QString)), this, SLOT(updateState())); connect(ui.helpButton, SIGNAL(clicked()), this, SLOT(helpClicked())); connect(&engine, SIGNAL(loginFinished(ForumSubscription *,bool)), this, SLOT(loginFinished(ForumSubscription *, bool))); connect(&subscription, SIGNAL(errorsChanged()), this, SLOT(subscriptionErrorsChanged())); connect(&engine, SIGNAL(getHttpAuthentication(ForumSubscription *, QAuthenticator *)), this, SLOT(getHttpAuthentication(ForumSubscription *, QAuthenticator *))); connect(loginMatcher, SIGNAL(dataMatched(int, QString, PatternMatchType)), this, SLOT(dataMatched(int, QString, PatternMatchType))); connect(loginMatcher, SIGNAL(dataMatchingStart(QString&)), this, SLOT(dataMatchingStart(QString&))); connect(loginMatcher, SIGNAL(dataMatchingEnd()), this, SLOT(dataMatchingEnd())); subscription.setLatestThreads(100); subscription.setLatestMessages(100); loginWithoutCredentials = false; updateState(); ui.tabWidget->setCurrentIndex(0); if (!restoreGeometry(settings.value("parsermaker_geometry").toByteArray())) showMaximized(); show(); }
int MainWindowImpl::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: openClicked(); break; case 1: saveAsClicked(); break; case 2: closeClicked(); break; case 3: aboutClicked(); break; default: ; } _id -= 4; } return _id; }
void ConfigDialog::init() { ui.setupUi(this); connect(ui.openButton, SIGNAL(clicked()), this, SLOT(openClicked())); connect(ui.generateMipmapsCheckBox, SIGNAL(stateChanged(int)), this, SLOT(generateMipmapsChanged(int))); connect(ui.mipmapFilterComboBox, SIGNAL(activated(QString)), this, SLOT(mipmapFilterChanged(QString))); //connect(ui.mipmapFilterSettings, SIGNAL(clicked()), this, SLOT(mipmapFilterSettingsShow())); connect(ui.redSpinBox, SIGNAL(valueChanged(double)), this, SLOT(colorWeightChanged())); connect(ui.greenSpinBox, SIGNAL(valueChanged(double)), this, SLOT(colorWeightChanged())); connect(ui.blueSpinBox, SIGNAL(valueChanged(double)), this, SLOT(colorWeightChanged())); connect(ui.uniformButton, SIGNAL(toggled(bool)), this, SLOT(uniformWeightToggled(bool))); connect(ui.luminanceButton, SIGNAL(toggled(bool)), this, SLOT(luminanceWeightToggled(bool))); //connect(ui.rgbMapRadioButton, SIGNAL(toggled(bool)), this, SLOT(colorModeChanged())); connect(ui.normalMapRadioButton, SIGNAL(toggled(bool)), this, SLOT(normalMapModeChanged(bool))); }
void BitcoinGUI::createActions() { QActionGroup *tabGroup = new QActionGroup(this); overviewAction = new QAction(SingleColorIcon(":/icons/overview"), tr("&Overview"), this); overviewAction->setStatusTip(tr("Show general overview of wallet")); overviewAction->setToolTip(overviewAction->statusTip()); overviewAction->setCheckable(true); overviewAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_1)); tabGroup->addAction(overviewAction); sendCoinsAction = new QAction(SingleColorIcon(":/icons/send"), tr("&Send"), this); sendCoinsAction->setStatusTip(tr("Send coins to a EuropeCoin address")); sendCoinsAction->setToolTip(sendCoinsAction->statusTip()); sendCoinsAction->setCheckable(true); sendCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_2)); tabGroup->addAction(sendCoinsAction); sendCoinsMenuAction = new QAction(TextColorIcon(":/icons/send"), sendCoinsAction->text(), this); sendCoinsMenuAction->setStatusTip(sendCoinsAction->statusTip()); sendCoinsMenuAction->setToolTip(sendCoinsMenuAction->statusTip()); depositCoinsAction = new QAction(SingleColorIcon(":/icons/deposit"), tr("&Deposit"), this); depositCoinsAction->setStatusTip(tr("Make a term deposit")); depositCoinsAction->setToolTip(depositCoinsAction->statusTip()); depositCoinsAction->setCheckable(true); depositCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_5)); tabGroup->addAction(depositCoinsAction); //depositCoinsMenuAction = new QAction(TextColorIcon(":/icons/deposit"), depositCoinsAction->text(), this); //depositCoinsMenuAction->setStatusTip(depositCoinsAction->statusTip()); //depositCoinsMenuAction->setToolTip(depositCoinsMenuAction->statusTip()); receiveCoinsAction = new QAction(SingleColorIcon(":/icons/receiving_addresses"), tr("&Receive"), this); receiveCoinsAction->setStatusTip(tr("Request payments (generates QR codes and europecoin: URIs)")); receiveCoinsAction->setToolTip(receiveCoinsAction->statusTip()); receiveCoinsAction->setCheckable(true); receiveCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_3)); tabGroup->addAction(receiveCoinsAction); receiveCoinsMenuAction = new QAction(TextColorIcon(":/icons/receiving_addresses"), receiveCoinsAction->text(), this); receiveCoinsMenuAction->setStatusTip(receiveCoinsAction->statusTip()); receiveCoinsMenuAction->setToolTip(receiveCoinsMenuAction->statusTip()); historyAction = new QAction(SingleColorIcon(":/icons/history"), tr("&Transactions"), this); historyAction->setStatusTip(tr("Browse transaction history")); historyAction->setToolTip(historyAction->statusTip()); historyAction->setCheckable(true); historyAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_4)); tabGroup->addAction(historyAction); miningOffAction = new QAction(QIcon(":/icons/transaction_conflicted"), tr("Solo Mining Off"), this); miningOffAction->setStatusTip(tr("Stop Mining. May take some time to wind down.")); miningOnAction = new QAction(QIcon(":/icons/tx_mined"), tr("Solo Mining On (1GB Required)"), this); miningOnAction->setStatusTip(tr("Mine solo.")); #ifdef ENABLE_WALLET // These showNormalIfMinimized are needed because Send Coins and Receive Coins // can be triggered from the tray menu, and need to show the GUI to be useful. connect(overviewAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(overviewAction, SIGNAL(triggered()), this, SLOT(gotoOverviewPage())); connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(gotoSendCoinsPage())); connect(depositCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(depositCoinsAction, SIGNAL(triggered()), this, SLOT(gotoDepositCoinsPage())); connect(sendCoinsMenuAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(sendCoinsMenuAction, SIGNAL(triggered()), this, SLOT(gotoSendCoinsPage())); connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(gotoReceiveCoinsPage())); connect(receiveCoinsMenuAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(receiveCoinsMenuAction, SIGNAL(triggered()), this, SLOT(gotoReceiveCoinsPage())); connect(historyAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(historyAction, SIGNAL(triggered()), this, SLOT(gotoHistoryPage())); connect(miningOffAction, SIGNAL(triggered()), this, SLOT(miningOff())); connect(miningOnAction, SIGNAL(triggered()), this, SLOT(miningOn())); #endif // ENABLE_WALLET quitAction = new QAction(TextColorIcon(":/icons/quit"), tr("E&xit"), this); quitAction->setStatusTip(tr("Quit application")); quitAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q)); quitAction->setMenuRole(QAction::QuitRole); aboutAction = new QAction(TextColorIcon(":/icons/about"), tr("&About EuropeCoin Core"), this); aboutAction->setStatusTip(tr("Show information about EuropeCoin Core")); aboutAction->setMenuRole(QAction::AboutRole); aboutQtAction = new QAction(TextColorIcon(":/icons/about_qt"), tr("About &Qt"), this); aboutQtAction->setStatusTip(tr("Show information about Qt")); aboutQtAction->setMenuRole(QAction::AboutQtRole); optionsAction = new QAction(TextColorIcon(":/icons/options"), tr("&Options..."), this); optionsAction->setStatusTip(tr("Modify configuration options for EuropeCoin Core")); optionsAction->setMenuRole(QAction::PreferencesRole); toggleHideAction = new QAction(TextColorIcon(":/icons/about"), tr("&Show / Hide"), this); toggleHideAction->setStatusTip(tr("Show or hide the main Window")); encryptWalletAction = new QAction(TextColorIcon(":/icons/lock_closed"), tr("&Encrypt Wallet..."), this); encryptWalletAction->setStatusTip(tr("Encrypt the private keys that belong to your wallet")); encryptWalletAction->setCheckable(true); backupWalletAction = new QAction(TextColorIcon(":/icons/filesave"), tr("&Backup Wallet..."), this); backupWalletAction->setStatusTip(tr("Backup wallet to another location")); changePassphraseAction = new QAction(TextColorIcon(":/icons/key"), tr("&Change Passphrase..."), this); changePassphraseAction->setStatusTip(tr("Change the passphrase used for wallet encryption")); signMessageAction = new QAction(TextColorIcon(":/icons/edit"), tr("Sign &message..."), this); signMessageAction->setStatusTip(tr("Sign messages with your EuropeCoin addresses to prove you own them")); verifyMessageAction = new QAction(TextColorIcon(":/icons/verify"), tr("&Verify message..."), this); verifyMessageAction->setStatusTip(tr("Verify messages to ensure they were signed with specified EuropeCoin addresses")); openRPCConsoleAction = new QAction(TextColorIcon(":/icons/debugwindow"), tr("&Debug window"), this); openRPCConsoleAction->setStatusTip(tr("Open debugging and diagnostic console")); usedSendingAddressesAction = new QAction(TextColorIcon(":/icons/address-book"), tr("&Sending addresses..."), this); usedSendingAddressesAction->setStatusTip(tr("Show the list of used sending addresses and labels")); usedReceivingAddressesAction = new QAction(TextColorIcon(":/icons/address-book"), tr("&Receiving addresses..."), this); usedReceivingAddressesAction->setStatusTip(tr("Show the list of used receiving addresses and labels")); openAction = new QAction(TextColorIcon(":/icons/open"), tr("Open &URI..."), this); openAction->setStatusTip(tr("Open a europecoin: URI or payment request")); showHelpMessageAction = new QAction(TextColorIcon(":/icons/info"), tr("&Command-line options"), this); showHelpMessageAction->setMenuRole(QAction::NoRole); showHelpMessageAction->setStatusTip(tr("Show the EuropeCoin Core help message to get a list with possible EuropeCoin command-line options")); connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit())); connect(aboutAction, SIGNAL(triggered()), this, SLOT(aboutClicked())); connect(aboutQtAction, SIGNAL(triggered()), qApp, SLOT(aboutQt())); connect(optionsAction, SIGNAL(triggered()), this, SLOT(optionsClicked())); connect(toggleHideAction, SIGNAL(triggered()), this, SLOT(toggleHidden())); connect(showHelpMessageAction, SIGNAL(triggered()), this, SLOT(showHelpMessageClicked())); connect(openRPCConsoleAction, SIGNAL(triggered()), this, SLOT(showDebugWindow())); // prevents an open debug window from becoming stuck/unusable on client shutdown connect(quitAction, SIGNAL(triggered()), rpcConsole, SLOT(hide())); #ifdef ENABLE_WALLET if(walletFrame) { connect(encryptWalletAction, SIGNAL(triggered(bool)), walletFrame, SLOT(encryptWallet(bool))); connect(backupWalletAction, SIGNAL(triggered()), walletFrame, SLOT(backupWallet())); connect(changePassphraseAction, SIGNAL(triggered()), walletFrame, SLOT(changePassphrase())); connect(signMessageAction, SIGNAL(triggered()), this, SLOT(gotoSignMessageTab())); connect(verifyMessageAction, SIGNAL(triggered()), this, SLOT(gotoVerifyMessageTab())); connect(usedSendingAddressesAction, SIGNAL(triggered()), walletFrame, SLOT(usedSendingAddresses())); connect(usedReceivingAddressesAction, SIGNAL(triggered()), walletFrame, SLOT(usedReceivingAddresses())); connect(openAction, SIGNAL(triggered()), this, SLOT(openClicked())); } #endif // ENABLE_WALLET }
void HivemindGUI::createActions(const NetworkStyle *networkStyle) { QActionGroup *tabGroup = new QActionGroup(this); overviewAction = new QAction(SingleColorIcon(":/icons/overview"), tr("&Overview"), this); overviewAction->setStatusTip(tr("Show general overview of wallet")); overviewAction->setToolTip(overviewAction->statusTip()); overviewAction->setCheckable(true); overviewAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_1)); tabGroup->addAction(overviewAction); sendCoinsAction = new QAction(SingleColorIcon(":/icons/send"), tr("&Send"), this); sendCoinsAction->setStatusTip(tr("Send coins to a Hivemind address")); sendCoinsAction->setToolTip(sendCoinsAction->statusTip()); sendCoinsAction->setCheckable(true); sendCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_2)); tabGroup->addAction(sendCoinsAction); sendCoinsMenuAction = new QAction(TextColorIcon(":/icons/send"), sendCoinsAction->text(), this); sendCoinsMenuAction->setStatusTip(sendCoinsAction->statusTip()); sendCoinsMenuAction->setToolTip(sendCoinsMenuAction->statusTip()); receiveCoinsAction = new QAction(SingleColorIcon(":/icons/receiving_addresses"), tr("&Receive"), this); receiveCoinsAction->setStatusTip(tr("Request payments (generates QR codes and hivemind: URIs)")); receiveCoinsAction->setToolTip(receiveCoinsAction->statusTip()); receiveCoinsAction->setCheckable(true); receiveCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_3)); tabGroup->addAction(receiveCoinsAction); receiveCoinsMenuAction = new QAction(TextColorIcon(":/icons/receiving_addresses"), receiveCoinsAction->text(), this); receiveCoinsMenuAction->setStatusTip(receiveCoinsAction->statusTip()); receiveCoinsMenuAction->setToolTip(receiveCoinsMenuAction->statusTip()); historyAction = new QAction(SingleColorIcon(":/icons/history"), tr("&Transactions"), this); historyAction->setStatusTip(tr("Browse transaction history")); historyAction->setToolTip(historyAction->statusTip()); historyAction->setCheckable(true); historyAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_4)); tabGroup->addAction(historyAction); marketAction = new QAction(SingleColorIcon(":/icons/market"), tr("&Markets"), this); marketAction->setStatusTip(tr("Browse markets")); marketAction->setToolTip(marketAction->statusTip()); marketAction->setCheckable(true); marketAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_5)); tabGroup->addAction(marketAction); decisionAction = new QAction(SingleColorIcon(":/icons/decision"), tr("&Decisions"), this); decisionAction->setStatusTip(tr("Browse decisions")); decisionAction->setToolTip(decisionAction->statusTip()); decisionAction->setCheckable(true); decisionAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_6)); tabGroup->addAction(decisionAction); authorAction = new QAction(SingleColorIcon(":/icons/author"), tr("&Author"), this); authorAction->setStatusTip(tr("Create decisions and markets")); authorAction->setToolTip(authorAction->statusTip()); authorAction->setCheckable(true); authorAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_8)); tabGroup->addAction(authorAction); ballotAction = new QAction(SingleColorIcon(":/icons/ballot"), tr("&Ballot"), this); ballotAction->setStatusTip(tr("See votes")); ballotAction->setToolTip(ballotAction->statusTip()); ballotAction->setCheckable(true); ballotAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_7)); tabGroup->addAction(ballotAction); #ifdef ENABLE_WALLET // These showNormalIfMinimized are needed because Send Coins and Receive Coins // can be triggered from the tray menu, and need to show the GUI to be useful. connect(overviewAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(overviewAction, SIGNAL(triggered()), this, SLOT(gotoOverviewPage())); connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(gotoSendCoinsPage())); connect(sendCoinsMenuAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(sendCoinsMenuAction, SIGNAL(triggered()), this, SLOT(gotoSendCoinsPage())); connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(gotoReceiveCoinsPage())); connect(receiveCoinsMenuAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(receiveCoinsMenuAction, SIGNAL(triggered()), this, SLOT(gotoReceiveCoinsPage())); connect(historyAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(historyAction, SIGNAL(triggered()), this, SLOT(gotoHistoryPage())); connect(ballotAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(ballotAction, SIGNAL(triggered()), this, SLOT(gotoBallotPage())); connect(authorAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(authorAction, SIGNAL(triggered()), this, SLOT(gotoAuthorView())); connect(decisionAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(decisionAction, SIGNAL(triggered()), this, SLOT(gotoDecisionPage())); connect(marketAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(marketAction, SIGNAL(triggered()), this, SLOT(gotoMarketPage())); #endif // ENABLE_WALLET quitAction = new QAction(TextColorIcon(":/icons/quit"), tr("E&xit"), this); quitAction->setStatusTip(tr("Quit application")); quitAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q)); quitAction->setMenuRole(QAction::QuitRole); aboutAction = new QAction(TextColorIcon(":/icons/about"), tr("&About Hivemind Core"), this); aboutAction->setStatusTip(tr("Show information about Hivemind Core")); aboutAction->setMenuRole(QAction::AboutRole); aboutQtAction = new QAction(TextColorIcon(":/icons/about_qt"), tr("About &Qt"), this); aboutQtAction->setStatusTip(tr("Show information about Qt")); aboutQtAction->setMenuRole(QAction::AboutQtRole); optionsAction = new QAction(TextColorIcon(":/icons/options"), tr("&Options..."), this); optionsAction->setStatusTip(tr("Modify configuration options for Hivemind Core")); optionsAction->setMenuRole(QAction::PreferencesRole); toggleHideAction = new QAction(TextColorIcon(":/icons/about"), tr("&Show / Hide"), this); toggleHideAction->setStatusTip(tr("Show or hide the main Window")); encryptWalletAction = new QAction(TextColorIcon(":/icons/lock_closed"), tr("&Encrypt Wallet..."), this); encryptWalletAction->setStatusTip(tr("Encrypt the private keys that belong to your wallet")); encryptWalletAction->setCheckable(true); backupWalletAction = new QAction(TextColorIcon(":/icons/filesave"), tr("&Backup Wallet..."), this); backupWalletAction->setStatusTip(tr("Backup wallet to another location")); changePassphraseAction = new QAction(TextColorIcon(":/icons/key"), tr("&Change Passphrase..."), this); changePassphraseAction->setStatusTip(tr("Change the passphrase used for wallet encryption")); signMessageAction = new QAction(TextColorIcon(":/icons/edit"), tr("Sign &message..."), this); signMessageAction->setStatusTip(tr("Sign messages with your Hivemind addresses to prove you own them")); verifyMessageAction = new QAction(TextColorIcon(":/icons/verify"), tr("&Verify message..."), this); verifyMessageAction->setStatusTip(tr("Verify messages to ensure they were signed with specified Hivemind addresses")); resolveVoteAction = new QAction(TextColorIcon(":/icons/resolve"), tr("&Resolve vote..."), this); resolveVoteAction->setStatusTip(tr("Test an Outcome independent of the blockchain")); openRPCConsoleAction = new QAction(TextColorIcon(":/icons/debugwindow"), tr("&Debug window"), this); openRPCConsoleAction->setStatusTip(tr("Open debugging and diagnostic console")); usedSendingAddressesAction = new QAction(TextColorIcon(":/icons/address-book"), tr("&Sending addresses..."), this); usedSendingAddressesAction->setStatusTip(tr("Show the list of used sending addresses and labels")); usedReceivingAddressesAction = new QAction(TextColorIcon(":/icons/address-book"), tr("&Receiving addresses..."), this); usedReceivingAddressesAction->setStatusTip(tr("Show the list of used receiving addresses and labels")); openAction = new QAction(TextColorIcon(":/icons/open"), tr("Open &URI..."), this); openAction->setStatusTip(tr("Open a hivemind: URI or payment request")); showHelpMessageAction = new QAction(TextColorIcon(":/icons/info"), tr("&Command-line options"), this); showHelpMessageAction->setStatusTip(tr("Show the Hivemind Core help message to get a list with possible Hivemind command-line options")); connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit())); connect(aboutAction, SIGNAL(triggered()), this, SLOT(aboutClicked())); connect(aboutQtAction, SIGNAL(triggered()), qApp, SLOT(aboutQt())); connect(optionsAction, SIGNAL(triggered()), this, SLOT(optionsClicked())); connect(toggleHideAction, SIGNAL(triggered()), this, SLOT(toggleHidden())); connect(showHelpMessageAction, SIGNAL(triggered()), this, SLOT(showHelpMessageClicked())); #ifdef ENABLE_WALLET if(walletFrame) { connect(encryptWalletAction, SIGNAL(triggered(bool)), walletFrame, SLOT(encryptWallet(bool))); connect(backupWalletAction, SIGNAL(triggered()), walletFrame, SLOT(backupWallet())); connect(changePassphraseAction, SIGNAL(triggered()), walletFrame, SLOT(changePassphrase())); connect(signMessageAction, SIGNAL(triggered()), this, SLOT(gotoSignMessageTab())); connect(verifyMessageAction, SIGNAL(triggered()), this, SLOT(gotoVerifyMessageTab())); connect(resolveVoteAction, SIGNAL(triggered()), this, SLOT(gotoResolveVoteTab())); connect(usedSendingAddressesAction, SIGNAL(triggered()), walletFrame, SLOT(usedSendingAddresses())); connect(usedReceivingAddressesAction, SIGNAL(triggered()), walletFrame, SLOT(usedReceivingAddresses())); connect(openAction, SIGNAL(triggered()), this, SLOT(openClicked())); } #endif // ENABLE_WALLET }
void SupcoinGUI::createActions(const NetworkStyle *networkStyle) { QActionGroup *tabGroup = new QActionGroup(this); overviewAction = new QAction(QIcon(":/icons/overview"), tr("&Overview"), this); overviewAction->setStatusTip(tr("Show general overview of wallet")); overviewAction->setToolTip(overviewAction->statusTip()); overviewAction->setCheckable(true); overviewAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_1)); tabGroup->addAction(overviewAction); sendCoinsAction = new QAction(QIcon(":/icons/send"), tr("&Send"), this); sendCoinsAction->setStatusTip(tr("Send coins to a Supcoin address")); sendCoinsAction->setToolTip(sendCoinsAction->statusTip()); sendCoinsAction->setCheckable(true); sendCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_2)); tabGroup->addAction(sendCoinsAction); receiveCoinsAction = new QAction(QIcon(":/icons/receiving_addresses"), tr("&Receive"), this); receiveCoinsAction->setStatusTip(tr("Request payments (generates QR codes and supcoin: URIs)")); receiveCoinsAction->setToolTip(receiveCoinsAction->statusTip()); receiveCoinsAction->setCheckable(true); receiveCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_3)); tabGroup->addAction(receiveCoinsAction); historyAction = new QAction(QIcon(":/icons/history"), tr("&Transactions"), this); historyAction->setStatusTip(tr("Browse transaction history")); historyAction->setToolTip(historyAction->statusTip()); historyAction->setCheckable(true); historyAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_4)); tabGroup->addAction(historyAction); #ifdef ENABLE_WALLET // These showNormalIfMinimized are needed because Send Coins and Receive Coins // can be triggered from the tray menu, and need to show the GUI to be useful. connect(overviewAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(overviewAction, SIGNAL(triggered()), this, SLOT(gotoOverviewPage())); connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(gotoSendCoinsPage())); connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(gotoReceiveCoinsPage())); connect(historyAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(historyAction, SIGNAL(triggered()), this, SLOT(gotoHistoryPage())); #endif // ENABLE_WALLET quitAction = new QAction(QIcon(":/icons/quit"), tr("E&xit"), this); quitAction->setStatusTip(tr("Quit application")); quitAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q)); quitAction->setMenuRole(QAction::QuitRole); aboutAction = new QAction(networkStyle->getAppIcon(), tr("&About Supcoin Core"), this); aboutAction->setStatusTip(tr("Show information about Supcoin Core")); aboutAction->setMenuRole(QAction::AboutRole); #if QT_VERSION < 0x050000 aboutQtAction = new QAction(QIcon(":/trolltech/qmessagebox/images/qtlogo-64.png"), tr("About &Qt"), this); #else aboutQtAction = new QAction(QIcon(":/qt-project.org/qmessagebox/images/qtlogo-64.png"), tr("About &Qt"), this); #endif aboutQtAction->setStatusTip(tr("Show information about Qt")); aboutQtAction->setMenuRole(QAction::AboutQtRole); optionsAction = new QAction(QIcon(":/icons/options"), tr("&Options..."), this); optionsAction->setStatusTip(tr("Modify configuration options for Supcoin")); optionsAction->setMenuRole(QAction::PreferencesRole); toggleHideAction = new QAction(networkStyle->getAppIcon(), tr("&Show / Hide"), this); toggleHideAction->setStatusTip(tr("Show or hide the main Window")); encryptWalletAction = new QAction(QIcon(":/icons/lock_closed"), tr("&Encrypt Wallet..."), this); encryptWalletAction->setStatusTip(tr("Encrypt the private keys that belong to your wallet")); encryptWalletAction->setCheckable(true); backupWalletAction = new QAction(QIcon(":/icons/filesave"), tr("&Backup Wallet..."), this); backupWalletAction->setStatusTip(tr("Backup wallet to another location")); changePassphraseAction = new QAction(QIcon(":/icons/key"), tr("&Change Passphrase..."), this); changePassphraseAction->setStatusTip(tr("Change the passphrase used for wallet encryption")); signMessageAction = new QAction(QIcon(":/icons/edit"), tr("Sign &message..."), this); signMessageAction->setStatusTip(tr("Sign messages with your Supcoin addresses to prove you own them")); verifyMessageAction = new QAction(QIcon(":/icons/transaction_0"), tr("&Verify message..."), this); verifyMessageAction->setStatusTip(tr("Verify messages to ensure they were signed with specified Supcoin addresses")); openRPCConsoleAction = new QAction(QIcon(":/icons/debugwindow"), tr("&Debug window"), this); openRPCConsoleAction->setStatusTip(tr("Open debugging and diagnostic console")); usedSendingAddressesAction = new QAction(QIcon(":/icons/address-book"), tr("&Sending addresses..."), this); usedSendingAddressesAction->setStatusTip(tr("Show the list of used sending addresses and labels")); usedReceivingAddressesAction = new QAction(QIcon(":/icons/address-book"), tr("&Receiving addresses..."), this); usedReceivingAddressesAction->setStatusTip(tr("Show the list of used receiving addresses and labels")); openAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_FileIcon), tr("Open &URI..."), this); openAction->setStatusTip(tr("Open a supcoin: URI or payment request")); showHelpMessageAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr("&Command-line options"), this); showHelpMessageAction->setStatusTip(tr("Show the Supcoin Core help message to get a list with possible Supcoin command-line options")); connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit())); connect(aboutAction, SIGNAL(triggered()), this, SLOT(aboutClicked())); connect(aboutQtAction, SIGNAL(triggered()), qApp, SLOT(aboutQt())); connect(optionsAction, SIGNAL(triggered()), this, SLOT(optionsClicked())); connect(toggleHideAction, SIGNAL(triggered()), this, SLOT(toggleHidden())); connect(showHelpMessageAction, SIGNAL(triggered()), this, SLOT(showHelpMessageClicked())); #ifdef ENABLE_WALLET if(walletFrame) { connect(encryptWalletAction, SIGNAL(triggered(bool)), walletFrame, SLOT(encryptWallet(bool))); connect(backupWalletAction, SIGNAL(triggered()), walletFrame, SLOT(backupWallet())); connect(changePassphraseAction, SIGNAL(triggered()), walletFrame, SLOT(changePassphrase())); connect(signMessageAction, SIGNAL(triggered()), this, SLOT(gotoSignMessageTab())); connect(verifyMessageAction, SIGNAL(triggered()), this, SLOT(gotoVerifyMessageTab())); connect(usedSendingAddressesAction, SIGNAL(triggered()), walletFrame, SLOT(usedSendingAddresses())); connect(usedReceivingAddressesAction, SIGNAL(triggered()), walletFrame, SLOT(usedReceivingAddresses())); connect(openAction, SIGNAL(triggered()), this, SLOT(openClicked())); } #endif // ENABLE_WALLET }
ThumbnailStrip::ThumbnailStrip(QWidget *parent) : QWidget(parent), panelSize(122), current(-1), thumbView(NULL) { thumbView = new ThumbnailView(); widget = new ClickableWidget(); thumbView->setWidget(widget); thumbView->setFrameShape(QFrame::NoFrame); viewLayout = new QBoxLayout(QBoxLayout::LeftToRight); viewLayout->setSpacing(0); widget->setLayout(viewLayout); widget->setStyleSheet("background-color: #202020;"); // doesnt work from qss for some reason scrollBar = thumbView->horizontalScrollBar(); // BUTTONS buttonsWidget = new QWidget(); buttonsWidget->setAccessibleName("panelButtonsWidget"); openButton = new ClickableLabel(); openButton->setAccessibleName("panelButton"); openButton->setPixmap(QPixmap(":/images/res/icons/open.png")); saveButton = new ClickableLabel(); saveButton->setAccessibleName("panelButton"); saveButton->setPixmap(QPixmap(":/images/res/icons/save.png")); settingsButton = new ClickableLabel(); settingsButton->setAccessibleName("panelButton"); settingsButton->setPixmap(QPixmap(":/images/res/icons/settings.png")); buttonsLayout = new QBoxLayout(QBoxLayout::LeftToRight); buttonsLayout->setSpacing(0); buttonsLayout->setContentsMargins(0,0,0,0); buttonsLayout->addWidget(openButton); buttonsLayout->addWidget(saveButton); buttonsLayout->addWidget(settingsButton); buttonsLayout->addStretch(0); buttonsWidget->setLayout(buttonsLayout); // main layout layout = new QBoxLayout(QBoxLayout::TopToBottom); layout->setSpacing(0); layout->setContentsMargins(0,0,0,0); layout->addWidget(buttonsWidget); layout->addWidget(thumbView); this->setLayout(layout); // other extremely important things thumbView->setSizeAdjustPolicy(QAbstractScrollArea::AdjustToContents); widget->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); widget->setAccessibleName("thumbnailWidget"); thumbView->setAccessibleName("thumbnailView"); loadTimer.setSingleShot(true); timeLine = new QTimeLine(SCROLL_ANIMATION_SPEED, thumbView); timeLine->setCurveShape(QTimeLine::EaseInCurve); thumbView->horizontalScrollBar()->setAttribute(Qt::WA_NoMousePropagation, true); thumbView->verticalScrollBar()->setAttribute(Qt::WA_NoMousePropagation, true); this->setAttribute(Qt::WA_NoMousePropagation, true); this->setFocusPolicy(Qt::NoFocus); thumbView->setFocusPolicy(Qt::NoFocus); // actions connect(openButton, SIGNAL(clicked()), this, SIGNAL(openClicked())); connect(saveButton, SIGNAL(clicked()), this, SIGNAL(saveClicked())); connect(settingsButton, SIGNAL(clicked()), this, SIGNAL(settingsClicked())); connect(widget, SIGNAL(pressed(QPoint)), this, SLOT(viewPressed(QPoint))); connect(&loadTimer, SIGNAL(timeout()), this, SLOT(loadVisibleThumbnails())); connect(settings, SIGNAL(settingsChanged()), this, SLOT(readSettings())); readSettings(); this->hide(); }
void BitcoinGUI::createActions() { QActionGroup* tabGroup = new QActionGroup(this); overviewAction = new QAction(platformStyle->SingleColorIcon(":/icons/overview"), tr("&Overview"), this); overviewAction->setStatusTip(tr("Show general overview of wallet")); overviewAction->setToolTip(overviewAction->statusTip()); overviewAction->setCheckable(true); overviewAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_1)); tabGroup->addAction(overviewAction); sendCoinsAction = new QAction(platformStyle->SingleColorIcon(":/icons/send"), tr("&Send"), this); sendCoinsAction->setStatusTip(tr("Send coins to a Bitcoin address")); sendCoinsAction->setToolTip(sendCoinsAction->statusTip()); sendCoinsAction->setCheckable(true); sendCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_2)); tabGroup->addAction(sendCoinsAction); sendCoinsMenuAction = new QAction(platformStyle->TextColorIcon(":/icons/send"), sendCoinsAction->text(), this); sendCoinsMenuAction->setStatusTip(sendCoinsAction->statusTip()); sendCoinsMenuAction->setToolTip(sendCoinsMenuAction->statusTip()); receiveCoinsAction = new QAction(platformStyle->SingleColorIcon(":/icons/receiving_addresses"), tr("&Receive"), this); receiveCoinsAction->setStatusTip(tr("Request payments (generates QR codes and bitcoin: URIs)")); receiveCoinsAction->setToolTip(receiveCoinsAction->statusTip()); receiveCoinsAction->setCheckable(true); receiveCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_3)); tabGroup->addAction(receiveCoinsAction); receiveCoinsMenuAction = new QAction(platformStyle->TextColorIcon(":/icons/receiving_addresses"), receiveCoinsAction->text(), this); receiveCoinsMenuAction->setStatusTip(receiveCoinsAction->statusTip()); receiveCoinsMenuAction->setToolTip(receiveCoinsMenuAction->statusTip()); historyAction = new QAction(platformStyle->SingleColorIcon(":/icons/history"), tr("&Transactions"), this); historyAction->setStatusTip(tr("Browse transaction history")); historyAction->setToolTip(historyAction->statusTip()); historyAction->setCheckable(true); historyAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_4)); tabGroup->addAction(historyAction); #ifdef ENABLE_WALLET connect(overviewAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(overviewAction, SIGNAL(triggered()), this, SLOT(gotoOverviewPage())); connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(gotoSendCoinsPage())); connect(sendCoinsMenuAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(sendCoinsMenuAction, SIGNAL(triggered()), this, SLOT(gotoSendCoinsPage())); connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(gotoReceiveCoinsPage())); connect(receiveCoinsMenuAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(receiveCoinsMenuAction, SIGNAL(triggered()), this, SLOT(gotoReceiveCoinsPage())); connect(historyAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(historyAction, SIGNAL(triggered()), this, SLOT(gotoHistoryPage())); #endif // ENABLE_WALLET quitAction = new QAction(platformStyle->TextColorIcon(":/icons/quit"), tr("E&xit"), this); quitAction->setStatusTip(tr("Quit application")); quitAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q)); quitAction->setMenuRole(QAction::QuitRole); aboutAction = new QAction(platformStyle->TextColorIcon(":/icons/about"), tr("&About %1").arg(tr(PACKAGE_NAME)), this); aboutAction->setStatusTip(tr("Show information about %1").arg(tr(PACKAGE_NAME))); aboutAction->setMenuRole(QAction::AboutRole); aboutAction->setEnabled(false); aboutQtAction = new QAction(platformStyle->TextColorIcon(":/icons/about_qt"), tr("About &Qt"), this); aboutQtAction->setStatusTip(tr("Show information about Qt")); aboutQtAction->setMenuRole(QAction::AboutQtRole); optionsAction = new QAction(platformStyle->TextColorIcon(":/icons/options"), tr("&Options..."), this); optionsAction->setStatusTip(tr("Modify configuration options for %1").arg(tr(PACKAGE_NAME))); optionsAction->setMenuRole(QAction::PreferencesRole); optionsAction->setEnabled(false); toggleHideAction = new QAction(platformStyle->TextColorIcon(":/icons/about"), tr("&Show / Hide"), this); toggleHideAction->setStatusTip(tr("Show or hide the main Window")); encryptWalletAction = new QAction(platformStyle->TextColorIcon(":/icons/lock_closed"), tr("&Encrypt Wallet..."), this); encryptWalletAction->setStatusTip(tr("Encrypt the private keys that belong to your wallet")); encryptWalletAction->setCheckable(true); backupWalletAction = new QAction(platformStyle->TextColorIcon(":/icons/filesave"), tr("&Backup Wallet..."), this); backupWalletAction->setStatusTip(tr("Backup wallet to another location")); changePassphraseAction = new QAction(platformStyle->TextColorIcon(":/icons/key"), tr("&Change Passphrase..."), this); changePassphraseAction->setStatusTip(tr("Change the passphrase used for wallet encryption")); signMessageAction = new QAction(platformStyle->TextColorIcon(":/icons/edit"), tr("Sign &message..."), this); signMessageAction->setStatusTip(tr("Sign messages with your Bitcoin addresses to prove you own them")); verifyMessageAction = new QAction(platformStyle->TextColorIcon(":/icons/verify"), tr("&Verify message..."), this); verifyMessageAction->setStatusTip(tr("Verify messages to ensure they were signed with specified Bitcoin addresses")); openRPCConsoleAction = new QAction(platformStyle->TextColorIcon(":/icons/debugwindow"), tr("&Debug window"), this); openRPCConsoleAction->setStatusTip(tr("Open debugging and diagnostic console")); openRPCConsoleAction->setEnabled(false); usedSendingAddressesAction = new QAction(platformStyle->TextColorIcon(":/icons/address-book"), tr("&Sending addresses..."), this); usedSendingAddressesAction->setStatusTip(tr("Show the list of used sending addresses and labels")); usedReceivingAddressesAction = new QAction(platformStyle->TextColorIcon(":/icons/address-book"), tr("&Receiving addresses..."), this); usedReceivingAddressesAction->setStatusTip(tr("Show the list of used receiving addresses and labels")); openAction = new QAction(platformStyle->TextColorIcon(":/icons/open"), tr("Open &URI..."), this); openAction->setStatusTip(tr("Open a bitcoin: URI or payment request")); showHelpMessageAction = new QAction(platformStyle->TextColorIcon(":/icons/info"), tr("&Command-line options"), this); showHelpMessageAction->setMenuRole(QAction::NoRole); showHelpMessageAction->setStatusTip(tr("Show the %1 help message to get a list with possible Bitcoin command-line options").arg(tr(PACKAGE_NAME))); connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit())); connect(aboutAction, SIGNAL(triggered()), this, SLOT(aboutClicked())); connect(aboutQtAction, SIGNAL(triggered()), qApp, SLOT(aboutQt())); connect(optionsAction, SIGNAL(triggered()), this, SLOT(optionsClicked())); connect(toggleHideAction, SIGNAL(triggered()), this, SLOT(toggleHidden())); connect(showHelpMessageAction, SIGNAL(triggered()), this, SLOT(showHelpMessageClicked())); connect(openRPCConsoleAction, SIGNAL(triggered()), this, SLOT(showDebugWindow())); connect(quitAction, SIGNAL(triggered()), rpcConsole, SLOT(hide())); #ifdef ENABLE_WALLET if (walletFrame) { connect(encryptWalletAction, SIGNAL(triggered(bool)), walletFrame, SLOT(encryptWallet(bool))); connect(backupWalletAction, SIGNAL(triggered()), walletFrame, SLOT(backupWallet())); connect(changePassphraseAction, SIGNAL(triggered()), walletFrame, SLOT(changePassphrase())); connect(signMessageAction, SIGNAL(triggered()), this, SLOT(gotoSignMessageTab())); connect(verifyMessageAction, SIGNAL(triggered()), this, SLOT(gotoVerifyMessageTab())); connect(usedSendingAddressesAction, SIGNAL(triggered()), walletFrame, SLOT(usedSendingAddresses())); connect(usedReceivingAddressesAction, SIGNAL(triggered()), walletFrame, SLOT(usedReceivingAddresses())); connect(openAction, SIGNAL(triggered()), this, SLOT(openClicked())); } #endif // ENABLE_WALLET new QShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_C), this, SLOT(showDebugWindowActivateConsole())); new QShortcut(QKeySequence(Qt::CTRL + Qt::SHIFT + Qt::Key_D), this, SLOT(showDebugWindow())); }
void BitcreditGUI::createActions(const NetworkStyle *networkStyle) { QActionGroup *tabGroup = new QActionGroup(this); overviewAction = new QAction(QIcon(":/icons/overview"), tr("&Overview"), this); overviewAction->setStatusTip(tr("Show general overview of wallet")); overviewAction->setToolTip(overviewAction->statusTip()); overviewAction->setCheckable(true); overviewAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_1)); tabGroup->addAction(overviewAction); sendCoinsAction = new QAction(QIcon(":/icons/send"), tr("&Send"), this); sendCoinsAction->setStatusTip(tr("Send coins to a Bitcredit address")); sendCoinsAction->setToolTip(sendCoinsAction->statusTip()); sendCoinsAction->setCheckable(true); sendCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_2)); tabGroup->addAction(sendCoinsAction); receiveCoinsAction = new QAction(QIcon(":/icons/receiving_addresses"), tr("&Receive"), this); receiveCoinsAction->setStatusTip(tr("Request payments (generates QR codes and bitcredit: URIs)")); receiveCoinsAction->setToolTip(receiveCoinsAction->statusTip()); receiveCoinsAction->setCheckable(true); receiveCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_3)); tabGroup->addAction(receiveCoinsAction); historyAction = new QAction(QIcon(":/icons/history"), tr("&Transactions"), this); historyAction->setStatusTip(tr("Browse transaction history")); historyAction->setToolTip(historyAction->statusTip()); historyAction->setCheckable(true); historyAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_4)); tabGroup->addAction(historyAction); chatAction = new QAction(QIcon(":/icons/chat"), tr("&IRC"), this); chatAction->setToolTip(tr("View chat")); chatAction->setCheckable(true); tabGroup->addAction(chatAction); blockAction = new QAction(QIcon(":/icons/block"), tr("&Block Crawler"), this); blockAction->setToolTip(tr("Explore the BlockChain")); blockAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_5)); blockAction->setCheckable(true); tabGroup->addAction(blockAction); voteCoinsAction = new QAction(QIcon(":/icons/vote"), tr("&Vote/Rate"), this); voteCoinsAction->setStatusTip(tr("Vote in elections/ Rate a Bank")); voteCoinsAction->setToolTip(voteCoinsAction->statusTip()); voteCoinsAction->setCheckable(true); voteCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_6)); tabGroup->addAction(voteCoinsAction); exchangeAction = new QAction(QIcon(":/icons/exchange"), tr("&Market Data"), this); exchangeAction->setToolTip(tr("Market")); exchangeAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_7)); exchangeAction->setCheckable(true); tabGroup->addAction(exchangeAction); bankstatsAction = new QAction(QIcon(":/icons/bankstats"), tr("&Bank Statistics"), this); bankstatsAction->setToolTip(tr("Local and Global statistics")); bankstatsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_8)); bankstatsAction->setCheckable(true); tabGroup->addAction(bankstatsAction); sendMessagesAction = new QAction(QIcon(":/icons/em"), tr("Send &Message"), this); sendMessagesAction->setToolTip(tr("Send Encrypted Messages or Requets")); sendMessagesAction->setCheckable(true); sendMessagesAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_9)); tabGroup->addAction(sendMessagesAction); messageAction = new QAction(QIcon(":/icons/em"), tr("Mess&ages"), this); messageAction->setToolTip(tr("Encrypted Messaging")); messageAction->setCheckable(true); tabGroup->addAction(messageAction); invoiceAction = new QAction(QIcon(":/icons/em"), tr("&Invoices"), this); invoiceAction->setToolTip(tr("Encrypted Invoicing")); invoiceAction->setCheckable(true); tabGroup->addAction(invoiceAction); receiptAction = new QAction(QIcon(":/icons/em"), tr("Re&ceipts"), this); receiptAction->setToolTip(tr("Encrypted Receipting")); receiptAction->setCheckable(true); tabGroup->addAction(receiptAction); sendMessagesAnonAction = new QAction(QIcon(":/icons/em"), tr("S&end Messages"), this); sendMessagesAnonAction->setToolTip(tr("Send Anonymous Message")); sendMessagesAnonAction->setCheckable(true); tabGroup->addAction(sendMessagesAnonAction); #ifdef ENABLE_WALLET // These showNormalIfMinimized are needed because Send Coins and Receive Coins // can be triggered from the tray menu, and need to show the GUI to be useful. connect(overviewAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(overviewAction, SIGNAL(triggered()), this, SLOT(gotoOverviewPage())); connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(gotoSendCoinsPage())); connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(gotoReceiveCoinsPage())); connect(historyAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(historyAction, SIGNAL(triggered()), this, SLOT(gotoHistoryPage())); connect(chatAction, SIGNAL(triggered()), this, SLOT(gotoChatPage())); connect(exchangeAction, SIGNAL(triggered()), this, SLOT(gotoExchangeBrowserPage())); connect(blockAction, SIGNAL(triggered()), this, SLOT(gotoBlockBrowser())); connect(bankstatsAction, SIGNAL(triggered()), this, SLOT(gotoBankStatisticsPage())); connect(voteCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(voteCoinsAction, SIGNAL(triggered()), this, SLOT(gotoVoteCoinsPage())); connect(sendMessagesAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(sendMessagesAction, SIGNAL(triggered()), this, SLOT(gotoSendMessagesPage())); connect(messageAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(messageAction, SIGNAL(triggered()), this, SLOT(gotoMessagesPage())); connect(invoiceAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(invoiceAction, SIGNAL(triggered()), this, SLOT(gotoInvoicesPage())); connect(receiptAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(receiptAction, SIGNAL(triggered()), this, SLOT(gotoReceiptPage())); connect(sendMessagesAnonAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); #endif // ENABLE_WALLET quitAction = new QAction(QIcon(":/icons/quit"), tr("E&xit"), this); quitAction->setStatusTip(tr("Quit application")); quitAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q)); quitAction->setMenuRole(QAction::QuitRole); aboutAction = new QAction(QIcon(":/icons/about"), tr("&About Bitcredit Core"), this); aboutAction->setStatusTip(tr("Show information about Bitcredit Core")); aboutAction->setMenuRole(QAction::AboutRole); aboutQtAction = new QAction(QIcon(":/icons/about_qt"), tr("About &Qt"), this); aboutQtAction->setStatusTip(tr("Show information about Qt")); aboutQtAction->setMenuRole(QAction::AboutQtRole); optionsAction = new QAction(QIcon(":/icons/options"), tr("&Options..."), this); optionsAction->setStatusTip(tr("Modify configuration options for Bitcredit Core")); optionsAction->setMenuRole(QAction::PreferencesRole); toggleHideAction = new QAction(QIcon(":/icons/mini"), tr("&Show / Hide"), this); toggleHideAction->setStatusTip(tr("Show or hide the main Window")); encryptWalletAction = new QAction(QIcon(":/icons/lock_closed"), tr("&Encrypt Wallet..."), this); encryptWalletAction->setStatusTip(tr("Encrypt the private keys that belong to your wallet")); encryptWalletAction->setCheckable(true); backupWalletAction = new QAction(QIcon(":/icons/filesave"), tr("&Backup Wallet..."), this); backupWalletAction->setStatusTip(tr("Backup wallet to another location")); changePassphraseAction = new QAction(QIcon(":/icons/key"), tr("&Change Passphrase..."), this); changePassphraseAction->setStatusTip(tr("Change the passphrase used for wallet encryption")); signMessageAction = new QAction(QIcon(":/icons/edit"), tr("Sign &message..."), this); signMessageAction->setStatusTip(tr("Sign messages with your Bitcredit addresses to prove you own them")); verifyMessageAction = new QAction(QIcon(":/icons/verify"), tr("&Verify message..."), this); verifyMessageAction->setStatusTip(tr("Verify messages to ensure they were signed with specified Bitcredit addresses")); paperWalletAction = new QAction(QIcon(":/icons/print"), tr("&Print paper wallets"), this); paperWalletAction->setStatusTip(tr("Print paper wallets")); openRPCConsoleAction = new QAction(QIcon(":/icons/debugwindow"), tr("&Debug window"), this); openRPCConsoleAction->setStatusTip(tr("Open debugging and diagnostic console")); usedSendingAddressesAction = new QAction(QIcon(":/icons/address-book"), tr("&Sending addresses..."), this); usedSendingAddressesAction->setStatusTip(tr("Show the list of used sending addresses and labels")); usedReceivingAddressesAction = new QAction(QIcon(":/icons/address-book"), tr("&Receiving addresses..."), this); usedReceivingAddressesAction->setStatusTip(tr("Show the list of used receiving addresses and labels")); openAction = new QAction(QIcon(":/icons/open"), tr("Open &URI..."), this); openAction->setStatusTip(tr("Open a bitcredit: URI or payment request")); showHelpMessageAction = new QAction(QIcon(":/icons/info"), tr("&Command-line options"), this); showHelpMessageAction->setStatusTip(tr("Show the Bitcredit Core help message to get a list with possible Bitcredit command-line options")); connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit())); connect(aboutAction, SIGNAL(triggered()), this, SLOT(aboutClicked())); connect(aboutQtAction, SIGNAL(triggered()), qApp, SLOT(aboutQt())); connect(optionsAction, SIGNAL(triggered()), this, SLOT(optionsClicked())); connect(toggleHideAction, SIGNAL(triggered()), this, SLOT(toggleHidden())); connect(showHelpMessageAction, SIGNAL(triggered()), this, SLOT(showHelpMessageClicked())); #ifdef ENABLE_WALLET if(walletFrame) { connect(encryptWalletAction, SIGNAL(triggered(bool)), walletFrame, SLOT(encryptWallet(bool))); connect(backupWalletAction, SIGNAL(triggered()), walletFrame, SLOT(backupWallet())); connect(changePassphraseAction, SIGNAL(triggered()), walletFrame, SLOT(changePassphrase())); connect(signMessageAction, SIGNAL(triggered()), this, SLOT(gotoSignMessageTab())); connect(verifyMessageAction, SIGNAL(triggered()), this, SLOT(gotoVerifyMessageTab())); connect(usedSendingAddressesAction, SIGNAL(triggered()), walletFrame, SLOT(usedSendingAddresses())); connect(usedReceivingAddressesAction, SIGNAL(triggered()), walletFrame, SLOT(usedReceivingAddresses())); connect(openAction, SIGNAL(triggered()), this, SLOT(openClicked())); connect(paperWalletAction, SIGNAL(triggered()), walletFrame, SLOT(printPaperWallets())); } #endif }
StartupView::StartupView( QWidget * parent ) : QWidget( parent ) { m_templateListModel = boost::shared_ptr<TemplateListModel>( new TemplateListModel() ); setStyleSheet("openstudio--StartupView { background: #E6E6E6; }"); #ifdef Q_WS_MAC setWindowFlags(Qt::FramelessWindowHint); #else setWindowFlags(Qt::CustomizeWindowHint); #endif QWidget * recentProjectsView = new QWidget(); recentProjectsView->setStyleSheet("QWidget { background: #F2F2F2; }"); QVBoxLayout * recentProjectsLayout = new QVBoxLayout(); recentProjectsLayout->setContentsMargins(10,10,10,10); QLabel * recentProjectsLabel = new QLabel("Recent Projects"); recentProjectsLabel->setStyleSheet("QLabel { font: bold }"); recentProjectsLayout->addWidget(recentProjectsLabel,0,Qt::AlignTop); recentProjectsView->setLayout(recentProjectsLayout); QToolButton * openButton = new QToolButton(); openButton->setText("Open File"); openButton->setStyleSheet("QToolButton { font: bold; }"); openButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); QIcon openIcon(":/images/open_file.png"); openButton->setIcon(openIcon); openButton->setIconSize(QSize(40,40)); connect( openButton, SIGNAL(clicked()), this, SIGNAL(openClicked()) ); QToolButton * importButton = new QToolButton(); importButton->setText("Import Idf"); importButton->setStyleSheet("QToolButton { font: bold; }"); importButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); QIcon importIcon(":/images/import_file.png"); importButton->setIcon(importIcon); importButton->setIconSize(QSize(40,40)); connect( importButton, SIGNAL(clicked()), this, SIGNAL(importClicked()) ); /* QToolButton * importSDDButton = new QToolButton(); importSDDButton->setText("Import SDD"); importSDDButton->setStyleSheet("QToolButton { font: bold; }"); importSDDButton->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); QIcon importSDDIcon(":/images/import_file.png"); importSDDButton->setIcon(importSDDIcon); importSDDButton->setIconSize(QSize(40,40)); connect( importSDDButton, SIGNAL(clicked()), this, SIGNAL(importSDDClicked()) ); */ QWidget * projectChooserView = new QWidget(); projectChooserView->setFixedWidth(238); projectChooserView->setStyleSheet("QWidget { background: #F2F2F2; }"); QVBoxLayout * projectChooserLayout = new QVBoxLayout(); projectChooserLayout->setContentsMargins(10,10,10,10); QLabel * projectChooserLabel = new QLabel("Create New From Template"); projectChooserLabel->setStyleSheet("QLabel { font: bold }"); projectChooserLayout->addWidget(projectChooserLabel,0,Qt::AlignTop); m_listView = new QListView(); m_listView->setViewMode(QListView::IconMode); m_listView->setModel(m_templateListModel.get()); m_listView->setFocusPolicy(Qt::NoFocus); m_listView->setFlow(QListView::LeftToRight); m_listView->setUniformItemSizes(true); m_listView->setSelectionMode(QAbstractItemView::SingleSelection); projectChooserLayout->addWidget(m_listView); projectChooserView->setLayout(projectChooserLayout); m_projectDetailView = new QWidget(); m_projectDetailView->setStyleSheet("QWidget { background: #F2F2F2; }"); QVBoxLayout * projectDetailLayout = new QVBoxLayout(); projectDetailLayout->setContentsMargins(10,10,10,10); m_projectDetailView->setLayout(projectDetailLayout); QWidget * footerView = new QWidget(); footerView->setObjectName("FooterView"); footerView->setStyleSheet("QWidget#FooterView { background: #E6E6E6; }"); footerView->setMaximumHeight(50); footerView->setMinimumHeight(50); QPushButton * cancelButton = new QPushButton(); cancelButton->setObjectName("StandardGrayButton"); cancelButton->setMinimumSize(QSize(99,28)); #ifdef OPENSTUDIO_PLUGIN cancelButton->setText("Cancel"); connect( cancelButton, SIGNAL(clicked()), this, SLOT(hide()) ); #else #ifdef Q_OS_MAC cancelButton->setText("Quit"); #else cancelButton->setText("Exit"); #endif connect( cancelButton, SIGNAL(clicked()), OpenStudioApp::instance(), SLOT(quit()) ); #endif cancelButton->setStyleSheet("QPushButton { font: bold; }"); QPushButton * chooseButton = new QPushButton(); chooseButton->setObjectName("StandardBlueButton"); chooseButton->setText("Choose"); chooseButton->setMinimumSize(QSize(99,28)); connect( chooseButton, SIGNAL(clicked()), this, SLOT(newFromTemplateSlot()) ); chooseButton->setStyleSheet("QPushButton { font: bold; }"); QHBoxLayout * hFooterLayout = new QHBoxLayout(); hFooterLayout->setSpacing(25); hFooterLayout->setContentsMargins(0,0,0,0); hFooterLayout->addStretch(); hFooterLayout->addWidget(cancelButton); hFooterLayout->addWidget(chooseButton); footerView->setLayout(hFooterLayout); QHBoxLayout * hLayout = new QHBoxLayout(); QVBoxLayout * vLayout = new QVBoxLayout(); QVBoxLayout * vOpenLayout = new QVBoxLayout(); vOpenLayout->addWidget(recentProjectsView); vOpenLayout->addWidget(openButton); vOpenLayout->addWidget(importButton); //vOpenLayout->addWidget(importSDDButton); hLayout->addLayout(vOpenLayout); hLayout->addWidget(projectChooserView); hLayout->addWidget(m_projectDetailView,1); vLayout->addSpacing(50); vLayout->addLayout(hLayout); vLayout->addWidget(footerView); setLayout(vLayout); connect(m_listView,SIGNAL(clicked( const QModelIndex &)),this,SLOT( showDetailsForItem( const QModelIndex & ) )); m_listView->setCurrentIndex(m_templateListModel->index(0,0)); showDetailsForItem(m_templateListModel->index(0,0)); }
void BitcoinGUI::createActions(const NetworkStyle *networkStyle) { QActionGroup *tabGroup = new QActionGroup(this); overviewAction = new QAction(SingleColorIcon(":/icons/overview"), tr("&Overview"), this); overviewAction->setStatusTip(tr("Show balance and most recent transactions")); overviewAction->setToolTip(overviewAction->statusTip()); overviewAction->setCheckable(true); overviewAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_1)); tabGroup->addAction(overviewAction); sendCoinsAction = new QAction(SingleColorIcon(":/icons/send"), tr("&Transfer Prototanium"), this); sendCoinsAction->setStatusTip(tr("Send Prototanium to another Storage Vault")); sendCoinsAction->setToolTip(sendCoinsAction->statusTip()); sendCoinsAction->setCheckable(true); sendCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_2)); tabGroup->addAction(sendCoinsAction); sendCoinsMenuAction = new QAction(TextColorIcon(":/icons/send"), sendCoinsAction->text(), this); sendCoinsMenuAction->setStatusTip(sendCoinsAction->statusTip()); sendCoinsMenuAction->setToolTip(sendCoinsMenuAction->statusTip()); receiveCoinsAction = new QAction(SingleColorIcon(":/icons/receiving_addresses"), tr("&Collect Prototanium"), this); receiveCoinsAction->setStatusTip(tr("Display your Storage Vault IDs for incoming transfers")); receiveCoinsAction->setToolTip(receiveCoinsAction->statusTip()); receiveCoinsAction->setCheckable(true); receiveCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_3)); tabGroup->addAction(receiveCoinsAction); receiveCoinsMenuAction = new QAction(TextColorIcon(":/icons/receiving_addresses"), receiveCoinsAction->text(), this); receiveCoinsMenuAction->setStatusTip(receiveCoinsAction->statusTip()); receiveCoinsMenuAction->setToolTip(receiveCoinsMenuAction->statusTip()); historyAction = new QAction(SingleColorIcon(":/icons/history"), tr("&Ledger"), this); historyAction->setStatusTip(tr("Browse transaction history")); historyAction->setToolTip(historyAction->statusTip()); historyAction->setCheckable(true); historyAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_4)); tabGroup->addAction(historyAction); #ifdef ENABLE_WALLET // These showNormalIfMinimized are needed because Send Coins and Receive Coins // can be triggered from the tray menu, and need to show the GUI to be useful. connect(overviewAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(overviewAction, SIGNAL(triggered()), this, SLOT(gotoOverviewPage())); connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(gotoSendCoinsPage())); connect(sendCoinsMenuAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(sendCoinsMenuAction, SIGNAL(triggered()), this, SLOT(gotoSendCoinsPage())); connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(gotoReceiveCoinsPage())); connect(receiveCoinsMenuAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(receiveCoinsMenuAction, SIGNAL(triggered()), this, SLOT(gotoReceiveCoinsPage())); connect(historyAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(historyAction, SIGNAL(triggered()), this, SLOT(gotoHistoryPage())); #endif // ENABLE_WALLET quitAction = new QAction(TextColorIcon(":/icons/quit"), tr("E&xit"), this); quitAction->setStatusTip(tr("Quit application")); quitAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q)); quitAction->setMenuRole(QAction::QuitRole); aboutAction = new QAction(TextColorIcon(":/icons/about"), tr("&About Prototanium"), this); aboutAction->setStatusTip(tr("Show information about Prototanium")); aboutAction->setMenuRole(QAction::AboutRole); aboutQtAction = new QAction(TextColorIcon(":/icons/about_qt"), tr("About &Qt"), this); aboutQtAction->setStatusTip(tr("Show information about Qt")); aboutQtAction->setMenuRole(QAction::AboutQtRole); optionsAction = new QAction(TextColorIcon(":/icons/options"), tr("&Options..."), this); optionsAction->setStatusTip(tr("Modify configuration options for Prototanium")); optionsAction->setMenuRole(QAction::PreferencesRole); toggleHideAction = new QAction(TextColorIcon(":/icons/about"), tr("&Show / Hide"), this); toggleHideAction->setStatusTip(tr("Show or hide the main Window")); encryptWalletAction = new QAction(TextColorIcon(":/icons/lock_closed"), tr("&Encrypt Vault..."), this); encryptWalletAction->setStatusTip(tr("Encrypt the private keys that belong to your vault")); encryptWalletAction->setCheckable(true); backupWalletAction = new QAction(TextColorIcon(":/icons/filesave"), tr("&Backup Vault..."), this); backupWalletAction->setStatusTip(tr("Backup vault to another location")); changePassphraseAction = new QAction(TextColorIcon(":/icons/key"), tr("&Change Passphrase..."), this); changePassphraseAction->setStatusTip(tr("Change the passphrase used for vault encryption")); signMessageAction = new QAction(TextColorIcon(":/icons/edit"), tr("Sign &message..."), this); signMessageAction->setStatusTip(tr("Sign messages with your Prototanium addresses to prove you own them")); verifyMessageAction = new QAction(TextColorIcon(":/icons/verify"), tr("&Verify message..."), this); verifyMessageAction->setStatusTip(tr("Verify messages to ensure they were signed with specified Prototanium addresses")); openRPCConsoleAction = new QAction(TextColorIcon(":/icons/debugwindow"), tr("&Console"), this); openRPCConsoleAction->setStatusTip(tr("Open diagnostic console")); usedSendingAddressesAction = new QAction(TextColorIcon(":/icons/address-book"), tr("&Sending addresses..."), this); usedSendingAddressesAction->setStatusTip(tr("Show the list of used sending addresses and labels")); usedReceivingAddressesAction = new QAction(TextColorIcon(":/icons/address-book"), tr("&Receiving addresses..."), this); usedReceivingAddressesAction->setStatusTip(tr("Show the list of used receiving addresses and labels")); openAction = new QAction(TextColorIcon(":/icons/open"), tr("Open &URI..."), this); openAction->setStatusTip(tr("Open a bitcoin: URI or payment request")); showHelpMessageAction = new QAction(TextColorIcon(":/icons/info"), tr("&Command-line options"), this); showHelpMessageAction->setStatusTip(tr("Show the Prototanium help message to get a list with possible Prototanium command-line options")); connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit())); connect(aboutAction, SIGNAL(triggered()), this, SLOT(aboutClicked())); connect(aboutQtAction, SIGNAL(triggered()), qApp, SLOT(aboutQt())); connect(optionsAction, SIGNAL(triggered()), this, SLOT(optionsClicked())); connect(toggleHideAction, SIGNAL(triggered()), this, SLOT(toggleHidden())); connect(showHelpMessageAction, SIGNAL(triggered()), this, SLOT(showHelpMessageClicked())); #ifdef ENABLE_WALLET if(walletFrame) { connect(encryptWalletAction, SIGNAL(triggered(bool)), walletFrame, SLOT(encryptWallet(bool))); connect(backupWalletAction, SIGNAL(triggered()), walletFrame, SLOT(backupWallet())); connect(changePassphraseAction, SIGNAL(triggered()), walletFrame, SLOT(changePassphrase())); connect(signMessageAction, SIGNAL(triggered()), this, SLOT(gotoSignMessageTab())); connect(verifyMessageAction, SIGNAL(triggered()), this, SLOT(gotoVerifyMessageTab())); connect(usedSendingAddressesAction, SIGNAL(triggered()), walletFrame, SLOT(usedSendingAddresses())); connect(usedReceivingAddressesAction, SIGNAL(triggered()), walletFrame, SLOT(usedReceivingAddresses())); connect(openAction, SIGNAL(triggered()), this, SLOT(openClicked())); } #endif // ENABLE_WALLET }
void BitcoinGUI::createActions(bool fIsTestnet) { QActionGroup *tabGroup = new QActionGroup(this); overviewAction = new QAction(QIcon(":/icons/overview"), tr("&Eye of Cthuhlu"), this); overviewAction->setStatusTip(tr("Gaze upon thine offerings")); overviewAction->setToolTip(overviewAction->statusTip()); overviewAction->setCheckable(true); overviewAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_1)); tabGroup->addAction(overviewAction); sendCoinsAction = new QAction(QIcon(":/icons/send"), tr("&Give Offering"), this); sendCoinsAction->setStatusTip(tr("Share Offerings with another cultist")); sendCoinsAction->setToolTip(sendCoinsAction->statusTip()); sendCoinsAction->setCheckable(true); sendCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_2)); tabGroup->addAction(sendCoinsAction); receiveCoinsAction = new QAction(QIcon(":/icons/receiving_addresses"), tr("&Take Offering"), this); receiveCoinsAction->setStatusTip(tr("Allow thy fellow cultists to bestow honor upon thee")); receiveCoinsAction->setToolTip(receiveCoinsAction->statusTip()); receiveCoinsAction->setCheckable(true); receiveCoinsAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_3)); tabGroup->addAction(receiveCoinsAction); historyAction = new QAction(QIcon(":/icons/history"), tr("&Transgressions"), this); historyAction->setStatusTip(tr("A list of your sins")); historyAction->setToolTip(historyAction->statusTip()); historyAction->setCheckable(true); historyAction->setShortcut(QKeySequence(Qt::ALT + Qt::Key_4)); tabGroup->addAction(historyAction); // These showNormalIfMinimized are needed because Send Coins and Receive Coins // can be triggered from the tray menu, and need to show the GUI to be useful. connect(overviewAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(overviewAction, SIGNAL(triggered()), this, SLOT(gotoOverviewPage())); connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(sendCoinsAction, SIGNAL(triggered()), this, SLOT(gotoSendCoinsPage())); connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(receiveCoinsAction, SIGNAL(triggered()), this, SLOT(gotoReceiveCoinsPage())); connect(historyAction, SIGNAL(triggered()), this, SLOT(showNormalIfMinimized())); connect(historyAction, SIGNAL(triggered()), this, SLOT(gotoHistoryPage())); quitAction = new QAction(QIcon(":/icons/quit"), tr("E&xit"), this); quitAction->setStatusTip(tr("Quit application")); quitAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q)); quitAction->setMenuRole(QAction::QuitRole); if (!fIsTestnet) aboutAction = new QAction(QIcon(":/icons/bitcoin"), tr("&About Offerings Core"), this); else aboutAction = new QAction(QIcon(":/icons/bitcoin_testnet"), tr("&About Offerings Core"), this); aboutAction->setStatusTip(tr("Show information about Offerings")); aboutAction->setMenuRole(QAction::AboutRole); #if QT_VERSION < 0x050000 aboutQtAction = new QAction(QIcon(":/trolltech/qmessagebox/images/qtlogo-64.png"), tr("About &Qt"), this); #else aboutQtAction = new QAction(QIcon(":/qt-project.org/qmessagebox/images/qtlogo-64.png"), tr("About &Qt"), this); #endif aboutQtAction->setStatusTip(tr("Show information about Qt")); aboutQtAction->setMenuRole(QAction::AboutQtRole); optionsAction = new QAction(QIcon(":/icons/options"), tr("&Options..."), this); optionsAction->setStatusTip(tr("Modify configuration options for Offerings")); optionsAction->setMenuRole(QAction::PreferencesRole); if (!fIsTestnet) toggleHideAction = new QAction(QIcon(":/icons/bitcoin"), tr("&Show / Hide"), this); else toggleHideAction = new QAction(QIcon(":/icons/bitcoin_testnet"), tr("&Show / Hide"), this); toggleHideAction->setStatusTip(tr("Show or hide the main Window")); encryptWalletAction = new QAction(QIcon(":/icons/lock_closed"), tr("&Spellbind Altar..."), this); encryptWalletAction->setStatusTip(tr("Encrypt your altar with 2d20 power.")); encryptWalletAction->setCheckable(true); backupWalletAction = new QAction(QIcon(":/icons/filesave"), tr("&Reconstruct Altar..."), this); backupWalletAction->setStatusTip(tr("Copy altar to another location")); changePassphraseAction = new QAction(QIcon(":/icons/key"), tr("&Change Words of Power..."), this); changePassphraseAction->setStatusTip(tr("Change the passphrase used for spellbinding your altar")); signMessageAction = new QAction(QIcon(":/icons/edit"), tr("Spellbind &message..."), this); signMessageAction->setStatusTip(tr("Mark messages with your Offering prove you thou art justified")); verifyMessageAction = new QAction(QIcon(":/icons/transaction_0"), tr("&Decode message..."), this); verifyMessageAction->setStatusTip(tr("Verify messages to ensure they were signed with specified Offerings addresses")); openRPCConsoleAction = new QAction(QIcon(":/icons/debugwindow"), tr("&Text Based Worship"), this); openRPCConsoleAction->setStatusTip(tr("Speak directly to the Great Old Ones using human language")); usedSendingAddressesAction = new QAction(QIcon(":/icons/address-book"), tr("&Sending addresses..."), this); usedSendingAddressesAction->setStatusTip(tr("Show the list of used sending addresses and labels")); usedReceivingAddressesAction = new QAction(QIcon(":/icons/address-book"), tr("&Receiving addresses..."), this); usedReceivingAddressesAction->setStatusTip(tr("Show the list of used receiving addresses and labels")); openAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_FileIcon), tr("Open &URI..."), this); openAction->setStatusTip(tr("Open a Offerings: URI or payment request")); showHelpMessageAction = new QAction(QApplication::style()->standardIcon(QStyle::SP_MessageBoxInformation), tr("&Command-line options"), this); showHelpMessageAction->setStatusTip(tr("Show the Offerings Core help message to get a list with possible Offerings Command-line options")); connect(quitAction, SIGNAL(triggered()), qApp, SLOT(quit())); connect(aboutAction, SIGNAL(triggered()), this, SLOT(aboutClicked())); connect(aboutQtAction, SIGNAL(triggered()), qApp, SLOT(aboutQt())); connect(optionsAction, SIGNAL(triggered()), this, SLOT(optionsClicked())); connect(toggleHideAction, SIGNAL(triggered()), this, SLOT(toggleHidden())); connect(showHelpMessageAction, SIGNAL(triggered()), this, SLOT(showHelpMessageClicked())); #ifdef ENABLE_WALLET if(walletFrame) { connect(encryptWalletAction, SIGNAL(triggered(bool)), walletFrame, SLOT(encryptWallet(bool))); connect(backupWalletAction, SIGNAL(triggered()), walletFrame, SLOT(backupWallet())); connect(changePassphraseAction, SIGNAL(triggered()), walletFrame, SLOT(changePassphrase())); connect(signMessageAction, SIGNAL(triggered()), this, SLOT(gotoSignMessageTab())); connect(verifyMessageAction, SIGNAL(triggered()), this, SLOT(gotoVerifyMessageTab())); connect(usedSendingAddressesAction, SIGNAL(triggered()), walletFrame, SLOT(usedSendingAddresses())); connect(usedReceivingAddressesAction, SIGNAL(triggered()), walletFrame, SLOT(usedReceivingAddresses())); connect(openAction, SIGNAL(triggered()), this, SLOT(openClicked())); } #endif }
// This slot is called when Open button on VToolBar is clicked void Application::OpenClicked() { openClicked(); connect(openVtkbutton,SIGNAL(clicked()),this,SLOT(openvtkclicked())); }
void MainWindow::showWebHistory() { webHistoryView = std::unique_ptr<WebHistory>{ new WebHistory(visitedUrls) }; connect(webHistoryView->getView(), SIGNAL(doubleClicked(QModelIndex)), SLOT(openClicked(QModelIndex))); }