├── .github └── workflows │ └── build.yml ├── .gitignore ├── .gitmodules ├── CMakeLists.txt ├── LICENSE ├── LeftPanel.qml ├── Makefile ├── MiddlePanel.qml ├── README.md ├── android ├── README.md └── docker │ ├── Dockerfile │ ├── android.mk.patch │ └── androiddeployqt.patch ├── bittube-wallet-gui.pro ├── build.sh ├── cmake ├── 32-bit-toolchain.cmake ├── 64-bit-toolchain.cmake ├── CheckLinkerFlag.c ├── CheckLinkerFlag.cmake ├── CheckTrezor.cmake ├── Doxyfile.in ├── Doxygen.extra.css.in ├── FindBacktrace.cmake ├── FindBerkeleyDB.cmake ├── FindHIDAPI.cmake ├── FindLibUSB.cmake ├── FindLibunwind.cmake ├── FindMiniupnpc.cmake ├── FindReadline.cmake ├── FindUnbound.cmake ├── FindZBar0.cmake ├── GenVersion.cmake ├── GenVersionGui.cmake ├── Version.cmake ├── VersionGui.cmake ├── test-libusb-version.c ├── test-protobuf.cpp ├── test-protobuf.proto ├── test-static-assert.c └── test-static-assert.cpp ├── components ├── CMakeLists.txt ├── CheckBox.qml ├── CheckBox2.qml ├── ContextMenu.qml ├── ContextMenuItem.qml ├── DaemonManagerDialog.qml ├── DatePicker.qml ├── IconButton.qml ├── InlineButton.qml ├── Input.qml ├── InputDialog.qml ├── InputMulti.qml ├── Label.qml ├── LabelButton.qml ├── LabelSubheader.qml ├── LanguageSidebar.qml ├── LineEdit.qml ├── LineEditMulti.qml ├── MenuButton.qml ├── MenuButtonDivider.qml ├── NetworkStatusItem.qml ├── PasswordDialog.qml ├── ProcessingSplash.qml ├── ProgressBar.qml ├── QRCodeScanner.qml ├── RadioButton.qml ├── RemoteNodeEdit.qml ├── SettingsListItem.qml ├── StandardButton.qml ├── StandardDialog.qml ├── StandardDropdown.qml ├── Style.qml ├── TextBlock.qml ├── TextPlain.qml ├── TextPlainArea.qml ├── TipItem.qml ├── TitleBar.qml ├── UpdateDialog.qml ├── WarningBox.qml ├── effects │ ├── ColorTransition.qml │ ├── GradientBackground.qml │ └── ImageMask.qml └── qmldir ├── deployment.pri ├── fonts ├── CMakeLists.txt ├── FontAwesome │ ├── FontAwesome.qml │ ├── Object.qml │ ├── fa-brands-400.ttf │ ├── fa-regular-400.ttf │ ├── fa-solid-900.ttf │ └── qmldir ├── LICENSE.txt ├── Roboto-Bold.ttf ├── Roboto-Light.ttf ├── Roboto-Medium.ttf ├── Roboto-Regular.ttf ├── RobotoMono-Bold.ttf ├── RobotoMono-Light.ttf ├── RobotoMono-Medium.ttf └── RobotoMono-Regular.ttf ├── get_libwallet_api.sh ├── images ├── CMakeLists.txt ├── appicon.icns ├── appicon.ico ├── appicons │ ├── 128x128.png │ ├── 16x16.png │ ├── 24x24.png │ ├── 256x256.png │ ├── 32x32.png │ ├── 48x48.png │ ├── 64x64.png │ └── 96x96.png ├── arrow-right-in-circle-outline-medium-white.svg ├── arrow-right-in-circle.png ├── arrow-right-in-circle@2x.png ├── arrow-right-medium-white.png ├── arrow-right-medium-white@2x.png ├── bittubeIcon-28x28.png ├── bittubeIcon-28x28@2x.png ├── bittubeIcon.png ├── bittubeLogo2.png ├── bittubeLogo_white.png ├── card-background-black.png ├── card-background-black@2x.png ├── card-background-white.png ├── card-background-white@2x.png ├── check-white.svg ├── close.svg ├── copy.svg ├── create-wallet.png ├── create-wallet@2x.png ├── edit.svg ├── fullscreen.svg ├── historyBorderRadius.png ├── langFlagGrey.png ├── lightning-white.png ├── lightning-white@2x.png ├── lightning.png ├── lightning@2x.png ├── local-node-full.png ├── local-node-full@2x.png ├── local-node.png ├── local-node@2x.png ├── lockIcon.png ├── logout.png ├── logout@2x.png ├── menuButtonGradient.png ├── merchant │ ├── arrow_right.png │ ├── bg.png │ └── input_box.png ├── middlePanelShadow.png ├── minimize.svg ├── miningtube.png ├── miningtube@2x.png ├── nextPage.png ├── nextPage@2x.png ├── open-wallet-from-file.png ├── open-wallet-from-file@2x.png ├── prevMonth.png ├── prevMonth@2x.png ├── question.png ├── question@2x.png ├── remote-node.png ├── remote-node@2x.png ├── resize.png ├── resize@2x.png ├── resizeHovered.png ├── resizeHovered@2x.png ├── restore-wallet-from-hardware.png ├── restore-wallet-from-hardware@2x.png ├── restore-wallet.png ├── restore-wallet@2x.png ├── right.svg ├── rightArrow.png ├── rightArrow@2x.png ├── rightArrowInactive.png ├── rightArrowInactive@2x.png ├── tails-grey.png ├── themes │ └── white │ │ ├── Monero-Logo.svg │ │ ├── close.svg │ │ ├── fullscreen.svg │ │ ├── leftPanelBg.jpg │ │ ├── middlePanelBg.jpg │ │ ├── minimize.svg │ │ ├── question.svg │ │ ├── titlebarLogo.png │ │ └── titlebarLogo@2x.png ├── tip.png ├── titlebarLogo.png ├── titlebarLogo@2x.png ├── uncheckedIcon.png ├── uncheckedIcon@2x.png ├── warning.png ├── warning@2x.png ├── whatIsIcon.png ├── whatIsIcon@2x.png ├── whiteDropIndicator.png ├── whiteDropIndicator@2x.png └── world-flags-globe.png ├── installers └── windows │ ├── .gitignore │ ├── Deterministic.md │ ├── FinishImage.bmp │ ├── LICENSE │ ├── Monero.iss │ ├── README.md │ ├── ReadMe.htm │ ├── WelcomeImage.bmp │ ├── WizardSmallImage.bmp │ └── bittube-daemon.bat ├── ios_get_libwallet.api.sh ├── js ├── CMakeLists.txt ├── TxUtils.js ├── Utils.js ├── Windows.js └── Wizard.js ├── lang ├── flags │ ├── bd.png │ ├── bg.png │ ├── br.png │ ├── catalonia.png │ ├── cn.png │ ├── cz.png │ ├── de.png │ ├── dk.png │ ├── eg.png │ ├── es.png │ ├── esperanto.png │ ├── fi.png │ ├── fr.png │ ├── gb.png │ ├── hr.png │ ├── hu.png │ ├── id.png │ ├── il.png │ ├── in.png │ ├── ir.png │ ├── irl.png │ ├── it.png │ ├── jp.png │ ├── kr.png │ ├── ku.png │ ├── lt.png │ ├── nb_NO.png │ ├── nl.png │ ├── pirate.png │ ├── pk.png │ ├── pl.png │ ├── ps.png │ ├── pt.png │ ├── ro.png │ ├── rs.png │ ├── ru.png │ ├── se.png │ ├── si.png │ ├── sk.png │ ├── tr.png │ ├── tw.png │ ├── ua.png │ ├── us.png │ └── za.png └── languages.xml ├── linuxdeploy_helper.sh ├── main.qml ├── pages ├── Account.qml ├── AddressBook.qml ├── CMakeLists.txt ├── History.qml ├── Keys.qml ├── Mining.qml ├── Receive.qml ├── SharedRingDB.qml ├── Sign.qml ├── Transfer.qml ├── TxKey.qml ├── merchant │ ├── Merchant.qml │ ├── MerchantCheckbox.qml │ ├── MerchantTitlebar.qml │ └── MerchantTrackingList.qml └── settings │ ├── Navbar.qml │ ├── Settings.qml │ ├── SettingsInfo.qml │ ├── SettingsLayout.qml │ ├── SettingsLog.qml │ ├── SettingsNode.qml │ └── SettingsWallet.qml ├── qml.qrc ├── share └── Info.plist ├── src ├── CMakeLists.txt ├── NetworkType.h ├── QR-Code-generator │ ├── BitBuffer.cpp │ ├── BitBuffer.hpp │ ├── CMakeLists.txt │ ├── QrCode.cpp │ ├── QrCode.hpp │ ├── QrSegment.cpp │ ├── QrSegment.hpp │ └── Readme.markdown ├── QR-Code-scanner │ ├── CMakeLists.txt │ ├── QrCodeScanner.cpp │ ├── QrCodeScanner.h │ ├── QrScanThread.cpp │ └── QrScanThread.h ├── TranslationManager.cpp ├── TranslationManager.h ├── daemon │ ├── CMakeLists.txt │ ├── DaemonManager.cpp │ └── DaemonManager.h ├── libwalletqt │ ├── AddressBook.cpp │ ├── AddressBook.h │ ├── CMakeLists.txt │ ├── PendingTransaction.cpp │ ├── PendingTransaction.h │ ├── QRCodeImageProvider.cpp │ ├── QRCodeImageProvider.h │ ├── Subaddress.cpp │ ├── Subaddress.h │ ├── SubaddressAccount.cpp │ ├── SubaddressAccount.h │ ├── TransactionHistory.cpp │ ├── TransactionHistory.h │ ├── TransactionInfo.cpp │ ├── TransactionInfo.h │ ├── Transfer.h │ ├── UnsignedTransaction.cpp │ ├── UnsignedTransaction.h │ ├── Wallet.cpp │ ├── Wallet.h │ ├── WalletManager.cpp │ └── WalletManager.h ├── main │ ├── Logger.cpp │ ├── Logger.h │ ├── MainApp.cpp │ ├── MainApp.h │ ├── clipboardAdapter.cpp │ ├── clipboardAdapter.h │ ├── filter.cpp │ ├── filter.h │ ├── main.cpp │ ├── oscursor.cpp │ ├── oscursor.h │ ├── oshelper.cpp │ └── oshelper.h ├── model │ ├── AddressBookModel.cpp │ ├── AddressBookModel.h │ ├── CMakeLists.txt │ ├── SubaddressAccountModel.cpp │ ├── SubaddressAccountModel.h │ ├── SubaddressModel.cpp │ ├── SubaddressModel.h │ ├── TransactionHistoryModel.cpp │ ├── TransactionHistoryModel.h │ ├── TransactionHistorySortFilterModel.cpp │ └── TransactionHistorySortFilterModel.h ├── openpgp │ └── CMakeLists.txt ├── qt │ ├── FutureScheduler.cpp │ ├── FutureScheduler.h │ ├── KeysFiles.cpp │ ├── KeysFiles.h │ ├── MoneroSettings.cpp │ ├── MoneroSettings.h │ ├── TailsOS.cpp │ ├── TailsOS.h │ ├── downloader.cpp │ ├── downloader.h │ ├── ipc.cpp │ ├── ipc.h │ ├── macoshelper.h │ ├── macoshelper.mm │ ├── network.cpp │ ├── network.h │ ├── updater.cpp │ ├── utils.cpp │ └── utils.h ├── version.js.in └── zxcvbn-c │ ├── .gitignore │ ├── CMakeLists.txt │ ├── 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 └── CMakeLists.txt ├── translations ├── CMakeLists.txt ├── bittube-core.ts ├── bittube-core_ar.ts ├── bittube-core_bg.ts ├── bittube-core_bn.ts ├── bittube-core_cat.ts ├── bittube-core_cs.ts ├── bittube-core_da.ts ├── bittube-core_de.ts ├── bittube-core_el.ts ├── bittube-core_eo.ts ├── bittube-core_es.ts ├── bittube-core_fa.ts ├── bittube-core_fi.ts ├── bittube-core_fr.ts ├── bittube-core_ga.ts ├── bittube-core_he.ts ├── bittube-core_hi.ts ├── bittube-core_hr.ts ├── bittube-core_hu.ts ├── bittube-core_id.ts ├── bittube-core_is.ts ├── bittube-core_it.ts ├── bittube-core_ja.ts ├── bittube-core_kmr.ts ├── bittube-core_ko.ts ├── bittube-core_lt.ts ├── bittube-core_nb_NO.ts ├── bittube-core_ne.ts ├── bittube-core_nl.ts ├── bittube-core_pl.ts ├── bittube-core_prt.ts ├── bittube-core_pt-br.ts ├── bittube-core_pt-pt.ts ├── bittube-core_ro.ts ├── bittube-core_ru.ts ├── bittube-core_sk.ts ├── bittube-core_sl.ts ├── bittube-core_sr.ts ├── bittube-core_sv.ts ├── bittube-core_tr.ts ├── bittube-core_uk.ts ├── bittube-core_ur.ts ├── bittube-core_vi.ts ├── bittube-core_zh-cn.ts ├── bittube-core_zh-tw.ts └── bittube-core_zu.ts ├── utils.sh ├── windeploy_helper.sh └── wizard ├── CMakeLists.txt ├── WizardAskPassword.qml ├── WizardController.qml ├── WizardCreateDevice1.qml ├── WizardCreateWallet1.qml ├── WizardCreateWallet2.qml ├── WizardCreateWallet3.qml ├── WizardCreateWallet4.qml ├── WizardDaemonSettings.qml ├── WizardHeader.qml ├── WizardHome.qml ├── WizardLang.qml ├── WizardLanguage.qml ├── WizardMenuItem.qml ├── WizardModeBootstrap.qml ├── WizardModeRemoteNodeWarning.qml ├── WizardModeSelection.qml ├── WizardNav.qml ├── WizardNavProgressDot.qml ├── WizardOpenWallet1.qml ├── WizardRestoreWallet1.qml ├── WizardRestoreWallet2.qml ├── WizardRestoreWallet3.qml ├── WizardRestoreWallet4.qml ├── WizardSummary.qml ├── WizardSummaryItem.qml └── WizardWalletInput.qml /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | name: continuous-integration/gh-actions/gui 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | build-macos: 7 | 8 | runs-on: macOS-latest 9 | 10 | steps: 11 | - uses: actions/checkout@v1 12 | - name: update brew and install dependencies 13 | run: brew update && brew install boost hidapi zmq libpgm miniupnpc ldns expat libunwind-headers protobuf qt5 14 | - name: downgrade boost to version 1.72 15 | run: (cd $(brew --repository)/Library/Taps/homebrew/homebrew-core && git checkout 0b9ee3127763e8ebce62599bae85f37ab1687622 -- Formula/boost.rb && brew unlink boost && HOMEBREW_NO_AUTO_UPDATE=1 brew install boost) 16 | - name: build 17 | run: export PATH=$PATH:/usr/local/opt/qt/bin && ./build.sh 18 | - name: test qml 19 | run: build/release/bin/bittube-wallet-gui.app/Contents/MacOS/bittube-wallet-gui --test-qml 20 | 21 | build-ubuntu: 22 | 23 | runs-on: ubuntu-latest 24 | 25 | steps: 26 | - uses: actions/checkout@v1 27 | - name: remove bundled boost 28 | run: sudo rm -rf /usr/local/share/boost 29 | - name: set apt conf 30 | run: | 31 | echo "Acquire::Retries \"3\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom 32 | echo "Acquire::http::Timeout \"120\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom 33 | echo "Acquire::ftp::Timeout \"120\";" | sudo tee -a /etc/apt/apt.conf.d/80-custom 34 | - name: update apt 35 | run: sudo apt update 36 | - name: install bittube dependencies 37 | run: sudo apt -y install build-essential cmake libboost-all-dev miniupnpc libunbound-dev graphviz doxygen libunwind8-dev pkg-config libssl-dev libzmq3-dev libsodium-dev libhidapi-dev libnorm-dev libusb-1.0-0-dev libpgm-dev 38 | - name: install bittube gui dependencies 39 | run: sudo apt -y install qtbase5-dev qt5-default qtdeclarative5-dev qml-module-qtquick-controls qml-module-qtquick-controls2 qml-module-qtquick-dialogs qml-module-qtquick-xmllistmodel qml-module-qt-labs-settings qml-module-qt-labs-folderlistmodel qttools5-dev-tools qml-module-qtquick-templates2 libqt5svg5-dev xvfb 40 | - name: build 41 | run: ./build.sh 42 | - name: test qml 43 | run: xvfb-run -a build/release/bin/bittube-wallet-gui --test-qml 44 | 45 | build-windows: 46 | 47 | runs-on: windows-latest 48 | 49 | steps: 50 | - uses: actions/checkout@v1 51 | - uses: eine/setup-msys2@v0 52 | with: 53 | update: true 54 | - name: install bittube dependencies 55 | run: msys2do pacman -S --noconfirm mingw-w64-x86_64-toolchain make mingw-w64-x86_64-cmake mingw-w64-x86_64-boost mingw-w64-x86_64-openssl mingw-w64-x86_64-zeromq mingw-w64-x86_64-libsodium mingw-w64-x86_64-hidapi mingw-w64-x86_64-protobuf-c mingw-w64-x86_64-libusb git mingw-w64-x86_64-qt5 56 | - name: downgrade boost to version 1.72 57 | run: msys2do pacman -U --noconfirm http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-boost-1.72.0-3-any.pkg.tar.zst 58 | - name: disable qtquickcompiler 59 | run: msys2do sed -i s/CONFIG\ +=\ qtquickcompiler// bittube-wallet-gui.pro 60 | - name: build 61 | run: msys2do ./build.sh release 62 | - name: test qml 63 | run: msys2do build/release/bin/bittube-wallet-gui --test-qml 64 | -------------------------------------------------------------------------------- /.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 | bittube-wallet-gui_plugin_import.cpp 13 | bittube-wallet-gui_qml_plugin_import.cpp 14 | *.qmlc 15 | *.jsc 16 | qml_qmlcache.qrc 17 | 18 | ### Vim ### 19 | # Swap 20 | [._]*.s[a-v][a-z] 21 | [._]*.sw[a-p] 22 | [._]s[a-rt-v][a-z] 23 | [._]ss[a-gi-z] 24 | [._]sw[a-p] 25 | 26 | # Session 27 | Session.vim 28 | 29 | # Temporary 30 | .netrwhist 31 | *~ 32 | *.autosave 33 | # Auto-generated tag files 34 | tags 35 | # Persistent undo 36 | [._]*.un~ 37 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "bittube"] 2 | path = bittube 3 | url = https://github.com/ipbc-dev/bittube 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 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | ANDROID_STANDALONE_TOOLCHAIN_PATH ?= /usr/local/toolchain 2 | 3 | dotgit=$(shell ls -d .git/config) 4 | ifneq ($(dotgit), .git/config) 5 | USE_SINGLE_BUILDDIR=1 6 | endif 7 | 8 | subbuilddir:=$(shell echo `uname | sed -e 's|[:/\\ \(\)]|_|g'`/`git branch | grep '\* ' | cut -f2- -d' '| sed -e 's|[:/\\ \(\)]|_|g'`) 9 | ifeq ($(USE_SINGLE_BUILDDIR),) 10 | builddir := build/"$(subbuilddir)" 11 | topdir := ../../../.. 12 | deldirs := $(builddir) 13 | else 14 | builddir := build 15 | topdir := ../.. 16 | deldirs := $(builddir)/debug $(builddir)/release $(builddir)/fuzz 17 | endif 18 | 19 | 20 | default: 21 | mkdir -p build && cd build && cmake -D ARCH="x86-64" -D DEV_MODE=$(or ${DEV_MODE},OFF) -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release .. && $(MAKE) 22 | debug: 23 | mkdir -p build && cd build && cmake -D DEV_MODE=$(or ${DEV_MODE},ON) .. && $(MAKE) VERBOSE=1 24 | devmode: 25 | mkdir -p build && cd build && cmake -D ARCH="x86-64" -D DEV_MODE=$(or ${DEV_MODE},ON) -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release .. && $(MAKE) 26 | clean: 27 | mkdir -p build && cd build && rm -rf * 28 | scanner: 29 | mkdir -p build && cd build && cmake -D ARCH="x86-64" -D DEV_MODE=$(or ${DEV_MODE},ON) -D WITH_SCANNER=ON -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release .. && $(MAKE) 30 | 31 | debug-static-win64: 32 | mkdir -p $(builddir)/debug && cd $(builddir)/debug && cmake -D STATIC=ON -G "MSYS Makefiles" -D DEV_MODE=$(or ${DEV_MODE},ON) -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Debug -D BUILD_TAG="win-x64" -D CMAKE_TOOLCHAIN_FILE=$(topdir)/cmake/64-bit-toolchain.cmake -D MSYS2_FOLDER=$(shell cd ${MINGW_PREFIX}/.. && pwd -W) -D MINGW=ON $(topdir) && $(MAKE) 33 | 34 | debug-static-mac64: 35 | mkdir -p $(builddir)/debug 36 | cd $(builddir)/debug && cmake -D STATIC=ON -D DEV_MODE=$(or ${DEV_MODE},ON) -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=release -D BUILD_TAG="mac-x64" $(topdir) && $(MAKE) 37 | 38 | release-static-win64: 39 | mkdir -p $(builddir)/release && cd $(builddir)/release && cmake -D STATIC=ON -G "MSYS Makefiles" -D DEV_MODE=$(or ${DEV_MODE},OFF) -D ARCH="x86-64" -D BUILD_64=ON -D CMAKE_BUILD_TYPE=Release -D BUILD_TAG="win-x64" -D CMAKE_TOOLCHAIN_FILE=$(topdir)/cmake/64-bit-toolchain.cmake -D MSYS2_FOLDER=$(shell cd ${MINGW_PREFIX}/.. && pwd -W) -D MINGW=ON $(topdir) && $(MAKE) 40 | 41 | -------------------------------------------------------------------------------- /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 bittube/utils/build_scripts 14 | docker build -f android32.Dockerfile -t bittube-android . 15 | cd .. 16 | 17 | # Build GUI 18 | 19 | cd android/docker 20 | docker build -t bittube-gui-android . 21 | docker create -it --name bittube-gui-android bittube-gui-android bash 22 | 23 | # Get the apk 24 | 25 | docker cp bittube-gui-android:/opt/android/bittube-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/bittube-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 | -------------------------------------------------------------------------------- /cmake/32-bit-toolchain.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014-2019, 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 | if (NOT CMAKE_HOST_WIN32) 30 | set (CMAKE_SYSTEM_NAME Windows) 31 | endif() 32 | 33 | set (GCC_PREFIX i686-w64-mingw32) 34 | set (CMAKE_C_COMPILER ${GCC_PREFIX}-gcc) 35 | set (CMAKE_CXX_COMPILER ${GCC_PREFIX}-g++) 36 | set (CMAKE_AR ar CACHE FILEPATH "" FORCE) 37 | set (CMAKE_NM nm CACHE FILEPATH "" FORCE) 38 | set (CMAKE_LINKER ld CACHE FILEPATH "" FORCE) 39 | #set (CMAKE_RANLIB ${GCC_PREFIX}-gcc-ranlib CACHE FILEPATH "" FORCE) 40 | set (CMAKE_RC_COMPILER windres) 41 | 42 | set (CMAKE_FIND_ROOT_PATH "${MSYS2_FOLDER}/mingw32") 43 | 44 | # Ensure cmake doesn't find things in the wrong places 45 | set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) # Find programs on host 46 | set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) # Find libs in target 47 | set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) # Find includes in target 48 | 49 | set (MINGW_FLAG "-m32") 50 | set (USE_LTO_DEFAULT false) 51 | -------------------------------------------------------------------------------- /cmake/64-bit-toolchain.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014-2019, 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 | if (NOT CMAKE_HOST_WIN32) 30 | set (CMAKE_SYSTEM_NAME Windows) 31 | endif() 32 | 33 | set (GCC_PREFIX x86_64-w64-mingw32) 34 | set (CMAKE_C_COMPILER ${GCC_PREFIX}-gcc) 35 | set (CMAKE_CXX_COMPILER ${GCC_PREFIX}-g++) 36 | set (CMAKE_AR ar CACHE FILEPATH "" FORCE) 37 | set (CMAKE_NM nm CACHE FILEPATH "" FORCE) 38 | set (CMAKE_LINKER ld CACHE FILEPATH "" FORCE) 39 | #set (CMAKE_RANLIB ${GCC_PREFIX}-gcc-ranlib CACHE FILEPATH "" FORCE) 40 | set (CMAKE_RC_COMPILER windres) 41 | 42 | set (CMAKE_FIND_ROOT_PATH "${MSYS2_FOLDER}/mingw64") 43 | 44 | # Ensure cmake doesn't find things in the wrong places 45 | set (CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) # Find programs on host 46 | set (CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) # Find libs in target 47 | set (CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) # Find includes in target 48 | 49 | set (MINGW_FLAG "-m64") 50 | set (USE_LTO_DEFAULT false) 51 | -------------------------------------------------------------------------------- /cmake/CheckLinkerFlag.c: -------------------------------------------------------------------------------- 1 | #ifdef __CLASSIC_C__ 2 | int main() 3 | { 4 | int ac; 5 | char* av[]; 6 | #else 7 | int main(int ac, char* av[]) 8 | { 9 | #endif 10 | if (ac > 1000) { 11 | return *av[0]; 12 | } 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /cmake/CheckLinkerFlag.cmake: -------------------------------------------------------------------------------- 1 | include(CheckCCompilerFlag) 2 | 3 | macro(CHECK_LINKER_FLAG flag VARIABLE) 4 | if(NOT DEFINED "${VARIABLE}") 5 | if(NOT CMAKE_REQUIRED_QUIET) 6 | message(STATUS "Looking for ${flag} linker flag") 7 | endif() 8 | 9 | set(_cle_source ${CMAKE_SOURCE_DIR}/cmake/CheckLinkerFlag.c) 10 | 11 | set(saved_CMAKE_C_FLAGS ${CMAKE_C_FLAGS}) 12 | set(CMAKE_C_FLAGS "${flag}") 13 | try_compile(${VARIABLE} 14 | ${CMAKE_BINARY_DIR} 15 | ${_cle_source} 16 | COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS} ${flag} 17 | CMAKE_FLAGS 18 | OUTPUT_VARIABLE OUTPUT) 19 | unset(_cle_source) 20 | set(CMAKE_C_FLAGS ${saved_CMAKE_C_FLAGS}) 21 | unset(saved_CMAKE_C_FLAGS) 22 | 23 | if ("${OUTPUT}" MATCHES "warning.*ignored") 24 | set(${VARIABLE} 0) 25 | endif() 26 | 27 | if(${VARIABLE}) 28 | if(NOT CMAKE_REQUIRED_QUIET) 29 | message(STATUS "Looking for ${flag} linker flag - found") 30 | endif() 31 | set(${VARIABLE} 1 CACHE INTERNAL "Have linker flag ${flag}") 32 | file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log 33 | "Determining if the ${flag} linker flag is supported " 34 | "passed with the following output:\n" 35 | "${OUTPUT}\n\n") 36 | else() 37 | if(NOT CMAKE_REQUIRED_QUIET) 38 | message(STATUS "Looking for ${flag} linker flag - not found") 39 | endif() 40 | set(${VARIABLE} "" CACHE INTERNAL "Have linker flag ${flag}") 41 | file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log 42 | "Determining if the ${flag} linker flag is supported " 43 | "failed with the following output:\n" 44 | "${OUTPUT}\n\n") 45 | endif() 46 | endif() 47 | endmacro() 48 | -------------------------------------------------------------------------------- /cmake/Doxygen.extra.css.in: -------------------------------------------------------------------------------- 1 | /* increase vertical space */ 2 | #titlearea, #nav-path { 3 | display: none; 4 | height: 0px; 5 | } 6 | 7 | 8 | /* uncomment these lines for some extra vertical space */ 9 | 10 | /* 11 | .tablist li { 12 | line-height: 26px; 13 | } 14 | */ 15 | -------------------------------------------------------------------------------- /cmake/FindBerkeleyDB.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find Berkeley DB 2 | # Once done this will define 3 | # 4 | # BERKELEY_DB_FOUND - system has Berkeley DB 5 | # BERKELEY_DB_INCLUDE_DIR - the Berkeley DB include directory 6 | # BERKELEY_DB_LIBRARIES - Link these to use Berkeley DB 7 | # BERKELEY_DB_DEFINITIONS - Compiler switches required for using Berkeley DB 8 | 9 | # Copyright (c) 2006, Alexander Dymo, 10 | # 11 | # Redistribution and use is allowed according to the terms of the BSD license. 12 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 13 | 14 | find_path(BERKELEY_DB_INCLUDE_DIR db_cxx.h 15 | /usr/include/db4 16 | /usr/local/include/db4 17 | ) 18 | 19 | find_library(BERKELEY_DB_LIBRARIES NAMES db_cxx ) 20 | 21 | include(FindPackageHandleStandardArgs) 22 | find_package_handle_standard_args(Berkeley "Could not find Berkeley DB >= 4.1" BERKELEY_DB_INCLUDE_DIR BERKELEY_DB_LIBRARIES) 23 | # show the BERKELEY_DB_INCLUDE_DIR and BERKELEY_DB_LIBRARIES variables only in the advanced view 24 | mark_as_advanced(BERKELEY_DB_INCLUDE_DIR BERKELEY_DB_LIBRARIES ) 25 | 26 | -------------------------------------------------------------------------------- /cmake/FindHIDAPI.cmake: -------------------------------------------------------------------------------- 1 | # - try to find HIDAPI library 2 | # from http://www.signal11.us/oss/hidapi/ 3 | # 4 | # Cache Variables: (probably not for direct use in your scripts) 5 | # HIDAPI_INCLUDE_DIR 6 | # HIDAPI_LIBRARY 7 | # 8 | # Non-cache variables you might use in your CMakeLists.txt: 9 | # HIDAPI_FOUND 10 | # HIDAPI_INCLUDE_DIRS 11 | # HIDAPI_LIBRARIES 12 | # 13 | # Requires these CMake modules: 14 | # FindPackageHandleStandardArgs (known included with CMake >=2.6.2) 15 | # 16 | # Original Author: 17 | # 2009-2010 Ryan Pavlik 18 | # http://academic.cleardefinition.com 19 | # Iowa State University HCI Graduate Program/VRAC 20 | # 21 | # Copyright Iowa State University 2009-2010. 22 | # Distributed under the Boost Software License, Version 1.0. 23 | # (See accompanying file LICENSE_1_0.txt or copy at 24 | # http://www.boost.org/LICENSE_1_0.txt) 25 | 26 | find_library(HIDAPI_LIBRARY 27 | NAMES hidapi hidapi-libusb) 28 | 29 | find_path(HIDAPI_INCLUDE_DIR 30 | NAMES hidapi.h 31 | PATH_SUFFIXES 32 | hidapi) 33 | 34 | include(FindPackageHandleStandardArgs) 35 | find_package_handle_standard_args(HIDAPI 36 | DEFAULT_MSG 37 | HIDAPI_LIBRARY 38 | HIDAPI_INCLUDE_DIR) 39 | 40 | if(HIDAPI_FOUND) 41 | set(HIDAPI_LIBRARIES "${HIDAPI_LIBRARY}") 42 | if((STATIC AND UNIX AND NOT APPLE) OR (DEPENDS AND CMAKE_SYSTEM_NAME STREQUAL "Linux")) 43 | find_library(LIBUSB-1.0_LIBRARY usb-1.0) 44 | find_library(LIBUDEV_LIBRARY udev) 45 | if(LIBUSB-1.0_LIBRARY) 46 | set(HIDAPI_LIBRARIES "${HIDAPI_LIBRARIES};${LIBUSB-1.0_LIBRARY}") 47 | if(LIBUDEV_LIBRARY) 48 | set(HIDAPI_LIBRARIES "${HIDAPI_LIBRARIES};${LIBUDEV_LIBRARY}") 49 | else() 50 | message(WARNING "libudev library not found, binaries may fail to link.") 51 | endif() 52 | else() 53 | message(WARNING "libusb-1.0 library not found, binaries may fail to link.") 54 | endif() 55 | endif() 56 | 57 | set(HIDAPI_INCLUDE_DIRS "${HIDAPI_INCLUDE_DIR}") 58 | endif() 59 | 60 | mark_as_advanced(HIDAPI_INCLUDE_DIR HIDAPI_LIBRARY) 61 | -------------------------------------------------------------------------------- /cmake/FindLibunwind.cmake: -------------------------------------------------------------------------------- 1 | # - Try to find libunwind 2 | # Once done this will define 3 | # 4 | # LIBUNWIND_FOUND - system has libunwind 5 | # LIBUNWIND_INCLUDE_DIR - the libunwind include directory 6 | # LIBUNWIND_LIBRARIES - Link these to use libunwind 7 | # LIBUNWIND_DEFINITIONS - Compiler switches required for using libunwind 8 | 9 | # Copyright (c) 2006, Alexander Dymo, 10 | # 11 | # Redistribution and use is allowed according to the terms of the BSD license. 12 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 13 | 14 | find_path(LIBUNWIND_INCLUDE_DIR libunwind.h 15 | /usr/include 16 | /usr/local/include 17 | ) 18 | 19 | find_library(LIBUNWIND_LIBRARIES NAMES unwind ) 20 | if(NOT LIBUNWIND_LIBRARIES STREQUAL "LIBUNWIND_LIBRARIES-NOTFOUND") 21 | if (CMAKE_COMPILER_IS_GNUCC) 22 | set(LIBUNWIND_LIBRARIES "gcc_eh;${LIBUNWIND_LIBRARIES}") 23 | endif() 24 | endif() 25 | 26 | # some versions of libunwind need liblzma, and we don't use pkg-config 27 | # so we just look whether liblzma is installed, and add it if it is. 28 | # It might not be actually needed, but doesn't hurt if it is not. 29 | # We don't need any headers, just the lib, as it's privately needed. 30 | message(STATUS "looking for liblzma") 31 | find_library(LIBLZMA_LIBRARIES lzma ) 32 | if(NOT LIBLZMA_LIBRARIES STREQUAL "LIBLZMA_LIBRARIES-NOTFOUND") 33 | message(STATUS "liblzma found") 34 | set(LIBUNWIND_LIBRARIES "${LIBUNWIND_LIBRARIES};${LIBLZMA_LIBRARIES}") 35 | endif() 36 | 37 | include(FindPackageHandleStandardArgs) 38 | find_package_handle_standard_args(Libunwind "Could not find libunwind" LIBUNWIND_INCLUDE_DIR LIBUNWIND_LIBRARIES) 39 | # show the LIBUNWIND_INCLUDE_DIR and LIBUNWIND_LIBRARIES variables only in the advanced view 40 | mark_as_advanced(LIBUNWIND_INCLUDE_DIR LIBUNWIND_LIBRARIES ) 41 | 42 | -------------------------------------------------------------------------------- /cmake/FindMiniupnpc.cmake: -------------------------------------------------------------------------------- 1 | # --------------------------------- FindMiniupnpc Start --------------------------------- 2 | # Locate miniupnp library 3 | # This module defines 4 | # MINIUPNP_FOUND, if false, do not try to link to miniupnp 5 | # MINIUPNP_LIBRARY, the miniupnp variant 6 | # MINIUPNP_INCLUDE_DIR, where to find miniupnpc.h and family) 7 | # MINIUPNPC_VERSION_1_7_OR_HIGHER, set if we detect the version of miniupnpc is 1.7 or higher 8 | # 9 | # Note that the expected include convention is 10 | # #include "miniupnpc.h" 11 | # and not 12 | # #include 13 | # This is because, the miniupnpc location is not standardized and may exist 14 | # in locations other than miniupnpc/ 15 | 16 | if (MINIUPNP_INCLUDE_DIR AND MINIUPNP_LIBRARY) 17 | # Already in cache, be silent 18 | set(MINIUPNP_FIND_QUIETLY TRUE) 19 | endif () 20 | 21 | find_path(MINIUPNP_INCLUDE_DIR miniupnpc.h 22 | HINTS $ENV{MINIUPNP_INCLUDE_DIR} 23 | PATH_SUFFIXES miniupnpc 24 | ) 25 | 26 | find_library(MINIUPNP_LIBRARY miniupnpc 27 | HINTS $ENV{MINIUPNP_LIBRARY} 28 | ) 29 | 30 | find_library(MINIUPNP_STATIC_LIBRARY libminiupnpc.a 31 | HINTS $ENV{MINIUPNP_STATIC_LIBRARY} 32 | ) 33 | 34 | set(MINIUPNP_INCLUDE_DIRS ${MINIUPNP_INCLUDE_DIR}) 35 | set(MINIUPNP_LIBRARIES ${MINIUPNP_LIBRARY}) 36 | set(MINIUPNP_STATIC_LIBRARIES ${MINIUPNP_STATIC_LIBRARY}) 37 | 38 | include(FindPackageHandleStandardArgs) 39 | find_package_handle_standard_args( 40 | MiniUPnPc DEFAULT_MSG 41 | MINIUPNP_INCLUDE_DIR 42 | MINIUPNP_LIBRARY 43 | ) 44 | 45 | IF(MINIUPNPC_FOUND) 46 | file(STRINGS "${MINIUPNP_INCLUDE_DIR}/miniupnpc.h" MINIUPNPC_API_VERSION_STR REGEX "^#define[\t ]+MINIUPNPC_API_VERSION[\t ]+[0-9]+") 47 | if(MINIUPNPC_API_VERSION_STR MATCHES "^#define[\t ]+MINIUPNPC_API_VERSION[\t ]+([0-9]+)") 48 | set(MINIUPNPC_API_VERSION "${CMAKE_MATCH_1}") 49 | if (${MINIUPNPC_API_VERSION} GREATER "10" OR ${MINIUPNPC_API_VERSION} EQUAL "10") 50 | message(STATUS "Found miniupnpc API version " ${MINIUPNPC_API_VERSION}) 51 | set(MINIUPNP_FOUND true) 52 | set(MINIUPNPC_VERSION_1_7_OR_HIGHER true) 53 | endif() 54 | endif() 55 | 56 | ENDIF() 57 | 58 | mark_as_advanced(MINIUPNP_INCLUDE_DIR MINIUPNP_LIBRARY MINIUPNP_STATIC_LIBRARY) 59 | # --------------------------------- FindMiniupnpc End --------------------------------- 60 | -------------------------------------------------------------------------------- /cmake/FindUnbound.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014-2019, The Monero Project 2 | # All rights reserved. 3 | # 4 | # Redistribution and use in source and binary forms, with or without modification, are 5 | # permitted provided that the following conditions are met: 6 | # 7 | # 1. Redistributions of source code must retain the above copyright notice, this list of 8 | # conditions and the following disclaimer. 9 | # 10 | # 2. Redistributions in binary form must reproduce the above copyright notice, this list 11 | # of conditions and the following disclaimer in the documentation and/or other 12 | # materials provided with the distribution. 13 | # 14 | # 3. Neither the name of the copyright holder nor the names of its contributors may be 15 | # used to endorse or promote products derived from this software without specific 16 | # prior written permission. 17 | # 18 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY 19 | # EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 20 | # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 21 | # THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22 | # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 23 | # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 24 | # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 25 | # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF 26 | # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 | 28 | MESSAGE(STATUS "Looking for libunbound") 29 | 30 | FIND_PATH(UNBOUND_INCLUDE_DIR 31 | NAMES unbound.h 32 | PATH_SUFFIXES include/ include/unbound/ 33 | PATHS "${PROJECT_SOURCE_DIR}" 34 | ${UNBOUND_ROOT} 35 | $ENV{UNBOUND_ROOT} 36 | /usr/local/ 37 | /usr/ 38 | ) 39 | 40 | find_library(UNBOUND_LIBRARIES unbound) 41 | -------------------------------------------------------------------------------- /cmake/FindZBar0.cmake: -------------------------------------------------------------------------------- 1 | # from http://code.google.com/p/low-cost-vision-2012/source/browse/CMakeModules/FindZBar0.cmake?name=2-helium-1&r=d61f248bd5565b3c086bf4769a04bfd98f7079df 2 | # - Try to find ZBar 3 | # This will define 4 | # 5 | # ZBAR_FOUND - 6 | # ZBAR_LIBRARY_DIR - 7 | # ZBAR_INCLUDE_DIR - 8 | # ZBAR_LIBRARIES - 9 | # 10 | 11 | find_package(PkgConfig) 12 | pkg_check_modules(PC_ZBAR QUIET zbar) 13 | set(ZBAR_DEFINITIONS ${PC_ZBAR_CFLAGS_OTHER}) 14 | find_library(ZBAR_LIBRARIES NAMES zbar 15 | HINTS ${PC_ZBAR_LIBDIR} ${PC_ZBAR_LIBRARY_DIRS} ) 16 | find_path(ZBAR_INCLUDE_DIR Decoder.h 17 | HINTS ${PC_ZBAR_INCLUDEDIR} ${PC_ZBAR_INCLUDE_DIRS} 18 | PATH_SUFFIXES zbar ) 19 | include(FindPackageHandleStandardArgs) 20 | find_package_handle_standard_args(ZBAR DEFAULT_MSG ZBAR_LIBRARIES ZBAR_INCLUDE_DIR) 21 | message(STATUS "Found zbar libraries ${ZBAR_LIBRARIES}") 22 | 23 | -------------------------------------------------------------------------------- /cmake/VersionGui.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2014-2019, 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 | function (write_static_version_header hash) 30 | set(VERSIONTAG "${hash}") 31 | configure_file("${CMAKE_SOURCE_DIR}/version.js.in" "${CMAKE_SOURCE_DIR}/version.js") 32 | endfunction () 33 | 34 | find_package(Git QUIET) 35 | if ("$Format:$" STREQUAL "") 36 | # We're in a tarball; use hard-coded variables. 37 | write_static_version_header("release") 38 | elseif (GIT_FOUND OR Git_FOUND) 39 | message(STATUS "Found Git: ${GIT_EXECUTABLE}") 40 | add_custom_command( 41 | OUTPUT "${CMAKE_SOURCE_DIR}/version.js" 42 | COMMAND "${CMAKE_COMMAND}" 43 | "-D" "GIT=${GIT_EXECUTABLE}" 44 | "-D" "TO=${CMAKE_SOURCE_DIR}/version.js" 45 | "-P" "cmake/GenVersionGui.cmake" 46 | WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}") 47 | else() 48 | message(STATUS "WARNING: Git was not found!") 49 | write_static_version_header("unknown") 50 | endif () 51 | add_custom_target(genversiongui ALL 52 | DEPENDS "${CMAKE_SOURCE_DIR}/version.js") 53 | -------------------------------------------------------------------------------- /cmake/test-libusb-version.c: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2019, 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 30 | 31 | #define UNUSED(expr) (void)(expr) 32 | 33 | int main(int argc, char *argv[]) { 34 | libusb_device **devs; 35 | libusb_context *ctx = NULL; 36 | 37 | int r = libusb_init(&ctx); UNUSED(r); 38 | ssize_t cnt = libusb_get_device_list(ctx, &devs); UNUSED(cnt); 39 | 40 | struct libusb_device_descriptor desc; 41 | r = libusb_get_device_descriptor(devs[0], &desc); UNUSED(r); 42 | uint8_t bus_id = libusb_get_bus_number(devs[0]); UNUSED(bus_id); 43 | uint8_t addr = libusb_get_device_address(devs[0]); UNUSED(addr); 44 | 45 | uint8_t tmp_path[16]; 46 | r = libusb_get_port_numbers(devs[0], tmp_path, sizeof(tmp_path)); 47 | UNUSED(r); 48 | UNUSED(tmp_path); 49 | 50 | libusb_free_device_list(devs, 1); 51 | libusb_exit(ctx); 52 | } 53 | -------------------------------------------------------------------------------- /cmake/test-protobuf.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2019, 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 30 | #include 31 | #include 32 | #include 33 | #include "test-protobuf.pb.h" 34 | 35 | int main(int argc, char *argv[]) { 36 | google::protobuf::UnknownFieldSet ufs; 37 | ufs.ClearAndFreeMemory(); 38 | 39 | Success sc; 40 | sc.set_message("test"); 41 | sc.SerializeToOstream(&std::cerr); 42 | return 0; 43 | } 44 | -------------------------------------------------------------------------------- /cmake/test-protobuf.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto2"; 2 | 3 | import "google/protobuf/descriptor.proto"; 4 | 5 | message Success { 6 | optional string message = 1; 7 | } 8 | -------------------------------------------------------------------------------- /cmake/test-static-assert.c: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2019, 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 30 | 31 | static_assert(1, "FAIL"); 32 | int main(int argc, char *argv[]) { 33 | return 0; 34 | } 35 | -------------------------------------------------------------------------------- /cmake/test-static-assert.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2019, 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 30 | 31 | static_assert(1, "FAIL"); 32 | int main(int argc, char *argv[]) { 33 | return 0; 34 | } 35 | -------------------------------------------------------------------------------- /components/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 2 | # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 3 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 4 | ### 5 | 6 | #configure_file(${CMAKE_CURRENT_SOURCE_DIR}/defines.h.cmake 7 | # ${CMAKE_CURRENT_BINARY_DIR}/defines.h) 8 | 9 | file(GLOB_RECURSE UI_FILES *.ui) 10 | file(GLOB_RECURSE CODE_FILES *.cpp) 11 | 12 | qt5_wrap_ui(UI_HEADERS ${UI_FILES}) 13 | #qt5_add_resources(RESOURCE_FILES ../resources/resources.qrc) 14 | 15 | # Windows application icon 16 | if (WIN32) 17 | set(WINDOWS_RES_FILE ${CMAKE_CURRENT_BINARY_DIR}/resources.obj) 18 | if (MSVC) 19 | add_custom_command(OUTPUT ${WINDOWS_RES_FILE} 20 | COMMAND rc.exe /fo ${WINDOWS_RES_FILE} resources.rc 21 | WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/win 22 | ) 23 | else() 24 | add_custom_command(OUTPUT ${WINDOWS_RES_FILE} 25 | COMMAND windres.exe resources.rc ${WINDOWS_RES_FILE} 26 | WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/win 27 | ) 28 | endif() 29 | endif() 30 | 31 | add_executable(${CMAKE_PROJECT_NAME} WIN32 32 | ${UI_HEADERS} 33 | ${CODE_FILES} 34 | ${RESOURCE_FILES} 35 | ${WINDOWS_RES_FILE} 36 | ) 37 | target_link_libraries(${CMAKE_PROJECT_NAME} 38 | Qt5::Widgets 39 | ) 40 | 41 | if (UNIX) 42 | install(TARGETS ${CMAKE_PROJECT_NAME} 43 | RUNTIME DESTINATION bin) 44 | elseif (WIN32) 45 | install(TARGETS ${CMAKE_PROJECT_NAME} 46 | DESTINATION .) 47 | endif() 48 | -------------------------------------------------------------------------------- /components/ContextMenu.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.9 2 | import QtQuick.Controls 2.2 3 | 4 | import FontAwesome 1.0 5 | import "../components" as BittubeComponents 6 | 7 | MouseArea { 8 | signal paste() 9 | 10 | id: root 11 | acceptedButtons: Qt.RightButton 12 | anchors.fill: parent 13 | onClicked: { 14 | if (mouse.button === Qt.RightButton) 15 | contextMenu.open() 16 | } 17 | 18 | Menu { 19 | id: contextMenu 20 | 21 | background: Rectangle { 22 | border.color: BittubeComponents.Style.buttonBackgroundColorDisabledHover 23 | border.width: 1 24 | radius: 2 25 | color: BittubeComponents.Style.buttonBackgroundColorDisabled 26 | } 27 | 28 | padding: 1 29 | width: 100 30 | x: root.mouseX 31 | y: root.mouseY 32 | 33 | BittubeComponents.ContextMenuItem { 34 | enabled: root.parent.canPaste === true 35 | glyphIcon: FontAwesome.paste 36 | onTriggered: root.paste() 37 | text: qsTr("Paste") + translationManager.emptyString 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /components/ContextMenuItem.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.9 2 | import QtQuick.Controls 2.2 3 | import QtQuick.Layouts 1.1 4 | 5 | import FontAwesome 1.0 6 | import "../components" as BittubeComponents 7 | 8 | MenuItem { 9 | id: menuItem 10 | 11 | property bool glyphIconSolid: true 12 | property alias glyphIcon: glyphIcon.text 13 | 14 | background: Rectangle { 15 | color: BittubeComponents.Style.buttonBackgroundColorDisabledHover 16 | opacity: mouse.containsMouse ? 1 : 0 17 | 18 | MouseArea { 19 | id: mouse 20 | 21 | anchors.fill: parent 22 | hoverEnabled: true 23 | onClicked: menuItem.triggered() 24 | visible: menuItem.enabled 25 | } 26 | } 27 | 28 | contentItem: RowLayout { 29 | anchors.fill: parent 30 | anchors.leftMargin: 10 31 | anchors.rightMargin: 10 32 | opacity: menuItem.enabled ? 1 : 0.4 33 | spacing: 8 34 | 35 | Text { 36 | id: glyphIcon 37 | 38 | color: BittubeComponents.Style.buttonTextColor 39 | font.family: glyphIconSolid ? FontAwesome.fontFamilySolid : FontAwesome.fontFamily 40 | font.pixelSize: 14 41 | font.styleName: glyphIconSolid ? "Solid" : "Regular" 42 | } 43 | 44 | Text { 45 | color: BittubeComponents.Style.buttonTextColor 46 | font.family: BittubeComponents.Style.fontRegular.name 47 | font.pixelSize: 14 48 | Layout.fillWidth: true 49 | text: menuItem.text 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /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 | import QtQuick 2.9 30 | import "../components" as BittubeComponents 31 | import "../components/effects" as MoneroEffects 32 | 33 | MoneroEffects.ImageMask { 34 | id: button 35 | z: 666 36 | color: BittubeComponents.Style.defaultFontColor 37 | image: "" 38 | 39 | signal clicked(var mouse) 40 | 41 | MouseArea { 42 | anchors.fill: parent 43 | hoverEnabled: true 44 | cursorShape: Qt.PointingHandCursor 45 | 46 | onEntered: { 47 | button.width = button.width + 2 48 | button.height = button.height + 2 49 | } 50 | 51 | onExited: { 52 | button.width = button.width - 2 53 | button.height = button.height - 2 54 | } 55 | 56 | onClicked: button.clicked(mouse) 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /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.9 31 | 32 | import "../components" as BittubeComponents 33 | 34 | TextField { 35 | id: textField 36 | font.family: BittubeComponents.Style.fontRegular.name 37 | font.pixelSize: 18 38 | font.bold: true 39 | horizontalAlignment: TextInput.AlignLeft 40 | selectByMouse: true 41 | color: BittubeComponents.Style.defaultFontColor 42 | selectionColor: BittubeComponents.Style.textSelectionColor 43 | selectedTextColor: BittubeComponents.Style.textSelectedColor 44 | 45 | background: Rectangle { 46 | color: "transparent" 47 | } 48 | 49 | BittubeComponents.ContextMenu { 50 | cursorShape: Qt.IBeamCursor 51 | onPaste: { 52 | textField.clear(); 53 | textField.paste(); 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /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.9 30 | import QtQuick.Layouts 1.1 31 | 32 | import "../components" as BittubeComponents 33 | 34 | 35 | Rectangle { 36 | signal clicked(); 37 | property alias text: labelButtonText.text 38 | 39 | id: labelButton 40 | color: BittubeComponents.Style.buttonBackgroundColorDisabled 41 | radius: 3 42 | height: 20 43 | width: labelButtonText.width + 14 44 | anchors.right: copyButton.left 45 | anchors.rightMargin: 6 46 | 47 | BittubeComponents.TextPlain { 48 | id: labelButtonText 49 | anchors.verticalCenter: parent.verticalCenter 50 | anchors.horizontalCenter: parent.horizontalCenter 51 | font.family: BittubeComponents.Style.fontRegular.name 52 | font.pixelSize: 12 53 | font.bold: true 54 | text: "" 55 | color: BittubeComponents.Style.inlineButtonTextColor 56 | } 57 | 58 | MouseArea { 59 | cursorShape: Qt.PointingHandCursor 60 | anchors.fill: parent 61 | hoverEnabled: true 62 | onClicked: labelButton.clicked() 63 | onEntered: { 64 | labelButton.color = BittubeComponents.Style.buttonBackgroundColorDisabledHover; 65 | labelButtonText.opacity = 0.8; 66 | } 67 | onExited: { 68 | labelButton.color = BittubeComponents.Style.buttonBackgroundColorDisabled; 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.9 30 | 31 | import "../components" as BittubeComponents 32 | import "../components/effects/" as MoneroEffects 33 | 34 | Label { 35 | id: item 36 | fontSize: 18 37 | 38 | Rectangle { 39 | anchors.top: item.bottom 40 | anchors.topMargin: 4 41 | anchors.left: parent.left 42 | anchors.right: parent.right 43 | height: 2 44 | color: BittubeComponents.Style.appWindowBorderColor 45 | 46 | MoneroEffects.ColorTransition { 47 | targetObj: parent 48 | blackColor: BittubeComponents.Style._b_appWindowBorderColor 49 | whiteColor: BittubeComponents.Style._w_appWindowBorderColor 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /components/MenuButtonDivider.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.9 2 | 3 | import "." as BittubeComponents 4 | import "effects/" as MoneroEffects 5 | 6 | Rectangle { 7 | color: BittubeComponents.Style.appWindowBorderColor 8 | height: 1 9 | 10 | MoneroEffects.ColorTransition { 11 | targetObj: parent 12 | blackColor: BittubeComponents.Style._b_appWindowBorderColor 13 | whiteColor: BittubeComponents.Style._w_appWindowBorderColor 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /components/TextBlock.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.9 2 | 3 | import "../components" as BittubeComponents 4 | 5 | TextEdit { 6 | color: BittubeComponents.Style.defaultFontColor 7 | font.family: BittubeComponents.Style.fontRegular.name 8 | selectionColor: BittubeComponents.Style.textSelectionColor 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/TextPlain.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.9 2 | 3 | import "." as BittubeComponents 4 | import "effects/" as MoneroEffects 5 | 6 | Text { 7 | // When using this component, please note that if you use a color different 8 | // than `defaultFontColor`, you are required to also define `themeTransitionXColor`. 9 | // If you do not set these the component will receive the wrong color after a transition. 10 | // If you do not want to set these, use `themeTransition: false`. 11 | id: root 12 | property bool themeTransition: true 13 | property string themeTransitionBlackColor: "" 14 | property string themeTransitionWhiteColor: "" 15 | font.family: BittubeComponents.Style.fontMedium.name 16 | font.bold: false 17 | font.pixelSize: 14 18 | textFormat: Text.PlainText 19 | 20 | MoneroEffects.ColorTransition { 21 | enabled: root.themeTransition 22 | themeTransition: root.themeTransition 23 | targetObj: root 24 | duration: 750 25 | blackColor: root.themeTransitionBlackColor !== "" ? root.themeTransitionBlackColor : BittubeComponents.Style._b_defaultFontColor 26 | whiteColor: root.themeTransitionWhiteColor !== "" ? root.themeTransitionWhiteColor : BittubeComponents.Style._w_defaultFontColor 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /components/TextPlainArea.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.9 2 | import QtQuick.Controls 2.0 3 | 4 | import "." as BittubeComponents 5 | 6 | TextArea { 7 | id: textArea 8 | property bool themeTransition: true 9 | property string colorWhiteTheme: "" 10 | property string colorBlackTheme: "" 11 | color: BittubeComponents.Style.defaultFontColor 12 | font.family: BittubeComponents.Style.fontRegular.name 13 | font.pixelSize: 14 14 | selectByMouse: false 15 | wrapMode: Text.WordWrap; 16 | textMargin: 0 17 | leftPadding: 0 18 | topPadding: 0 19 | readOnly: true 20 | textFormat: TextEdit.PlainText 21 | 22 | states: [ 23 | State { 24 | name: "black"; 25 | when: textArea.themeTransition && BittubeComponents.Style.blackTheme 26 | PropertyChanges { 27 | target: textArea 28 | color: { 29 | return textArea.colorBlackTheme ? textArea.colorBlackTheme : BittubeComponents.Style._b_defaultFontColor 30 | } 31 | } 32 | }, State { 33 | name: "white"; 34 | when: textArea.themeTransition && !BittubeComponents.Style.blackTheme 35 | PropertyChanges { 36 | target: textArea 37 | color: { 38 | return textArea.colorWhiteTheme ? textArea.colorWhiteTheme : BittubeComponents.Style._w_defaultFontColor 39 | } 40 | } 41 | } 42 | ] 43 | 44 | transitions: Transition { 45 | enabled: appWindow.themeTransition 46 | ColorAnimation { properties: "color"; easing.type: Easing.InOutQuad; duration: 750 } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /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.9 30 | import QtQuick.Window 2.1 31 | 32 | import "../components" as BittubeComponents 33 | 34 | Window { 35 | property alias text: content.text 36 | property alias containsMouse: tipArea.containsMouse 37 | flags: Qt.ToolTip 38 | color: "transparent" 39 | height: rect.height + tip.height 40 | width: rect.width 41 | 42 | MouseArea { 43 | id: tipArea 44 | hoverEnabled: true 45 | anchors.fill: parent 46 | } 47 | 48 | Rectangle { 49 | id: rect 50 | width: content.width + 12 51 | height: content.height + 17 52 | color: "#FF6C3C" 53 | //radius: 3 54 | 55 | Image { 56 | id: tip 57 | anchors.top: parent.bottom 58 | anchors.left: parent.left 59 | anchors.leftMargin: 5 60 | source: "qrc:///images/tip.png" 61 | } 62 | 63 | BittubeComponents.TextPlain { 64 | id: content 65 | anchors.horizontalCenter: parent.horizontalCenter 66 | y: 6 67 | lineHeight: 0.7 68 | font.family: "Arial" 69 | font.pixelSize: 12 70 | color: "#FFFFFF" 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /components/WarningBox.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.9 2 | import QtQuick.Layouts 1.1 3 | import QtQuick.Controls 2.0 4 | 5 | import "." as BittubeComponents 6 | 7 | Rectangle { 8 | id: root 9 | property alias text: content.text 10 | property alias textColor: content.color 11 | property int fontSize: 15 12 | 13 | Layout.fillWidth: true 14 | Layout.preferredHeight: warningLayout.height 15 | 16 | color: BittubeComponents.Style.titleBarButtonHoverColor 17 | radius: 4 18 | border.color: BittubeComponents.Style.inputBorderColorInActive 19 | border.width: 1 20 | 21 | signal linkActivated; 22 | 23 | RowLayout { 24 | id: warningLayout 25 | spacing: 0 26 | anchors.left: parent.left 27 | anchors.right: parent.right 28 | 29 | Image { 30 | Layout.alignment: Qt.AlignVCenter 31 | Layout.preferredHeight: 33 32 | Layout.preferredWidth: 33 33 | Layout.rightMargin: 12 34 | Layout.leftMargin: 18 35 | Layout.topMargin: 12 36 | Layout.bottomMargin: 12 37 | source: "qrc:///images/warning.png" 38 | } 39 | 40 | Text { 41 | id: content 42 | Layout.fillWidth: true 43 | color: BittubeComponents.Style.defaultFontColor 44 | font.family: BittubeComponents.Style.fontRegular.name 45 | font.pixelSize: root.fontSize 46 | horizontalAlignment: TextInput.AlignLeft 47 | textFormat: Text.RichText 48 | wrapMode: Text.WordWrap 49 | leftPadding: 4 50 | rightPadding: 18 51 | topPadding: 10 52 | bottomPadding: 10 53 | onLinkActivated: root.linkActivated(); 54 | 55 | MouseArea { 56 | anchors.fill: parent 57 | acceptedButtons: Qt.NoButton 58 | cursorShape: parent.hoveredLink ? Qt.PointingHandCursor : Qt.ArrowCursor 59 | } 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /components/effects/ColorTransition.qml: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2019, 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.9 30 | import QtGraphicalEffects 1.0 31 | 32 | import "../" as BittubeComponents 33 | 34 | Item { 35 | id: root 36 | property var targetObj 37 | property string blackColor: "" 38 | property string whiteColor: "" 39 | property int duration: 300 40 | property bool themeTransition: true 41 | 42 | states: [ 43 | State { 44 | name: "black"; 45 | when: BittubeComponents.Style.blackTheme && root.themeTransition 46 | PropertyChanges { target: root.targetObj; color: root.blackColor} 47 | }, State { 48 | name: "white"; 49 | when: !BittubeComponents.Style.blackTheme && root.themeTransition 50 | PropertyChanges { target: root.targetObj; color: root.whiteColor} 51 | } 52 | ] 53 | 54 | transitions: Transition { 55 | enabled: appWindow.themeTransition 56 | ColorAnimation { properties: "color"; easing.type: Easing.InOutQuad; duration: root.duration } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /fonts/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | qt5_add_resources(RESOURCE_FILES *.otf) 2 | -------------------------------------------------------------------------------- /fonts/FontAwesome/Object.qml: -------------------------------------------------------------------------------- 1 | import QtQuick 2.9 2 | 3 | QtObject { 4 | id: object 5 | default property alias children: object.__children 6 | 7 | property list __children: [QtObject {}] 8 | } 9 | -------------------------------------------------------------------------------- /fonts/FontAwesome/fa-brands-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/fonts/FontAwesome/fa-brands-400.ttf -------------------------------------------------------------------------------- /fonts/FontAwesome/fa-regular-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/fonts/FontAwesome/fa-regular-400.ttf -------------------------------------------------------------------------------- /fonts/FontAwesome/fa-solid-900.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/fonts/FontAwesome/fa-solid-900.ttf -------------------------------------------------------------------------------- /fonts/FontAwesome/qmldir: -------------------------------------------------------------------------------- 1 | module FontAwesome 2 | singleton FontAwesome 1.0 FontAwesome.qml 3 | -------------------------------------------------------------------------------- /fonts/Roboto-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/fonts/Roboto-Bold.ttf -------------------------------------------------------------------------------- /fonts/Roboto-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/fonts/Roboto-Light.ttf -------------------------------------------------------------------------------- /fonts/Roboto-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/fonts/Roboto-Medium.ttf -------------------------------------------------------------------------------- /fonts/Roboto-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/fonts/Roboto-Regular.ttf -------------------------------------------------------------------------------- /fonts/RobotoMono-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/fonts/RobotoMono-Bold.ttf -------------------------------------------------------------------------------- /fonts/RobotoMono-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/fonts/RobotoMono-Light.ttf -------------------------------------------------------------------------------- /fonts/RobotoMono-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/fonts/RobotoMono-Medium.ttf -------------------------------------------------------------------------------- /fonts/RobotoMono-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/fonts/RobotoMono-Regular.ttf -------------------------------------------------------------------------------- /images/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | qt5_add_resources(RESOURCE_FILES *.png) 2 | -------------------------------------------------------------------------------- /images/appicon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/appicon.icns -------------------------------------------------------------------------------- /images/appicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/appicon.ico -------------------------------------------------------------------------------- /images/appicons/128x128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/appicons/128x128.png -------------------------------------------------------------------------------- /images/appicons/16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/appicons/16x16.png -------------------------------------------------------------------------------- /images/appicons/24x24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/appicons/24x24.png -------------------------------------------------------------------------------- /images/appicons/256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/appicons/256x256.png -------------------------------------------------------------------------------- /images/appicons/32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/appicons/32x32.png -------------------------------------------------------------------------------- /images/appicons/48x48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/appicons/48x48.png -------------------------------------------------------------------------------- /images/appicons/64x64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/appicons/64x64.png -------------------------------------------------------------------------------- /images/appicons/96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/appicons/96x96.png -------------------------------------------------------------------------------- /images/arrow-right-in-circle-outline-medium-white.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /images/arrow-right-in-circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/arrow-right-in-circle.png -------------------------------------------------------------------------------- /images/arrow-right-in-circle@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/arrow-right-in-circle@2x.png -------------------------------------------------------------------------------- /images/arrow-right-medium-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/arrow-right-medium-white.png -------------------------------------------------------------------------------- /images/arrow-right-medium-white@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/arrow-right-medium-white@2x.png -------------------------------------------------------------------------------- /images/bittubeIcon-28x28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/bittubeIcon-28x28.png -------------------------------------------------------------------------------- /images/bittubeIcon-28x28@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/bittubeIcon-28x28@2x.png -------------------------------------------------------------------------------- /images/bittubeIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/bittubeIcon.png -------------------------------------------------------------------------------- /images/bittubeLogo2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/bittubeLogo2.png -------------------------------------------------------------------------------- /images/bittubeLogo_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/bittubeLogo_white.png -------------------------------------------------------------------------------- /images/card-background-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/card-background-black.png -------------------------------------------------------------------------------- /images/card-background-black@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/card-background-black@2x.png -------------------------------------------------------------------------------- /images/card-background-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/card-background-white.png -------------------------------------------------------------------------------- /images/card-background-white@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/card-background-white@2x.png -------------------------------------------------------------------------------- /images/check-white.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /images/close.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /images/copy.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /images/create-wallet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/create-wallet.png -------------------------------------------------------------------------------- /images/create-wallet@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/create-wallet@2x.png -------------------------------------------------------------------------------- /images/edit.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /images/fullscreen.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /images/historyBorderRadius.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/historyBorderRadius.png -------------------------------------------------------------------------------- /images/langFlagGrey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/langFlagGrey.png -------------------------------------------------------------------------------- /images/lightning-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/lightning-white.png -------------------------------------------------------------------------------- /images/lightning-white@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/lightning-white@2x.png -------------------------------------------------------------------------------- /images/lightning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/lightning.png -------------------------------------------------------------------------------- /images/lightning@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/lightning@2x.png -------------------------------------------------------------------------------- /images/local-node-full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/local-node-full.png -------------------------------------------------------------------------------- /images/local-node-full@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/local-node-full@2x.png -------------------------------------------------------------------------------- /images/local-node.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/local-node.png -------------------------------------------------------------------------------- /images/local-node@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/local-node@2x.png -------------------------------------------------------------------------------- /images/lockIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/lockIcon.png -------------------------------------------------------------------------------- /images/logout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/logout.png -------------------------------------------------------------------------------- /images/logout@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/logout@2x.png -------------------------------------------------------------------------------- /images/menuButtonGradient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/menuButtonGradient.png -------------------------------------------------------------------------------- /images/merchant/arrow_right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/merchant/arrow_right.png -------------------------------------------------------------------------------- /images/merchant/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/merchant/bg.png -------------------------------------------------------------------------------- /images/merchant/input_box.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/merchant/input_box.png -------------------------------------------------------------------------------- /images/middlePanelShadow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/middlePanelShadow.png -------------------------------------------------------------------------------- /images/minimize.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /images/miningtube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/miningtube.png -------------------------------------------------------------------------------- /images/miningtube@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/miningtube@2x.png -------------------------------------------------------------------------------- /images/nextPage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/nextPage.png -------------------------------------------------------------------------------- /images/nextPage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/nextPage@2x.png -------------------------------------------------------------------------------- /images/open-wallet-from-file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/open-wallet-from-file.png -------------------------------------------------------------------------------- /images/open-wallet-from-file@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/open-wallet-from-file@2x.png -------------------------------------------------------------------------------- /images/prevMonth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/prevMonth.png -------------------------------------------------------------------------------- /images/prevMonth@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/prevMonth@2x.png -------------------------------------------------------------------------------- /images/question.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/question.png -------------------------------------------------------------------------------- /images/question@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/question@2x.png -------------------------------------------------------------------------------- /images/remote-node.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/remote-node.png -------------------------------------------------------------------------------- /images/remote-node@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/remote-node@2x.png -------------------------------------------------------------------------------- /images/resize.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/resize.png -------------------------------------------------------------------------------- /images/resize@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/resize@2x.png -------------------------------------------------------------------------------- /images/resizeHovered.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/resizeHovered.png -------------------------------------------------------------------------------- /images/resizeHovered@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/resizeHovered@2x.png -------------------------------------------------------------------------------- /images/restore-wallet-from-hardware.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/restore-wallet-from-hardware.png -------------------------------------------------------------------------------- /images/restore-wallet-from-hardware@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/restore-wallet-from-hardware@2x.png -------------------------------------------------------------------------------- /images/restore-wallet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/restore-wallet.png -------------------------------------------------------------------------------- /images/restore-wallet@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/restore-wallet@2x.png -------------------------------------------------------------------------------- /images/right.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /images/rightArrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/rightArrow.png -------------------------------------------------------------------------------- /images/rightArrow@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/rightArrow@2x.png -------------------------------------------------------------------------------- /images/rightArrowInactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/rightArrowInactive.png -------------------------------------------------------------------------------- /images/rightArrowInactive@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/rightArrowInactive@2x.png -------------------------------------------------------------------------------- /images/tails-grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/tails-grey.png -------------------------------------------------------------------------------- /images/themes/white/close.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /images/themes/white/fullscreen.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /images/themes/white/leftPanelBg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/themes/white/leftPanelBg.jpg -------------------------------------------------------------------------------- /images/themes/white/middlePanelBg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/themes/white/middlePanelBg.jpg -------------------------------------------------------------------------------- /images/themes/white/minimize.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /images/themes/white/question.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /images/themes/white/titlebarLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/themes/white/titlebarLogo.png -------------------------------------------------------------------------------- /images/themes/white/titlebarLogo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/themes/white/titlebarLogo@2x.png -------------------------------------------------------------------------------- /images/tip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/tip.png -------------------------------------------------------------------------------- /images/titlebarLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/titlebarLogo.png -------------------------------------------------------------------------------- /images/titlebarLogo@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/titlebarLogo@2x.png -------------------------------------------------------------------------------- /images/uncheckedIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/uncheckedIcon.png -------------------------------------------------------------------------------- /images/uncheckedIcon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/uncheckedIcon@2x.png -------------------------------------------------------------------------------- /images/warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/warning.png -------------------------------------------------------------------------------- /images/warning@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/warning@2x.png -------------------------------------------------------------------------------- /images/whatIsIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/whatIsIcon.png -------------------------------------------------------------------------------- /images/whatIsIcon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/whatIsIcon@2x.png -------------------------------------------------------------------------------- /images/whiteDropIndicator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/whiteDropIndicator.png -------------------------------------------------------------------------------- /images/whiteDropIndicator@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/whiteDropIndicator@2x.png -------------------------------------------------------------------------------- /images/world-flags-globe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/images/world-flags-globe.png -------------------------------------------------------------------------------- /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/Deterministic.md: -------------------------------------------------------------------------------- 1 | # Building the Installer Deterministically 2 | 3 | This file contains info about building the Windows installer deterministically, i.e. how different people on different Windows machines or VMs can build it and arrive at a result that is bit-for-bit identical. This approach is also known as *reproducible builds*, see e.g. [this Wikipedia article](https://en.wikipedia.org/wiki/Reproducible_builds). 4 | 5 | The steps to build the Windows installer deterministically by a group of people are the following (for some details about the build process in general see `README.md`): 6 | 7 | * Agree on a particular version of Inno Setup, and everybody install that 8 | * Get the zip file for the Windows GUI wallet and unpack it, plus make sure / check that the file timestamps are preserved, i.e. upacked timestamp = timestamp in zip file 9 | * Build using Inno Setup and the `Monero.iss` script file 10 | * Success: All people arrive at a bit-for-bit identical installer .exe file, which they can verify by calculating and exchanging SHA256 hashes 11 | 12 | Some background info why this process is relatively simple: 13 | 14 | The tool used to build the Windows installer, Inno Setup, avoids many issues that make reproducible builds very challenging with many other compilers and similar tools: It does not store current date and time in the installer .exe file, and it does not seem to depend on the Windows version it runs on (tried with Windows 7 and two different editions of Windows 10), nor on the locale and display language. 15 | 16 | So fortunately no complicated things as faked current system time or use of VMs with exactly prescribed versions of Windows are necessary. 17 | 18 | The version of Inno Setup **is** important however: People wanting to reproducibly build the installer must agree on a particular version to use. This should not be hard to do however. 19 | 20 | Also important are the **timestamps** of the source files because they go into the installer file, to be restored at install time. 21 | 22 | You would think timestamp preservation is no problem when unpacking the zip archive with the files for the Windows GUI wallet from getbittube.org, but if you use the zip folder unpack functionality of the Windows 7 GUI, the files get the current date, **not** the file recorded in the zip file. (The Windows 10 GUI seems better here, and also the 7zip app.) 23 | 24 | In any case, after unpacking, check the file dates in the `bin` directory where the installer script looks for them with the dates of the files in the zip file: They must be identical. 25 | 26 | Note that the the following line in `Monero.iss` is also important regarding file timestamps: 27 | 28 | TimeStampsInUTC=yes 29 | 30 | Without this line the **timezone** of the machine used to build the installer would matter, with different timezones leading to different installer files. 31 | -------------------------------------------------------------------------------- /installers/windows/FinishImage.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/installers/windows/FinishImage.bmp -------------------------------------------------------------------------------- /installers/windows/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014-2019, 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 | # BitTube GUI Wallet Windows Installer # 2 | 3 | Copyright (c) 2017-2019, 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 Carbon Chamaeleon 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 many 19 | files and directories 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 *Carbon Chamaeleon* that you find on 22 | [the official download page](https://getbittube.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 | Carbon Chamaeleon GUI wallet. 36 | 37 | Note that the installer build process is now reproducible / deterministic. For details check the file [Deterministic.md](Deterministic.md). 38 | 39 | The build steps in detail: 40 | 41 | 1. Install *Inno Setup*. You can get it from [here](http://www.jrsoftware.org/isdl.php) 42 | 2. Get the Inno Setup script plus related files by cloning the whole [bittube-gui GitHub repository](https://github.com/ipbc-dev/bittube-gui); you will only need the files in the installer directory `installers\windows` however. Depending on development state, additionally instead of simply using `master` you may have to checkout a specific branch, like `release-v0.15`. 43 | 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://getbittube.org/downloads/), unpack it somewhere, and copy all the files and subdirectories in the single subdirectory there (currently named `bittube-gui-0.15.0.0`) to this `bin` subdirectory 44 | 4. Start Inno Setup, load `Monero.iss` and compile it 45 | 5. The result i.e. the finished installer will be the file `mysetup.exe` in the `installers\windows\Output` subdirectory 46 | 47 | -------------------------------------------------------------------------------- /installers/windows/WelcomeImage.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/installers/windows/WelcomeImage.bmp -------------------------------------------------------------------------------- /installers/windows/WizardSmallImage.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/installers/windows/WizardSmallImage.bmp -------------------------------------------------------------------------------- /installers/windows/bittube-daemon.bat: -------------------------------------------------------------------------------- 1 | REM Execute the Monero daemon and then stay with window open after it exits 2 | "C:\Program Files\Monero Core\bittubed.exe" 3 | PAUSE 4 | -------------------------------------------------------------------------------- /ios_get_libwallet.api.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash -e 2 | 3 | # 3 header files required by bittube 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 bittube/build > /dev/null 30 | mkdir -p bittube/build/release 31 | pushd bittube/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/bittube-core/bittube" ../.. 33 | make -j4 && make install 34 | popd 35 | echo "Building IOS arm64" 36 | rm -r bittube/build > /dev/null 37 | mkdir -p bittube/build/release 38 | pushd bittube/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/bittube-core/bittube" ../.. 40 | make -j4 && make install 41 | popd 42 | 43 | echo "Creating fat library for armv7 and arm64" 44 | pushd bittube 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/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | qt5_add_resources(RESOURCE_FILES *.js) 2 | -------------------------------------------------------------------------------- /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(address) === "undefined") return ""; 16 | if(typeof(range) === "undefined") range = 8; 17 | return address.substring(0, range) + "..." + address.substring(address.length-range); 18 | } 19 | 20 | function addressTruncatePretty(address, blocks){ 21 | if(typeof(address) === "undefined") return ""; 22 | if(typeof(blocks) === "undefined") blocks = 2; 23 | blocks = blocks <= 1 ? 1 : blocks >= 23 ? 23 : blocks; 24 | var ret = ""; 25 | return address.substring(0, 4 * blocks).match(/.{1,4}/g).join(' ') + " .. " + address.substring(address.length - 4 * blocks).match(/.{1,4}/g).join(' '); 26 | } 27 | 28 | function check256(str, length) { 29 | if (str.length != length) 30 | return false; 31 | for (var i = 0; i < length; ++i) { 32 | if (str[i] >= '0' && str[i] <= '9') 33 | continue; 34 | if (str[i] >= 'a' && str[i] <= 'z') 35 | continue; 36 | if (str[i] >= 'A' && str[i] <= 'Z') 37 | continue; 38 | return false; 39 | } 40 | return true; 41 | } 42 | 43 | function checkAddress(address, testnet) { 44 | return walletManager.addressValid(address, testnet) 45 | } 46 | 47 | function checkTxID(txid) { 48 | return check256(txid, 64) 49 | } 50 | 51 | function checkSignature(signature) { 52 | if (signature.indexOf("OutProofV") === 0) { 53 | if ((signature.length - 10) % 132 != 0) 54 | return false; 55 | return check256(signature, signature.length); 56 | } else if (signature.indexOf("InProofV") === 0) { 57 | if ((signature.length - 9) % 132 != 0) 58 | return false; 59 | return check256(signature, signature.length); 60 | } else if (signature.indexOf("SpendProofV") === 0) { 61 | if ((signature.length - 12) % 88 != 0) 62 | return false; 63 | return check256(signature, signature.length); 64 | } 65 | return false; 66 | } 67 | 68 | function isValidOpenAliasAddress(address) { 69 | address = address.trim() 70 | var dot = address.indexOf('.') 71 | if (dot < 0) 72 | return false 73 | // we can get an awful lot of valid domains, including non ASCII chars... accept anything 74 | return true 75 | } 76 | 77 | function makeQRCodeString(addr, amount) { 78 | var XMR_URI_SCHEME = "bittube:" 79 | var XMR_AMOUNT = "tx_amount" 80 | var qrCodeString ="" 81 | qrCodeString += (XMR_URI_SCHEME + addr) 82 | if (amount !== undefined && amount !== ""){ 83 | qrCodeString += ("?" + XMR_AMOUNT + "=" + amount) 84 | } 85 | return qrCodeString 86 | } 87 | -------------------------------------------------------------------------------- /js/Windows.js: -------------------------------------------------------------------------------- 1 | var flagsCustomDecorations = (Qt.FramelessWindowHint | Qt.CustomizeWindowHint | Qt.WindowSystemMenuHint | Qt.Window); 2 | var flags = (Qt.WindowSystemMenuHint | Qt.Window | Qt.WindowMinimizeButtonHint | Qt.WindowCloseButtonHint | Qt.WindowTitleHint | Qt.WindowMaximizeButtonHint | Qt.WindowFullscreenButtonHint); 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 | } else { 23 | appWindow.flags = flags; 24 | } 25 | 26 | // Reset window 27 | appWindow.hide() 28 | appWindow.x = x 29 | appWindow.y = y 30 | appWindow.show() 31 | } 32 | -------------------------------------------------------------------------------- /lang/flags/bd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/bd.png -------------------------------------------------------------------------------- /lang/flags/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/bg.png -------------------------------------------------------------------------------- /lang/flags/br.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/br.png -------------------------------------------------------------------------------- /lang/flags/catalonia.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/catalonia.png -------------------------------------------------------------------------------- /lang/flags/cn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/cn.png -------------------------------------------------------------------------------- /lang/flags/cz.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/cz.png -------------------------------------------------------------------------------- /lang/flags/de.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/de.png -------------------------------------------------------------------------------- /lang/flags/dk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/dk.png -------------------------------------------------------------------------------- /lang/flags/eg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/eg.png -------------------------------------------------------------------------------- /lang/flags/es.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/es.png -------------------------------------------------------------------------------- /lang/flags/esperanto.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/esperanto.png -------------------------------------------------------------------------------- /lang/flags/fi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/fi.png -------------------------------------------------------------------------------- /lang/flags/fr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/fr.png -------------------------------------------------------------------------------- /lang/flags/gb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/gb.png -------------------------------------------------------------------------------- /lang/flags/hr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/hr.png -------------------------------------------------------------------------------- /lang/flags/hu.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/hu.png -------------------------------------------------------------------------------- /lang/flags/id.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/id.png -------------------------------------------------------------------------------- /lang/flags/il.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/il.png -------------------------------------------------------------------------------- /lang/flags/in.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/in.png -------------------------------------------------------------------------------- /lang/flags/ir.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/ir.png -------------------------------------------------------------------------------- /lang/flags/irl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/irl.png -------------------------------------------------------------------------------- /lang/flags/it.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/it.png -------------------------------------------------------------------------------- /lang/flags/jp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/jp.png -------------------------------------------------------------------------------- /lang/flags/kr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/kr.png -------------------------------------------------------------------------------- /lang/flags/ku.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/ku.png -------------------------------------------------------------------------------- /lang/flags/lt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/lt.png -------------------------------------------------------------------------------- /lang/flags/nb_NO.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/nb_NO.png -------------------------------------------------------------------------------- /lang/flags/nl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/nl.png -------------------------------------------------------------------------------- /lang/flags/pirate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/pirate.png -------------------------------------------------------------------------------- /lang/flags/pk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/pk.png -------------------------------------------------------------------------------- /lang/flags/pl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/pl.png -------------------------------------------------------------------------------- /lang/flags/ps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/ps.png -------------------------------------------------------------------------------- /lang/flags/pt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/pt.png -------------------------------------------------------------------------------- /lang/flags/ro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/ro.png -------------------------------------------------------------------------------- /lang/flags/rs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/rs.png -------------------------------------------------------------------------------- /lang/flags/ru.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/ru.png -------------------------------------------------------------------------------- /lang/flags/se.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/se.png -------------------------------------------------------------------------------- /lang/flags/si.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/si.png -------------------------------------------------------------------------------- /lang/flags/sk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/sk.png -------------------------------------------------------------------------------- /lang/flags/tr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/tr.png -------------------------------------------------------------------------------- /lang/flags/tw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/tw.png -------------------------------------------------------------------------------- /lang/flags/ua.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/ua.png -------------------------------------------------------------------------------- /lang/flags/us.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/lang/flags/us.png -------------------------------------------------------------------------------- /lang/flags/za.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ipbc-dev/bittube-wallet-gui/367b03e098929257d4767d73d291eea02f0da604/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 < $TARGET/start-tails.AppImage < 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 | bittube-wallet-gui 22 | 23 | CFBundleName 24 | BitTube GUI 25 | 26 | NSHumanReadableCopyright 27 | Copyright © 2014-2020 The Monero Project 28 | 29 | CFBundleIdentifier 30 | org.ipbc-dev.bittube-wallet-gui 31 | 32 | CFBundleVersion 33 | @VERSION_LONG@ 34 | 35 | CFBundleShortVersionString 36 | @VERSION@ 37 | 38 | NSSupportsAutomaticGraphicsSwitching 39 | 40 | 41 | NSRequiresAquaSystemAppearance 42 | True 43 | 44 | CFBundleURLTypes 45 | 46 | 47 | CFBundleURLName 48 | bittube Handler 49 | CFBundleURLSchemes 50 | 51 | bittube 52 | 53 | 54 | 55 | CFBundleURLName 56 | bittubeseed Handler 57 | CFBundleURLSchemes 58 | 59 | bittubeseed 60 | 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /src/NetworkType.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2019, 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 | #pragma once 30 | 31 | #include 32 | #include 33 | 34 | class NetworkType : public QObject 35 | { 36 | Q_OBJECT 37 | 38 | public: 39 | enum Type : uint8_t { 40 | MAINNET = Monero::MAINNET, 41 | TESTNET = Monero::TESTNET, 42 | STAGENET = Monero::STAGENET 43 | }; 44 | Q_ENUM(Type) 45 | }; 46 | -------------------------------------------------------------------------------- /src/QR-Code-generator/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB_RECURSE SRC_SOURCES *.cpp) 2 | file(GLOB_RECURSE SRC_HEADERS *.h) 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/QR-Code-scanner/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB_RECURSE SRC_SOURCES *.cpp) 2 | file(GLOB_RECURSE SRC_HEADERS *.h) 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/QR-Code-scanner/QrCodeScanner.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2019, 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 QRCODESCANNER_H_ 30 | #define QRCODESCANNER_H_ 31 | 32 | #include 33 | #include 34 | #include "QrScanThread.h" 35 | 36 | class QVideoProbe; 37 | class QCamera; 38 | 39 | class QrCodeScanner : public QObject 40 | { 41 | Q_OBJECT 42 | 43 | Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged) 44 | 45 | public: 46 | QrCodeScanner(QObject *parent = Q_NULLPTR); 47 | ~QrCodeScanner(); 48 | void setSource(QCamera*); 49 | 50 | bool enabled() const; 51 | void setEnabled(bool enabled); 52 | 53 | public Q_SLOTS: 54 | void processCode(int type, const QString &data); 55 | void processFrame(QVideoFrame); 56 | 57 | Q_SIGNALS: 58 | void enabledChanged(); 59 | 60 | void decoded(const QString &address, const QString &payment_id, const QString &amount, const QString &tx_description, const QString &recipient_name, const QVariantMap &extra_parameters); 61 | void decode(int type, const QString &data); 62 | void notifyError(const QString &error, bool warning = false); 63 | 64 | protected: 65 | void timerEvent(QTimerEvent *); 66 | QrScanThread *m_thread; 67 | int m_processTimerId; 68 | int m_processInterval; 69 | int m_enabled; 70 | QVideoFrame m_curFrame; 71 | QVideoProbe *m_probe; 72 | }; 73 | 74 | #endif 75 | 76 | -------------------------------------------------------------------------------- /src/QR-Code-scanner/QrScanThread.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2019, 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 _QRSCANTHREAD_H_ 30 | #define _QRSCANTHREAD_H_ 31 | 32 | #include 33 | #include 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | 40 | class QrScanThread : public QThread, public zbar::Image::Handler 41 | { 42 | Q_OBJECT 43 | 44 | public: 45 | QrScanThread(QObject *parent = Q_NULLPTR); 46 | void addFrame(const QVideoFrame &frame); 47 | virtual void stop(); 48 | 49 | Q_SIGNALS: 50 | void decoded(int type, const QString &data); 51 | void notifyError(const QString &error, bool warning = false); 52 | 53 | protected: 54 | virtual void run(); 55 | void processVideoFrame(const QVideoFrame &); 56 | void processQImage(const QImage &); 57 | void processZImage(zbar::Image &image); 58 | virtual void image_callback(zbar::Image &image); 59 | bool zimageFromQImage(const QImage&, zbar::Image &); 60 | 61 | private: 62 | zbar::ImageScanner m_scanner; 63 | QSharedPointer m_image; 64 | bool m_running; 65 | QMutex m_mutex; 66 | QWaitCondition m_waitCondition; 67 | QList m_queue; 68 | }; 69 | #endif 70 | -------------------------------------------------------------------------------- /src/TranslationManager.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2019, 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 TRANSLATIONMANAGER_H 30 | #define TRANSLATIONMANAGER_H 31 | 32 | #include 33 | 34 | class QTranslator; 35 | class TranslationManager : public QObject 36 | { 37 | Q_OBJECT 38 | Q_PROPERTY(QString emptyString READ emptyString NOTIFY languageChanged) 39 | public: 40 | Q_INVOKABLE bool setLanguage(const QString &language); 41 | static TranslationManager *instance(); 42 | 43 | QString emptyString(); 44 | 45 | signals: 46 | void languageChanged(); 47 | 48 | private: 49 | explicit TranslationManager(QObject *parent = 0); 50 | 51 | private: 52 | static TranslationManager * m_instance; 53 | QTranslator * m_translator; 54 | 55 | }; 56 | 57 | #endif // TRANSLATIONMANAGER_H 58 | -------------------------------------------------------------------------------- /src/daemon/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB_RECURSE SRC_SOURCES *.cpp) 2 | file(GLOB_RECURSE SRC_HEADERS *.h) 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/libwalletqt/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB_RECURSE SRC_SOURCES *.cpp) 2 | file(GLOB_RECURSE SRC_HEADERS *.h) 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/libwalletqt/QRCodeImageProvider.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2019, 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 "QrCode.hpp" 30 | 31 | #include "QRCodeImageProvider.h" 32 | 33 | QImage QRCodeImageProvider::genQrImage(const QString &id, QSize *size) 34 | { 35 | using namespace qrcodegen; 36 | 37 | QrCode qrcode = QrCode::encodeText(id.toStdString().c_str(), QrCode::Ecc::MEDIUM); 38 | unsigned int black = 0; 39 | unsigned int white = 1; 40 | unsigned int borderSize = 4; 41 | unsigned int imageSize = qrcode.size + (2 * borderSize); 42 | QImage img = QImage(imageSize, imageSize, QImage::Format_Mono); 43 | 44 | for (unsigned int y = 0; y < imageSize; ++y) 45 | for (unsigned int x = 0; x < imageSize; ++x) 46 | if ((x < borderSize) || (x >= imageSize - borderSize) || (y < borderSize) || (y >= imageSize - borderSize)) 47 | img.setPixel(x, y, white); 48 | else 49 | img.setPixel(x, y, qrcode.getModule(x - borderSize, y - borderSize) ? black : white); 50 | if (size) 51 | *size = QSize(imageSize, imageSize); 52 | 53 | return img; 54 | } 55 | 56 | QImage QRCodeImageProvider::requestImage(const QString &id, QSize *size, const QSize &/* requestedSize */) 57 | { 58 | return genQrImage(id, size); 59 | } 60 | -------------------------------------------------------------------------------- /src/libwalletqt/QRCodeImageProvider.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2019, 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 30 | #include 31 | 32 | class QRCodeImageProvider: public QQuickImageProvider 33 | { 34 | public: 35 | QRCodeImageProvider(): QQuickImageProvider(QQuickImageProvider::Image) {} 36 | 37 | QImage requestImage(const QString &id, QSize *size, const QSize &requestedSize); 38 | static QImage genQrImage(const QString &id, QSize *size); 39 | }; 40 | 41 | -------------------------------------------------------------------------------- /src/libwalletqt/Subaddress.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2019, 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 | 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | 40 | class Subaddress : public QObject 41 | { 42 | Q_OBJECT 43 | public: 44 | Q_INVOKABLE void getAll() const; 45 | Q_INVOKABLE bool getRow(int index, std::function callback) const; 46 | Q_INVOKABLE void addRow(quint32 accountIndex, const QString &label) const; 47 | Q_INVOKABLE void setLabel(quint32 accountIndex, quint32 addressIndex, const QString &label) const; 48 | Q_INVOKABLE void refresh(quint32 accountIndex) const; 49 | quint64 count() const; 50 | 51 | signals: 52 | void refreshStarted() const; 53 | void refreshFinished() const; 54 | 55 | public slots: 56 | 57 | private: 58 | explicit Subaddress(Monero::Subaddress * subaddressImpl, QObject *parent); 59 | friend class Wallet; 60 | mutable QReadWriteLock m_lock; 61 | Monero::Subaddress * m_subaddressImpl; 62 | mutable QList m_rows; 63 | }; 64 | 65 | #endif // SUBADDRESS_H 66 | -------------------------------------------------------------------------------- /src/libwalletqt/SubaddressAccount.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2019, 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 SUBADDRESSACCOUNT_H 30 | #define SUBADDRESSACCOUNT_H 31 | 32 | #include 33 | 34 | #include 35 | #include 36 | #include 37 | #include 38 | #include 39 | 40 | class SubaddressAccount : public QObject 41 | { 42 | Q_OBJECT 43 | public: 44 | Q_INVOKABLE void getAll() const; 45 | Q_INVOKABLE bool getRow(int index, std::function callback) const; 46 | Q_INVOKABLE void addRow(const QString &label) const; 47 | Q_INVOKABLE void setLabel(quint32 accountIndex, const QString &label) const; 48 | Q_INVOKABLE void refresh() const; 49 | quint64 count() const; 50 | 51 | signals: 52 | void refreshStarted() const; 53 | void refreshFinished() const; 54 | 55 | public slots: 56 | 57 | private: 58 | explicit SubaddressAccount(Monero::SubaddressAccount * subaddressAccountImpl, QObject *parent); 59 | friend class Wallet; 60 | mutable QReadWriteLock m_lock; 61 | Monero::SubaddressAccount * m_subaddressAccountImpl; 62 | mutable QList m_rows; 63 | }; 64 | 65 | #endif // SUBADDRESSACCOUNT_H 66 | -------------------------------------------------------------------------------- /src/libwalletqt/Transfer.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2019, 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 TRANSFER_H 30 | #define TRANSFER_H 31 | 32 | #include 33 | #include 34 | 35 | class Transfer : public QObject 36 | { 37 | Q_OBJECT 38 | Q_PROPERTY(quint64 amount READ amount) 39 | Q_PROPERTY(QString address READ address) 40 | private: 41 | explicit Transfer(uint64_t _amount, const QString &_address, QObject *parent = 0): QObject(parent), m_amount(_amount), m_address(_address) {}; 42 | private: 43 | friend class TransactionInfo; 44 | quint64 m_amount; 45 | QString m_address; 46 | public: 47 | quint64 amount() const { return m_amount; } 48 | QString address() const { return m_address; } 49 | 50 | }; 51 | 52 | #endif // TRANSACTIONINFO_H 53 | -------------------------------------------------------------------------------- /src/main/Logger.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2019, 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 LOGGER_H 30 | #define LOGGER_H 31 | 32 | const QString getLogPath(const QString logPath); 33 | void messageHandler(QtMsgType type, const QMessageLogContext &context, const QString &message); 34 | 35 | #endif // LOGGER_H 36 | 37 | -------------------------------------------------------------------------------- /src/main/MainApp.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2019, 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 "MainApp.h" 30 | #include 31 | 32 | bool MainApp::event (QEvent *event) 33 | { 34 | // Catch application exit event and signal to qml app to handle exit 35 | if(event->type() == QEvent::Close) { 36 | event->ignore(); 37 | emit closing(); 38 | return true; 39 | } 40 | 41 | // Pass unhandled events to base class 42 | return QApplication::event(event); 43 | } 44 | -------------------------------------------------------------------------------- /src/main/MainApp.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2019, 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 MAINAPP_H 30 | #define MAINAPP_H 31 | #include 32 | 33 | class MainApp : public QApplication 34 | { 35 | Q_OBJECT 36 | public: 37 | MainApp(int &argc, char** argv) : QApplication(argc, argv) {}; 38 | private: 39 | bool event(QEvent *e); 40 | signals: 41 | void closing(); 42 | }; 43 | 44 | #endif // MAINAPP_H 45 | 46 | 47 | -------------------------------------------------------------------------------- /src/main/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 | -------------------------------------------------------------------------------- /src/main/clipboardAdapter.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2019, 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 | -------------------------------------------------------------------------------- /src/main/filter.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2019, 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 | void uriHandler(const QUrl &url); 53 | }; 54 | 55 | #endif // FILTER_H 56 | -------------------------------------------------------------------------------- /src/main/oscursor.cpp: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2019, 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 "oscursor.h" 30 | #include 31 | OSCursor::OSCursor(QObject *parent) 32 | : QObject(parent) 33 | { 34 | } 35 | QPoint OSCursor::getPosition() const 36 | { 37 | return QCursor::pos(); 38 | } 39 | -------------------------------------------------------------------------------- /src/main/oscursor.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2019, 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 OSCURSOR_H 30 | #define OSCURSOR_H 31 | 32 | 33 | #include 34 | #include 35 | #include 36 | class OSCursor : public QObject 37 | { 38 | Q_OBJECT 39 | //QObject(); 40 | public: 41 | //QObject(QObject* aParent); 42 | //OSCursor(); 43 | explicit OSCursor(QObject *parent = 0); 44 | Q_INVOKABLE QPoint getPosition() const; 45 | }; 46 | 47 | //OSCursor::OSCursor() : QObject(NULL){ 48 | 49 | //} 50 | 51 | 52 | //Q_DECLARE_METATYPE(OSCursor) 53 | #endif // OSCURSOR_H 54 | -------------------------------------------------------------------------------- /src/main/oshelper.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2019, 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 OSHELPER_H 30 | #define OSHELPER_H 31 | 32 | #include 33 | /** 34 | * @brief The OSHelper class - exports to QML some OS-related functions 35 | */ 36 | class OSHelper : public QObject 37 | { 38 | Q_OBJECT 39 | public: 40 | explicit OSHelper(QObject *parent = 0); 41 | 42 | Q_INVOKABLE QString downloadLocation() const; 43 | Q_INVOKABLE bool openContainingFolder(const QString &filePath) const; 44 | Q_INVOKABLE QString openSaveFileDialog(const QString &title, const QString &folder, const QString &filename) const; 45 | Q_INVOKABLE QString temporaryFilename() const; 46 | Q_INVOKABLE QString temporaryPath() const; 47 | Q_INVOKABLE bool removeTemporaryWallet(const QString &walletName) const; 48 | Q_INVOKABLE bool isCapsLock() const; 49 | 50 | signals: 51 | 52 | public slots: 53 | }; 54 | 55 | #endif // OSHELPER_H 56 | -------------------------------------------------------------------------------- /src/model/AddressBookModel.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2019, 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 ADDRESSBOOKMODEL_H 30 | #define ADDRESSBOOKMODEL_H 31 | 32 | #include 33 | 34 | class AddressBook; 35 | 36 | class AddressBookModel : public QAbstractListModel 37 | { 38 | Q_OBJECT 39 | 40 | public: 41 | enum AddressBookRowRole { 42 | AddressBookRole = Qt::UserRole + 1, // for the AddressBookRow object; 43 | AddressBookAddressRole, 44 | AddressBookDescriptionRole, 45 | AddressBookPaymentIdRole, 46 | AddressBookRowIdRole, 47 | }; 48 | Q_ENUM(AddressBookRowRole) 49 | 50 | AddressBookModel(QObject *parent, AddressBook * addressBook); 51 | 52 | int rowCount(const QModelIndex &parent = QModelIndex()) const override; 53 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; 54 | Q_INVOKABLE bool deleteRow(int row); 55 | Q_INVOKABLE int lookupPaymentID(const QString &payment_id) const; 56 | virtual QHash roleNames() const override; 57 | 58 | public slots: 59 | void startReset(); 60 | void endReset(); 61 | 62 | private: 63 | AddressBook * m_addressBook; 64 | }; 65 | 66 | #endif // ADDRESSBOOKMODEL_H 67 | -------------------------------------------------------------------------------- /src/model/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB_RECURSE SRC_SOURCES *.cpp) 2 | file(GLOB_RECURSE SRC_HEADERS *.h) 3 | 4 | 5 | -------------------------------------------------------------------------------- /src/model/SubaddressAccountModel.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2019, 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 SUBADDRESSACCOUNTMODEL_H 30 | #define SUBADDRESSACCOUNTMODEL_H 31 | 32 | #include 33 | 34 | class SubaddressAccount; 35 | 36 | class SubaddressAccountModel : public QAbstractListModel 37 | { 38 | Q_OBJECT 39 | 40 | public: 41 | enum SubaddressAccountRowRole { 42 | SubaddressAccountRole = Qt::UserRole + 1, // for the SubaddressAccountRow object; 43 | SubaddressAccountAddressRole, 44 | SubaddressAccountLabelRole, 45 | SubaddressAccountBalanceRole, 46 | SubaddressAccountUnlockedBalanceRole, 47 | }; 48 | Q_ENUM(SubaddressAccountRowRole) 49 | 50 | SubaddressAccountModel(QObject *parent, SubaddressAccount *subaddressAccount); 51 | 52 | int rowCount(const QModelIndex &parent = QModelIndex()) const override; 53 | QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; 54 | QHash roleNames() const override; 55 | 56 | public slots: 57 | void startReset(); 58 | void endReset(); 59 | 60 | private: 61 | SubaddressAccount *m_subaddressAccount; 62 | }; 63 | 64 | #endif // SUBADDRESSACCOUNTMODEL_H 65 | -------------------------------------------------------------------------------- /src/model/SubaddressModel.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2019, 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/openpgp/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB_RECURSE SOURCES *.cpp) 2 | file(GLOB_RECURSE HEADERS *.h) 3 | 4 | find_library(GCRYPT_LIBRARY gcrypt) 5 | find_library(GPG_ERROR_LIBRARY gpg-error) 6 | 7 | add_library(openpgp 8 | ${SOURCES} 9 | ${HEADERS}) 10 | 11 | target_include_directories(openpgp 12 | PUBLIC 13 | ${CMAKE_SOURCE_DIR}/bittube/contrib/epee/include) 14 | 15 | target_link_libraries(openpgp 16 | PUBLIC 17 | ${GCRYPT_LIBRARY} 18 | ${GPG_ERROR_LIBRARY}) 19 | -------------------------------------------------------------------------------- /src/qt/FutureScheduler.cpp: -------------------------------------------------------------------------------- 1 | #include "FutureScheduler.h" 2 | 3 | FutureScheduler::FutureScheduler(QObject *parent) 4 | : QObject(parent), Alive(0), Stopping(false) 5 | { 6 | } 7 | 8 | FutureScheduler::~FutureScheduler() 9 | { 10 | shutdownWaitForFinished(); 11 | } 12 | 13 | void FutureScheduler::shutdownWaitForFinished() noexcept 14 | { 15 | QMutexLocker locker(&Mutex); 16 | 17 | Stopping = true; 18 | while (Alive > 0) 19 | { 20 | Condition.wait(&Mutex); 21 | } 22 | } 23 | 24 | QPair> FutureScheduler::run(std::function function) noexcept 25 | { 26 | return execute([this, function](QFutureWatcher *) { 27 | return QtConcurrent::run([this, function] { 28 | try 29 | { 30 | function(); 31 | } 32 | catch (const std::exception &exception) 33 | { 34 | qWarning() << "Exception thrown from async function: " << exception.what(); 35 | } 36 | done(); 37 | }); 38 | }); 39 | } 40 | 41 | QPair> FutureScheduler::run(std::function function, const QJSValue &callback) 42 | { 43 | if (!callback.isCallable()) 44 | { 45 | throw std::runtime_error("js callback must be callable"); 46 | } 47 | 48 | return execute([this, function, callback](QFutureWatcher *watcher) { 49 | connect(watcher, &QFutureWatcher::finished, [watcher, callback] { 50 | QJSValue(callback).call(watcher->future().result()); 51 | }); 52 | return QtConcurrent::run([this, function] { 53 | QJSValueList result; 54 | try 55 | { 56 | result = function(); 57 | } 58 | catch (const std::exception &exception) 59 | { 60 | qWarning() << "Exception thrown from async function: " << exception.what(); 61 | } 62 | done(); 63 | return result; 64 | }); 65 | }); 66 | } 67 | 68 | bool FutureScheduler::add() noexcept 69 | { 70 | QMutexLocker locker(&Mutex); 71 | 72 | if (Stopping) 73 | { 74 | return false; 75 | } 76 | 77 | ++Alive; 78 | return true; 79 | } 80 | 81 | void FutureScheduler::done() noexcept 82 | { 83 | { 84 | QMutexLocker locker(&Mutex); 85 | --Alive; 86 | } 87 | 88 | Condition.wakeAll(); 89 | } 90 | -------------------------------------------------------------------------------- /src/qt/FutureScheduler.h: -------------------------------------------------------------------------------- 1 | #ifndef FUTURE_SCHEDULER_H 2 | #define FUTURE_SCHEDULER_H 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | class FutureScheduler : public QObject 15 | { 16 | Q_OBJECT 17 | 18 | public: 19 | FutureScheduler(QObject *parent); 20 | ~FutureScheduler(); 21 | 22 | void shutdownWaitForFinished() noexcept; 23 | 24 | QPair> run(std::function function) noexcept; 25 | QPair> run(std::function function, const QJSValue &callback); 26 | 27 | private: 28 | bool add() noexcept; 29 | void done() noexcept; 30 | 31 | template 32 | QPair> execute(std::function(QFutureWatcher *)> makeFuture) noexcept 33 | { 34 | if (add()) 35 | { 36 | try 37 | { 38 | auto *watcher = new QFutureWatcher(); 39 | connect(watcher, &QFutureWatcher::finished, [watcher] { 40 | watcher->deleteLater(); 41 | }); 42 | watcher->setFuture(makeFuture(watcher)); 43 | return qMakePair(true, watcher->future()); 44 | } 45 | catch (const std::exception &exception) 46 | { 47 | qCritical() << "Failed to schedule async function: " << exception.what(); 48 | done(); 49 | } 50 | } 51 | 52 | return qMakePair(false, QFuture()); 53 | } 54 | 55 | QFutureWatcher schedule(std::function function); 56 | QFutureWatcher schedule(std::function function, const QJSValue &callback); 57 | 58 | private: 59 | size_t Alive; 60 | QWaitCondition Condition; 61 | QMutex Mutex; 62 | bool Stopping; 63 | }; 64 | 65 | #endif // FUTURE_SCHEDULER_H 66 | -------------------------------------------------------------------------------- /src/qt/TailsOS.h: -------------------------------------------------------------------------------- 1 | #ifndef TAILSOS_H 2 | #define TAILSOS_H 3 | 4 | #include 5 | 6 | 7 | class TailsOS 8 | { 9 | public: 10 | TailsOS(); 11 | static bool detect(); 12 | static bool detectDataPersistence(); 13 | static bool detectDotPersistence(); 14 | 15 | static void showDataPersistenceDisabledWarning(); 16 | static void askPersistence(); 17 | static void persistXdgMime(QString filePath, QString data); 18 | 19 | static bool usePersistence; 20 | static QString tailsPathData; 21 | }; 22 | 23 | #endif // TAILSOS_H 24 | -------------------------------------------------------------------------------- /src/qt/downloader.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2020, 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 | #pragma once 30 | 31 | #include 32 | 33 | #include "network.h" 34 | 35 | class Downloader : public QObject 36 | { 37 | Q_OBJECT 38 | Q_PROPERTY(bool active READ active NOTIFY activeChanged); 39 | Q_PROPERTY(quint64 loaded READ loaded NOTIFY loadedChanged); 40 | Q_PROPERTY(quint64 total READ total NOTIFY totalChanged); 41 | 42 | public: 43 | Downloader(QObject *parent = nullptr); 44 | ~Downloader(); 45 | 46 | Q_INVOKABLE void cancel(); 47 | Q_INVOKABLE bool get(const QString &url, const QJSValue &callback); 48 | Q_INVOKABLE bool saveToFile(const QString &path) const; 49 | 50 | signals: 51 | void activeChanged() const; 52 | void loadedChanged() const; 53 | void totalChanged() const; 54 | 55 | private: 56 | bool active() const; 57 | quint64 loaded() const; 58 | quint64 total() const; 59 | 60 | private: 61 | bool m_active; 62 | std::string m_contents; 63 | std::shared_ptr m_httpClient; 64 | mutable QReadWriteLock m_mutex; 65 | Network m_network; 66 | mutable FutureScheduler m_scheduler; 67 | }; 68 | -------------------------------------------------------------------------------- /src/qt/ipc.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2019, 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 IPC_H 30 | #define IPC_H 31 | 32 | #include 33 | #include 34 | #include 35 | 36 | class IPC : public QObject 37 | { 38 | Q_OBJECT 39 | public: 40 | IPC(QObject *parent = 0) : QObject(parent) {} 41 | QFileInfo socketFile() const { return m_socketFile; } 42 | Q_INVOKABLE QString queuedCmd() { return m_queuedCmd; } 43 | void SetQueuedCmd(const QString cmdString) { m_queuedCmd = cmdString; } 44 | 45 | public slots: 46 | void bind(); 47 | void handleConnection(); 48 | bool saveCommand(QString cmdString); 49 | bool saveCommand(const QUrl &url); 50 | void parseCommand(QString cmdString); 51 | void parseCommand(const QUrl &url); 52 | void emitUriHandler(QString uriString); 53 | 54 | signals: 55 | void uriHandler(QString uriString); 56 | 57 | private: 58 | QLocalServer *m_server; 59 | QString m_queuedCmd; 60 | QFileInfo m_socketFile = QFileInfo(QString(QDir::tempPath() + "/xmr-gui_%2.sock").arg(getAccountName())); 61 | }; 62 | 63 | #endif // IPC_H 64 | -------------------------------------------------------------------------------- /src/qt/macoshelper.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2019, 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 MACOSHELPER_H 30 | #define MACOSHELPER_H 31 | 32 | class MacOSHelper 33 | { 34 | MacOSHelper() {} 35 | 36 | public: 37 | static bool isCapsLock(); 38 | static bool openFolderAndSelectItem(const QUrl &path); 39 | }; 40 | 41 | #endif //MACOSHELPER_H 42 | -------------------------------------------------------------------------------- /src/qt/macoshelper.mm: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2019, 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 30 | #include 31 | #include 32 | #include "macoshelper.h" 33 | 34 | #import 35 | #import 36 | #include 37 | #include 38 | #include 39 | 40 | bool MacOSHelper::isCapsLock() 41 | { 42 | #ifdef __MAC_10_12 43 | NSUInteger flags = [NSEvent modifierFlags] & NSEventModifierFlagDeviceIndependentFlagsMask; 44 | return (flags == NSEventModifierFlagCapsLock); 45 | #else 46 | NSUInteger flags = [NSEvent modifierFlags] & NSDeviceIndependentModifierFlagsMask; 47 | return (flags & NSAlphaShiftKeyMask); 48 | #endif 49 | } 50 | 51 | bool MacOSHelper::openFolderAndSelectItem(const QUrl &path) 52 | { 53 | NSURL *nspath = path.toNSURL(); 54 | NSArray *fileURLs = [NSArray arrayWithObjects:nspath, nil]; 55 | [[NSWorkspace sharedWorkspace] activateFileViewerSelectingURLs:fileURLs]; 56 | return true; 57 | } 58 | -------------------------------------------------------------------------------- /src/qt/utils.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2019, 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 UTILS_H 30 | #define UTILS_H 31 | 32 | #include 33 | #include 34 | #include 35 | 36 | bool fileExists(QString path); 37 | QByteArray fileOpen(QString path); 38 | bool fileWrite(QString path, QString data); 39 | QString getAccountName(); 40 | #ifdef Q_OS_LINUX 41 | QString xdgMime(QApplication &app); 42 | void registerXdgMime(QApplication &app); 43 | #endif 44 | const static QRegExp reURI = QRegExp("^\\w+:\\/\\/([\\w+\\-?\\-_\\-=\\-&]+)"); 45 | QString randomUserAgent(); 46 | 47 | #endif // UTILS_H 48 | -------------------------------------------------------------------------------- /src/version.js.in: -------------------------------------------------------------------------------- 1 | var GUI_VERSION = "@VERSIONTAG@" 2 | var GUI_BITTUBE_VERSION = "@VERSIONTAG@" 3 | 4 | -------------------------------------------------------------------------------- /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/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | file(GLOB_RECURSE SRC_SOURCES *.cpp) 2 | file(GLOB_RECURSE SRC_HEADERS *.h) 3 | 4 | 5 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /start-low-graphics-mode.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | 3 | set QMLSCENE_DEVICE=softwarecontext 4 | 5 | start /b bittube-wallet-gui.exe 6 | -------------------------------------------------------------------------------- /tabs/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | qt5_add_resources(RESOURCE_FILES *.qrc) 2 | -------------------------------------------------------------------------------- /translations/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | qt5_add_resources(RESOURCE_FILES *.ts) 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=(libicudt67.dll libicuin67.dll libicuio67.dll libicutu67.dll libicuuc67.dll) 21 | else 22 | echo "Debug build" 23 | ICU_FILES=(libicudtd67.dll libicuind67.dll libicuiod67.dll libicutud67.dll libicuucd67.dll) 24 | fi 25 | 26 | FILES=(libbrotlicommon.dll libbrotlidec.dll libprotobuf.dll libusb-1.0.dll zlib1.dll libzstd.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 libdouble-conversion.dll) 27 | 28 | OPENSSL_FILES=(libssl-1_1 libcrypto-1_1) 29 | 30 | platform=$(get_platform) 31 | 32 | if [[ "$platform" == "mingw64" ]]; then 33 | PLATFORM_FILES="libgcc_s_seh-1.dll" 34 | OPENSSL_SUFFIX="-x64" 35 | elif [[ "$platform" == "mingw32" ]]; then 36 | PLATFORM_FILES="libgcc_s_dw2-1.dll" 37 | OPENSSL_SUFFIX = "" 38 | fi 39 | 40 | for f in "${FILES[@]}"; do cp $MSYSTEM_PREFIX/bin/$f $TARGET || exit 1; done 41 | 42 | for f in "${ICU_FILES[@]}"; do cp $MSYSTEM_PREFIX/bin/$f $TARGET || exit 1; done 43 | 44 | for f in "${PLATFORM_FILES[@]}"; do cp $MSYSTEM_PREFIX/bin/$f $TARGET || exit 1; done 45 | 46 | for f in "${OPENSSL_FILES[@]}"; do cp $MSYSTEM_PREFIX/bin/$f$OPENSSL_SUFFIX.dll $TARGET || exit 1; done 47 | 48 | cp $ROOT_DIR/start-low-graphics-mode.bat $TARGET 49 | -------------------------------------------------------------------------------- /wizard/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | qt5_add_resources(RESOURCE_FILES *.qrc) 2 | -------------------------------------------------------------------------------- /wizard/WizardNavProgressDot.qml: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014-2019, 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.9 30 | import QtQuick.Layouts 1.2 31 | import QtQuick.Controls 2.0 32 | 33 | import "../components" as BittubeComponents 34 | 35 | Rectangle { 36 | property bool active: false 37 | Layout.preferredWidth: 30 38 | Layout.fillHeight: true 39 | property string activeColor: BittubeComponents.Style.defaultFontColor 40 | property string inactiveColor: BittubeComponents.Style.progressBarBackgroundColor 41 | color: "transparent" 42 | 43 | Rectangle { 44 | anchors.horizontalCenter: parent.horizontalCenter 45 | anchors.verticalCenter: parent.verticalCenter 46 | width: 10 47 | height: 10 48 | radius: 10 49 | color: parent.active ? parent.activeColor : parent.inactiveColor 50 | } 51 | } 52 | --------------------------------------------------------------------------------