├── .DS_Store ├── .gitignore ├── .gitmodules ├── BasicPanel.qml ├── LICENSE ├── LeftPanel.qml ├── Logger.cpp ├── Logger.h ├── MainApp.cpp ├── MainApp.h ├── MiddlePanel.qml ├── README.md ├── RightPanel.qml ├── TranslationManager.cpp ├── TranslationManager.h ├── VULNERABILITY_RESPONSE_PROCESS.md ├── android ├── README.md └── docker │ ├── Dockerfile │ ├── android.mk.patch │ └── androiddeployqt.patch ├── build.sh ├── build_libwallet_api.sh ├── clipboardAdapter.cpp ├── clipboardAdapter.h ├── components ├── AddressBookTable.qml ├── CheckBox.qml ├── CheckBox2.qml ├── DaemonConsole.qml ├── DaemonManagerDialog.qml ├── DashboardTable.qml ├── DatePicker.qml ├── HistoryTable.qml ├── HistoryTableInnerColumn.qml ├── HistoryTableMobile.qml ├── IconButton.qml ├── InlineButton.qml ├── Input.qml ├── InputDialog.qml ├── InputMulti.qml ├── Label.qml ├── LabelButton.qml ├── LabelSubheader.qml ├── LineEdit.qml ├── LineEditMulti.qml ├── MenuButton.qml ├── MobileHeader.qml ├── NetworkStatusItem.qml ├── NewPasswordDialog.qml ├── Notifier.qml ├── PasswordDialog.qml ├── PrivacyLevel.qml ├── PrivacyLevelSmall.qml ├── ProcessingSplash.qml ├── ProgressBar.qml ├── QRCodeScanner.qml ├── RadioButton.qml ├── RemoteNodeEdit.qml ├── Scroll.qml ├── SearchInput.qml ├── StandardButton.qml ├── StandardDialog.qml ├── StandardDropdown.qml ├── Style.qml ├── TableDropdown.qml ├── TableHeader.qml ├── TextBlock.qml ├── TickDelegate.qml ├── TipItem.qml ├── TitleBar.qml ├── WarningBox.qml └── qmldir ├── deployment.pri ├── empty ├── filter.cpp ├── filter.h ├── fonts ├── LICENSE.txt ├── Roboto-Bold.ttf ├── Roboto-Light.ttf ├── Roboto-Medium.ttf └── Roboto-Regular.ttf ├── get_libwallet_api.sh ├── images ├── .DS_Store ├── appicon.icns ├── appicon.ico ├── appicons │ ├── 128x128.png │ ├── 16x16.png │ ├── 24x24.png │ ├── 256x256.png │ ├── 32x32.png │ ├── 48x48.png │ ├── 512x512.png │ ├── 64x64.png │ └── 96x96.png ├── arrow-right-medium-white.png ├── arrow-right-medium-white@2x.png ├── ascSortIndicator.png ├── ascSortIndicatorActived.png ├── ascSortIndicatorPressed.png ├── backToWindowIcon.png ├── card-background.png ├── card-background@2x.png ├── checkedBlackIcon.png ├── checkedIcon-black.png ├── checkedOrangeIcon.png ├── checkedVioletIcon.png ├── close.png ├── close@2x.png ├── closeIcon.png ├── collapseRightPanel.png ├── connectedImage.png ├── copyToClipboard.png ├── createWallet.png ├── createWalletFromDevice.png ├── datePicker.png ├── deleteIcon.png ├── descSortIndicator.png ├── descSortIndicatorActived.png ├── descSortIndicatorPressed.png ├── disconnectedImage.png ├── downArrow.png ├── dropIndicator.png ├── dropdownAdd.png ├── dropdownCopy.png ├── dropdownDel.png ├── dropdownSearch.png ├── dropdownSend.png ├── editIcon.png ├── editIcon2.png ├── expand.png ├── expand@2x.png ├── expandRightPanel.png ├── expandTable.png ├── eyeHide.png ├── eyeShow.png ├── fullscreen.png ├── fullscreen@2x.png ├── goToBasicVersionHovered.png ├── gotoBasicVersion.png ├── greyTriangle.png ├── helpIcon.png ├── historyBorderRadius.png ├── hseparator.png ├── iconaddressbook.png ├── iconadvanced.png ├── iconhelp.png ├── iconhistory.png ├── iconmining.png ├── iconreceive.png ├── iconringdb.png ├── iconseedkeys.png ├── iconsend.png ├── iconsettings.png ├── iconsignverify.png ├── icontxkey.png ├── leftPanelBg.jpg ├── lightning-white.png ├── lightning.png ├── lightning2x.png ├── lightning@2x.png ├── lockIcon.png ├── logout.png ├── logout@2x.png ├── magnifier.png ├── maximizeIcon.png ├── menu.png ├── menuArrow.png ├── menuButtonGradient.png ├── menuIndicator.png ├── middlePanelBg.jpg ├── minimize.png ├── minimize@2x.png ├── minimizeIcon.png ├── miningxmr.png ├── miningxmr@2x.png ├── minus-white.png ├── minus-white@2x.png ├── moneroIcon-28x28.png ├── moneroIcon-trans28x28.png ├── moneroIcon-trans56x56.png ├── moneroIcon-trans84x84.png ├── moneroIcon.png ├── moneroLogo.png ├── moneroLogo2.png ├── moneroLogo_white.png ├── nextMonth.png ├── nextPage.png ├── openAccount.png ├── plus-white.png ├── plus-white@2x.png ├── prevMonth.png ├── prevPage.png ├── privacyTick.png ├── question.png ├── question@2x.png ├── recoverWallet.png ├── resize.png ├── resizeHovered.png ├── right.png ├── right@2x.png ├── rightArrow.png ├── rightArrowInactive.png ├── settings_local.png ├── settings_local@2x.png ├── settings_navbar_side.png ├── settings_navbar_side_active.png ├── settings_remote.png ├── settings_remote@2x.png ├── statusConnected.png ├── statusDisconnected.png ├── tableOptions.png ├── tip.png ├── titlebarGradient.jpg ├── titlebarLogo.png ├── titlebarLogo@2x.png ├── torque-trans28x28.png ├── torqueIcon-28x28.png ├── torqueIcon-trans28x28.png ├── torqueIcon-trans56x56.png ├── torqueIcon-trans84x84.png ├── torqueIcon.png ├── torqueLogo.png ├── torqueLogo2.png ├── torqueLogo_white.png ├── uncheckedIcon.png ├── upArrow-green.png ├── warning.png ├── whatIsIcon.png └── whiteDropIndicator.png ├── installers ├── .DS_Store └── windows │ ├── .gitignore │ ├── FinishImage.bmp │ ├── LICENSE │ ├── Monero.iss │ ├── README.md │ ├── ReadMe.htm │ ├── WelcomeImage.bmp │ ├── WizardSmallImage.bmp │ ├── monero-daemon.bat │ └── monero-wallet-gui.log ├── ios_get_libwallet.api.sh ├── js ├── TxUtils.js ├── Utils.js └── Windows.js ├── lang ├── flags │ ├── bangladesh.png │ ├── bd.png │ ├── bg.png │ ├── br.png │ ├── brazil.png │ ├── catalonia.png │ ├── china.png │ ├── cn.png │ ├── croatia.png │ ├── cz.png │ ├── de.png │ ├── dk.png │ ├── eg.png │ ├── es.png │ ├── esperanto.png │ ├── fi.png │ ├── finland.png │ ├── fr.png │ ├── france.png │ ├── gb.png │ ├── german.png │ ├── hr.png │ ├── hu.png │ ├── id.png │ ├── il.png │ ├── in.png │ ├── india.png │ ├── indonesia.png │ ├── israel.png │ ├── it.png │ ├── italy.png │ ├── japan.png │ ├── jp.png │ ├── kr.png │ ├── lt.png │ ├── malaysia.png │ ├── netherlands.png │ ├── nl.png │ ├── palestine.png │ ├── pirate.png │ ├── pl.png │ ├── poland.png │ ├── ps.png │ ├── pt.png │ ├── ro.png │ ├── rpa.png │ ├── rs.png │ ├── ru.png │ ├── russia.png │ ├── se.png │ ├── si.png │ ├── sk.png │ ├── south_korea.png │ ├── spain.png │ ├── sweden.png │ ├── taiwan.png │ ├── tr.png │ ├── tw.png │ ├── ua.png │ ├── uk.png │ ├── us.png │ ├── usa.png │ └── za.png └── languages.xml ├── linuxdeploy_helper.sh ├── main.cpp ├── main.qml ├── oscursor.cpp ├── oscursor.h ├── oshelper.cpp ├── oshelper.h ├── package_mac.sh ├── pages ├── AddressBook.qml ├── Dashboard.qml ├── Help.qml ├── History.qml ├── Keys.qml ├── Mining.qml ├── Receive.qml ├── Settings.qml ├── SharedRingDB.qml ├── Sign.qml ├── Transfer.qml ├── TxKey.qml └── settings │ ├── Navbar.qml │ ├── Settings.qml │ ├── SettingsInfo.qml │ ├── SettingsLayout.qml │ ├── SettingsLog.qml │ ├── SettingsNode.qml │ └── SettingsWallet.qml ├── qml.qrc ├── share └── Info.plist ├── src ├── NetworkType.h ├── QR-Code-generator │ ├── BitBuffer.cpp │ ├── BitBuffer.hpp │ ├── QrCode.cpp │ ├── QrCode.hpp │ ├── QrSegment.cpp │ ├── QrSegment.hpp │ └── Readme.markdown ├── QR-Code-scanner │ ├── QrCodeScanner.cpp │ ├── QrCodeScanner.h │ ├── QrScanThread.cpp │ └── QrScanThread.h ├── daemon │ ├── DaemonManager.cpp │ └── DaemonManager.h ├── libwalletqt │ ├── AddressBook.cpp │ ├── AddressBook.h │ ├── PendingTransaction.cpp │ ├── PendingTransaction.h │ ├── QRCodeImageProvider.cpp │ ├── QRCodeImageProvider.h │ ├── Subaddress.cpp │ ├── Subaddress.h │ ├── TransactionHistory.cpp │ ├── TransactionHistory.h │ ├── TransactionInfo.cpp │ ├── TransactionInfo.h │ ├── Transfer.h │ ├── UnsignedTransaction.cpp │ ├── UnsignedTransaction.h │ ├── Wallet.cpp │ ├── Wallet.h │ ├── WalletManager.cpp │ ├── WalletManager.cpp.bak │ ├── WalletManager.h │ └── WalletManager.h.bak ├── model │ ├── AddressBookModel.cpp │ ├── AddressBookModel.h │ ├── SubaddressModel.cpp │ ├── SubaddressModel.h │ ├── TransactionHistoryModel.cpp │ ├── TransactionHistoryModel.h │ ├── TransactionHistorySortFilterModel.cpp │ ├── TransactionHistorySortFilterModel.cpp.bak │ └── TransactionHistorySortFilterModel.h └── zxcvbn-c │ ├── .gitignore │ ├── README.md │ ├── dict-generate.cpp │ ├── makefile │ ├── test.c │ ├── testcases.txt │ ├── words-eng_wiki.txt │ ├── words-female.txt │ ├── words-male.txt │ ├── words-passwd.txt │ ├── words-surname.txt │ ├── words-tv_film.txt │ ├── zxcvbn.c │ └── zxcvbn.h ├── start-low-graphics-mode.bat ├── tabs ├── TweetsModel.qml ├── Twitter.qml └── tweetSearch.js ├── torque-core.rc ├── torque-wallet-gui.pro ├── translations ├── torque-core.ts ├── torque-core_ar.ts ├── torque-core_cat.ts ├── torque-core_cs.ts ├── torque-core_da.ts ├── torque-core_de.ts ├── torque-core_eo.ts ├── torque-core_es.ts ├── torque-core_fi.ts ├── torque-core_fr.ts ├── torque-core_he.ts ├── torque-core_hi.ts ├── torque-core_hr.ts ├── torque-core_hu.ts ├── torque-core_id.ts ├── torque-core_it.ts ├── torque-core_ja.ts ├── torque-core_ko.ts ├── torque-core_lt.ts ├── torque-core_nl.ts ├── torque-core_pl.ts ├── torque-core_prt.ts ├── torque-core_pt-br.ts ├── torque-core_pt-pt.ts ├── torque-core_ro.ts ├── torque-core_ru.ts ├── torque-core_sk.ts ├── torque-core_sl.ts ├── torque-core_sr.ts ├── torque-core_sv.ts ├── torque-core_tr.ts ├── torque-core_uk.ts ├── torque-core_zh-cn.ts └── torque-core_zh-tw.ts ├── utils.sh ├── windeploy_helper.sh └── wizard ├── WizardConfigure.qml ├── WizardCreateViewOnlyWallet.qml ├── WizardCreateWallet.qml ├── WizardCreateWalletFromDevice.qml ├── WizardDaemonSettings.qml ├── WizardDonation.qml ├── WizardFinish.qml ├── WizardMain.qml ├── WizardManageWalletUI.qml ├── WizardMemoTextInput.qml ├── WizardOptions.qml ├── WizardPassword.qml ├── WizardPasswordInput.qml ├── WizardPasswordUI.qml ├── WizardRecoveryWallet.qml ├── WizardWelcome.qml └── utils.js /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/.DS_Store -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.user 2 | *.user.* 3 | translations/*.qm 4 | build 5 | version.js 6 | # IOS stuff below 7 | moc_* 8 | *.o 9 | *.mak 10 | *.build 11 | *.xcodeproj 12 | stellite-wallet-gui_plugin_import.cpp 13 | stellite-wallet-gui_qml_plugin_import.cpp 14 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "torque"] 2 | path = torque 3 | url = https://github.com/contribute-torque/torque 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014-2018, The Monero Project 2 | 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | 1. Redistributions of source code must retain the above copyright notice, this 9 | list of conditions and the following disclaimer. 10 | 11 | 2. Redistributions in binary form must reproduce the above copyright notice, 12 | this list of conditions and the following disclaimer in the documentation 13 | and/or other materials provided with the distribution. 14 | 15 | 3. Neither the name of the copyright holder nor the names of its contributors 16 | may be used to endorse or promote products derived from this software without 17 | specific prior written permission. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 20 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | Parts of the project are originally copyright (c) 2012-2013 The Cryptonote 31 | developers 32 | 33 | -------------------------------------------------------------------------------- /Logger.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #include "Logger.h" 7 | #include "wallet/api/wallet2_api.h" 8 | 9 | // default log path by OS (should be writable) 10 | static const QString default_name = "torque-wallet-gui.log"; 11 | #if defined(Q_OS_ANDROID) || defined(Q_OS_IOS) 12 | static const QString osPath = QStandardPaths::standardLocations(QStandardPaths::AppDataLocation).at(0); 13 | #elif defined(Q_OS_WIN) 14 | static const QString osPath = QStandardPaths::standardLocations(QStandardPaths::AppDataLocation).at(0); 15 | #elif defined(Q_OS_MAC) 16 | static const QString osPath = QStandardPaths::standardLocations(QStandardPaths::HomeLocation).at(0) + "/Library/Logs"; 17 | #else // linux + bsd 18 | static const QString osPath = QStandardPaths::standardLocations(QStandardPaths::HomeLocation).at(0); 19 | #endif 20 | 21 | 22 | // return the absolute path of the logfile 23 | const QString getLogPath(const QString logPath) 24 | { 25 | const QFileInfo fi(logPath); 26 | 27 | if(!logPath.isEmpty() && !fi.isDir()) 28 | return fi.absoluteFilePath(); 29 | else 30 | return osPath + "/" + default_name; 31 | } 32 | 33 | 34 | // custom messageHandler that foward all messages to easylogging 35 | void messageHandler(QtMsgType type, const QMessageLogContext &context, const QString &message) 36 | { 37 | (void) context; // context isn't used in release builds 38 | const std::string cat = "frontend"; // category displayed in the log 39 | const std::string msg = message.toStdString(); 40 | switch(type) 41 | { 42 | case QtDebugMsg: Torque::Wallet::debug(cat, msg); break; 43 | case QtInfoMsg: Torque::Wallet::info(cat, msg); break; 44 | case QtWarningMsg: Torque::Wallet::warning(cat, msg); break; 45 | case QtCriticalMsg: Torque::Wallet::error(cat, msg); break; 46 | case QtFatalMsg: Torque::Wallet::error(cat, msg); break; 47 | } 48 | } 49 | 50 | -------------------------------------------------------------------------------- /Logger.h: -------------------------------------------------------------------------------- 1 | #ifndef LOGGER_H 2 | #define LOGGER_H 3 | 4 | const QString getLogPath(const QString logPath); 5 | void messageHandler(QtMsgType type, const QMessageLogContext &context, const QString &message); 6 | 7 | #endif // LOGGER_H 8 | 9 | -------------------------------------------------------------------------------- /MainApp.cpp: -------------------------------------------------------------------------------- 1 | #include "MainApp.h" 2 | #include 3 | 4 | bool MainApp::event (QEvent *event) 5 | { 6 | // Catch application exit event and signal to qml app to handle exit 7 | if(event->type() == QEvent::Close) { 8 | event->ignore(); 9 | emit closing(); 10 | return true; 11 | } 12 | 13 | return false; 14 | } 15 | -------------------------------------------------------------------------------- /MainApp.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINAPP_H 2 | #define MAINAPP_H 3 | #include 4 | 5 | class MainApp : public QApplication 6 | { 7 | Q_OBJECT 8 | public: 9 | MainApp(int &argc, char** argv) : QApplication(argc, argv) {}; 10 | private: 11 | bool event(QEvent *e); 12 | signals: 13 | void closing(); 14 | }; 15 | 16 | #endif // MAINAPP_H 17 | 18 | 19 | -------------------------------------------------------------------------------- /RightPanel.qml: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2018, The Monero Project 2 | // 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without modification, are 6 | // permitted provided that the following conditions are met: 7 | // 8 | // 1. Redistributions of source code must retain the above copyright notice, this list of 9 | // conditions and the following disclaimer. 10 | // 11 | // 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 | // of conditions and the following disclaimer in the documentation and/or other 13 | // materials provided with the distribution. 14 | // 15 | // 3. Neither the name of the copyright holder nor the names of its contributors may be 16 | // used to endorse or promote products derived from this software without specific 17 | // prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 | // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 21 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 22 | // THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 26 | // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 27 | // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | import QtQuick 2.2 30 | import QtQuick.Controls 1.2 31 | import QtQuick.Controls.Styles 1.2 32 | import QtGraphicalEffects 1.0 33 | 34 | import "tabs" 35 | import "components" 36 | 37 | Rectangle { 38 | id: root 39 | width: 330 40 | color: "#FFFFFF" 41 | } 42 | -------------------------------------------------------------------------------- /TranslationManager.cpp: -------------------------------------------------------------------------------- 1 | #include "TranslationManager.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | 10 | TranslationManager * TranslationManager::m_instance = nullptr; 11 | 12 | 13 | TranslationManager::TranslationManager(QObject *parent) : QObject(parent) 14 | { 15 | m_translator = new QTranslator(this); 16 | } 17 | 18 | bool TranslationManager::setLanguage(const QString &language) 19 | { 20 | qDebug() << __FUNCTION__ << " " << language; 21 | // if language is "en", remove translator 22 | if (language.toLower() == "en") { 23 | qApp->removeTranslator(m_translator); 24 | emit languageChanged(); 25 | return true; 26 | } 27 | 28 | QString dir = qApp->applicationDirPath() + "/translations"; 29 | QString filename = "torque-core_" + language; 30 | 31 | qDebug("%s: loading translation file '%s' from '%s'", 32 | __FUNCTION__, qPrintable(filename), qPrintable(dir)); 33 | 34 | if (m_translator->load(filename, dir)) { 35 | qDebug("%s: translation for language '%s' loaded successfully", 36 | __FUNCTION__, qPrintable(language)); 37 | // TODO: apply locale? 38 | qApp->installTranslator(m_translator); 39 | emit languageChanged(); 40 | return true; 41 | } 42 | 43 | qDebug("%s: couldn't load translation file '%s' from '%s'", 44 | __FUNCTION__, qPrintable(filename), qPrintable(dir)); 45 | qDebug("%s: loading embedded translation file '%s'", 46 | __FUNCTION__, qPrintable(filename)); 47 | 48 | if (m_translator->load(filename, ":")) { 49 | qDebug("%s: embedded translation for language '%s' loaded successfully", 50 | __FUNCTION__, qPrintable(language)); 51 | qApp->installTranslator(m_translator); 52 | emit languageChanged(); 53 | return true; 54 | } 55 | 56 | qCritical("%s: error loading translation for language '%s'", 57 | __FUNCTION__, qPrintable(language)); 58 | return false; 59 | } 60 | 61 | TranslationManager *TranslationManager::instance() 62 | { 63 | if (!m_instance) { 64 | m_instance = new TranslationManager(); 65 | } 66 | return m_instance; 67 | } 68 | 69 | QString TranslationManager::emptyString() 70 | { 71 | return ""; 72 | } 73 | 74 | -------------------------------------------------------------------------------- /TranslationManager.h: -------------------------------------------------------------------------------- 1 | #ifndef TRANSLATIONMANAGER_H 2 | #define TRANSLATIONMANAGER_H 3 | 4 | #include 5 | 6 | class QTranslator; 7 | class TranslationManager : public QObject 8 | { 9 | Q_OBJECT 10 | Q_PROPERTY(QString emptyString READ emptyString NOTIFY languageChanged) 11 | public: 12 | Q_INVOKABLE bool setLanguage(const QString &language); 13 | static TranslationManager *instance(); 14 | 15 | QString emptyString(); 16 | 17 | signals: 18 | void languageChanged(); 19 | 20 | private: 21 | explicit TranslationManager(QObject *parent = 0); 22 | 23 | private: 24 | static TranslationManager * m_instance; 25 | QTranslator * m_translator; 26 | 27 | }; 28 | 29 | #endif // TRANSLATIONMANAGER_H 30 | -------------------------------------------------------------------------------- /android/README.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014-2018, The Monero Project 2 | 3 | 4 | ## Current status : ALPHA 5 | 6 | - Minimum Android 5.0 (api level 21) 7 | - Modal dialogs can appear in background giving the feeling that the application is frozen (Work around : turn screen off/on or switch to another app and back) 8 | 9 | ## Build using Docker 10 | 11 | # Base environnement 12 | 13 | cd torque/utils/build_scripts 14 | docker build -f android32.Dockerfile -t torque-android . 15 | cd .. 16 | 17 | # Build GUI 18 | 19 | cd android/docker 20 | docker build -t monero-gui-android . 21 | docker create -it --name monero-gui-android monero-gui-android bash 22 | 23 | # Get the apk 24 | 25 | docker cp monero-gui-android:/opt/android/monero-gui/build/release/bin/bin/QtApp-debug.apk . 26 | 27 | ## Deployment 28 | 29 | - Using ADB (Android debugger bridge) : 30 | 31 | First, see section [Enable adb debugging on your device](https://developer.android.com/studio/command-line/adb.html#Enabling) 32 | The only place where we are allowed to play is `/data/local/tmp`. So : 33 | 34 | adb push /opt/android/monero-gui/build/release/bin/bin/QtApp-debug.apk /data/local/tmp 35 | adb shell pm install -r /data/local/tmp/QtApp-debug.apk 36 | 37 | - Troubleshooting: 38 | 39 | adb devices -l 40 | adb logcat 41 | 42 | if using adb inside docker, make sure you did "docker run -v /dev/bus/usb:/dev/bus/usb --privileged" 43 | 44 | - Using a web server 45 | 46 | mkdir /usr/tmp 47 | cp QtApp-debug.apk /usr/tmp 48 | docker run -d -v /usr/tmp:/usr/share/nginx/html:ro -p 8080:80 nginx 49 | 50 | Now it should be accessible through a web browser at 51 | 52 | http://:8080/QtApp-debug.apk 53 | 54 | -------------------------------------------------------------------------------- /android/docker/android.mk.patch: -------------------------------------------------------------------------------- 1 | diff --git a/android/jni/Android.mk b/android/jni/Android.mk 2 | index e442b07..158afd5 100644 3 | --- a/android/jni/Android.mk 4 | +++ b/android/jni/Android.mk 5 | @@ -12,14 +12,18 @@ LOCAL_PATH := $(ICONV_SRC) 6 | 7 | LOCAL_MODULE := libiconv 8 | 9 | +LOCAL_ARM_MODE := arm 10 | +LOCAL_CPP_FEATURES := exceptions rtti features 11 | LOCAL_CFLAGS := \ 12 | -Wno-multichar \ 13 | -D_ANDROID \ 14 | - -DLIBDIR="c" \ 15 | + -DLIBDIR="\".\"" \ 16 | -DBUILDING_LIBICONV \ 17 | -DBUILDING_LIBCHARSET \ 18 | -DIN_LIBRARY 19 | 20 | +LOCAL_CFLAGS += -fno-stack-protector 21 | + 22 | LOCAL_SRC_FILES := \ 23 | lib/iconv.c \ 24 | libcharset/lib/localcharset.c \ 25 | @@ -30,13 +34,14 @@ LOCAL_C_INCLUDES := \ 26 | $(ICONV_SRC)/libcharset \ 27 | $(ICONV_SRC)/libcharset/include 28 | 29 | -include $(BUILD_SHARED_LIBRARY) 30 | +include $(BUILD_STATIC_LIBRARY) 31 | 32 | LOCAL_LDLIBS := -llog -lcharset 33 | 34 | # libzbarjni 35 | include $(CLEAR_VARS) 36 | 37 | + 38 | LOCAL_PATH := $(MY_LOCAL_PATH) 39 | LOCAL_MODULE := zbarjni 40 | LOCAL_SRC_FILES := ../../java/zbarjni.c \ 41 | @@ -71,6 +76,17 @@ LOCAL_C_INCLUDES := ../include \ 42 | ../zbar \ 43 | $(ICONV_SRC)/include 44 | 45 | -LOCAL_SHARED_LIBRARIES := libiconv 46 | +LOCAL_STATIC_LIBRARIES := libiconv 47 | +LOCAL_ARM_MODE := arm 48 | +LOCAL_CPP_FEATURES := exceptions rtti features 49 | + 50 | +LOCAL_CFLAGS := \ 51 | + -Wno-multichar \ 52 | + -D_ANDROID \ 53 | + -DLIBDIR="\".\"" \ 54 | + -DBUILDING_LIBICONV \ 55 | + -DBUILDING_LIBCHARSET \ 56 | + -DIN_LIBRARY 57 | + 58 | 59 | -include $(BUILD_SHARED_LIBRARY) 60 | \ No newline at end of file 61 | +include $(BUILD_STATIC_LIBRARY) 62 | -------------------------------------------------------------------------------- /android/docker/androiddeployqt.patch: -------------------------------------------------------------------------------- 1 | diff --git a/src/androiddeployqt/main.cpp b/src/androiddeployqt/main.cpp 2 | index 8a8e591..71d693e 100644 3 | --- a/src/androiddeployqt/main.cpp 4 | +++ b/src/androiddeployqt/main.cpp 5 | @@ -1122,7 +1122,7 @@ bool updateLibsXml(const Options &options) 6 | 7 | QString libsPath = QLatin1String("libs/") + options.architecture + QLatin1Char('/'); 8 | 9 | - QString qtLibs = QLatin1String("gnustl_shared\n"); 10 | + QString qtLibs = QLatin1String("c++_shared\n"); 11 | QString bundledInLibs; 12 | QString bundledInAssets; 13 | foreach (Options::BundledFile bundledFile, options.bundledFiles) { 14 | @@ -2519,6 +2519,39 @@ bool installApk(const Options &options) 15 | return true; 16 | } 17 | 18 | +bool copyStl(Options *options) 19 | +{ 20 | + if (options->deploymentMechanism == Options::Debug && !options->installApk) 21 | + return true; 22 | + 23 | + if (options->verbose) 24 | + fprintf(stdout, "Copying LIBC++ STL library\n"); 25 | + 26 | + QString filePath = options->ndkPath 27 | + + QLatin1String("/sources/cxx-stl/llvm-libc++") 28 | + + QLatin1String("/libs/") 29 | + + options->architecture 30 | + + QLatin1String("/libc++_shared.so"); 31 | + if (!QFile::exists(filePath)) { 32 | + fprintf(stderr, "LIBC STL library does not exist at %s\n", qPrintable(filePath)); 33 | + return false; 34 | + } 35 | + 36 | + QString destinationDirectory = 37 | + options->deploymentMechanism == Options::Debug 38 | + ? options->temporaryDirectoryName + QLatin1String("/lib") 39 | + : options->outputDirectory + QLatin1String("/libs/") + options->architecture; 40 | + 41 | + if (!copyFileIfNewer(filePath, destinationDirectory 42 | + + QLatin1String("/libc++_shared.so"), options->verbose)) { 43 | + return false; 44 | + } 45 | + 46 | + if (options->deploymentMechanism == Options::Debug && !deployToLocalTmp(options, QLatin1String("/lib/libc++_shared.so"))) 47 | + return false; 48 | + 49 | + return true; 50 | +} 51 | bool copyGnuStl(Options *options) 52 | { 53 | if (options->deploymentMechanism == Options::Debug && !options->installApk) 54 | @@ -2870,7 +2903,7 @@ int main(int argc, char *argv[]) 55 | if (Q_UNLIKELY(options.timing)) 56 | fprintf(stdout, "[TIMING] %d ms: Read dependencies\n", options.timer.elapsed()); 57 | 58 | - if (options.deploymentMechanism != Options::Ministro && !copyGnuStl(&options)) 59 | + if (options.deploymentMechanism != Options::Ministro && !copyStl(&options)) 60 | return CannotCopyGnuStl; 61 | 62 | if (Q_UNLIKELY(options.timing)) 63 | -------------------------------------------------------------------------------- /build_libwallet_api.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | # MONERO_URL=https://github.com/contribute-torque/torque.git 5 | # MONERO_BRANCH=master 6 | CPU_CORE_COUNT=$(grep -c ^processor /proc/cpuinfo 2>/dev/null || sysctl -n hw.ncpu) 7 | pushd $(pwd) 8 | ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 9 | 10 | source $ROOT_DIR/utils.sh 11 | 12 | 13 | INSTALL_DIR=$ROOT_DIR/wallet 14 | MONERO_DIR=$ROOT_DIR/torque 15 | 16 | 17 | mkdir -p $MONERO_DIR/build/release 18 | pushd $MONERO_DIR/build/release 19 | 20 | # reusing function from "utils.sh" 21 | platform=$(get_platform) 22 | 23 | pushd $MONERO_DIR/build/release/src/wallet 24 | make -j$CPU_CORE_COUNT 25 | make install -j$CPU_CORE_COUNT 26 | popd 27 | 28 | # unbound is one more dependency. can't be merged to the wallet_merged 29 | # since filename conflict (random.c.obj) 30 | # for Linux, we use libunbound shipped with the system, so we don't need to build it 31 | 32 | if [ "$platform" != "linux" ]; then 33 | echo "Building libunbound..." 34 | pushd $MONERO_DIR/build/release/external/unbound 35 | # no need to make, it was already built as dependency for libwallet 36 | # make -j$CPU_CORE_COUNT 37 | make install -j$CPU_CORE_COUNT 38 | popd 39 | fi 40 | 41 | popd 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /clipboardAdapter.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2018, The Monero Project 2 | // 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without modification, are 6 | // permitted provided that the following conditions are met: 7 | // 8 | // 1. Redistributions of source code must retain the above copyright notice, this list of 9 | // conditions and the following disclaimer. 10 | // 11 | // 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 | // of conditions and the following disclaimer in the documentation and/or other 13 | // materials provided with the distribution. 14 | // 15 | // 3. Neither the name of the copyright holder nor the names of its contributors may be 16 | // used to endorse or promote products derived from this software without specific 17 | // prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 | // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 21 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 22 | // THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 26 | // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 27 | // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | #include "clipboardAdapter.h" 30 | 31 | clipboardAdapter::clipboardAdapter(QObject *parent) : 32 | QObject(parent) 33 | { 34 | m_pClipboard = QGuiApplication::clipboard(); 35 | } 36 | 37 | void clipboardAdapter::setText(const QString &text) { 38 | m_pClipboard->setText(text, QClipboard::Clipboard); 39 | m_pClipboard->setText(text, QClipboard::Selection); 40 | } 41 | 42 | QString clipboardAdapter::text() const { 43 | return m_pClipboard->text(); 44 | } 45 | -------------------------------------------------------------------------------- /clipboardAdapter.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2018, The Monero Project 2 | // 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without modification, are 6 | // permitted provided that the following conditions are met: 7 | // 8 | // 1. Redistributions of source code must retain the above copyright notice, this list of 9 | // conditions and the following disclaimer. 10 | // 11 | // 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 | // of conditions and the following disclaimer in the documentation and/or other 13 | // materials provided with the distribution. 14 | // 15 | // 3. Neither the name of the copyright holder nor the names of its contributors may be 16 | // used to endorse or promote products derived from this software without specific 17 | // prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 | // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 21 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 22 | // THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 26 | // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 27 | // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | #ifndef CLIPBOARDADAPTER_H 30 | #define CLIPBOARDADAPTER_H 31 | 32 | #include 33 | #include 34 | #include 35 | 36 | class clipboardAdapter : public QObject 37 | { 38 | Q_OBJECT 39 | public: 40 | explicit clipboardAdapter(QObject *parent = 0); 41 | Q_INVOKABLE void setText(const QString &text); 42 | Q_INVOKABLE QString text() const; 43 | 44 | private: 45 | QClipboard *m_pClipboard; 46 | }; 47 | 48 | #endif // CLIPBOARDADAPTER_H 49 | -------------------------------------------------------------------------------- /components/IconButton.qml: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2018, The Monero Project 2 | // 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without modification, are 6 | // permitted provided that the following conditions are met: 7 | // 8 | // 1. Redistributions of source code must retain the above copyright notice, this list of 9 | // conditions and the following disclaimer. 10 | // 11 | // 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 | // of conditions and the following disclaimer in the documentation and/or other 13 | // materials provided with the distribution. 14 | // 15 | // 3. Neither the name of the copyright holder nor the names of its contributors may be 16 | // used to endorse or promote products derived from this software without specific 17 | // prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 | // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 21 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 22 | // THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 26 | // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 27 | // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | 30 | import QtQuick 2.0 31 | 32 | Item { 33 | property alias image : buttonImage 34 | property alias imageSource : buttonImage.source 35 | 36 | signal clicked(var mouse) 37 | 38 | 39 | id: button 40 | width: parent.height 41 | height: parent.height 42 | anchors.right: parent.right 43 | anchors.top: parent.top 44 | anchors.bottom: parent.bottom 45 | 46 | Image { 47 | id: buttonImage 48 | source: "" 49 | x : (parent.width - width) / 2 50 | y : (parent.height - height) /2 51 | z: 100 52 | } 53 | 54 | MouseArea { 55 | id: buttonArea 56 | anchors.fill: parent 57 | hoverEnabled: true 58 | cursorShape: Qt.PointingHandCursor 59 | 60 | onPressed: { 61 | buttonImage.x = buttonImage.x + 2 62 | buttonImage.y = buttonImage.y + 2 63 | } 64 | onReleased: { 65 | buttonImage.x = buttonImage.x - 2 66 | buttonImage.y = buttonImage.y - 2 67 | } 68 | 69 | onClicked: { 70 | parent.clicked(mouse) 71 | } 72 | } 73 | 74 | } 75 | -------------------------------------------------------------------------------- /components/Input.qml: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2018, The Monero Project 2 | // 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without modification, are 6 | // permitted provided that the following conditions are met: 7 | // 8 | // 1. Redistributions of source code must retain the above copyright notice, this list of 9 | // conditions and the following disclaimer. 10 | // 11 | // 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 | // of conditions and the following disclaimer in the documentation and/or other 13 | // materials provided with the distribution. 14 | // 15 | // 3. Neither the name of the copyright holder nor the names of its contributors may be 16 | // used to endorse or promote products derived from this software without specific 17 | // prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 | // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 21 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 22 | // THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 26 | // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 27 | // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | import QtQuick.Controls 2.0 30 | import QtQuick 2.7 31 | 32 | import "../components" as MoneroComponents 33 | 34 | TextField { 35 | font.family: MoneroComponents.Style.fontRegular.name 36 | font.pixelSize: 18 * scaleRatio 37 | font.bold: true 38 | horizontalAlignment: TextInput.AlignLeft 39 | selectByMouse: true 40 | color: MoneroComponents.Style.defaultFontColor 41 | selectionColor: MoneroComponents.Style.dimmedFontColor 42 | selectedTextColor: MoneroComponents.Style.defaultFontColor 43 | 44 | background: Rectangle { 45 | color: "transparent" 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /components/InputMulti.qml: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2015, The Monero Project 2 | // 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without modification, are 6 | // permitted provided that the following conditions are met: 7 | // 8 | // 1. Redistributions of source code must retain the above copyright notice, this list of 9 | // conditions and the following disclaimer. 10 | // 11 | // 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 | // of conditions and the following disclaimer in the documentation and/or other 13 | // materials provided with the distribution. 14 | // 15 | // 3. Neither the name of the copyright holder nor the names of its contributors may be 16 | // used to endorse or promote products derived from this software without specific 17 | // prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 | // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 21 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 22 | // THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 26 | // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 27 | // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | import QtQuick.Controls 2.0 30 | import QtQuick 2.7 31 | 32 | import "../js/TxUtils.js" as TxUtils 33 | import "../components" as MoneroComponents 34 | 35 | TextArea { 36 | property int fontSize: 18 * scaleRatio 37 | property bool fontBold: false 38 | property string fontColor: MoneroComponents.Style.defaultFontColor 39 | 40 | property bool mouseSelection: true 41 | property bool error: false 42 | property bool addressValidation: false 43 | 44 | id: textArea 45 | font.family: MoneroComponents.Style.fontRegular.name 46 | color: fontColor 47 | font.pixelSize: fontSize 48 | font.bold: fontBold 49 | horizontalAlignment: TextInput.AlignLeft 50 | selectByMouse: mouseSelection 51 | selectionColor: MoneroComponents.Style.dimmedFontColor 52 | selectedTextColor: MoneroComponents.Style.defaultFontColor 53 | 54 | onTextChanged: { 55 | if(addressValidation){ 56 | // js replacement for `RegExpValidator { regExp: /[0-9A-Fa-f]{95}/g }` 57 | textArea.text = textArea.text.replace(/[^a-z0-9.@]/gi,''); 58 | var address_ok = TxUtils.checkAddress(textArea.text, appWindow.persistentSettings.nettype) || TxUtils.isValidOpenAliasAddress(textArea.text); 59 | if(!address_ok) error = true; 60 | else error = false; 61 | TextArea.cursorPosition = textArea.text.length; 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /components/Label.qml: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2018, The Monero Project 2 | // 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without modification, are 6 | // permitted provided that the following conditions are met: 7 | // 8 | // 1. Redistributions of source code must retain the above copyright notice, this list of 9 | // conditions and the following disclaimer. 10 | // 11 | // 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 | // of conditions and the following disclaimer in the documentation and/or other 13 | // materials provided with the distribution. 14 | // 15 | // 3. Neither the name of the copyright holder nor the names of its contributors may be 16 | // used to endorse or promote products derived from this software without specific 17 | // prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 | // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 21 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 22 | // THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 26 | // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 27 | // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | import QtQuick 2.5 30 | import QtQuick.Layouts 1.1 31 | 32 | import "../components" as MoneroComponents 33 | 34 | Item { 35 | id: item 36 | property alias text: label.text 37 | property alias color: label.color 38 | property int textFormat: Text.PlainText 39 | property string tipText: "" 40 | property int fontSize: 16 * scaleRatio 41 | property bool fontBold: false 42 | property string fontColor: MoneroComponents.Style.defaultFontColor 43 | property string fontFamily: "" 44 | property alias wrapMode: label.wrapMode 45 | property alias horizontalAlignment: label.horizontalAlignment 46 | property alias hoveredLink: label.hoveredLink 47 | signal linkActivated() 48 | height: label.height * scaleRatio 49 | width: label.width * scaleRatio 50 | Layout.topMargin: 10 * scaleRatio 51 | 52 | Text { 53 | id: label 54 | anchors.bottom: parent.bottom 55 | anchors.bottomMargin: 2 * scaleRatio 56 | anchors.left: parent.left 57 | font.family: { 58 | if(fontFamily){ 59 | return fontFamily; 60 | } else { 61 | return MoneroComponents.Style.fontRegular.name; 62 | } 63 | } 64 | font.pixelSize: fontSize 65 | font.bold: fontBold 66 | color: fontColor 67 | onLinkActivated: item.linkActivated() 68 | textFormat: parent.textFormat 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /components/LabelButton.qml: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2015, The Monero Project 2 | // 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without modification, are 6 | // permitted provided that the following conditions are met: 7 | // 8 | // 1. Redistributions of source code must retain the above copyright notice, this list of 9 | // conditions and the following disclaimer. 10 | // 11 | // 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 | // of conditions and the following disclaimer in the documentation and/or other 13 | // materials provided with the distribution. 14 | // 15 | // 3. Neither the name of the copyright holder nor the names of its contributors may be 16 | // used to endorse or promote products derived from this software without specific 17 | // prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 | // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 21 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 22 | // THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 26 | // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 27 | // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | import QtQuick 2.0 30 | import QtQuick.Layouts 1.1 31 | 32 | import "../components" as MoneroComponents 33 | 34 | 35 | Rectangle { 36 | signal clicked(); 37 | property alias text: labelButtonText.text 38 | 39 | id: labelButton 40 | color: "#808080" 41 | radius: 3 42 | height: 20 43 | width: labelButtonText.width + 14 44 | anchors.right: copyButton.left 45 | anchors.rightMargin: 6 46 | 47 | Text { 48 | id: labelButtonText 49 | anchors.verticalCenter: parent.verticalCenter 50 | anchors.horizontalCenter: parent.horizontalCenter 51 | font.family: MoneroComponents.Style.fontRegular.name 52 | font.pixelSize: 12 53 | font.bold: true 54 | text: "" 55 | color: "black" 56 | } 57 | 58 | MouseArea { 59 | cursorShape: Qt.PointingHandCursor 60 | anchors.fill: parent 61 | hoverEnabled: true 62 | onClicked: labelButton.clicked() 63 | onEntered: { 64 | labelButton.color = "#707070"; 65 | labelButtonText.opacity = 0.8; 66 | } 67 | onExited: { 68 | labelButton.color = "#808080"; 69 | labelButtonText.opacity = 1.0; 70 | } 71 | } 72 | } 73 | 74 | -------------------------------------------------------------------------------- /components/LabelSubheader.qml: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2015, The Monero Project 2 | // 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without modification, are 6 | // permitted provided that the following conditions are met: 7 | // 8 | // 1. Redistributions of source code must retain the above copyright notice, this list of 9 | // conditions and the following disclaimer. 10 | // 11 | // 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 | // of conditions and the following disclaimer in the documentation and/or other 13 | // materials provided with the distribution. 14 | // 15 | // 3. Neither the name of the copyright holder nor the names of its contributors may be 16 | // used to endorse or promote products derived from this software without specific 17 | // prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 | // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 21 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 22 | // THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 26 | // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 27 | // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | import QtQuick 2.0 30 | 31 | import "../components" as MoneroComponents 32 | 33 | Label { 34 | id: item 35 | fontSize: 18 * scaleRatio 36 | 37 | Rectangle { 38 | anchors.top: item.bottom 39 | anchors.topMargin: 4 40 | anchors.left: parent.left 41 | anchors.right: parent.right 42 | height: 2 43 | color: MoneroComponents.Style.dividerColor 44 | opacity: MoneroComponents.Style.dividerOpacity 45 | } 46 | 47 | MouseArea { 48 | anchors.fill: parent 49 | acceptedButtons: Qt.NoButton 50 | cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /components/Notifier.qml: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017-2018, The Monero Project 2 | // 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without modification, are 6 | // permitted provided that the following conditions are met: 7 | // 8 | // 1. Redistributions of source code must retain the above copyright notice, this list of 9 | // conditions and the following disclaimer. 10 | // 11 | // 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 | // of conditions and the following disclaimer in the documentation and/or other 13 | // materials provided with the distribution. 14 | // 15 | // 3. Neither the name of the copyright holder nor the names of its contributors may be 16 | // used to endorse or promote products derived from this software without specific 17 | // prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 | // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 21 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 22 | // THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 26 | // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 27 | // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | import QtQuick 2.0 30 | import QtQuick.Controls 1.4 31 | import moneroComponents.Wallet 1.0 32 | 33 | Item { 34 | id: item 35 | property string message: "" 36 | property bool active: false 37 | height: 120 38 | width: 240 39 | property int margin: 15 40 | x: parent.width - width - margin 41 | y: parent.height - height * scale.yScale - margin * scale.yScale 42 | 43 | Rectangle { 44 | color: "#7a5fcb" 45 | border.color: "black" 46 | anchors.fill: parent 47 | 48 | TextArea { 49 | id:versionText 50 | readOnly: true 51 | backgroundVisible: false 52 | textFormat: TextEdit.AutoText 53 | anchors.fill: parent 54 | font.family: "Arial" 55 | font.pixelSize: 12 56 | textMargin: 20 57 | textColor: "white" 58 | text: item.message 59 | } 60 | } 61 | 62 | transform: Scale { 63 | id: scale 64 | yScale: item.active ? 1 : 0 65 | 66 | Behavior on yScale { 67 | NumberAnimation { duration: 500; easing.type: Easing.InOutCubic } 68 | } 69 | } 70 | 71 | Timer { 72 | id: hider 73 | interval: 12000; running: false; repeat: false 74 | onTriggered: { item.active = false } 75 | } 76 | 77 | function show(message) { 78 | item.visible = true 79 | item.message = message 80 | item.active = true 81 | hider.running = true 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /components/ProcessingSplash.qml: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2018, The Monero Project 2 | // 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without modification, are 6 | // permitted provided that the following conditions are met: 7 | // 8 | // 1. Redistributions of source code must retain the above copyright notice, this list of 9 | // conditions and the following disclaimer. 10 | // 11 | // 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 | // of conditions and the following disclaimer in the documentation and/or other 13 | // materials provided with the distribution. 14 | // 15 | // 3. Neither the name of the copyright holder nor the names of its contributors may be 16 | // used to endorse or promote products derived from this software without specific 17 | // prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 | // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 21 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 22 | // THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 26 | // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 27 | // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | import QtQuick 2.0 30 | import QtQuick.Window 2.1 31 | import QtQuick.Controls 1.4 32 | import QtQuick.Layouts 1.1 33 | 34 | Rectangle { 35 | id: root 36 | color: "white" 37 | visible: false 38 | z:11 39 | property alias messageText: messageTitle.text 40 | property alias heightProgressText : heightProgress.text 41 | 42 | width: 200 * scaleRatio 43 | height: 100 * scaleRatio 44 | opacity: 0.7 45 | 46 | function show() { 47 | root.visible = true; 48 | } 49 | 50 | function close() { 51 | root.visible = false; 52 | } 53 | 54 | ColumnLayout { 55 | id: rootLayout 56 | 57 | anchors.left: parent.left 58 | anchors.right: parent.right 59 | anchors.verticalCenter: parent.verticalCenter 60 | 61 | anchors.leftMargin: 30 * scaleRatio 62 | anchors.rightMargin: 30 * scaleRatio 63 | 64 | BusyIndicator { 65 | running: parent.visible 66 | Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter 67 | } 68 | 69 | Text { 70 | id: messageTitle 71 | text: "Please wait..." 72 | font { 73 | pixelSize: 22 * scaleRatio 74 | } 75 | horizontalAlignment: Text.AlignHCenter 76 | Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter 77 | Layout.fillWidth: true 78 | } 79 | 80 | 81 | Text { 82 | id: heightProgress 83 | font { 84 | pixelSize: 18 * scaleRatio 85 | } 86 | horizontalAlignment: Text.AlignHCenter 87 | Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter 88 | Layout.fillWidth: true 89 | } 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /components/RadioButton.qml: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2018, The Monero Project 2 | // 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without modification, are 6 | // permitted provided that the following conditions are met: 7 | // 8 | // 1. Redistributions of source code must retain the above copyright notice, this list of 9 | // conditions and the following disclaimer. 10 | // 11 | // 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 | // of conditions and the following disclaimer in the documentation and/or other 13 | // materials provided with the distribution. 14 | // 15 | // 3. Neither the name of the copyright holder nor the names of its contributors may be 16 | // used to endorse or promote products derived from this software without specific 17 | // prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 | // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 21 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 22 | // THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 26 | // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 27 | // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | import QtQuick 2.0 30 | import QtQuick.Layouts 1.1 31 | 32 | import "../components" as MoneroComponents 33 | 34 | Item { 35 | id: radioButton 36 | property alias text: label.text 37 | property bool checked: false 38 | property int fontSize: 14 * scaleRatio 39 | property alias fontColor: label.color 40 | signal clicked() 41 | height: 26 * scaleRatio 42 | width: layout.width 43 | // legacy properties 44 | property var checkedColor: "white" 45 | property var borderColor: checked ? Qt.rgba(1, 1, 1, 0.35) : Qt.rgba(1, 1, 1, 0.25) 46 | 47 | function toggle(){ 48 | radioButton.checked = !radioButton.checked 49 | radioButton.clicked() 50 | } 51 | 52 | RowLayout { 53 | id: layout 54 | 55 | Rectangle { 56 | id: button 57 | color: "transparent" 58 | border.color: borderColor 59 | height: radioButton.height 60 | width: radioButton.height 61 | radius: radioButton.height 62 | 63 | Rectangle { 64 | visible: radioButton.checked 65 | anchors.horizontalCenter: parent.horizontalCenter 66 | anchors.verticalCenter: parent.verticalCenter 67 | color: checkedColor 68 | width: 10 * scaleRatio 69 | height: 10 * scaleRatio 70 | radius: 10 71 | opacity: 0.8 72 | } 73 | } 74 | 75 | Text { 76 | id: label 77 | Layout.leftMargin: (!isMobile ? 10 : 8) * scaleRatio 78 | color: MoneroComponents.Style.defaultFontColor 79 | font.family: MoneroComponents.Style.fontRegular.name 80 | font.pixelSize: radioButton.fontSize 81 | wrapMode: Text.Wrap 82 | } 83 | } 84 | 85 | MouseArea { 86 | anchors.fill: parent 87 | cursorShape: Qt.PointingHandCursor 88 | onClicked: { 89 | toggle() 90 | } 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /components/Scroll.qml: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2018, The Monero Project 2 | // 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without modification, are 6 | // permitted provided that the following conditions are met: 7 | // 8 | // 1. Redistributions of source code must retain the above copyright notice, this list of 9 | // conditions and the following disclaimer. 10 | // 11 | // 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 | // of conditions and the following disclaimer in the documentation and/or other 13 | // materials provided with the distribution. 14 | // 15 | // 3. Neither the name of the copyright holder nor the names of its contributors may be 16 | // used to endorse or promote products derived from this software without specific 17 | // prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 | // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 21 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 22 | // THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 26 | // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 27 | // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | import QtQuick 2.0 30 | import "." as MoneroComponents 31 | 32 | Item { 33 | id: scrollItem 34 | property var flickable 35 | property alias scrollColor: scroll.color 36 | property alias scrollWidth: scroll.width 37 | property alias scrollRadius: scroll.radius 38 | width: 15 39 | z: 1 40 | 41 | function flickableContentYChanged() { 42 | if(flickable === undefined) 43 | return 44 | 45 | var t = flickable.height - scroll.height 46 | scroll.y = (flickable.contentY / (flickable.contentHeight - flickable.height)) * t 47 | } 48 | 49 | MouseArea { 50 | id: scrollArea 51 | anchors.fill: parent 52 | hoverEnabled: true 53 | } 54 | 55 | Rectangle { 56 | id: scroll 57 | 58 | width: 4 59 | radius: width / 2 60 | height: { 61 | var t = (flickable.height * flickable.height) / flickable.contentHeight 62 | return t < 50 ? 50 : t 63 | } 64 | y: 0; x: 0 65 | color: "#DBDBDB" 66 | opacity: flickable.moving || handleArea.pressed || scrollArea.containsMouse ? 0.5 : 0 67 | visible: flickable.contentHeight > flickable.height 68 | 69 | Behavior on opacity { 70 | NumberAnimation { duration: 200; easing.type: Easing.InQuad } 71 | } 72 | 73 | MouseArea { 74 | id: handleArea 75 | anchors.fill: parent 76 | drag.target: scroll 77 | drag.axis: Drag.YAxis 78 | drag.minimumY: 0 79 | drag.maximumY: flickable.height - height 80 | propagateComposedEvents: true 81 | 82 | onPositionChanged: { 83 | if(!pressed) return 84 | var dy = scroll.y / (flickable.height - scroll.height) 85 | flickable.contentY = (flickable.contentHeight - flickable.height) * dy 86 | } 87 | } 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /components/Style.qml: -------------------------------------------------------------------------------- 1 | pragma Singleton 2 | 3 | import QtQuick 2.5 4 | 5 | QtObject { 6 | property QtObject fontMedium: FontLoader { id: _fontMedium; source: "qrc:/fonts/Roboto-Medium.ttf"; } 7 | property QtObject fontBold: FontLoader { id: _fontBold; source: "qrc:/fonts/Roboto-Bold.ttf"; } 8 | property QtObject fontLight: FontLoader { id: _fontLight; source: "qrc:/fonts/Roboto-Light.ttf"; } 9 | property QtObject fontRegular: FontLoader { id: _fontRegular; source: "qrc:/fonts/Roboto-Regular.ttf"; } 10 | 11 | property string grey: "#404040" 12 | property string orange: "#334d8d" 13 | property string white: "#FFFFFF" 14 | property string green: "#2EB358" 15 | 16 | property string defaultFontColor: "white" 17 | property string dimmedFontColor: "#BBBBBB" 18 | property string errorColor: "#FA6800" 19 | property string inputBoxBackground: "black" 20 | property string inputBoxBackgroundError: "#FFDDDD" 21 | property string inputBoxColor: "white" 22 | property string legacy_placeholderFontColor: "#BABABA" 23 | property string inputBorderColorActive: Qt.rgba(255, 255, 255, 0.38) 24 | property string inputBorderColorInActive: Qt.rgba(255, 255, 255, 0.32) 25 | property string inputBorderColorInvalid: Qt.rgba(255, 0, 0, 0.40) 26 | 27 | property string buttonBackgroundColor: "#334d8d" 28 | property string buttonBackgroundColorHover: "#5675c2" 29 | property string buttonBackgroundColorDisabled: "#707070" 30 | property string buttonBackgroundColorDisabledHover: "#808080" 31 | property string buttonTextColor: "white" 32 | property string buttonTextColorDisabled: "black" 33 | property string dividerColor: "white" 34 | property real dividerOpacity: 0.20 35 | } 36 | -------------------------------------------------------------------------------- /components/TextBlock.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.0 2 | 3 | import "../components" as MoneroComponents 4 | 5 | TextEdit { 6 | color: MoneroComponents.Style.defaultFontColor 7 | font.family: MoneroComponents.Style.fontRegular.name 8 | selectionColor: MoneroComponents.Style.dimmedFontColor 9 | wrapMode: Text.Wrap 10 | readOnly: true 11 | selectByMouse: true 12 | // Workaround for https://bugreports.qt.io/browse/QTBUG-50587 13 | onFocusChanged: { 14 | if(focus === false) 15 | deselect() 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /components/TickDelegate.qml: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2018, The Monero Project 2 | // 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without modification, are 6 | // permitted provided that the following conditions are met: 7 | // 8 | // 1. Redistributions of source code must retain the above copyright notice, this list of 9 | // conditions and the following disclaimer. 10 | // 11 | // 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 | // of conditions and the following disclaimer in the documentation and/or other 13 | // materials provided with the distribution. 14 | // 15 | // 3. Neither the name of the copyright holder nor the names of its contributors may be 16 | // used to endorse or promote products derived from this software without specific 17 | // prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 | // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 21 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 22 | // THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 26 | // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 27 | // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | import QtQuick 2.0 30 | 31 | import "../components" as MoneroComponents 32 | 33 | Item { 34 | id: delegateItem 35 | width: 1 36 | height: 48 37 | property bool mainTick: false 38 | property int currentIndex 39 | property int currentX 40 | 41 | Image { 42 | anchors.horizontalCenter: parent.horizontalCenter 43 | anchors.top: parent.top 44 | visible: parent.mainTick 45 | source: "../images/privacyTick.png" 46 | 47 | Text { 48 | anchors.right: parent.right 49 | anchors.rightMargin: 12 50 | anchors.bottom: parent.bottom 51 | anchors.bottomMargin: 2 52 | font.family: "Arial" 53 | font.bold: true 54 | font.pixelSize: 12 * scaleRatio 55 | color: MoneroComponents.Style.defaultFontColor 56 | text: { 57 | if(currentIndex === 0) return qsTr("Default") + translationManager.emptyString 58 | if(currentIndex === 13) return qsTr("High") + translationManager.emptyString 59 | return "" 60 | } 61 | } 62 | } 63 | 64 | Rectangle { 65 | anchors.top: parent.top 66 | anchors.topMargin: 14 67 | width: 1 68 | color: "#DBDBDB" 69 | height: 8 70 | visible: !parent.mainTick 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /components/TipItem.qml: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2018, The Monero Project 2 | // 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without modification, are 6 | // permitted provided that the following conditions are met: 7 | // 8 | // 1. Redistributions of source code must retain the above copyright notice, this list of 9 | // conditions and the following disclaimer. 10 | // 11 | // 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 | // of conditions and the following disclaimer in the documentation and/or other 13 | // materials provided with the distribution. 14 | // 15 | // 3. Neither the name of the copyright holder nor the names of its contributors may be 16 | // used to endorse or promote products derived from this software without specific 17 | // prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 | // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 21 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 22 | // THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 26 | // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 27 | // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | import QtQuick 2.2 30 | import QtQuick.Window 2.1 31 | 32 | Window { 33 | property alias text: content.text 34 | property alias containsMouse: tipArea.containsMouse 35 | flags: Qt.ToolTip 36 | color: "transparent" 37 | height: rect.height + tip.height 38 | width: rect.width 39 | 40 | MouseArea { 41 | id: tipArea 42 | hoverEnabled: true 43 | anchors.fill: parent 44 | } 45 | 46 | Rectangle { 47 | id: rect 48 | width: content.width + 12 49 | height: content.height + 17 50 | color: "#7a5fcb" 51 | //radius: 3 52 | 53 | Image { 54 | id: tip 55 | anchors.top: parent.bottom 56 | anchors.left: parent.left 57 | anchors.leftMargin: 5 58 | source: "../images/tip.png" 59 | } 60 | 61 | Text { 62 | id: content 63 | anchors.horizontalCenter: parent.horizontalCenter 64 | y: 6 65 | lineHeight: 0.7 66 | font.family: "Arial" 67 | font.pixelSize: 12 68 | color: "#FFFFFF" 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /components/WarningBox.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.7 2 | import QtQuick.Layouts 1.1 3 | import QtQuick.Controls 2.0 4 | 5 | import "." as MoneroComponents 6 | 7 | Rectangle { 8 | id: root 9 | property alias text: content.text 10 | property int fontSize: 15 * scaleRatio 11 | 12 | Layout.fillWidth: true 13 | Layout.preferredHeight: warningLayout.height 14 | 15 | color: "#09FFFFFF" 16 | radius: 4 17 | border.color: MoneroComponents.Style.inputBorderColorInActive 18 | border.width: 1 19 | 20 | signal linkActivated; 21 | 22 | RowLayout { 23 | id: warningLayout 24 | spacing: 0 25 | anchors.left: parent.left 26 | anchors.right: parent.right 27 | 28 | Image { 29 | Layout.alignment: Qt.AlignVCenter 30 | Layout.preferredHeight: 33 31 | Layout.preferredWidth: 33 32 | Layout.rightMargin: 14 33 | Layout.leftMargin: 14 34 | Layout.topMargin: 12 35 | Layout.bottomMargin: 12 36 | source: "../images/warning.png" 37 | } 38 | 39 | TextArea { 40 | id: content 41 | Layout.fillWidth: true 42 | color: MoneroComponents.Style.defaultFontColor 43 | font.family: MoneroComponents.Style.fontRegular.name 44 | font.pixelSize: root.fontSize 45 | horizontalAlignment: TextInput.AlignLeft 46 | selectByMouse: false 47 | textFormat: Text.RichText 48 | wrapMode: Text.WordWrap 49 | textMargin: 0 50 | leftPadding: 0 51 | topPadding: 6 52 | readOnly: true 53 | onLinkActivated: root.linkActivated(); 54 | 55 | // @TODO: Legacy. Remove after Qt 5.8. 56 | // https://stackoverflow.com/questions/41990013 57 | MouseArea { 58 | anchors.fill: parent 59 | enabled: false 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /components/qmldir: -------------------------------------------------------------------------------- 1 | singleton Style 1.0 Style.qml 2 | -------------------------------------------------------------------------------- /deployment.pri: -------------------------------------------------------------------------------- 1 | android-no-sdk { 2 | target.path = /data/user/qt 3 | export(target.path) 4 | INSTALLS += target 5 | } else:android { 6 | x86 { 7 | target.path = /libs/x86 8 | } else: armeabi-v7a { 9 | target.path = /libs/armeabi-v7a 10 | } else { 11 | target.path = /libs/armeabi 12 | } 13 | export(target.path) 14 | INSTALLS += target 15 | } else:unix { 16 | isEmpty(target.path) { 17 | qnx { 18 | target.path = /tmp/$${TARGET}/bin 19 | } else { 20 | target.path = /opt/$${TARGET}/bin 21 | } 22 | export(target.path) 23 | } 24 | INSTALLS += target 25 | } 26 | 27 | export(INSTALLS) 28 | -------------------------------------------------------------------------------- /empty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/empty -------------------------------------------------------------------------------- /filter.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2018, The Monero Project 2 | // 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without modification, are 6 | // permitted provided that the following conditions are met: 7 | // 8 | // 1. Redistributions of source code must retain the above copyright notice, this list of 9 | // conditions and the following disclaimer. 10 | // 11 | // 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 | // of conditions and the following disclaimer in the documentation and/or other 13 | // materials provided with the distribution. 14 | // 15 | // 3. Neither the name of the copyright holder nor the names of its contributors may be 16 | // used to endorse or promote products derived from this software without specific 17 | // prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 | // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 21 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 22 | // THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 26 | // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 27 | // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | #ifndef FILTER_H 30 | #define FILTER_H 31 | 32 | #include 33 | 34 | class filter : public QObject 35 | { 36 | Q_OBJECT 37 | private: 38 | bool m_tabPressed; 39 | bool m_backtabPressed; 40 | public: 41 | explicit filter(QObject *parent = 0); 42 | 43 | protected: 44 | bool eventFilter(QObject *obj, QEvent *ev); 45 | 46 | signals: 47 | void sequencePressed(const QVariant &o, const QVariant &seq); 48 | void sequenceReleased(const QVariant &o, const QVariant &seq); 49 | void mousePressed(const QVariant &o, const QVariant &x, const QVariant &y); 50 | void mouseReleased(const QVariant &o, const QVariant &x, const QVariant &y); 51 | void userActivity(); 52 | }; 53 | 54 | #endif // FILTER_H 55 | -------------------------------------------------------------------------------- /fonts/Roboto-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/fonts/Roboto-Bold.ttf -------------------------------------------------------------------------------- /fonts/Roboto-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/fonts/Roboto-Light.ttf -------------------------------------------------------------------------------- /fonts/Roboto-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/fonts/Roboto-Medium.ttf -------------------------------------------------------------------------------- /fonts/Roboto-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/fonts/Roboto-Regular.ttf -------------------------------------------------------------------------------- /images/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/.DS_Store -------------------------------------------------------------------------------- /images/appicon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/appicon.icns -------------------------------------------------------------------------------- /images/appicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/appicon.ico -------------------------------------------------------------------------------- /images/appicons/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/appicons/128x128.png -------------------------------------------------------------------------------- /images/appicons/16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/appicons/16x16.png -------------------------------------------------------------------------------- /images/appicons/24x24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/appicons/24x24.png -------------------------------------------------------------------------------- /images/appicons/256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/appicons/256x256.png -------------------------------------------------------------------------------- /images/appicons/32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/appicons/32x32.png -------------------------------------------------------------------------------- /images/appicons/48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/appicons/48x48.png -------------------------------------------------------------------------------- /images/appicons/512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/appicons/512x512.png -------------------------------------------------------------------------------- /images/appicons/64x64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/appicons/64x64.png -------------------------------------------------------------------------------- /images/appicons/96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/appicons/96x96.png -------------------------------------------------------------------------------- /images/arrow-right-medium-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/arrow-right-medium-white.png -------------------------------------------------------------------------------- /images/arrow-right-medium-white@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/arrow-right-medium-white@2x.png -------------------------------------------------------------------------------- /images/ascSortIndicator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/ascSortIndicator.png -------------------------------------------------------------------------------- /images/ascSortIndicatorActived.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/ascSortIndicatorActived.png -------------------------------------------------------------------------------- /images/ascSortIndicatorPressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/ascSortIndicatorPressed.png -------------------------------------------------------------------------------- /images/backToWindowIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/backToWindowIcon.png -------------------------------------------------------------------------------- /images/card-background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/card-background.png -------------------------------------------------------------------------------- /images/card-background@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/card-background@2x.png -------------------------------------------------------------------------------- /images/checkedBlackIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/checkedBlackIcon.png -------------------------------------------------------------------------------- /images/checkedIcon-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/checkedIcon-black.png -------------------------------------------------------------------------------- /images/checkedOrangeIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/checkedOrangeIcon.png -------------------------------------------------------------------------------- /images/checkedVioletIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/checkedVioletIcon.png -------------------------------------------------------------------------------- /images/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/close.png -------------------------------------------------------------------------------- /images/close@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/close@2x.png -------------------------------------------------------------------------------- /images/closeIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/closeIcon.png -------------------------------------------------------------------------------- /images/collapseRightPanel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/collapseRightPanel.png -------------------------------------------------------------------------------- /images/connectedImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/connectedImage.png -------------------------------------------------------------------------------- /images/copyToClipboard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/copyToClipboard.png -------------------------------------------------------------------------------- /images/createWallet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/createWallet.png -------------------------------------------------------------------------------- /images/createWalletFromDevice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/createWalletFromDevice.png -------------------------------------------------------------------------------- /images/datePicker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/datePicker.png -------------------------------------------------------------------------------- /images/deleteIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/deleteIcon.png -------------------------------------------------------------------------------- /images/descSortIndicator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/descSortIndicator.png -------------------------------------------------------------------------------- /images/descSortIndicatorActived.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/descSortIndicatorActived.png -------------------------------------------------------------------------------- /images/descSortIndicatorPressed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/descSortIndicatorPressed.png -------------------------------------------------------------------------------- /images/disconnectedImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/disconnectedImage.png -------------------------------------------------------------------------------- /images/downArrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/downArrow.png -------------------------------------------------------------------------------- /images/dropIndicator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/dropIndicator.png -------------------------------------------------------------------------------- /images/dropdownAdd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/dropdownAdd.png -------------------------------------------------------------------------------- /images/dropdownCopy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/dropdownCopy.png -------------------------------------------------------------------------------- /images/dropdownDel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/dropdownDel.png -------------------------------------------------------------------------------- /images/dropdownSearch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/dropdownSearch.png -------------------------------------------------------------------------------- /images/dropdownSend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/dropdownSend.png -------------------------------------------------------------------------------- /images/editIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/editIcon.png -------------------------------------------------------------------------------- /images/editIcon2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/editIcon2.png -------------------------------------------------------------------------------- /images/expand.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/expand.png -------------------------------------------------------------------------------- /images/expand@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/expand@2x.png -------------------------------------------------------------------------------- /images/expandRightPanel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/expandRightPanel.png -------------------------------------------------------------------------------- /images/expandTable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/expandTable.png -------------------------------------------------------------------------------- /images/eyeHide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/eyeHide.png -------------------------------------------------------------------------------- /images/eyeShow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/eyeShow.png -------------------------------------------------------------------------------- /images/fullscreen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/fullscreen.png -------------------------------------------------------------------------------- /images/fullscreen@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/fullscreen@2x.png -------------------------------------------------------------------------------- /images/goToBasicVersionHovered.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/goToBasicVersionHovered.png -------------------------------------------------------------------------------- /images/gotoBasicVersion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/gotoBasicVersion.png -------------------------------------------------------------------------------- /images/greyTriangle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/greyTriangle.png -------------------------------------------------------------------------------- /images/helpIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/helpIcon.png -------------------------------------------------------------------------------- /images/historyBorderRadius.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/historyBorderRadius.png -------------------------------------------------------------------------------- /images/hseparator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/hseparator.png -------------------------------------------------------------------------------- /images/iconaddressbook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/iconaddressbook.png -------------------------------------------------------------------------------- /images/iconadvanced.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/iconadvanced.png -------------------------------------------------------------------------------- /images/iconhelp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/iconhelp.png -------------------------------------------------------------------------------- /images/iconhistory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/iconhistory.png -------------------------------------------------------------------------------- /images/iconmining.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/iconmining.png -------------------------------------------------------------------------------- /images/iconreceive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/iconreceive.png -------------------------------------------------------------------------------- /images/iconringdb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/iconringdb.png -------------------------------------------------------------------------------- /images/iconseedkeys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/iconseedkeys.png -------------------------------------------------------------------------------- /images/iconsend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/iconsend.png -------------------------------------------------------------------------------- /images/iconsettings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/iconsettings.png -------------------------------------------------------------------------------- /images/iconsignverify.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/iconsignverify.png -------------------------------------------------------------------------------- /images/icontxkey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/icontxkey.png -------------------------------------------------------------------------------- /images/leftPanelBg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/leftPanelBg.jpg -------------------------------------------------------------------------------- /images/lightning-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/lightning-white.png -------------------------------------------------------------------------------- /images/lightning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/lightning.png -------------------------------------------------------------------------------- /images/lightning2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/lightning2x.png -------------------------------------------------------------------------------- /images/lightning@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/lightning@2x.png -------------------------------------------------------------------------------- /images/lockIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/lockIcon.png -------------------------------------------------------------------------------- /images/logout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/logout.png -------------------------------------------------------------------------------- /images/logout@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/logout@2x.png -------------------------------------------------------------------------------- /images/magnifier.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/magnifier.png -------------------------------------------------------------------------------- /images/maximizeIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/maximizeIcon.png -------------------------------------------------------------------------------- /images/menu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/menu.png -------------------------------------------------------------------------------- /images/menuArrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/menuArrow.png -------------------------------------------------------------------------------- /images/menuButtonGradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/menuButtonGradient.png -------------------------------------------------------------------------------- /images/menuIndicator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/menuIndicator.png -------------------------------------------------------------------------------- /images/middlePanelBg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/middlePanelBg.jpg -------------------------------------------------------------------------------- /images/minimize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/minimize.png -------------------------------------------------------------------------------- /images/minimize@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/minimize@2x.png -------------------------------------------------------------------------------- /images/minimizeIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/minimizeIcon.png -------------------------------------------------------------------------------- /images/miningxmr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/miningxmr.png -------------------------------------------------------------------------------- /images/miningxmr@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/miningxmr@2x.png -------------------------------------------------------------------------------- /images/minus-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/minus-white.png -------------------------------------------------------------------------------- /images/minus-white@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/minus-white@2x.png -------------------------------------------------------------------------------- /images/moneroIcon-28x28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/moneroIcon-28x28.png -------------------------------------------------------------------------------- /images/moneroIcon-trans28x28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/moneroIcon-trans28x28.png -------------------------------------------------------------------------------- /images/moneroIcon-trans56x56.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/moneroIcon-trans56x56.png -------------------------------------------------------------------------------- /images/moneroIcon-trans84x84.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/moneroIcon-trans84x84.png -------------------------------------------------------------------------------- /images/moneroIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/moneroIcon.png -------------------------------------------------------------------------------- /images/moneroLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/moneroLogo.png -------------------------------------------------------------------------------- /images/moneroLogo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/moneroLogo2.png -------------------------------------------------------------------------------- /images/moneroLogo_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/moneroLogo_white.png -------------------------------------------------------------------------------- /images/nextMonth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/nextMonth.png -------------------------------------------------------------------------------- /images/nextPage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/nextPage.png -------------------------------------------------------------------------------- /images/openAccount.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/openAccount.png -------------------------------------------------------------------------------- /images/plus-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/plus-white.png -------------------------------------------------------------------------------- /images/plus-white@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/plus-white@2x.png -------------------------------------------------------------------------------- /images/prevMonth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/prevMonth.png -------------------------------------------------------------------------------- /images/prevPage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/prevPage.png -------------------------------------------------------------------------------- /images/privacyTick.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/privacyTick.png -------------------------------------------------------------------------------- /images/question.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/question.png -------------------------------------------------------------------------------- /images/question@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/question@2x.png -------------------------------------------------------------------------------- /images/recoverWallet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/recoverWallet.png -------------------------------------------------------------------------------- /images/resize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/resize.png -------------------------------------------------------------------------------- /images/resizeHovered.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/resizeHovered.png -------------------------------------------------------------------------------- /images/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/right.png -------------------------------------------------------------------------------- /images/right@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/right@2x.png -------------------------------------------------------------------------------- /images/rightArrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/rightArrow.png -------------------------------------------------------------------------------- /images/rightArrowInactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/rightArrowInactive.png -------------------------------------------------------------------------------- /images/settings_local.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/settings_local.png -------------------------------------------------------------------------------- /images/settings_local@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/settings_local@2x.png -------------------------------------------------------------------------------- /images/settings_navbar_side.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/settings_navbar_side.png -------------------------------------------------------------------------------- /images/settings_navbar_side_active.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/settings_navbar_side_active.png -------------------------------------------------------------------------------- /images/settings_remote.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/settings_remote.png -------------------------------------------------------------------------------- /images/settings_remote@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/settings_remote@2x.png -------------------------------------------------------------------------------- /images/statusConnected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/statusConnected.png -------------------------------------------------------------------------------- /images/statusDisconnected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/statusDisconnected.png -------------------------------------------------------------------------------- /images/tableOptions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/tableOptions.png -------------------------------------------------------------------------------- /images/tip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/tip.png -------------------------------------------------------------------------------- /images/titlebarGradient.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/titlebarGradient.jpg -------------------------------------------------------------------------------- /images/titlebarLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/titlebarLogo.png -------------------------------------------------------------------------------- /images/titlebarLogo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/titlebarLogo@2x.png -------------------------------------------------------------------------------- /images/torque-trans28x28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/torque-trans28x28.png -------------------------------------------------------------------------------- /images/torqueIcon-28x28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/torqueIcon-28x28.png -------------------------------------------------------------------------------- /images/torqueIcon-trans28x28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/torqueIcon-trans28x28.png -------------------------------------------------------------------------------- /images/torqueIcon-trans56x56.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/torqueIcon-trans56x56.png -------------------------------------------------------------------------------- /images/torqueIcon-trans84x84.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/torqueIcon-trans84x84.png -------------------------------------------------------------------------------- /images/torqueIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/torqueIcon.png -------------------------------------------------------------------------------- /images/torqueLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/torqueLogo.png -------------------------------------------------------------------------------- /images/torqueLogo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/torqueLogo2.png -------------------------------------------------------------------------------- /images/torqueLogo_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/torqueLogo_white.png -------------------------------------------------------------------------------- /images/uncheckedIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/uncheckedIcon.png -------------------------------------------------------------------------------- /images/upArrow-green.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/upArrow-green.png -------------------------------------------------------------------------------- /images/warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/warning.png -------------------------------------------------------------------------------- /images/whatIsIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/whatIsIcon.png -------------------------------------------------------------------------------- /images/whiteDropIndicator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/images/whiteDropIndicator.png -------------------------------------------------------------------------------- /installers/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/installers/.DS_Store -------------------------------------------------------------------------------- /installers/windows/.gitignore: -------------------------------------------------------------------------------- 1 | # The subdirectory with the individual GUI Wallet files 2 | bin/ 3 | 4 | # The subdirectory with the generated installer "mysetup.exe" 5 | Output/ 6 | -------------------------------------------------------------------------------- /installers/windows/FinishImage.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/installers/windows/FinishImage.bmp -------------------------------------------------------------------------------- /installers/windows/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014-2018, The Monero Project 2 | 3 | All rights reserved. 4 | 5 | Redistribution and use in source and binary forms, with or without 6 | modification, are permitted provided that the following conditions are met: 7 | 8 | 1. Redistributions of source code must retain the above copyright notice, this 9 | list of conditions and the following disclaimer. 10 | 11 | 2. Redistributions in binary form must reproduce the above copyright notice, 12 | this list of conditions and the following disclaimer in the documentation 13 | and/or other materials provided with the distribution. 14 | 15 | 3. Neither the name of the copyright holder nor the names of its contributors 16 | may be used to endorse or promote products derived from this software without 17 | specific prior written permission. 18 | 19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 20 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 21 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 22 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 23 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 25 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 26 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 27 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | Parts of the project are originally copyright (c) 2012-2013 The Cryptonote 31 | developers 32 | -------------------------------------------------------------------------------- /installers/windows/README.md: -------------------------------------------------------------------------------- 1 | # Monero GUI Wallet Windows Installer # 2 | 3 | Copyright (c) 2014-2018, The Monero Project 4 | 5 | ## Introduction ## 6 | 7 | This is a *Inno Setup* script `Monero.iss` plus some related files 8 | that allows you to build a standalone Windows installer (.exe) for 9 | the GUI wallet that comes with the Beryllium Bullet release of Monero. 10 | 11 | This turns the GUI wallet into a more or less standard Windows program, 12 | by default installed into a subdirectory of `C:\Program Files`, a 13 | program group with some icons in the *Start* menu, and automatic 14 | uninstall support. It helps lowering the "barrier to entry" 15 | somewhat, especially for less technically experienced users of 16 | Monero. 17 | 18 | As the setup script in file [Monero.iss](Monero.iss) has to list every 19 | single file of the GUI wallet package to install by name, 20 | this version of the script only works with exactly the GUI wallet 21 | for Monero release *Beryllium Bullet* that you find on 22 | [the official download page](https://getmonero.org/downloads/). 23 | 24 | It should however be easy to modify the script for future 25 | versions of the GUI wallet. 26 | 27 | ## License ## 28 | 29 | See [LICENSE](LICENSE). 30 | 31 | ## Building ## 32 | 33 | You can only build on Windows, and the result is always a 34 | Windows .exe file that can act as a standalone installer for the 35 | Beryllium Bullet GUI wallet. 36 | 37 | The build steps in detail: 38 | 39 | 1. Install *Inno Setup*. You can get it from [here](http://www.jrsoftware.org/isdl.php) 40 | 2. Get the Inno Setup script plus related files by cloning the whole [monero-gui GitHub repository](https://github.com/monero-project/monero-gui); you will only need the files in the installer directory `installers\windows` however. Depending on development state, additionally you may have to checkout a specific branch, like `release-v0.13`. 41 | 3. The setup script is written to take the GUI wallet files from a subdirectory named `bin`; so create `installers\windows\bin`, get the zip file of the GUI wallet from [here](https://getmonero.org/downloads/), unpack it somewhere, and copy all the files and subdirectories in the single subdirectory there (currently named `monero-gui-0.13.0.4`) to this `bin` subdirectory 42 | 4. Start Inno Setup, load `Monero.iss` and compile it 43 | 5. The result i.e. the finished installer will be the file `mysetup.exe` in the `installers\windows\Output` subdirectory 44 | 45 | -------------------------------------------------------------------------------- /installers/windows/WelcomeImage.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/installers/windows/WelcomeImage.bmp -------------------------------------------------------------------------------- /installers/windows/WizardSmallImage.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/installers/windows/WizardSmallImage.bmp -------------------------------------------------------------------------------- /installers/windows/monero-daemon.bat: -------------------------------------------------------------------------------- 1 | REM Execute the Monero daemon and then stay with window open after it exits 2 | "C:\Program Files\Monero Core\monerod.exe" 3 | PAUSE 4 | -------------------------------------------------------------------------------- /installers/windows/monero-wallet-gui.log: -------------------------------------------------------------------------------- 1 | ----- 2 | -------------------------------------------------------------------------------- /ios_get_libwallet.api.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | # 3 header files required by monero are missing from the IOS SDK. I copied them from iphoneSimulator SDK 4 | # cd /Applications/XCode.app 5 | # sudo cp ./Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/sys/vmmeter.h ./Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sys/ 6 | # sudo cp ./Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/netinet/udp_var.h ./Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/netinet/ 7 | # sudo cp ./Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/netinet/ip_var.h ./Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/netinet/ 8 | 9 | 10 | if [ -z $BUILD_TYPE ]; then 11 | BUILD_TYPE=release 12 | fi 13 | 14 | ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 15 | if [ -z $BOOST_LIBRARYDIR ]; then 16 | BOOST_LIBRARYDIR=${ROOT_DIR}/../ofxiOSBoost/build/ios/prefix/lib 17 | fi 18 | if [ -z $BOOST_INCLUDEDIR ]; then 19 | BOOST_INCLUDEDIR=${ROOT_DIR}/../ofxiOSBoost/build/ios/prefix/include 20 | fi 21 | if [ -z $OPENSSL_INCLUDE_DIR ]; then 22 | OPENSSL_INCLUDE_DIR=${ROOT_DIR}/../openssl/1.0.2j/include 23 | fi 24 | if [ -z $OPENSSL_ROOT_DIR ]; then 25 | OPENSSL_ROOT_DIR=${ROOT_DIR}/../openssl/1.0.2j 26 | fi 27 | 28 | echo "Building IOS armv7" 29 | rm -r torque/build > /dev/null 30 | mkdir -p torque/build/release 31 | pushd torque/build/release 32 | cmake -D IOS=ON -D ARCH=armv7 -D BOOST_LIBRARYDIR=${BOOST_INCLUDEDIR} -D BOOST_INCLUDEDIR=${BOOST_INCLUDEDIR} -D OPENSSL_INCLUDE_DIR=${OPENSSL_INCLUDE_DIR} -D OPENSSL_ROOT_DIR=${OPENSSL_ROOT_DIR} -D CMAKE_BUILD_TYPE=debug -D STATIC=ON -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON -D CMAKE_INSTALL_PREFIX="/Users/jacob/crypto/monero-core/monero" ../.. 33 | make -j4 && make install 34 | popd 35 | echo "Building IOS arm64" 36 | rm -r torque/build > /dev/null 37 | mkdir -p torque/build/release 38 | pushd torque/build/release 39 | cmake -D IOS=ON -D ARCH=armv8-a -D BOOST_LIBRARYDIR=${BOOST_INCLUDEDIR} -D BOOST_INCLUDEDIR=${BOOST_INCLUDEDIR} -D OPENSSL_INCLUDE_DIR=${OPENSSL_INCLUDE_DIR} -D OPENSSL_ROOT_DIR=${OPENSSL_ROOT_DIR} -D CMAKE_BUILD_TYPE=debug -D STATIC=ON -D BUILD_GUI_DEPS=ON -D INSTALL_VENDORED_LIBUNBOUND=ON -D CMAKE_INSTALL_PREFIX="/Users/jacob/crypto/monero-core/monero" ../.. 40 | make -j4 && make install 41 | popd 42 | 43 | echo "Creating fat library for armv7 and arm64" 44 | pushd torque 45 | mkdir -p lib-ios 46 | lipo -create lib-armv7/libwallet_merged.a lib-arm64/libwallet_merged.a -output lib-ios/libwallet_merged.a 47 | lipo -create lib-armv7/libunbound.a lib-arm64/libunbound.a -output lib-ios/libunbound.a 48 | lipo -create lib-armv7/libepee.a lib-arm64/libepee.a -output lib-ios/libepee.a 49 | popd -------------------------------------------------------------------------------- /js/TxUtils.js: -------------------------------------------------------------------------------- 1 | function destinationsToAmount(destinations){ 2 | // Gets amount from destinations line 3 | // input: "20.000000000000: 9tLGyK277MnYrDc7Vzi6TB1pJvstFoviziFwsqQNFbwA9rvg5RxYVYjEezFKDjvDHgAzTELJhJHVx6JAaWZKeVqSUZkXeKk" 4 | // returns: 20.000000000000 5 | return destinations.split(" ")[0].split(":")[0]; 6 | } 7 | 8 | function destinationsToAddress(destinations){ 9 | var address = destinations.split(" ")[1]; 10 | if(address === undefined) return "" 11 | return address; 12 | } 13 | 14 | function addressTruncate(address, range){ 15 | if(typeof(range) === "undefined") range = 8; 16 | return address.substring(0, range) + "..." + address.substring(address.length-range); 17 | } 18 | 19 | function check256(str, length) { 20 | if (str.length != length) 21 | return false; 22 | for (var i = 0; i < length; ++i) { 23 | if (str[i] >= '0' && str[i] <= '9') 24 | continue; 25 | if (str[i] >= 'a' && str[i] <= 'z') 26 | continue; 27 | if (str[i] >= 'A' && str[i] <= 'Z') 28 | continue; 29 | return false; 30 | } 31 | return true; 32 | } 33 | 34 | function checkAddress(address, testnet) { 35 | return walletManager.addressValid(address, testnet) 36 | } 37 | 38 | function checkTxID(txid) { 39 | return check256(txid, 64) 40 | } 41 | 42 | function checkSignature(signature) { 43 | if (signature.indexOf("OutProofV") === 0) { 44 | if ((signature.length - 10) % 132 != 0) 45 | return false; 46 | return check256(signature, signature.length); 47 | } else if (signature.indexOf("InProofV") === 0) { 48 | if ((signature.length - 9) % 132 != 0) 49 | return false; 50 | return check256(signature, signature.length); 51 | } else if (signature.indexOf("SpendProofV") === 0) { 52 | if ((signature.length - 12) % 88 != 0) 53 | return false; 54 | return check256(signature, signature.length); 55 | } 56 | return false; 57 | } 58 | 59 | function isValidOpenAliasAddress(address) { 60 | address = address.trim() 61 | var dot = address.indexOf('.') 62 | if (dot < 0) 63 | return false 64 | // we can get an awful lot of valid domains, including non ASCII chars... accept anything 65 | return true 66 | } 67 | -------------------------------------------------------------------------------- /js/Utils.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Formats a date. 3 | * @param {date} date - toggle decorations 4 | * @param {params} params - 5 | */ 6 | function formatDate( date, params ) { 7 | var options = { 8 | weekday: "short", 9 | year: "numeric", 10 | month: "long", 11 | day: "numeric", 12 | hour: "2-digit", 13 | minute: "2-digit", 14 | timeZone: "UTC", 15 | timeZoneName: "short", 16 | }; 17 | 18 | options = [options, params].reduce(function (r, o) { 19 | Object.keys(o).forEach(function (k) { r[k] = o[k]; }); 20 | return r; 21 | }, {}); 22 | 23 | // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleString 24 | return new Date( date ).toLocaleString( 'en-US', options ); 25 | } 26 | 27 | function isNumeric(n) { 28 | return !isNaN(parseFloat(n)) && isFinite(n); 29 | } 30 | 31 | function showSeedPage() { 32 | // Shows `Settings->Seed & keys`. Prompts a password dialog. 33 | passwordDialog.onAcceptedCallback = function() { 34 | if(walletPassword === passwordDialog.password){ 35 | if(currentWallet.seedLanguage == "") { 36 | console.log("No seed language set. Using English as default"); 37 | currentWallet.setSeedLanguage("English"); 38 | } 39 | // Load keys page 40 | appWindow.showPageRequest("Keys"); 41 | } else { 42 | passwordDialog.showError(qsTr("Wrong password")); 43 | } 44 | } 45 | passwordDialog.onRejectedCallback = function() { 46 | leftPanel.selectItem(middlePanel.state); 47 | } 48 | passwordDialog.open(); 49 | if(isMobile) hideMenu(); 50 | updateBalance(); 51 | } -------------------------------------------------------------------------------- /js/Windows.js: -------------------------------------------------------------------------------- 1 | var flagsCustomDecorations = (Qt.FramelessWindowHint | Qt.WindowSystemMenuHint | Qt.Window | Qt.WindowMinimizeButtonHint); 2 | var flags = (Qt.WindowSystemMenuHint | Qt.Window | Qt.WindowMinimizeButtonHint | Qt.WindowCloseButtonHint | Qt.WindowTitleHint | Qt.WindowMaximizeButtonHint); 3 | 4 | /** 5 | * Toggles window decorations 6 | * @param {bool} custom - toggle decorations 7 | */ 8 | function setCustomWindowDecorations(custom) { 9 | // save x,y positions, because we need to hide/show the window 10 | var x = appWindow.x 11 | var y = appWindow.y 12 | if (x < 0) x = 0 13 | if (y < 0) y = 0 14 | 15 | // Update persistentSettings 16 | persistentSettings.customDecorations = custom; 17 | 18 | titleBar.visible = custom; 19 | 20 | if (custom) { 21 | appWindow.flags = flagsCustomDecorations; 22 | daemonConsolePopup.flags = flagsCustomDecorations; 23 | } else { 24 | appWindow.flags = flags; 25 | daemonConsolePopup.flags = flags; 26 | } 27 | 28 | // Reset window 29 | appWindow.hide() 30 | appWindow.x = x 31 | appWindow.y = y 32 | appWindow.show() 33 | } 34 | -------------------------------------------------------------------------------- /lang/flags/bangladesh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/bangladesh.png -------------------------------------------------------------------------------- /lang/flags/bd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/bd.png -------------------------------------------------------------------------------- /lang/flags/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/bg.png -------------------------------------------------------------------------------- /lang/flags/br.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/br.png -------------------------------------------------------------------------------- /lang/flags/brazil.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/brazil.png -------------------------------------------------------------------------------- /lang/flags/catalonia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/catalonia.png -------------------------------------------------------------------------------- /lang/flags/china.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/china.png -------------------------------------------------------------------------------- /lang/flags/cn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/cn.png -------------------------------------------------------------------------------- /lang/flags/croatia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/croatia.png -------------------------------------------------------------------------------- /lang/flags/cz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/cz.png -------------------------------------------------------------------------------- /lang/flags/de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/de.png -------------------------------------------------------------------------------- /lang/flags/dk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/dk.png -------------------------------------------------------------------------------- /lang/flags/eg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/eg.png -------------------------------------------------------------------------------- /lang/flags/es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/es.png -------------------------------------------------------------------------------- /lang/flags/esperanto.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/esperanto.png -------------------------------------------------------------------------------- /lang/flags/fi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/fi.png -------------------------------------------------------------------------------- /lang/flags/finland.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/finland.png -------------------------------------------------------------------------------- /lang/flags/fr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/fr.png -------------------------------------------------------------------------------- /lang/flags/france.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/france.png -------------------------------------------------------------------------------- /lang/flags/gb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/gb.png -------------------------------------------------------------------------------- /lang/flags/german.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/german.png -------------------------------------------------------------------------------- /lang/flags/hr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/hr.png -------------------------------------------------------------------------------- /lang/flags/hu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/hu.png -------------------------------------------------------------------------------- /lang/flags/id.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/id.png -------------------------------------------------------------------------------- /lang/flags/il.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/il.png -------------------------------------------------------------------------------- /lang/flags/in.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/in.png -------------------------------------------------------------------------------- /lang/flags/india.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/india.png -------------------------------------------------------------------------------- /lang/flags/indonesia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/indonesia.png -------------------------------------------------------------------------------- /lang/flags/israel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/israel.png -------------------------------------------------------------------------------- /lang/flags/it.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/it.png -------------------------------------------------------------------------------- /lang/flags/italy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/italy.png -------------------------------------------------------------------------------- /lang/flags/japan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/japan.png -------------------------------------------------------------------------------- /lang/flags/jp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/jp.png -------------------------------------------------------------------------------- /lang/flags/kr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/kr.png -------------------------------------------------------------------------------- /lang/flags/lt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/lt.png -------------------------------------------------------------------------------- /lang/flags/malaysia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/malaysia.png -------------------------------------------------------------------------------- /lang/flags/netherlands.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/netherlands.png -------------------------------------------------------------------------------- /lang/flags/nl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/nl.png -------------------------------------------------------------------------------- /lang/flags/palestine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/palestine.png -------------------------------------------------------------------------------- /lang/flags/pirate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/pirate.png -------------------------------------------------------------------------------- /lang/flags/pl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/pl.png -------------------------------------------------------------------------------- /lang/flags/poland.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/poland.png -------------------------------------------------------------------------------- /lang/flags/ps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/ps.png -------------------------------------------------------------------------------- /lang/flags/pt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/pt.png -------------------------------------------------------------------------------- /lang/flags/ro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/ro.png -------------------------------------------------------------------------------- /lang/flags/rpa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/rpa.png -------------------------------------------------------------------------------- /lang/flags/rs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/rs.png -------------------------------------------------------------------------------- /lang/flags/ru.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/ru.png -------------------------------------------------------------------------------- /lang/flags/russia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/russia.png -------------------------------------------------------------------------------- /lang/flags/se.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/se.png -------------------------------------------------------------------------------- /lang/flags/si.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/si.png -------------------------------------------------------------------------------- /lang/flags/sk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/sk.png -------------------------------------------------------------------------------- /lang/flags/south_korea.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/south_korea.png -------------------------------------------------------------------------------- /lang/flags/spain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/spain.png -------------------------------------------------------------------------------- /lang/flags/sweden.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/sweden.png -------------------------------------------------------------------------------- /lang/flags/taiwan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/taiwan.png -------------------------------------------------------------------------------- /lang/flags/tr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/tr.png -------------------------------------------------------------------------------- /lang/flags/tw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/tw.png -------------------------------------------------------------------------------- /lang/flags/ua.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/ua.png -------------------------------------------------------------------------------- /lang/flags/uk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/uk.png -------------------------------------------------------------------------------- /lang/flags/us.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/us.png -------------------------------------------------------------------------------- /lang/flags/usa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/usa.png -------------------------------------------------------------------------------- /lang/flags/za.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/lang/flags/za.png -------------------------------------------------------------------------------- /linuxdeploy_helper.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 4 | source $ROOT_DIR/utils.sh 5 | 6 | TARGET=$1 7 | 8 | GUI_EXEC=$2 9 | 10 | platform=$(get_platform) 11 | 12 | if [[ "$platform" == "linux64" ]]; then 13 | PLAT_DIR="/usr/lib/x86_64-linux-gnu" 14 | elif [[ "$platform" == "linux32" ]]; then 15 | PLAT_DIR="/usr/lib/i386-linux-gnu" 16 | elif [[ "$platform" == "linuxarmv7" ]]; then 17 | PLAT_DIR="/usr/lib/arm-linux-gnueabihf" 18 | elif [[ "$platform" == "linuxarmv8" ]]; then 19 | PLAT_DIR="/usr/lib/aarch64-linux-gnu" 20 | else 21 | PLAT_DIR="/usr/lib" 22 | fi 23 | 24 | if [ -z "$QT_DIR" ]; then 25 | QT_DIR=$PLAT_DIR/qt5 26 | fi 27 | 28 | if [ -z "$QTXML_DIR" ]; then 29 | QTXML_DIR=$PLAT_DIR 30 | fi 31 | 32 | # Copy dependencies 33 | EXCLUDE='libstdc++|libgcc_s.so|libc.so|libpthread' 34 | INCLUDE='libunbound' 35 | cp -rv $QT_DIR/qml $TARGET || exit 36 | cp -rv $QT_DIR/plugins $TARGET || exit 37 | mkdir -p $TARGET/libs || exit 38 | #ldd $TARGET/$GUI_EXEC | grep "=> /" | awk '{print $3}' | grep $INCLUDE | xargs -I '{}' cp -v '{}' $TARGET/libs || exit 39 | #ldd $TARGET/$GUI_EXEC | grep "=> /" | awk '{print $3}' | grep -Ev $EXCLUDE | xargs -I '{}' cp -v '{}' $TARGET/libs || exit 40 | #ldd $TARGET/plugins/platforms/libqxcb.so| grep "=> /" | awk '{print $3}' | grep -Ev $EXCLUDE | xargs -I '{}' cp -v '{}' $TARGET/libs || exit 41 | #cp -v $QTXML_DIR/libQt5XmlPatterns.so.5 $TARGET/libs || exit 42 | 43 | # Create start script 44 | cat > $TARGET/start-gui.sh < 3 | OSCursor::OSCursor(QObject *parent) 4 | : QObject(parent) 5 | { 6 | } 7 | QPoint OSCursor::getPosition() const 8 | { 9 | return QCursor::pos(); 10 | } 11 | -------------------------------------------------------------------------------- /oscursor.h: -------------------------------------------------------------------------------- 1 | #ifndef OSCURSOR_H 2 | #define OSCURSOR_H 3 | 4 | 5 | #include 6 | #include 7 | #include 8 | class OSCursor : public QObject 9 | { 10 | Q_OBJECT 11 | //QObject(); 12 | public: 13 | //QObject(QObject* aParent); 14 | //OSCursor(); 15 | explicit OSCursor(QObject *parent = 0); 16 | Q_INVOKABLE QPoint getPosition() const; 17 | }; 18 | 19 | //OSCursor::OSCursor() : QObject(NULL){ 20 | 21 | //} 22 | 23 | 24 | //Q_DECLARE_METATYPE(OSCursor) 25 | #endif // OSCURSOR_H 26 | -------------------------------------------------------------------------------- /oshelper.cpp: -------------------------------------------------------------------------------- 1 | #include "oshelper.h" 2 | #include 3 | #include 4 | #include 5 | #include 6 | 7 | OSHelper::OSHelper(QObject *parent) : QObject(parent) 8 | { 9 | 10 | } 11 | 12 | QString OSHelper::temporaryFilename() const 13 | { 14 | QString tempFileName; 15 | { 16 | QTemporaryFile f; 17 | f.open(); 18 | tempFileName = f.fileName(); 19 | } 20 | return tempFileName; 21 | } 22 | 23 | bool OSHelper::removeTemporaryWallet(const QString &fileName) const 24 | { 25 | // Temporary files should be deleted automatically by default, in case they wouldn't, we delete them manually as well 26 | bool cache_deleted = QFile::remove(fileName); 27 | bool address_deleted = QFile::remove(fileName + ".address.txt"); 28 | bool keys_deleted = QFile::remove(fileName +".keys"); 29 | 30 | return cache_deleted && address_deleted && keys_deleted; 31 | } 32 | 33 | QString OSHelper::temporaryPath() const 34 | { 35 | return QDir::tempPath(); 36 | } 37 | -------------------------------------------------------------------------------- /oshelper.h: -------------------------------------------------------------------------------- 1 | #ifndef OSHELPER_H 2 | #define OSHELPER_H 3 | 4 | #include 5 | /** 6 | * @brief The OSHelper class - exports to QML some OS-related functions 7 | */ 8 | class OSHelper : public QObject 9 | { 10 | Q_OBJECT 11 | public: 12 | explicit OSHelper(QObject *parent = 0); 13 | 14 | Q_INVOKABLE QString temporaryFilename() const; 15 | Q_INVOKABLE QString temporaryPath() const; 16 | Q_INVOKABLE bool removeTemporaryWallet(const QString &walletName) const; 17 | 18 | signals: 19 | 20 | public slots: 21 | }; 22 | 23 | #endif // OSHELPER_H 24 | -------------------------------------------------------------------------------- /package_mac.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | cp build/release/bin/torque-wallet-gui.app/Contents/Frameworks/libicudata.63.1.dylib build/release/bin/torque-wallet-gui.app/Contents/Frameworks/libicudata.63.dylib 3 | cd build/release/bin/ 4 | tar -zcvf TorqueGUI_MacOS.tar.gz torque-wallet-gui.app 5 | cd ../../../ 6 | echo 'The MacOS GUI wallet is at build/release/bin/TorqueGUI_MacOS.tar.gz' 7 | -------------------------------------------------------------------------------- /share/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | LSMinimumSystemVersion 6 | 10.10.0 7 | 8 | NSPrincipalClass 9 | NSApplication 10 | 11 | CFBundleIconFile 12 | appicon.icns 13 | 14 | CFBundlePackageType 15 | APPL 16 | 17 | CFBundleSignature 18 | ???? 19 | 20 | CFBundleExecutable 21 | torque-wallet-gui 22 | 23 | CFBundleName 24 | Torque GUI 25 | 26 | CFBundleIdentifier 27 | org.monero-project.torque-wallet-gui 28 | 29 | NSSupportsAutomaticGraphicsSwitching 30 | 31 | 32 | NSRequiresAquaSystemAppearance 33 | True 34 | 35 | 36 | -------------------------------------------------------------------------------- /src/NetworkType.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | #include 4 | #include 5 | 6 | class NetworkType : public QObject 7 | { 8 | Q_OBJECT 9 | 10 | public: 11 | enum Type : uint8_t { 12 | MAINNET = Torque::MAINNET, 13 | TESTNET = Torque::TESTNET, 14 | STAGENET = Torque::STAGENET 15 | }; 16 | Q_ENUM(Type) 17 | }; 18 | -------------------------------------------------------------------------------- /src/QR-Code-generator/BitBuffer.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * QR Code generator library (C++) 3 | * 4 | * Copyright (c) 2016 Project Nayuki 5 | * https://www.nayuki.io/page/qr-code-generator-library 6 | * 7 | * (MIT License) 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 9 | * this software and associated documentation files (the "Software"), to deal in 10 | * the Software without restriction, including without limitation the rights to 11 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 12 | * the Software, and to permit persons to whom the Software is furnished to do so, 13 | * subject to the following conditions: 14 | * - The above copyright notice and this permission notice shall be included in 15 | * all copies or substantial portions of the Software. 16 | * - The Software is provided "as is", without warranty of any kind, express or 17 | * implied, including but not limited to the warranties of merchantability, 18 | * fitness for a particular purpose and noninfringement. In no event shall the 19 | * authors or copyright holders be liable for any claim, damages or other 20 | * liability, whether in an action of contract, tort or otherwise, arising from, 21 | * out of or in connection with the Software or the use or other dealings in the 22 | * Software. 23 | */ 24 | 25 | #include 26 | #include "BitBuffer.hpp" 27 | 28 | 29 | qrcodegen::BitBuffer::BitBuffer() : 30 | data(), 31 | bitLength(0) {} 32 | 33 | 34 | int qrcodegen::BitBuffer::getBitLength() const { 35 | return bitLength; 36 | } 37 | 38 | 39 | std::vector qrcodegen::BitBuffer::getBytes() const { 40 | return data; 41 | } 42 | 43 | 44 | void qrcodegen::BitBuffer::appendBits(uint32_t val, int len) { 45 | if (len < 0 || len > 32 || (len < 32 && (val >> len) != 0)) 46 | throw "Value out of range"; 47 | size_t newBitLen = bitLength + len; 48 | while (data.size() * 8 < newBitLen) 49 | data.push_back(0); 50 | for (int i = len - 1; i >= 0; i--, bitLength++) // Append bit by bit 51 | data.at(bitLength >> 3) |= ((val >> i) & 1) << (7 - (bitLength & 7)); 52 | } 53 | 54 | 55 | void qrcodegen::BitBuffer::appendData(const QrSegment &seg) { 56 | size_t newBitLen = bitLength + seg.bitLength; 57 | while (data.size() * 8 < newBitLen) 58 | data.push_back(0); 59 | for (int i = 0; i < seg.bitLength; i++, bitLength++) { // Append bit by bit 60 | int bit = (seg.data.at(i >> 3) >> (7 - (i & 7))) & 1; 61 | data.at(bitLength >> 3) |= bit << (7 - (bitLength & 7)); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/QR-Code-generator/BitBuffer.hpp: -------------------------------------------------------------------------------- 1 | /* 2 | * QR Code generator library (C++) 3 | * 4 | * Copyright (c) 2016 Project Nayuki 5 | * https://www.nayuki.io/page/qr-code-generator-library 6 | * 7 | * (MIT License) 8 | * Permission is hereby granted, free of charge, to any person obtaining a copy of 9 | * this software and associated documentation files (the "Software"), to deal in 10 | * the Software without restriction, including without limitation the rights to 11 | * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 12 | * the Software, and to permit persons to whom the Software is furnished to do so, 13 | * subject to the following conditions: 14 | * - The above copyright notice and this permission notice shall be included in 15 | * all copies or substantial portions of the Software. 16 | * - The Software is provided "as is", without warranty of any kind, express or 17 | * implied, including but not limited to the warranties of merchantability, 18 | * fitness for a particular purpose and noninfringement. In no event shall the 19 | * authors or copyright holders be liable for any claim, damages or other 20 | * liability, whether in an action of contract, tort or otherwise, arising from, 21 | * out of or in connection with the Software or the use or other dealings in the 22 | * Software. 23 | */ 24 | 25 | #pragma once 26 | 27 | #include 28 | #include 29 | #include "QrSegment.hpp" 30 | 31 | 32 | namespace qrcodegen { 33 | 34 | /* 35 | * An appendable sequence of bits. Bits are packed in big endian within a byte. 36 | */ 37 | class BitBuffer final { 38 | 39 | /*---- Fields ----*/ 40 | private: 41 | 42 | std::vector data; 43 | int bitLength; 44 | 45 | 46 | 47 | /*---- Constructor ----*/ 48 | public: 49 | 50 | // Creates an empty bit buffer (length 0). 51 | BitBuffer(); 52 | 53 | 54 | 55 | /*---- Methods ----*/ 56 | public: 57 | 58 | // Returns the number of bits in the buffer, which is a non-negative value. 59 | int getBitLength() const; 60 | 61 | 62 | // Returns a copy of all bytes, padding up to the nearest byte. 63 | std::vector getBytes() const; 64 | 65 | 66 | // Appends the given number of bits of the given value to this sequence. 67 | // If 0 <= len <= 31, then this requires 0 <= val < 2^len. 68 | void appendBits(uint32_t val, int len); 69 | 70 | 71 | // Appends the data of the given segment to this bit buffer. 72 | void appendData(const QrSegment &seg); 73 | 74 | }; 75 | 76 | } 77 | -------------------------------------------------------------------------------- /src/QR-Code-scanner/QrCodeScanner.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2017, The Torque Project 2 | // Copyright (c) 2014-2018, The Monero Project 3 | // 4 | // All rights reserved. 5 | // 6 | // Redistribution and use in source and binary forms, with or without modification, are 7 | // permitted provided that the following conditions are met: 8 | // 9 | // 1. Redistributions of source code must retain the above copyright notice, this list of 10 | // conditions and the following disclaimer. 11 | // 12 | // 2. Redistributions in binary form must reproduce the above copyright notice, this list 13 | // of conditions and the following disclaimer in the documentation and/or other 14 | // materials provided with the distribution. 15 | // 16 | // 3. Neither the name of the copyright holder nor the names of its contributors may be 17 | // used to endorse or promote products derived from this software without specific 18 | // prior written permission. 19 | // 20 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 21 | // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 22 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 23 | // THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 25 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 27 | // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 28 | // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #ifndef QRCODESCANNER_H_ 31 | #define QRCODESCANNER_H_ 32 | 33 | #include 34 | #include 35 | #include "QrScanThread.h" 36 | 37 | class QVideoProbe; 38 | class QCamera; 39 | 40 | class QrCodeScanner : public QObject 41 | { 42 | Q_OBJECT 43 | 44 | Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged) 45 | 46 | public: 47 | QrCodeScanner(QObject *parent = Q_NULLPTR); 48 | ~QrCodeScanner(); 49 | void setSource(QCamera*); 50 | 51 | bool enabled() const; 52 | void setEnabled(bool enabled); 53 | 54 | public Q_SLOTS: 55 | void processCode(int type, const QString &data); 56 | void processFrame(QVideoFrame); 57 | 58 | Q_SIGNALS: 59 | void enabledChanged(); 60 | 61 | void decoded(const QString &address, const QString &payment_id, const QString &amount, const QString &tx_description, const QString &recipient_name, const QVariantMap &extra_parameters); 62 | void decode(int type, const QString &data); 63 | void notifyError(const QString &error, bool warning = false); 64 | 65 | protected: 66 | void timerEvent(QTimerEvent *); 67 | QrScanThread *m_thread; 68 | int m_processTimerId; 69 | int m_processInterval; 70 | int m_enabled; 71 | QVideoFrame m_curFrame; 72 | QVideoProbe *m_probe; 73 | }; 74 | 75 | #endif 76 | 77 | -------------------------------------------------------------------------------- /src/QR-Code-scanner/QrScanThread.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2018, The Monero Project 2 | // Copyright (c) 2014-2017, The Torque Project 3 | // 4 | // All rights reserved. 5 | // 6 | // Redistribution and use in source and binary forms, with or without modification, are 7 | // permitted provided that the following conditions are met: 8 | // 9 | // 1. Redistributions of source code must retain the above copyright notice, this list of 10 | // conditions and the following disclaimer. 11 | // 12 | // 2. Redistributions in binary form must reproduce the above copyright notice, this list 13 | // of conditions and the following disclaimer in the documentation and/or other 14 | // materials provided with the distribution. 15 | // 16 | // 3. Neither the name of the copyright holder nor the names of its contributors may be 17 | // used to endorse or promote products derived from this software without specific 18 | // prior written permission. 19 | // 20 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 21 | // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 22 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 23 | // THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 25 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 27 | // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 28 | // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 | 30 | #ifndef _QRSCANTHREAD_H_ 31 | #define _QRSCANTHREAD_H_ 32 | 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | #include 40 | 41 | class QrScanThread : public QThread, public zbar::Image::Handler 42 | { 43 | Q_OBJECT 44 | 45 | public: 46 | QrScanThread(QObject *parent = Q_NULLPTR); 47 | void addFrame(const QVideoFrame &frame); 48 | virtual void stop(); 49 | 50 | Q_SIGNALS: 51 | void decoded(int type, const QString &data); 52 | void notifyError(const QString &error, bool warning = false); 53 | 54 | protected: 55 | virtual void run(); 56 | void processVideoFrame(const QVideoFrame &); 57 | void processQImage(const QImage &); 58 | void processZImage(zbar::Image &image); 59 | virtual void image_callback(zbar::Image &image); 60 | bool zimageFromQImage(const QImage&, zbar::Image &); 61 | 62 | private: 63 | zbar::ImageScanner m_scanner; 64 | QSharedPointer m_image; 65 | bool m_running; 66 | QMutex m_mutex; 67 | QWaitCondition m_waitCondition; 68 | QList m_queue; 69 | }; 70 | #endif 71 | -------------------------------------------------------------------------------- /src/daemon/DaemonManager.h: -------------------------------------------------------------------------------- 1 | #ifndef DAEMONMANAGER_H 2 | #define DAEMONMANAGER_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include "NetworkType.h" 9 | 10 | class DaemonManager : public QObject 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | 16 | static DaemonManager * instance(const QStringList *args); 17 | 18 | Q_INVOKABLE bool start(const QString &flags, NetworkType::Type nettype, const QString &dataDir = "", const QString &bootstrapNodeAddress = ""); 19 | Q_INVOKABLE bool stop(NetworkType::Type nettype); 20 | 21 | // return true if daemon process is started 22 | Q_INVOKABLE bool running(NetworkType::Type nettype) const; 23 | // Send daemon command from qml and prints output in console window. 24 | Q_INVOKABLE bool sendCommand(const QString &cmd, NetworkType::Type nettype) const; 25 | Q_INVOKABLE void exit(); 26 | Q_INVOKABLE QVariantMap validateDataDir(const QString &dataDir) const; 27 | 28 | private: 29 | 30 | bool sendCommand(const QString &cmd, NetworkType::Type nettype, QString &message) const; 31 | bool startWatcher(NetworkType::Type nettype) const; 32 | bool stopWatcher(NetworkType::Type nettype) const; 33 | signals: 34 | void daemonStarted() const; 35 | void daemonStopped() const; 36 | void daemonStartFailure() const; 37 | void daemonConsoleUpdated(QString message) const; 38 | 39 | public slots: 40 | void printOutput(); 41 | void printError(); 42 | void stateChanged(QProcess::ProcessState state); 43 | 44 | private: 45 | explicit DaemonManager(QObject *parent = 0); 46 | static DaemonManager * m_instance; 47 | static QStringList m_clArgs; 48 | QProcess *m_daemon; 49 | bool initialized = false; 50 | QString m_torqued; 51 | bool m_has_daemon = true; 52 | bool m_app_exit = false; 53 | 54 | }; 55 | 56 | #endif // DAEMONMANAGER_H 57 | -------------------------------------------------------------------------------- /src/libwalletqt/AddressBook.cpp: -------------------------------------------------------------------------------- 1 | #include "AddressBook.h" 2 | #include 3 | 4 | AddressBook::AddressBook(Torque::AddressBook *abImpl,QObject *parent) 5 | : QObject(parent), m_addressBookImpl(abImpl) 6 | { 7 | qDebug(__FUNCTION__); 8 | getAll(); 9 | } 10 | 11 | QString AddressBook::errorString() const 12 | { 13 | return QString::fromStdString(m_addressBookImpl->errorString()); 14 | } 15 | 16 | int AddressBook::errorCode() const 17 | { 18 | return m_addressBookImpl->errorCode(); 19 | } 20 | 21 | QList AddressBook::getAll(bool update) const 22 | { 23 | qDebug(__FUNCTION__); 24 | 25 | emit refreshStarted(); 26 | 27 | if(update) 28 | m_rows.clear(); 29 | 30 | if (m_rows.empty()){ 31 | for (auto &abr: m_addressBookImpl->getAll()) { 32 | m_rows.append(abr); 33 | } 34 | } 35 | 36 | emit refreshFinished(); 37 | return m_rows; 38 | 39 | } 40 | 41 | Torque::AddressBookRow * AddressBook::getRow(int index) const 42 | { 43 | return m_rows.at(index); 44 | } 45 | 46 | bool AddressBook::addRow(const QString &address, const QString &payment_id, const QString &description) const 47 | { 48 | // virtual bool addRow(const std::string &dst_addr , const std::string &payment_id, const std::string &description) = 0; 49 | bool r = m_addressBookImpl->addRow(address.toStdString(), payment_id.toStdString(), description.toStdString()); 50 | 51 | if(r) 52 | getAll(true); 53 | 54 | return r; 55 | } 56 | 57 | bool AddressBook::deleteRow(int rowId) const 58 | { 59 | bool r = m_addressBookImpl->deleteRow(rowId); 60 | 61 | // Fetch new data from wallet2. 62 | getAll(true); 63 | 64 | return r; 65 | } 66 | 67 | quint64 AddressBook::count() const 68 | { 69 | return m_rows.size(); 70 | } 71 | 72 | int AddressBook::lookupPaymentID(const QString &payment_id) const 73 | { 74 | return m_addressBookImpl->lookupPaymentID(payment_id.toStdString()); 75 | } 76 | -------------------------------------------------------------------------------- /src/libwalletqt/AddressBook.h: -------------------------------------------------------------------------------- 1 | #ifndef ADDRESSBOOK_H 2 | #define ADDRESSBOOK_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | namespace Torque { 10 | class AddressBook; 11 | } 12 | class AddressBookRow; 13 | 14 | class AddressBook : public QObject 15 | { 16 | Q_OBJECT 17 | public: 18 | Q_INVOKABLE QList getAll(bool update = false) const; 19 | Q_INVOKABLE Torque::AddressBookRow * getRow(int index) const; 20 | Q_INVOKABLE bool addRow(const QString &address, const QString &payment_id, const QString &description) const; 21 | Q_INVOKABLE bool deleteRow(int rowId) const; 22 | quint64 count() const; 23 | Q_INVOKABLE QString errorString() const; 24 | Q_INVOKABLE int errorCode() const; 25 | Q_INVOKABLE int lookupPaymentID(const QString &payment_id) const; 26 | 27 | enum ErrorCode { 28 | Status_Ok, 29 | General_Error, 30 | Invalid_Address, 31 | Invalid_Payment_Id 32 | }; 33 | 34 | Q_ENUM(ErrorCode); 35 | 36 | 37 | signals: 38 | void refreshStarted() const; 39 | void refreshFinished() const; 40 | 41 | 42 | public slots: 43 | 44 | private: 45 | explicit AddressBook(Torque::AddressBook * abImpl, QObject *parent); 46 | friend class Wallet; 47 | Torque::AddressBook * m_addressBookImpl; 48 | mutable QList m_rows; 49 | }; 50 | 51 | #endif // ADDRESSBOOK_H 52 | -------------------------------------------------------------------------------- /src/libwalletqt/PendingTransaction.cpp: -------------------------------------------------------------------------------- 1 | #include "PendingTransaction.h" 2 | 3 | 4 | PendingTransaction::Status PendingTransaction::status() const 5 | { 6 | return static_cast(m_pimpl->status()); 7 | } 8 | 9 | QString PendingTransaction::errorString() const 10 | { 11 | return QString::fromStdString(m_pimpl->errorString()); 12 | } 13 | 14 | bool PendingTransaction::commit() 15 | { 16 | // Save transaction to file if fileName is set. 17 | if(!m_fileName.isEmpty()) 18 | return m_pimpl->commit(m_fileName.toStdString()); 19 | return m_pimpl->commit(m_fileName.toStdString()); 20 | } 21 | 22 | quint64 PendingTransaction::amount() const 23 | { 24 | return m_pimpl->amount(); 25 | } 26 | 27 | quint64 PendingTransaction::dust() const 28 | { 29 | return m_pimpl->dust(); 30 | } 31 | 32 | quint64 PendingTransaction::fee() const 33 | { 34 | return m_pimpl->fee(); 35 | } 36 | 37 | 38 | QStringList PendingTransaction::txid() const 39 | { 40 | QStringList list; 41 | std::vector txid = m_pimpl->txid(); 42 | for (const auto &t: txid) 43 | list.append(QString::fromStdString(t)); 44 | return list; 45 | } 46 | 47 | 48 | quint64 PendingTransaction::txCount() const 49 | { 50 | return m_pimpl->txCount(); 51 | } 52 | 53 | QList PendingTransaction::subaddrIndices() const 54 | { 55 | std::vector> subaddrIndices = m_pimpl->subaddrIndices(); 56 | QList result; 57 | for (const auto& x : subaddrIndices) 58 | for (uint32_t i : x) 59 | result.push_back(i); 60 | return result; 61 | } 62 | 63 | void PendingTransaction::setFilename(const QString &fileName) 64 | { 65 | m_fileName = fileName; 66 | } 67 | 68 | PendingTransaction::PendingTransaction(Torque::PendingTransaction *pt, QObject *parent) 69 | : QObject(parent), m_pimpl(pt) 70 | { 71 | 72 | } 73 | -------------------------------------------------------------------------------- /src/libwalletqt/PendingTransaction.h: -------------------------------------------------------------------------------- 1 | #ifndef PENDINGTRANSACTION_H 2 | #define PENDINGTRANSACTION_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | 10 | //namespace Torque { 11 | //class PendingTransaction; 12 | //} 13 | 14 | class PendingTransaction : public QObject 15 | { 16 | Q_OBJECT 17 | Q_PROPERTY(Status status READ status) 18 | Q_PROPERTY(QString errorString READ errorString) 19 | Q_PROPERTY(quint64 amount READ amount) 20 | Q_PROPERTY(quint64 dust READ dust) 21 | Q_PROPERTY(quint64 fee READ fee) 22 | Q_PROPERTY(QStringList txid READ txid) 23 | Q_PROPERTY(quint64 txCount READ txCount) 24 | Q_PROPERTY(QList subaddrIndices READ subaddrIndices) 25 | 26 | public: 27 | enum Status { 28 | Status_Ok = Torque::PendingTransaction::Status_Ok, 29 | Status_Error = Torque::PendingTransaction::Status_Error, 30 | Status_Critical = Torque::PendingTransaction::Status_Critical 31 | }; 32 | Q_ENUM(Status) 33 | 34 | enum Priority { 35 | Priority_Low = Torque::PendingTransaction::Priority_Low, 36 | Priority_Medium = Torque::PendingTransaction::Priority_Medium, 37 | Priority_High = Torque::PendingTransaction::Priority_High 38 | }; 39 | Q_ENUM(Priority) 40 | 41 | 42 | Status status() const; 43 | QString errorString() const; 44 | Q_INVOKABLE bool commit(); 45 | quint64 amount() const; 46 | quint64 dust() const; 47 | quint64 fee() const; 48 | QStringList txid() const; 49 | quint64 txCount() const; 50 | QList subaddrIndices() const; 51 | Q_INVOKABLE void setFilename(const QString &fileName); 52 | 53 | private: 54 | explicit PendingTransaction(Torque::PendingTransaction * pt, QObject *parent = 0); 55 | 56 | private: 57 | friend class Wallet; 58 | Torque::PendingTransaction * m_pimpl; 59 | QString m_fileName; 60 | }; 61 | 62 | #endif // PENDINGTRANSACTION_H 63 | -------------------------------------------------------------------------------- /src/libwalletqt/QRCodeImageProvider.cpp: -------------------------------------------------------------------------------- 1 | #include "QrCode.hpp" 2 | 3 | #include "QRCodeImageProvider.h" 4 | 5 | QImage QRCodeImageProvider::genQrImage(const QString &id, QSize *size) 6 | { 7 | using namespace qrcodegen; 8 | 9 | QrCode qrcode = QrCode::encodeText(id.toStdString().c_str(), QrCode::Ecc::MEDIUM); 10 | unsigned int black = 0; 11 | unsigned int white = 1; 12 | unsigned int borderSize = 4; 13 | unsigned int imageSize = qrcode.size + (2 * borderSize); 14 | QImage img = QImage(imageSize, imageSize, QImage::Format_Mono); 15 | 16 | for (unsigned int y = 0; y < imageSize; ++y) 17 | for (unsigned int x = 0; x < imageSize; ++x) 18 | if ((x < borderSize) || (x >= imageSize - borderSize) || (y < borderSize) || (y >= imageSize - borderSize)) 19 | img.setPixel(x, y, white); 20 | else 21 | img.setPixel(x, y, qrcode.getModule(x - borderSize, y - borderSize) ? black : white); 22 | if (size) 23 | *size = QSize(imageSize, imageSize); 24 | 25 | return img; 26 | } 27 | 28 | QImage QRCodeImageProvider::requestImage(const QString &id, QSize *size, const QSize &/* requestedSize */) 29 | { 30 | return genQrImage(id, size); 31 | } 32 | -------------------------------------------------------------------------------- /src/libwalletqt/QRCodeImageProvider.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | class QRCodeImageProvider: public QQuickImageProvider 5 | { 6 | public: 7 | QRCodeImageProvider(): QQuickImageProvider(QQuickImageProvider::Image) {} 8 | 9 | QImage requestImage(const QString &id, QSize *size, const QSize &requestedSize); 10 | static QImage genQrImage(const QString &id, QSize *size); 11 | }; 12 | 13 | -------------------------------------------------------------------------------- /src/libwalletqt/Subaddress.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2018, The Monero Project 2 | // 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without modification, are 6 | // permitted provided that the following conditions are met: 7 | // 8 | // 1. Redistributions of source code must retain the above copyright notice, this list of 9 | // conditions and the following disclaimer. 10 | // 11 | // 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 | // of conditions and the following disclaimer in the documentation and/or other 13 | // materials provided with the distribution. 14 | // 15 | // 3. Neither the name of the copyright holder nor the names of its contributors may be 16 | // used to endorse or promote products derived from this software without specific 17 | // prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 | // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 21 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 22 | // THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 26 | // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 27 | // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | #include "Subaddress.h" 30 | #include 31 | 32 | Subaddress::Subaddress(Torque::Subaddress *subaddressImpl, QObject *parent) 33 | : QObject(parent), m_subaddressImpl(subaddressImpl) 34 | { 35 | qDebug(__FUNCTION__); 36 | getAll(); 37 | } 38 | 39 | QList Subaddress::getAll(bool update) const 40 | { 41 | qDebug(__FUNCTION__); 42 | 43 | emit refreshStarted(); 44 | 45 | if(update) 46 | m_rows.clear(); 47 | 48 | if (m_rows.empty()){ 49 | for (auto &row: m_subaddressImpl->getAll()) { 50 | m_rows.append(row); 51 | } 52 | } 53 | 54 | emit refreshFinished(); 55 | return m_rows; 56 | } 57 | 58 | Torque::SubaddressRow * Subaddress::getRow(int index) const 59 | { 60 | return m_rows.at(index); 61 | } 62 | 63 | void Subaddress::addRow(quint32 accountIndex, const QString &label) const 64 | { 65 | m_subaddressImpl->addRow(accountIndex, label.toStdString()); 66 | getAll(true); 67 | } 68 | 69 | void Subaddress::setLabel(quint32 accountIndex, quint32 addressIndex, const QString &label) const 70 | { 71 | m_subaddressImpl->setLabel(accountIndex, addressIndex, label.toStdString()); 72 | getAll(true); 73 | } 74 | 75 | void Subaddress::refresh(quint32 accountIndex) const 76 | { 77 | m_subaddressImpl->refresh(accountIndex); 78 | getAll(true); 79 | } 80 | 81 | quint64 Subaddress::count() const 82 | { 83 | return m_rows.size(); 84 | } 85 | -------------------------------------------------------------------------------- /src/libwalletqt/Subaddress.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2018, The Monero Project 2 | // 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without modification, are 6 | // permitted provided that the following conditions are met: 7 | // 8 | // 1. Redistributions of source code must retain the above copyright notice, this list of 9 | // conditions and the following disclaimer. 10 | // 11 | // 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 | // of conditions and the following disclaimer in the documentation and/or other 13 | // materials provided with the distribution. 14 | // 15 | // 3. Neither the name of the copyright holder nor the names of its contributors may be 16 | // used to endorse or promote products derived from this software without specific 17 | // prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 | // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 21 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 22 | // THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 26 | // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 27 | // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | #ifndef SUBADDRESS_H 30 | #define SUBADDRESS_H 31 | 32 | #include 33 | #include 34 | #include 35 | #include 36 | 37 | class Subaddress : public QObject 38 | { 39 | Q_OBJECT 40 | public: 41 | Q_INVOKABLE QList getAll(bool update = false) const; 42 | Q_INVOKABLE Torque::SubaddressRow * getRow(int index) const; 43 | Q_INVOKABLE void addRow(quint32 accountIndex, const QString &label) const; 44 | Q_INVOKABLE void setLabel(quint32 accountIndex, quint32 addressIndex, const QString &label) const; 45 | Q_INVOKABLE void refresh(quint32 accountIndex) const; 46 | quint64 count() const; 47 | 48 | signals: 49 | void refreshStarted() const; 50 | void refreshFinished() const; 51 | 52 | public slots: 53 | 54 | private: 55 | explicit Subaddress(Torque::Subaddress * subaddressImpl, QObject *parent); 56 | friend class Wallet; 57 | Torque::Subaddress * m_subaddressImpl; 58 | mutable QList m_rows; 59 | }; 60 | 61 | #endif // SUBADDRESS_H 62 | -------------------------------------------------------------------------------- /src/libwalletqt/TransactionHistory.h: -------------------------------------------------------------------------------- 1 | #ifndef TRANSACTIONHISTORY_H 2 | #define TRANSACTIONHISTORY_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | namespace Torque { 9 | class TransactionHistory; 10 | } 11 | 12 | class TransactionInfo; 13 | 14 | class TransactionHistory : public QObject 15 | { 16 | Q_OBJECT 17 | Q_PROPERTY(int count READ count) 18 | Q_PROPERTY(QDateTime firstDateTime READ firstDateTime NOTIFY firstDateTimeChanged) 19 | Q_PROPERTY(QDateTime lastDateTime READ lastDateTime NOTIFY lastDateTimeChanged) 20 | Q_PROPERTY(int minutesToUnlock READ minutesToUnlock) 21 | Q_PROPERTY(bool locked READ locked) 22 | 23 | public: 24 | Q_INVOKABLE TransactionInfo *transaction(int index); 25 | // Q_INVOKABLE TransactionInfo * transaction(const QString &id); 26 | Q_INVOKABLE QList getAll(quint32 accountIndex) const; 27 | Q_INVOKABLE void refresh(quint32 accountIndex); 28 | quint64 count() const; 29 | QDateTime firstDateTime() const; 30 | QDateTime lastDateTime() const; 31 | quint64 minutesToUnlock() const; 32 | bool locked() const; 33 | 34 | signals: 35 | void refreshStarted() const; 36 | void refreshFinished() const; 37 | void firstDateTimeChanged() const; 38 | void lastDateTimeChanged() const; 39 | 40 | public slots: 41 | 42 | 43 | private: 44 | explicit TransactionHistory(Torque::TransactionHistory * pimpl, QObject *parent = 0); 45 | 46 | private: 47 | friend class Wallet; 48 | Torque::TransactionHistory * m_pimpl; 49 | mutable QList m_tinfo; 50 | mutable QDateTime m_firstDateTime; 51 | mutable QDateTime m_lastDateTime; 52 | mutable int m_minutesToUnlock; 53 | // history contains locked transfers 54 | mutable bool m_locked; 55 | 56 | }; 57 | 58 | #endif // TRANSACTIONHISTORY_H 59 | -------------------------------------------------------------------------------- /src/libwalletqt/TransactionInfo.cpp: -------------------------------------------------------------------------------- 1 | #include "TransactionInfo.h" 2 | #include "WalletManager.h" 3 | #include "Transfer.h" 4 | #include 5 | #include 6 | 7 | TransactionInfo::Direction TransactionInfo::direction() const 8 | { 9 | return static_cast(m_pimpl->direction()); 10 | } 11 | 12 | bool TransactionInfo::isPending() const 13 | { 14 | return m_pimpl->isPending(); 15 | } 16 | 17 | bool TransactionInfo::isFailed() const 18 | { 19 | return m_pimpl->isFailed(); 20 | } 21 | 22 | 23 | double TransactionInfo::amount() const 24 | { 25 | // there's no unsigned uint64 for JS, so better use double 26 | return WalletManager::instance()->displayAmount(m_pimpl->amount()).toDouble(); 27 | } 28 | 29 | quint64 TransactionInfo::atomicAmount() const 30 | { 31 | return m_pimpl->amount(); 32 | } 33 | 34 | QString TransactionInfo::displayAmount() const 35 | { 36 | return WalletManager::instance()->displayAmount(m_pimpl->amount()); 37 | } 38 | 39 | QString TransactionInfo::fee() const 40 | { 41 | if(m_pimpl->fee() == 0) 42 | return ""; 43 | return WalletManager::instance()->displayAmount(m_pimpl->fee()); 44 | } 45 | 46 | quint64 TransactionInfo::blockHeight() const 47 | { 48 | return m_pimpl->blockHeight(); 49 | } 50 | 51 | QSet TransactionInfo::subaddrIndex() const 52 | { 53 | QSet result; 54 | for (uint32_t i : m_pimpl->subaddrIndex()) 55 | result.insert(i); 56 | return result; 57 | } 58 | 59 | quint32 TransactionInfo::subaddrAccount() const 60 | { 61 | return m_pimpl->subaddrAccount(); 62 | } 63 | 64 | QString TransactionInfo::label() const 65 | { 66 | return QString::fromStdString(m_pimpl->label()); 67 | } 68 | 69 | quint64 TransactionInfo::confirmations() const 70 | { 71 | return m_pimpl->confirmations(); 72 | } 73 | 74 | quint64 TransactionInfo::unlockTime() const 75 | { 76 | return m_pimpl->unlockTime(); 77 | } 78 | 79 | QString TransactionInfo::hash() const 80 | { 81 | return QString::fromStdString(m_pimpl->hash()); 82 | } 83 | 84 | QDateTime TransactionInfo::timestamp() const 85 | { 86 | QDateTime result = QDateTime::fromTime_t(m_pimpl->timestamp()); 87 | return result; 88 | } 89 | 90 | QString TransactionInfo::date() const 91 | { 92 | return timestamp().date().toString(Qt::ISODate); 93 | } 94 | 95 | QString TransactionInfo::time() const 96 | { 97 | return timestamp().time().toString(Qt::ISODate); 98 | } 99 | 100 | QString TransactionInfo::paymentId() const 101 | { 102 | return QString::fromStdString(m_pimpl->paymentId()); 103 | } 104 | 105 | QString TransactionInfo::destinations_formatted() const 106 | { 107 | QString destinations; 108 | for (auto const& t: transfers()) { 109 | if (!destinations.isEmpty()) 110 | destinations += "
"; 111 | destinations += WalletManager::instance()->displayAmount(t->amount()) + ": " + t->address(); 112 | } 113 | return destinations; 114 | } 115 | 116 | QList TransactionInfo::transfers() const 117 | { 118 | if (!m_transfers.isEmpty()) { 119 | return m_transfers; 120 | } 121 | 122 | for(auto const& t: m_pimpl->transfers()) { 123 | TransactionInfo * parent = const_cast(this); 124 | Transfer * transfer = new Transfer(t.amount, QString::fromStdString(t.address), parent); 125 | m_transfers.append(transfer); 126 | } 127 | return m_transfers; 128 | } 129 | 130 | TransactionInfo::TransactionInfo(Torque::TransactionInfo *pimpl, QObject *parent) 131 | : QObject(parent), m_pimpl(pimpl) 132 | { 133 | 134 | } 135 | -------------------------------------------------------------------------------- /src/libwalletqt/TransactionInfo.h: -------------------------------------------------------------------------------- 1 | #ifndef TRANSACTIONINFO_H 2 | #define TRANSACTIONINFO_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | class Transfer; 10 | 11 | class TransactionInfo : public QObject 12 | { 13 | Q_OBJECT 14 | Q_PROPERTY(Direction direction READ direction) 15 | Q_PROPERTY(bool isPending READ isPending) 16 | Q_PROPERTY(bool isFailed READ isFailed) 17 | Q_PROPERTY(double amount READ amount) 18 | Q_PROPERTY(quint64 atomicAmount READ atomicAmount) 19 | Q_PROPERTY(QString displayAmount READ displayAmount) 20 | Q_PROPERTY(QString fee READ fee) 21 | Q_PROPERTY(quint64 blockHeight READ blockHeight) 22 | Q_PROPERTY(QSet subaddrIndex READ subaddrIndex) 23 | Q_PROPERTY(quint32 subaddrAccount READ subaddrAccount) 24 | Q_PROPERTY(QString label READ label) 25 | Q_PROPERTY(quint64 confirmations READ confirmations) 26 | Q_PROPERTY(quint64 unlockTime READ unlockTime) 27 | Q_PROPERTY(QString hash READ hash) 28 | Q_PROPERTY(QDateTime timestamp READ timestamp) 29 | Q_PROPERTY(QString date READ date) 30 | Q_PROPERTY(QString time READ time) 31 | Q_PROPERTY(QString paymentId READ paymentId) 32 | Q_PROPERTY(QString destinations_formatted READ destinations_formatted) 33 | 34 | public: 35 | enum Direction { 36 | Direction_In = Torque::TransactionInfo::Direction_In, 37 | Direction_Out = Torque::TransactionInfo::Direction_Out, 38 | Direction_Both // invalid direction value, used for filtering 39 | }; 40 | 41 | Q_ENUM(Direction) 42 | 43 | Direction direction() const; 44 | bool isPending() const; 45 | bool isFailed() const; 46 | double amount() const; 47 | quint64 atomicAmount() const; 48 | QString displayAmount() const; 49 | QString fee() const; 50 | quint64 blockHeight() const; 51 | QSet subaddrIndex() const; 52 | quint32 subaddrAccount() const; 53 | QString label() const; 54 | quint64 confirmations() const; 55 | quint64 unlockTime() const; 56 | //! transaction_id 57 | QString hash() const; 58 | QDateTime timestamp() const; 59 | QString date() const; 60 | QString time() const; 61 | QString paymentId() const; 62 | //! only applicable for output transactions 63 | //! used in tx details popup 64 | QString destinations_formatted() const; 65 | //! Could be useful later when addressbook is implemented 66 | Q_INVOKABLE QList transfers() const; 67 | private: 68 | explicit TransactionInfo(Torque::TransactionInfo * pimpl, QObject *parent = 0); 69 | private: 70 | friend class TransactionHistory; 71 | Torque::TransactionInfo * m_pimpl; 72 | mutable QList m_transfers; 73 | }; 74 | 75 | // in order to wrap it to QVariant 76 | Q_DECLARE_METATYPE(TransactionInfo*) 77 | 78 | 79 | #endif // TRANSACTIONINFO_H 80 | -------------------------------------------------------------------------------- /src/libwalletqt/Transfer.h: -------------------------------------------------------------------------------- 1 | #ifndef TRANSFER_H 2 | #define TRANSFER_H 3 | 4 | #include 5 | #include 6 | 7 | class Transfer : public QObject 8 | { 9 | Q_OBJECT 10 | Q_PROPERTY(quint64 amount READ amount) 11 | Q_PROPERTY(QString address READ address) 12 | private: 13 | explicit Transfer(uint64_t _amount, const QString &_address, QObject *parent = 0): QObject(parent), m_amount(_amount), m_address(_address) {}; 14 | private: 15 | friend class TransactionInfo; 16 | quint64 m_amount; 17 | QString m_address; 18 | public: 19 | quint64 amount() const { return m_amount; } 20 | QString address() const { return m_address; } 21 | 22 | }; 23 | 24 | #endif // TRANSACTIONINFO_H 25 | -------------------------------------------------------------------------------- /src/libwalletqt/UnsignedTransaction.cpp: -------------------------------------------------------------------------------- 1 | #include "UnsignedTransaction.h" 2 | #include 3 | #include 4 | 5 | UnsignedTransaction::Status UnsignedTransaction::status() const 6 | { 7 | return static_cast(m_pimpl->status()); 8 | } 9 | 10 | QString UnsignedTransaction::errorString() const 11 | { 12 | return QString::fromStdString(m_pimpl->errorString()); 13 | } 14 | 15 | quint64 UnsignedTransaction::amount(int index) const 16 | { 17 | std::vector arr = m_pimpl->amount(); 18 | if(index > arr.size() - 1) 19 | return 0; 20 | return arr[index]; 21 | } 22 | 23 | quint64 UnsignedTransaction::fee(int index) const 24 | { 25 | std::vector arr = m_pimpl->fee(); 26 | if(index > arr.size() - 1) 27 | return 0; 28 | return arr[index]; 29 | } 30 | 31 | quint64 UnsignedTransaction::mixin(int index) const 32 | { 33 | std::vector arr = m_pimpl->mixin(); 34 | if(index > arr.size() - 1) 35 | return 0; 36 | return arr[index]; 37 | } 38 | 39 | quint64 UnsignedTransaction::txCount() const 40 | { 41 | return m_pimpl->txCount(); 42 | } 43 | 44 | quint64 UnsignedTransaction::minMixinCount() const 45 | { 46 | return m_pimpl->minMixinCount(); 47 | } 48 | 49 | QString UnsignedTransaction::confirmationMessage() const 50 | { 51 | return QString::fromStdString(m_pimpl->confirmationMessage()); 52 | } 53 | 54 | QStringList UnsignedTransaction::paymentId() const 55 | { 56 | QList list; 57 | for (const auto &t: m_pimpl->paymentId()) 58 | list.append(QString::fromStdString(t)); 59 | return list; 60 | } 61 | 62 | QStringList UnsignedTransaction::recipientAddress() const 63 | { 64 | QList list; 65 | for (const auto &t: m_pimpl->recipientAddress()) 66 | list.append(QString::fromStdString(t)); 67 | return list; 68 | } 69 | 70 | bool UnsignedTransaction::sign(const QString &fileName) const 71 | { 72 | if(!m_pimpl->sign(fileName.toStdString())) 73 | return false; 74 | // export key images 75 | return m_walletImpl->exportKeyImages(fileName.toStdString() + "_keyImages"); 76 | } 77 | 78 | void UnsignedTransaction::setFilename(const QString &fileName) 79 | { 80 | m_fileName = fileName; 81 | } 82 | 83 | UnsignedTransaction::UnsignedTransaction(Torque::UnsignedTransaction *pt, Torque::Wallet *walletImpl, QObject *parent) 84 | : QObject(parent), m_pimpl(pt), m_walletImpl(walletImpl) 85 | { 86 | 87 | } 88 | 89 | UnsignedTransaction::~UnsignedTransaction() 90 | { 91 | delete m_pimpl; 92 | } 93 | -------------------------------------------------------------------------------- /src/libwalletqt/UnsignedTransaction.h: -------------------------------------------------------------------------------- 1 | #ifndef UNSIGNEDTRANSACTION_H 2 | #define UNSIGNEDTRANSACTION_H 3 | 4 | #include 5 | 6 | #include 7 | 8 | class UnsignedTransaction : public QObject 9 | { 10 | Q_OBJECT 11 | Q_PROPERTY(Status status READ status) 12 | Q_PROPERTY(QString errorString READ errorString) 13 | // Q_PROPERTY(QList amount READ amount) 14 | // Q_PROPERTY(QList fee READ fee) 15 | Q_PROPERTY(quint64 txCount READ txCount) 16 | Q_PROPERTY(QString confirmationMessage READ confirmationMessage) 17 | Q_PROPERTY(QStringList recipientAddress READ recipientAddress) 18 | Q_PROPERTY(QStringList paymentId READ paymentId) 19 | Q_PROPERTY(quint64 minMixinCount READ minMixinCount) 20 | 21 | public: 22 | enum Status { 23 | Status_Ok = Torque::UnsignedTransaction::Status_Ok, 24 | Status_Error = Torque::UnsignedTransaction::Status_Error, 25 | Status_Critical = Torque::UnsignedTransaction::Status_Critical 26 | }; 27 | Q_ENUM(Status) 28 | 29 | Status status() const; 30 | QString errorString() const; 31 | Q_INVOKABLE quint64 amount(int index) const; 32 | Q_INVOKABLE quint64 fee(int index) const; 33 | Q_INVOKABLE quint64 mixin(int index) const; 34 | QStringList recipientAddress() const; 35 | QStringList paymentId() const; 36 | quint64 txCount() const; 37 | QString confirmationMessage() const; 38 | quint64 minMixinCount() const; 39 | Q_INVOKABLE bool sign(const QString &fileName) const; 40 | Q_INVOKABLE void setFilename(const QString &fileName); 41 | 42 | private: 43 | explicit UnsignedTransaction(Torque::UnsignedTransaction * pt, Torque::Wallet *walletImpl, QObject *parent = 0); 44 | ~UnsignedTransaction(); 45 | private: 46 | friend class Wallet; 47 | Torque::UnsignedTransaction * m_pimpl; 48 | QString m_fileName; 49 | Torque::Wallet * m_walletImpl; 50 | }; 51 | 52 | #endif // UNSIGNEDTRANSACTION_H 53 | -------------------------------------------------------------------------------- /src/model/AddressBookModel.cpp: -------------------------------------------------------------------------------- 1 | #include "AddressBookModel.h" 2 | #include "AddressBook.h" 3 | #include 4 | #include 5 | #include 6 | 7 | AddressBookModel::AddressBookModel(QObject *parent, AddressBook *addressBook) 8 | : QAbstractListModel(parent) , m_addressBook(addressBook) 9 | { 10 | qDebug(__FUNCTION__); 11 | connect(m_addressBook,SIGNAL(refreshStarted()),this,SLOT(startReset())); 12 | connect(m_addressBook,SIGNAL(refreshFinished()),this,SLOT(endReset())); 13 | 14 | } 15 | 16 | void AddressBookModel::startReset(){ 17 | qDebug(__FUNCTION__); 18 | beginResetModel(); 19 | } 20 | void AddressBookModel::endReset(){ 21 | qDebug(__FUNCTION__); 22 | endResetModel(); 23 | } 24 | 25 | int AddressBookModel::rowCount(const QModelIndex &parent) const 26 | { 27 | return m_addressBook->count(); 28 | } 29 | 30 | QVariant AddressBookModel::data(const QModelIndex &index, int role) const 31 | { 32 | if (!index.isValid()) 33 | return QVariant(); 34 | 35 | if (index.row() < 0 || (unsigned)index.row() >= m_addressBook->count()) { 36 | return QVariant(); 37 | } 38 | 39 | Torque::AddressBookRow * ar = m_addressBook->getRow(index.row()); 40 | 41 | QVariant result = ""; 42 | switch (role) { 43 | case AddressBookAddressRole: 44 | result = QString::fromStdString(ar->getAddress()); 45 | break; 46 | case AddressBookDescriptionRole: 47 | result = QString::fromStdString(ar->getDescription()); 48 | break; 49 | case AddressBookPaymentIdRole: 50 | result = QString::fromStdString(ar->getPaymentId()); 51 | break; 52 | case AddressBookRowIdRole: 53 | // Qt doesnt support size_t overload type casting 54 | result.setValue(ar->getRowId()); 55 | break; 56 | } 57 | 58 | return result; 59 | } 60 | 61 | bool AddressBookModel::deleteRow(int row) 62 | { 63 | return m_addressBook->deleteRow(row); 64 | } 65 | 66 | int AddressBookModel::lookupPaymentID(const QString &payment_id) const 67 | { 68 | return m_addressBook->lookupPaymentID(payment_id); 69 | } 70 | 71 | QHash AddressBookModel::roleNames() const 72 | { 73 | QHash roleNames = QAbstractListModel::roleNames(); 74 | roleNames.insert(AddressBookAddressRole, "address"); 75 | roleNames.insert(AddressBookPaymentIdRole, "paymentId"); 76 | roleNames.insert(AddressBookDescriptionRole, "description"); 77 | roleNames.insert(AddressBookRowIdRole, "rowId"); 78 | 79 | 80 | return roleNames; 81 | } 82 | -------------------------------------------------------------------------------- /src/model/AddressBookModel.h: -------------------------------------------------------------------------------- 1 | #ifndef ADDRESSBOOKMODEL_H 2 | #define ADDRESSBOOKMODEL_H 3 | 4 | #include 5 | 6 | class AddressBook; 7 | 8 | class AddressBookModel : public QAbstractListModel 9 | { 10 | Q_OBJECT 11 | 12 | public: 13 | enum AddressBookRowRole { 14 | AddressBookRole = Qt::UserRole + 1, // for the AddressBookRow object; 15 | AddressBookAddressRole, 16 | AddressBookDescriptionRole, 17 | AddressBookPaymentIdRole, 18 | AddressBookRowIdRole, 19 | }; 20 | Q_ENUM(AddressBookRowRole) 21 | 22 | AddressBookModel(QObject *parent, AddressBook * addressBook); 23 | 24 | int rowCount(const QModelIndex &parent = QModelIndex()) const override; 25 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; 26 | Q_INVOKABLE bool deleteRow(int row); 27 | Q_INVOKABLE int lookupPaymentID(const QString &payment_id) const; 28 | virtual QHash roleNames() const override; 29 | 30 | public slots: 31 | void startReset(); 32 | void endReset(); 33 | 34 | private: 35 | AddressBook * m_addressBook; 36 | }; 37 | 38 | #endif // ADDRESSBOOKMODEL_H 39 | -------------------------------------------------------------------------------- /src/model/SubaddressModel.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2018, The Monero Project 2 | // 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without modification, are 6 | // permitted provided that the following conditions are met: 7 | // 8 | // 1. Redistributions of source code must retain the above copyright notice, this list of 9 | // conditions and the following disclaimer. 10 | // 11 | // 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 | // of conditions and the following disclaimer in the documentation and/or other 13 | // materials provided with the distribution. 14 | // 15 | // 3. Neither the name of the copyright holder nor the names of its contributors may be 16 | // used to endorse or promote products derived from this software without specific 17 | // prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 | // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 21 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 22 | // THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 26 | // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 27 | // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | #include "SubaddressModel.h" 30 | #include "Subaddress.h" 31 | #include 32 | #include 33 | #include 34 | 35 | SubaddressModel::SubaddressModel(QObject *parent, Subaddress *subaddress) 36 | : QAbstractListModel(parent), m_subaddress(subaddress) 37 | { 38 | qDebug(__FUNCTION__); 39 | connect(m_subaddress,SIGNAL(refreshStarted()),this,SLOT(startReset())); 40 | connect(m_subaddress,SIGNAL(refreshFinished()),this,SLOT(endReset())); 41 | 42 | } 43 | 44 | void SubaddressModel::startReset(){ 45 | qDebug(__FUNCTION__); 46 | beginResetModel(); 47 | } 48 | void SubaddressModel::endReset(){ 49 | qDebug(__FUNCTION__); 50 | endResetModel(); 51 | } 52 | 53 | int SubaddressModel::rowCount(const QModelIndex &parent) const 54 | { 55 | return m_subaddress->count(); 56 | } 57 | 58 | QVariant SubaddressModel::data(const QModelIndex &index, int role) const 59 | { 60 | if (!index.isValid() || index.row() < 0 || (unsigned)index.row() >= m_subaddress->count()) 61 | return {}; 62 | 63 | Torque::SubaddressRow * sr = m_subaddress->getRow(index.row()); 64 | if (!sr) 65 | return {}; 66 | 67 | QVariant result = ""; 68 | switch (role) { 69 | case SubaddressAddressRole: 70 | result = QString::fromStdString(sr->getAddress()); 71 | break; 72 | case SubaddressLabelRole: 73 | result = index.row() == 0 ? tr("Primary address") : QString::fromStdString(sr->getLabel()); 74 | break; 75 | } 76 | 77 | return result; 78 | } 79 | 80 | QHash SubaddressModel::roleNames() const 81 | { 82 | static QHash roleNames; 83 | if (roleNames.empty()) 84 | { 85 | roleNames.insert(SubaddressAddressRole, "address"); 86 | roleNames.insert(SubaddressLabelRole, "label"); 87 | } 88 | return roleNames; 89 | } 90 | -------------------------------------------------------------------------------- /src/model/SubaddressModel.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2018, The Monero Project 2 | // 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without modification, are 6 | // permitted provided that the following conditions are met: 7 | // 8 | // 1. Redistributions of source code must retain the above copyright notice, this list of 9 | // conditions and the following disclaimer. 10 | // 11 | // 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 | // of conditions and the following disclaimer in the documentation and/or other 13 | // materials provided with the distribution. 14 | // 15 | // 3. Neither the name of the copyright holder nor the names of its contributors may be 16 | // used to endorse or promote products derived from this software without specific 17 | // prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 | // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 21 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 22 | // THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 26 | // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 27 | // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | #ifndef SUBADDRESSMODEL_H 30 | #define SUBADDRESSMODEL_H 31 | 32 | #include 33 | 34 | class Subaddress; 35 | 36 | class SubaddressModel : public QAbstractListModel 37 | { 38 | Q_OBJECT 39 | 40 | public: 41 | enum SubaddressRowRole { 42 | SubaddressRole = Qt::UserRole + 1, // for the SubaddressRow object; 43 | SubaddressAddressRole, 44 | SubaddressLabelRole, 45 | }; 46 | Q_ENUM(SubaddressRowRole) 47 | 48 | SubaddressModel(QObject *parent, Subaddress *subaddress); 49 | 50 | int rowCount(const QModelIndex &parent = QModelIndex()) const override; 51 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; 52 | QHash roleNames() const override; 53 | 54 | public slots: 55 | void startReset(); 56 | void endReset(); 57 | 58 | private: 59 | Subaddress *m_subaddress; 60 | }; 61 | 62 | #endif // SUBADDRESSMODEL_H 63 | -------------------------------------------------------------------------------- /src/model/TransactionHistoryModel.h: -------------------------------------------------------------------------------- 1 | #ifndef TRANSACTIONHISTORYMODEL_H 2 | #define TRANSACTIONHISTORYMODEL_H 3 | 4 | #include 5 | 6 | class TransactionHistory; 7 | class TransactionInfo; 8 | 9 | /** 10 | * @brief The TransactionHistoryModel class - read-only list model for Transaction History 11 | */ 12 | 13 | class TransactionHistoryModel : public QAbstractListModel 14 | { 15 | Q_OBJECT 16 | Q_PROPERTY(TransactionHistory * transactionHistory READ transactionHistory WRITE setTransactionHistory NOTIFY transactionHistoryChanged) 17 | 18 | public: 19 | enum TransactionInfoRole { 20 | TransactionRole = Qt::UserRole + 1, // for the TransactionInfo object; 21 | TransactionDirectionRole, 22 | TransactionPendingRole, 23 | TransactionFailedRole, 24 | TransactionAmountRole, 25 | TransactionDisplayAmountRole, 26 | TransactionFeeRole, 27 | TransactionBlockHeightRole, 28 | TransactionSubaddrIndexRole, 29 | TransactionSubaddrAccountRole, 30 | TransactionLabelRole, 31 | TransactionConfirmationsRole, 32 | TransactionConfirmationsRequiredRole, 33 | TransactionHashRole, 34 | TransactionTimeStampRole, 35 | TransactionPaymentIdRole, 36 | // extra role (alias) for TransactionDirectionRole (as UI currently wants just boolean "out") 37 | TransactionIsOutRole, 38 | // extra roles for date and time (as UI wants date and time separately) 39 | TransactionDateRole, 40 | TransactionTimeRole, 41 | TransactionAtomicAmountRole, 42 | // only for outgoing 43 | TransactionDestinationsRole 44 | }; 45 | Q_ENUM(TransactionInfoRole) 46 | 47 | TransactionHistoryModel(QObject * parent = 0); 48 | void setTransactionHistory(TransactionHistory * th); 49 | TransactionHistory * transactionHistory() const; 50 | /** 51 | * @brief dateFrom - returns firstmost transaction datetime 52 | * @return 53 | */ 54 | QDateTime firstDateTime() const; 55 | 56 | /** 57 | * @brief dateTo - returns lastmost transaction datetime 58 | * @return 59 | */ 60 | QDateTime lastDateTime() const; 61 | 62 | 63 | 64 | /// QAbstractListModel 65 | virtual QVariant data(const QModelIndex & index, int role = Qt::DisplayRole) const override; 66 | virtual int rowCount(const QModelIndex & parent = QModelIndex()) const override; 67 | virtual QHash roleNames() const override; 68 | 69 | signals: 70 | void transactionHistoryChanged(); 71 | 72 | private: 73 | TransactionHistory * m_transactionHistory; 74 | }; 75 | 76 | #endif // TRANSACTIONHISTORYMODEL_H 77 | -------------------------------------------------------------------------------- /src/model/TransactionHistorySortFilterModel.h: -------------------------------------------------------------------------------- 1 | #ifndef TRANSACTIONHISTORYSORTFILTERMODEL_H 2 | #define TRANSACTIONHISTORYSORTFILTERMODEL_H 3 | 4 | #include "TransactionInfo.h" 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | 12 | class TransactionHistory; 13 | 14 | class TransactionHistorySortFilterModel: public QSortFilterProxyModel 15 | { 16 | Q_OBJECT 17 | Q_PROPERTY(QString searchFilter READ searchFilter WRITE setSearchFilter NOTIFY searchFilterChanged) 18 | Q_PROPERTY(QString paymentIdFilter READ paymentIdFilter WRITE setPaymentIdFilter NOTIFY paymentIdFilterChanged) 19 | Q_PROPERTY(QDate dateFromFilter READ dateFromFilter WRITE setDateFromFilter NOTIFY dateFromFilterChanged) 20 | Q_PROPERTY(QDate dateToFilter READ dateToFilter WRITE setDateToFilter NOTIFY dateToFilterChanged) 21 | Q_PROPERTY(double amountFromFilter READ amountFromFilter WRITE setAmountFromFilter NOTIFY amountFromFilterChanged) 22 | Q_PROPERTY(double amountToFilter READ amountToFilter WRITE setAmountToFilter NOTIFY amountToFilterChanged) 23 | Q_PROPERTY(int directionFilter READ directionFilter WRITE setDirectionFilter NOTIFY directionFilterChanged) 24 | 25 | Q_PROPERTY(TransactionHistory * transactionHistory READ transactionHistory) 26 | 27 | public: 28 | TransactionHistorySortFilterModel(QObject * parent = nullptr); 29 | //! filtering by string search 30 | QString searchFilter() const; 31 | void setSearchFilter(const QString &arg); 32 | 33 | //! filtering by payment id 34 | QString paymentIdFilter() const; 35 | void setPaymentIdFilter(const QString &arg); 36 | 37 | //! filtering by date (lower bound) 38 | QDate dateFromFilter() const; 39 | void setDateFromFilter(const QDate &date); 40 | 41 | //! filtering by to date (upper bound) 42 | QDate dateToFilter() const; 43 | void setDateToFilter(const QDate &date); 44 | 45 | //! filtering by amount (lower bound) 46 | double amountFromFilter() const; 47 | void setAmountFromFilter(double value); 48 | 49 | //! filtering by amount (upper bound) 50 | double amountToFilter() const; 51 | void setAmountToFilter(double value); 52 | 53 | //! filtering by direction 54 | int directionFilter() const; 55 | void setDirectionFilter(int value); 56 | 57 | Q_INVOKABLE void sort(int column, Qt::SortOrder order); 58 | TransactionHistory * transactionHistory() const; 59 | 60 | signals: 61 | void searchFilterChanged(); 62 | void paymentIdFilterChanged(); 63 | void dateFromFilterChanged(); 64 | void dateToFilterChanged(); 65 | void amountFromFilterChanged(); 66 | void amountToFilterChanged(); 67 | void directionFilterChanged(); 68 | 69 | protected: 70 | // QSortFilterProxyModel overrides 71 | virtual bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const; 72 | virtual bool lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const; 73 | 74 | 75 | private: 76 | enum ScopeIndex { 77 | From = 0, 78 | To = 1 79 | }; 80 | 81 | private: 82 | QMap m_filterValues; 83 | QString m_searchString; 84 | }; 85 | 86 | #endif // TRANSACTIONHISTORYSORTFILTERMODEL_H 87 | -------------------------------------------------------------------------------- /src/zxcvbn-c/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.ko 3 | *.obj 4 | *.elf 5 | *.gch 6 | *.pch 7 | *.lib 8 | *.a 9 | *.la 10 | *.lo 11 | *.dll 12 | *.so 13 | *.so.* 14 | *.dylib 15 | *.exe 16 | *.out 17 | *.app 18 | *.i*86 19 | *.x86_64 20 | *.hex 21 | test.cpp 22 | zxcvbn.cpp 23 | zxcvbn.dict 24 | test-*file 25 | test-*line 26 | test-*lib 27 | dictgen 28 | dict-*.h 29 | -------------------------------------------------------------------------------- /src/zxcvbn-c/testcases.txt: -------------------------------------------------------------------------------- 1 | zxcvbn 5.83 2 | qwER43@! 26.44 3 | Tr0ub4dour&3 30.87 4 | archi 13.61 5 | 6 | D0g.................. 19.02 7 | abcdefghijk987654321 8.53 8 | neverforget13/3/1997 34.86 9 | 1qaz2wsx3edc 9.98 10 | barbarbara 12.43 11 | abarbarbara 16.18 12 | 13 | temppass22 17.20 14 | briansmith 5.32 15 | htimsnairb 6.07 16 | briansmith4mayor 21.63 17 | password1 4.0 18 | viking 7.93 19 | thx1138 7.70 20 | ScoRpi0ns 19.54 21 | do you know 25.51 22 | 23 | ryanhunter2000 20.8 24 | rianhunter2000 28.25 25 | 26 | asdfghju7654rewq 29.57 27 | AOEUIDHG&*()LS_ 33.33 28 | 29 | 12345678 1.59 30 | defghi6789 13.61 31 | 02468 3.32 32 | adgjmpsvy 4.17 33 | 34 | rosebud 8.09 35 | Rosebud 9.09 36 | ROSEBUD 9.09 37 | rosebuD 9.09 38 | R0$38uD 12.09 39 | ros3bud99 14.41 40 | r0s3bud99 14.41 41 | R0$38uD99 17.41 42 | 43 | verlineVANDERMARK 27.24 44 | 45 | eheuczkqyq 41.24 46 | rWibMFACxAUGZmxhVncy 111.0 47 | 48 | illness 11.26 49 | 1llness 12.26 50 | i1lness 12.84 51 | 11lness 22.44 52 | ssenl1i 12.84 53 | Ba9ZyWABu99[BK#6MBgbH88Tofv)vs$w 171.63 54 | correcthorsebatterystaple 47.98 55 | elpatsyrettabesrohtcerroc 48.98 56 | coRrecth0rseba++ery9.23.2007staple$ 71.95 57 | 58 | pass.word.pass.word.pass.word. 60.41 59 | passpasswordword 17.28 60 | quvpzquvpz 24.50 61 | 62 | magicfavoriteunclepromisedpublicbotherislandjimseriouslycellleadknowingbrokenadvicesomehowpaidblairlosingpushhelpedkillingusuallyearlierbosslaurabeginninglikedinnocentdocruleselizabethsabrinasummerexcoplearnedthirtyrisklettingphillipspeakingofficerridiculoussupportafternoonericwithsobutallwellareheohaboutrightyou're 545.9 63 | -------------------------------------------------------------------------------- /src/zxcvbn-c/zxcvbn.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/scala-network/TorqueGUI/710af27ef5ae476af89d3237f786e0be3407b170/src/zxcvbn-c/zxcvbn.c -------------------------------------------------------------------------------- /start-low-graphics-mode.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set QMLSCENE_DEVICE=softwarecontext 4 | 5 | start /b torque-wallet-gui.exe 6 | -------------------------------------------------------------------------------- /tabs/tweetSearch.js: -------------------------------------------------------------------------------- 1 | .pragma library 2 | 3 | function formatDate(date) { 4 | var da = new Date(date) 5 | return da.toDateString() 6 | } 7 | 8 | function demoToken() { 9 | var a = new Array(22).join('A') 10 | return a + String.fromCharCode(0x44, 0x69, 0x4a, 0x52, 0x51, 0x41, 0x41, 0x41, 0x41, 11 | 0x41, 0x41, 0x74, 0x2b, 0x72, 0x6a, 0x6c, 0x2b, 0x71, 12 | 0x6d, 0x7a, 0x30, 0x72, 0x63, 0x79, 0x2b, 0x42, 0x62, 13 | 0x75, 0x58, 0x42, 0x42, 0x73, 0x72, 0x55, 0x48, 0x47, 14 | 0x45, 0x67, 0x3d, 0x71, 0x30, 0x45, 0x4b, 0x32, 0x61, 15 | 0x57, 0x71, 0x51, 0x4d, 0x62, 0x31, 0x35, 0x67, 0x43, 16 | 0x5a, 0x4e, 0x77, 0x5a, 0x6f, 0x39, 0x79, 0x71, 0x61, 17 | 0x65, 0x30, 0x68, 0x70, 0x65, 0x32, 0x46, 0x44, 0x73, 18 | 0x53, 0x39, 0x32, 0x57, 0x41, 0x75, 0x30, 0x67) 19 | } 20 | 21 | function linkForEntity(entity) { 22 | return (entity.url ? entity.url : 23 | (entity.screen_name ? 'https://twitter.com/' + entity.screen_name : 24 | 'https://twitter.com/search?q=%23' + entity.text)) 25 | } 26 | 27 | function textForEntity(entity) { 28 | return (entity.display_url ? entity.display_url : 29 | (entity.screen_name ? entity.screen_name : entity.text)) 30 | } 31 | 32 | function insertLinks(text, entities) { 33 | if (typeof text !== 'string') 34 | return ""; 35 | 36 | if (!entities) 37 | return text; 38 | 39 | // Add all links (urls, usernames and hashtags) to an array and sort them in 40 | // descending order of appearance in text 41 | var links = [] 42 | if (entities.urls) 43 | links = entities.urls.concat(entities.hashtags, entities.user_mentions) 44 | else if (entities.url) 45 | links = entities.url.urls 46 | 47 | links.sort(function(a, b) { return b.indices[0] - a.indices[0] }) 48 | 49 | for (var i = 0; i < links.length; i++) { 50 | var offset = links[i].url ? 0 : 1 51 | text = text.substring(0, links[i].indices[0] + offset) + 52 | '' + 53 | textForEntity(links[i]) + '' + 54 | text.substring(links[i].indices[1]) 55 | } 56 | return text.replace(/\n/g, '
'); 57 | } 58 | 59 | function boldLinks(text, entities) { 60 | if (typeof text !== 'string') 61 | return ""; 62 | 63 | if (!entities) 64 | return text; 65 | 66 | // Add all links (urls, usernames and hashtags) to an array and sort them in 67 | // descending order of appearance in text 68 | var links = [] 69 | if (entities.urls) 70 | links = entities.urls.concat(entities.hashtags, entities.user_mentions) 71 | else if (entities.url) 72 | links = entities.url.urls 73 | 74 | links.sort(function(a, b) { return b.indices[0] - a.indices[0] }) 75 | 76 | for (var i = 0; i < links.length; i++) { 77 | var offset = links[i].url ? 0 : 1 78 | text = text.substring(0, links[i].indices[0] + offset) + 79 | '' + textForEntity(links[i]) + '' + 80 | text.substring(links[i].indices[1]) 81 | } 82 | return text.replace(/\n/g, '
'); 83 | } 84 | -------------------------------------------------------------------------------- /torque-core.rc: -------------------------------------------------------------------------------- 1 | IDI_ICON1 ICON DISCARDABLE "images/appicon.ico" 2 | -------------------------------------------------------------------------------- /utils.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | function get_platform { 5 | local platform="unknown" 6 | if [ "$(uname)" == "Darwin" ]; then 7 | platform="darwin" 8 | elif [ "$(uname)" == "FreeBSD" ]; then 9 | platform="freebsd" 10 | elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then 11 | if [ "$(expr substr $(uname -m) 1 6)" == "x86_64" ]; then 12 | platform="linux64" 13 | elif [ "$(expr substr $(uname -m) 1 4)" == "i686" ]; then 14 | platform="linux32" 15 | elif [ "$(expr substr $(uname -m) 1 6)" == "armv7l" ]; then 16 | platform="linuxarmv7" 17 | elif [ "$(expr substr $(uname -m) 1 7)" == "aarch64" ]; then 18 | platform="linuxarmv8" 19 | else 20 | platform="linux" 21 | fi 22 | elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW64_NT" ]; then 23 | platform="mingw64" 24 | elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW32_NT" ]; then 25 | platform="mingw32" 26 | fi 27 | echo "$platform" 28 | 29 | } 30 | 31 | 32 | function get_tag() 33 | { 34 | COMMIT=$(git rev-parse --short HEAD | sed -e 's/[\t ]*//') 35 | if test $? -ne 0 36 | then 37 | echo "Cannot determine current commit. Make sure that you are building either from a Git working tree or from a source archive." 38 | VERSIONTAG="unknown" 39 | else 40 | echo "You are currently on commit ${COMMIT}" 41 | TAGGEDCOMMIT=$(git rev-list --tags --max-count=1 --abbrev-commit | sed -e 's/[\t ]*//') 42 | if test -z "$TAGGEDCOMMIT" 43 | then 44 | echo "Cannot determine most recent tag. Make sure that you are building either from a Git working tree or from a source archive." 45 | VERSIONTAG=$COMMIT 46 | else 47 | echo "The most recent tag was at ${TAGGEDCOMMIT}" 48 | if test "$TAGGEDCOMMIT" = "$COMMIT" 49 | then 50 | echo "You are building a tagged release" 51 | VERSIONTAG="release" 52 | else 53 | echo "You are ahead of or behind a tagged release" 54 | VERSIONTAG="$COMMIT" 55 | fi 56 | # save tag name + commit if availible 57 | TAGNAME=$(git describe --tags | sed -e 's/[\t ]*//') 58 | if test -z "$TAGNAME" 59 | then 60 | TAGNAME="$VERSIONTAG" 61 | fi 62 | fi 63 | fi 64 | } 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /windeploy_helper.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 4 | source $ROOT_DIR/utils.sh 5 | 6 | 7 | TARGET=$1 8 | 9 | BUILD_TYPE=$2 10 | 11 | 12 | 13 | 14 | if [[ -z $BUILD_TYPE ]]; then 15 | BUILD_TYPE=Release 16 | fi 17 | 18 | if [[ "$BUILD_TYPE" == "Release" ]]; then 19 | echo "Release build" 20 | ICU_FILES=(zlib1.dll libwinpthread-1.dll libtiff-5.dll libstdc++-6.dll libpng16-16.dll libpcre16-0.dll libpcre-1.dll libmng-2.dll liblzma-5.dll liblcms2-2.dll libjpeg-8.dll libintl-8.dll libiconv-2.dll libharfbuzz-0.dll libgraphite2.dll libglib-2.0-0.dll libfreetype-6.dll libbz2-1.dll libssp-0.dll libpcre2-16-0.dll libhidapi-0.dll libicuin62.dll libicuuc62.dll libicudt62.dll) 21 | else 22 | echo "Debug build" 23 | ICU_FILES=(libicudtd61.dll libicuind61.dll libicuiod61.dll libicutud61.dll libicuucd61.dll) 24 | fi 25 | 26 | FILES=(zlib1.dll libwinpthread-1.dll libtiff-5.dll libstdc++-6.dll libpng16-16.dll libpcre16-0.dll libpcre-1.dll libmng-2.dll liblzma-5.dll liblcms2-2.dll libjpeg-8.dll libintl-8.dll libiconv-2.dll libharfbuzz-0.dll libgraphite2.dll libglib-2.0-0.dll libfreetype-6.dll libbz2-1.dll libssp-0.dll libpcre2-16-0.dll libhidapi-0.dll) 27 | 28 | platform=$(get_platform) 29 | 30 | if [[ "$platform" == "mingw64" ]]; then 31 | PLATFORM_FILES="libgcc_s_seh-1.dll" 32 | elif [[ "$platform" == "mingw32" ]]; then 33 | PLATFORM_FILES="libgcc_s_dw2-1.dll" 34 | fi 35 | 36 | for f in "${FILES[@]}"; do cp $MSYSTEM_PREFIX/bin/$f $TARGET || exit 1; done 37 | 38 | for f in "${ICU_FILES[@]}"; do cp $MSYSTEM_PREFIX/bin/$f $TARGET || exit 1; done 39 | 40 | for f in "${PLATFORM_FILES[@]}"; do cp $MSYSTEM_PREFIX/bin/$f $TARGET || exit 1; done 41 | 42 | cp $ROOT_DIR/start-low-graphics-mode.bat $TARGET 43 | -------------------------------------------------------------------------------- /wizard/WizardCreateViewOnlyWallet.qml: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2018, The Monero Project 2 | // 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without modification, are 6 | // permitted provided that the following conditions are met: 7 | // 8 | // 1. Redistributions of source code must retain the above copyright notice, this list of 9 | // conditions and the following disclaimer. 10 | // 11 | // 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 | // of conditions and the following disclaimer in the documentation and/or other 13 | // materials provided with the distribution. 14 | // 15 | // 3. Neither the name of the copyright holder nor the names of its contributors may be 16 | // used to endorse or promote products derived from this software without specific 17 | // prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 | // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 21 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 22 | // THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 26 | // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 27 | // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | import moneroComponents.WalletManager 1.0 30 | import QtQuick 2.2 31 | import QtQuick.Layouts 1.1 32 | import "../components" 33 | import "utils.js" as Utils 34 | 35 | ColumnLayout { 36 | 37 | id: passwordPage 38 | opacity: 0 39 | visible: false 40 | 41 | Behavior on opacity { 42 | NumberAnimation { duration: 100; easing.type: Easing.InQuad } 43 | } 44 | 45 | onOpacityChanged: visible = opacity !== 0 46 | 47 | 48 | function onPageOpened(settingsObject) { 49 | wizard.nextButton.enabled = true 50 | wizard.nextButton.visible = true 51 | } 52 | 53 | function onPageClosed(settingsObject) { 54 | var walletFullPath = wizard.createWalletPath(uiItem.walletPath,uiItem.accountNameText); 55 | settingsObject['view_only_wallet_path'] = walletFullPath 56 | console.log("wallet path", walletFullPath) 57 | return wizard.walletPathValid(walletFullPath); 58 | } 59 | 60 | ListModel { 61 | id: dotsModel 62 | ListElement { dotColor: "#36B05B" } 63 | ListElement { dotColor: "#DBDBDB" } 64 | } 65 | 66 | WizardManageWalletUI { 67 | id: uiItem 68 | titleText: qsTr("Create view only wallet") + translationManager.emptyString 69 | wordsTextItem.visible: false 70 | restoreHeightVisible:false 71 | walletName: appWindow.walletName + "-viewonly" 72 | progressDotsModel: dotsModel 73 | recoverMode: false 74 | } 75 | 76 | Component.onCompleted: { 77 | //parent.wizardRestarted.connect(onWizardRestarted) 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /wizard/WizardPasswordInput.qml: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2018, The Monero Project 2 | // 3 | // All rights reserved. 4 | // 5 | // Redistribution and use in source and binary forms, with or without modification, are 6 | // permitted provided that the following conditions are met: 7 | // 8 | // 1. Redistributions of source code must retain the above copyright notice, this list of 9 | // conditions and the following disclaimer. 10 | // 11 | // 2. Redistributions in binary form must reproduce the above copyright notice, this list 12 | // of conditions and the following disclaimer in the documentation and/or other 13 | // materials provided with the distribution. 14 | // 15 | // 3. Neither the name of the copyright holder nor the names of its contributors may be 16 | // used to endorse or promote products derived from this software without specific 17 | // prior written permission. 18 | // 19 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 20 | // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 21 | // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 22 | // THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 23 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 24 | // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25 | // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 26 | // STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 27 | // THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | 29 | import QtQuick 2.0 30 | import QtQuick.Controls 1.4 31 | import QtQuick.Controls.Styles 1.4 32 | import QtQuick.Layouts 1.1 33 | 34 | ColumnLayout { 35 | property alias password: password.text 36 | property alias placeholderText: password.placeholderText 37 | signal changed(string password) 38 | 39 | 40 | TextField { 41 | Layout.fillWidth: true 42 | id : password 43 | focus:true 44 | font.family: "Arial" 45 | font.pixelSize: (isMobile) ? 25 * scaleRatio : 26 * scaleRatio 46 | echoMode: TextInput.Password 47 | style: TextFieldStyle { 48 | renderType: Text.NativeRendering 49 | textColor: "#35B05A" 50 | passwordCharacter: "•" 51 | background: Rectangle { 52 | radius: 0 53 | border.width: 0 54 | } 55 | } 56 | onTextChanged: changed(text) 57 | 58 | Keys.onReleased: { 59 | changed(text) 60 | } 61 | } 62 | 63 | Rectangle { 64 | Layout.fillWidth:true 65 | height: 1 66 | color: "#DBDBDB" 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /wizard/utils.js: -------------------------------------------------------------------------------- 1 | .pragma library 2 | 3 | function mapScope (inputScopeFrom, inputScopeTo, outputScopeFrom, outputScopeTo, value) { 4 | var x = (value - inputScopeFrom) / (inputScopeTo - inputScopeFrom); 5 | var result = outputScopeFrom + ((outputScopeTo - outputScopeFrom) * x); 6 | return result; 7 | } 8 | 9 | 10 | function tr(text) { 11 | return qsTr(text) + translationManager.emptyString 12 | } 13 | 14 | 15 | function lineBreaksToSpaces(text) { 16 | return text.trim().replace(/(\r\n|\n|\r)/gm, " "); 17 | } 18 | 19 | function usefulName(path) { 20 | // arbitrary "short enough" limit 21 | if (path.length < 32) 22 | return path 23 | return path.replace(/.*[\/\\]/, '').replace(/\.keys$/, '') 24 | } 25 | --------------------------------------------------------------------------------