mirror of
https://github.com/hastagAB/Awesome-Python-Scripts.git
synced 2024-11-23 20:11:07 +00:00
Cryptocurrency converter GUI app
This commit is contained in:
parent
ddddfe1162
commit
605a6e4325
87
Cryptocurrency-converter/CryptoConverter.py
Normal file
87
Cryptocurrency-converter/CryptoConverter.py
Normal file
|
@ -0,0 +1,87 @@
|
|||
from PyQt5.QtGui import *
|
||||
from PyQt5.QtWidgets import *
|
||||
from PyQt5.QtCore import *
|
||||
from MainWindow import Ui_MainWindow
|
||||
import json
|
||||
import requests
|
||||
|
||||
|
||||
class MainWindow(QMainWindow, Ui_MainWindow):
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(MainWindow, self).__init__(*args, **kwargs)
|
||||
self.setupUi(self)
|
||||
self.show()
|
||||
# Vars
|
||||
self.new_label = '0'
|
||||
self.cur1 = 'BTC'
|
||||
self.cur2 = 'USD'
|
||||
self.result = ''
|
||||
# Connect buttons
|
||||
for n in range(0, 10):
|
||||
getattr(self, 'pushButton_n%s' % n).clicked.connect(self.digit_pressed)
|
||||
self.pushButton_n10.clicked.connect(self.decimal_point)
|
||||
self.pushButton_del.clicked.connect(self.del_digit)
|
||||
self.pushButton_convert.clicked.connect(self.convert_fun)
|
||||
self.comboBox.activated[str].connect(self.currencies1)
|
||||
self.comboBox_2.activated[str].connect(self.currencies2)
|
||||
|
||||
def digit_pressed(self):
|
||||
button = self.sender()
|
||||
self.new_label = self.label_1.text() + button.text()
|
||||
if '.' in self.new_label:
|
||||
self.label_1.setText(str(self.new_label))
|
||||
else:
|
||||
self.label_1.setText(str(int(self.new_label)))
|
||||
|
||||
def decimal_point(self):
|
||||
if '.' in self.label_1.text():
|
||||
pass
|
||||
else:
|
||||
self.label_1.setText(self.label_1.text() + '.')
|
||||
|
||||
def del_digit(self):
|
||||
self.new_label = self.new_label[:-1]
|
||||
self.label_1.setText(self.new_label)
|
||||
|
||||
def currencies1(self, item1):
|
||||
self.cur1 = item1
|
||||
# print(self.cur1)
|
||||
|
||||
def currencies2(self, item2):
|
||||
self.cur2 = item2
|
||||
# print(self.cur2)
|
||||
|
||||
# Live data from API
|
||||
def api(self, cur1, cur2):
|
||||
api_link = "https://min-api.cryptocompare.com/data/pricemulti?fsyms={}&tsyms={}".format(cur1, cur2)
|
||||
resp = requests.get(api_link)
|
||||
# print(r.status_code)
|
||||
data = json.loads(resp.content)
|
||||
# print(data)
|
||||
var = data[self.cur1][self.cur2]
|
||||
return var
|
||||
|
||||
def convert_fun(self):
|
||||
try:
|
||||
if len(self.new_label) == 0:
|
||||
self.label_1.setText('0')
|
||||
self.label_2.setText('0')
|
||||
if '.' in self.new_label:
|
||||
self.result = float(self.new_label) * self.api(self.cur1, self.cur2)
|
||||
self.result = round(self.result, 2)
|
||||
self.label_2.setText(str(self.result))
|
||||
else:
|
||||
self.result = int(self.new_label) * self.api(self.cur1, self.cur2)
|
||||
self.result = round(self.result, 2)
|
||||
self.label_2.setText(str(self.result))
|
||||
except (KeyError, ValueError):
|
||||
pass
|
||||
except requests.exceptions.ConnectionError:
|
||||
print('Please verify your internet connection!')
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
app = QApplication([])
|
||||
app.setApplicationName("CryptoConverter")
|
||||
window = MainWindow()
|
||||
app.exec_()
|
383
Cryptocurrency-converter/MainWindow.py
Normal file
383
Cryptocurrency-converter/MainWindow.py
Normal file
|
@ -0,0 +1,383 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Form implementation generated from reading ui file 'mainwindow.ui'
|
||||
# Created by: PyQt5 UI code generator 5.10.1
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
class Ui_MainWindow(object):
|
||||
def setupUi(self, MainWindow):
|
||||
MainWindow.setObjectName("MainWindow")
|
||||
MainWindow.resize(360, 390)
|
||||
MainWindow.setMinimumSize(QtCore.QSize(360, 390))
|
||||
MainWindow.setMaximumSize(QtCore.QSize(360, 390))
|
||||
self.label = QtWidgets.QLabel(MainWindow)
|
||||
self.label.setGeometry(QtCore.QRect(160, 10, 41, 71))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(16)
|
||||
self.label.setFont(font)
|
||||
self.label.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label.setObjectName("label")
|
||||
self.pushButton_n1 = QtWidgets.QPushButton(MainWindow)
|
||||
self.pushButton_n1.setEnabled(True)
|
||||
self.pushButton_n1.setGeometry(QtCore.QRect(70, 90, 60, 50))
|
||||
self.pushButton_n1.setMinimumSize(QtCore.QSize(60, 50))
|
||||
self.pushButton_n1.setMaximumSize(QtCore.QSize(60, 50))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(15)
|
||||
self.pushButton_n1.setFont(font)
|
||||
self.pushButton_n1.setIconSize(QtCore.QSize(20, 20))
|
||||
self.pushButton_n1.setFlat(False)
|
||||
self.pushButton_n1.setObjectName("pushButton_n1")
|
||||
self.pushButton_convert = QtWidgets.QPushButton(MainWindow)
|
||||
self.pushButton_convert.setEnabled(True)
|
||||
self.pushButton_convert.setGeometry(QtCore.QRect(70, 330, 220, 50))
|
||||
self.pushButton_convert.setMinimumSize(QtCore.QSize(220, 50))
|
||||
self.pushButton_convert.setMaximumSize(QtCore.QSize(220, 50))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(13)
|
||||
font.setItalic(True)
|
||||
self.pushButton_convert.setFont(font)
|
||||
self.pushButton_convert.setStyleSheet("background-color: rgb(138, 226, 52);")
|
||||
self.pushButton_convert.setObjectName("pushButton_convert")
|
||||
self.pushButton_del = QtWidgets.QPushButton(MainWindow)
|
||||
self.pushButton_del.setGeometry(QtCore.QRect(230, 270, 60, 50))
|
||||
self.pushButton_del.setMinimumSize(QtCore.QSize(60, 50))
|
||||
self.pushButton_del.setMaximumSize(QtCore.QSize(60, 50))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(13)
|
||||
self.pushButton_del.setFont(font)
|
||||
self.pushButton_del.setStyleSheet("background-color: rgb(239, 41, 41);")
|
||||
self.pushButton_del.setObjectName("pushButton_del")
|
||||
self.pushButton_n3 = QtWidgets.QPushButton(MainWindow)
|
||||
self.pushButton_n3.setEnabled(True)
|
||||
self.pushButton_n3.setGeometry(QtCore.QRect(230, 90, 60, 50))
|
||||
self.pushButton_n3.setMinimumSize(QtCore.QSize(60, 50))
|
||||
self.pushButton_n3.setMaximumSize(QtCore.QSize(60, 50))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(15)
|
||||
self.pushButton_n3.setFont(font)
|
||||
self.pushButton_n3.setIconSize(QtCore.QSize(20, 20))
|
||||
self.pushButton_n3.setFlat(False)
|
||||
self.pushButton_n3.setObjectName("pushButton_n3")
|
||||
self.pushButton_n2 = QtWidgets.QPushButton(MainWindow)
|
||||
self.pushButton_n2.setEnabled(True)
|
||||
self.pushButton_n2.setGeometry(QtCore.QRect(150, 90, 60, 50))
|
||||
self.pushButton_n2.setMinimumSize(QtCore.QSize(60, 50))
|
||||
self.pushButton_n2.setMaximumSize(QtCore.QSize(60, 50))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(15)
|
||||
self.pushButton_n2.setFont(font)
|
||||
self.pushButton_n2.setIconSize(QtCore.QSize(20, 20))
|
||||
self.pushButton_n2.setFlat(False)
|
||||
self.pushButton_n2.setObjectName("pushButton_n2")
|
||||
self.pushButton_n9 = QtWidgets.QPushButton(MainWindow)
|
||||
self.pushButton_n9.setEnabled(True)
|
||||
self.pushButton_n9.setGeometry(QtCore.QRect(230, 210, 60, 50))
|
||||
self.pushButton_n9.setMinimumSize(QtCore.QSize(60, 50))
|
||||
self.pushButton_n9.setMaximumSize(QtCore.QSize(60, 50))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(15)
|
||||
self.pushButton_n9.setFont(font)
|
||||
self.pushButton_n9.setIconSize(QtCore.QSize(20, 20))
|
||||
self.pushButton_n9.setFlat(False)
|
||||
self.pushButton_n9.setObjectName("pushButton_n9")
|
||||
self.pushButton_n8 = QtWidgets.QPushButton(MainWindow)
|
||||
self.pushButton_n8.setEnabled(True)
|
||||
self.pushButton_n8.setGeometry(QtCore.QRect(150, 210, 60, 50))
|
||||
self.pushButton_n8.setMinimumSize(QtCore.QSize(60, 50))
|
||||
self.pushButton_n8.setMaximumSize(QtCore.QSize(60, 50))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(15)
|
||||
self.pushButton_n8.setFont(font)
|
||||
self.pushButton_n8.setIconSize(QtCore.QSize(20, 20))
|
||||
self.pushButton_n8.setFlat(False)
|
||||
self.pushButton_n8.setObjectName("pushButton_n8")
|
||||
self.pushButton_n7 = QtWidgets.QPushButton(MainWindow)
|
||||
self.pushButton_n7.setEnabled(True)
|
||||
self.pushButton_n7.setGeometry(QtCore.QRect(70, 210, 60, 50))
|
||||
self.pushButton_n7.setMinimumSize(QtCore.QSize(60, 50))
|
||||
self.pushButton_n7.setMaximumSize(QtCore.QSize(60, 50))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(15)
|
||||
self.pushButton_n7.setFont(font)
|
||||
self.pushButton_n7.setIconSize(QtCore.QSize(20, 20))
|
||||
self.pushButton_n7.setFlat(False)
|
||||
self.pushButton_n7.setObjectName("pushButton_n7")
|
||||
self.pushButton_n6 = QtWidgets.QPushButton(MainWindow)
|
||||
self.pushButton_n6.setEnabled(True)
|
||||
self.pushButton_n6.setGeometry(QtCore.QRect(230, 150, 60, 50))
|
||||
self.pushButton_n6.setMinimumSize(QtCore.QSize(60, 50))
|
||||
self.pushButton_n6.setMaximumSize(QtCore.QSize(60, 50))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(15)
|
||||
self.pushButton_n6.setFont(font)
|
||||
self.pushButton_n6.setIconSize(QtCore.QSize(20, 20))
|
||||
self.pushButton_n6.setFlat(False)
|
||||
self.pushButton_n6.setObjectName("pushButton_n6")
|
||||
self.pushButton_n5 = QtWidgets.QPushButton(MainWindow)
|
||||
self.pushButton_n5.setEnabled(True)
|
||||
self.pushButton_n5.setGeometry(QtCore.QRect(150, 150, 60, 50))
|
||||
self.pushButton_n5.setMinimumSize(QtCore.QSize(60, 50))
|
||||
self.pushButton_n5.setMaximumSize(QtCore.QSize(60, 50))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(15)
|
||||
self.pushButton_n5.setFont(font)
|
||||
self.pushButton_n5.setIconSize(QtCore.QSize(20, 20))
|
||||
self.pushButton_n5.setFlat(False)
|
||||
self.pushButton_n5.setObjectName("pushButton_n5")
|
||||
self.pushButton_n4 = QtWidgets.QPushButton(MainWindow)
|
||||
self.pushButton_n4.setEnabled(True)
|
||||
self.pushButton_n4.setGeometry(QtCore.QRect(70, 150, 60, 50))
|
||||
self.pushButton_n4.setMinimumSize(QtCore.QSize(60, 50))
|
||||
self.pushButton_n4.setMaximumSize(QtCore.QSize(60, 50))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(15)
|
||||
self.pushButton_n4.setFont(font)
|
||||
self.pushButton_n4.setIconSize(QtCore.QSize(20, 20))
|
||||
self.pushButton_n4.setFlat(False)
|
||||
self.pushButton_n4.setObjectName("pushButton_n4")
|
||||
self.pushButton_n0 = QtWidgets.QPushButton(MainWindow)
|
||||
self.pushButton_n0.setEnabled(True)
|
||||
self.pushButton_n0.setGeometry(QtCore.QRect(150, 270, 60, 50))
|
||||
self.pushButton_n0.setMinimumSize(QtCore.QSize(60, 50))
|
||||
self.pushButton_n0.setMaximumSize(QtCore.QSize(60, 50))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(15)
|
||||
self.pushButton_n0.setFont(font)
|
||||
self.pushButton_n0.setIconSize(QtCore.QSize(20, 20))
|
||||
self.pushButton_n0.setFlat(False)
|
||||
self.pushButton_n0.setObjectName("pushButton_n0")
|
||||
self.label_1 = QtWidgets.QLabel(MainWindow)
|
||||
self.label_1.setGeometry(QtCore.QRect(10, 50, 140, 30))
|
||||
self.label_1.setMinimumSize(QtCore.QSize(140, 30))
|
||||
self.label_1.setMaximumSize(QtCore.QSize(140, 30))
|
||||
self.label_1.setStyleSheet("background-color: rgb(245, 121, 0, 65);")
|
||||
self.label_1.setInputMethodHints(QtCore.Qt.ImhNone)
|
||||
self.label_1.setIndent(-1)
|
||||
self.label_1.setMargin(5)
|
||||
self.label_1.setObjectName("label_1")
|
||||
self.label_2 = QtWidgets.QLabel(MainWindow)
|
||||
self.label_2.setGeometry(QtCore.QRect(210, 50, 140, 30))
|
||||
self.label_2.setMinimumSize(QtCore.QSize(140, 30))
|
||||
self.label_2.setMaximumSize(QtCore.QSize(140, 30))
|
||||
self.label_2.setStyleSheet("background-color: rgb(52, 101, 164, 65);")
|
||||
self.label_2.setText("")
|
||||
self.label_2.setIndent(-1)
|
||||
self.label_2.setMargin(5)
|
||||
self.label_2.setObjectName("label_2")
|
||||
self.pushButton_n10 = QtWidgets.QPushButton(MainWindow)
|
||||
self.pushButton_n10.setEnabled(True)
|
||||
self.pushButton_n10.setGeometry(QtCore.QRect(70, 270, 60, 50))
|
||||
self.pushButton_n10.setMinimumSize(QtCore.QSize(60, 50))
|
||||
self.pushButton_n10.setMaximumSize(QtCore.QSize(60, 50))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(15)
|
||||
self.pushButton_n10.setFont(font)
|
||||
self.pushButton_n10.setIconSize(QtCore.QSize(20, 20))
|
||||
self.pushButton_n10.setFlat(False)
|
||||
self.pushButton_n10.setObjectName("pushButton_n10")
|
||||
self.comboBox_2 = QtWidgets.QComboBox(MainWindow)
|
||||
self.comboBox_2.setEnabled(True)
|
||||
self.comboBox_2.setGeometry(QtCore.QRect(210, 10, 140, 30))
|
||||
self.comboBox_2.setMinimumSize(QtCore.QSize(140, 30))
|
||||
self.comboBox_2.setMaximumSize(QtCore.QSize(140, 30))
|
||||
self.comboBox_2.setMaxVisibleItems(6)
|
||||
self.comboBox_2.setObjectName("comboBox_2")
|
||||
self.comboBox_2.addItem("")
|
||||
self.comboBox_2.addItem("")
|
||||
self.comboBox_2.addItem("")
|
||||
self.comboBox_2.addItem("")
|
||||
self.comboBox_2.addItem("")
|
||||
self.comboBox_2.addItem("")
|
||||
self.comboBox_2.addItem("")
|
||||
self.comboBox_2.addItem("")
|
||||
self.comboBox_2.addItem("")
|
||||
self.comboBox_2.addItem("")
|
||||
self.comboBox_2.addItem("")
|
||||
self.comboBox_2.addItem("")
|
||||
self.comboBox_2.addItem("")
|
||||
self.comboBox_2.addItem("")
|
||||
self.comboBox_2.addItem("")
|
||||
self.comboBox_2.addItem("")
|
||||
self.comboBox_2.addItem("")
|
||||
self.comboBox_2.addItem("")
|
||||
self.comboBox_2.addItem("")
|
||||
self.comboBox_2.addItem("")
|
||||
self.comboBox_2.addItem("")
|
||||
self.comboBox_2.addItem("")
|
||||
self.comboBox_2.addItem("")
|
||||
self.comboBox_2.addItem("")
|
||||
self.comboBox_2.addItem("")
|
||||
self.comboBox_2.addItem("")
|
||||
self.comboBox_2.addItem("")
|
||||
self.comboBox_2.addItem("")
|
||||
self.comboBox_2.addItem("")
|
||||
self.comboBox_2.addItem("")
|
||||
self.comboBox_2.addItem("")
|
||||
self.comboBox_2.addItem("")
|
||||
self.comboBox_2.addItem("")
|
||||
self.comboBox_2.addItem("")
|
||||
self.comboBox_2.addItem("")
|
||||
self.comboBox_2.addItem("")
|
||||
self.comboBox_2.addItem("")
|
||||
self.comboBox_2.addItem("")
|
||||
self.comboBox_2.addItem("")
|
||||
self.comboBox_2.addItem("")
|
||||
self.comboBox = QtWidgets.QComboBox(MainWindow)
|
||||
self.comboBox.setEnabled(True)
|
||||
self.comboBox.setGeometry(QtCore.QRect(10, 10, 140, 30))
|
||||
self.comboBox.setMinimumSize(QtCore.QSize(140, 30))
|
||||
self.comboBox.setMaximumSize(QtCore.QSize(140, 30))
|
||||
self.comboBox.setMaxVisibleItems(6)
|
||||
self.comboBox.setObjectName("comboBox")
|
||||
self.comboBox.addItem("")
|
||||
self.comboBox.addItem("")
|
||||
self.comboBox.addItem("")
|
||||
self.comboBox.addItem("")
|
||||
self.comboBox.addItem("")
|
||||
self.comboBox.addItem("")
|
||||
self.comboBox.addItem("")
|
||||
self.comboBox.addItem("")
|
||||
self.comboBox.addItem("")
|
||||
self.comboBox.addItem("")
|
||||
self.comboBox.addItem("")
|
||||
self.comboBox.addItem("")
|
||||
self.comboBox.addItem("")
|
||||
self.comboBox.addItem("")
|
||||
self.comboBox.addItem("")
|
||||
self.comboBox.addItem("")
|
||||
self.comboBox.addItem("")
|
||||
self.comboBox.addItem("")
|
||||
self.comboBox.addItem("")
|
||||
self.comboBox.addItem("")
|
||||
self.comboBox.addItem("")
|
||||
self.comboBox.addItem("")
|
||||
self.comboBox.addItem("")
|
||||
self.comboBox.addItem("")
|
||||
self.comboBox.addItem("")
|
||||
self.comboBox.addItem("")
|
||||
self.comboBox.addItem("")
|
||||
self.comboBox.addItem("")
|
||||
self.comboBox.addItem("")
|
||||
self.comboBox.addItem("")
|
||||
self.comboBox.addItem("")
|
||||
self.comboBox.addItem("")
|
||||
self.comboBox.addItem("")
|
||||
self.comboBox.addItem("")
|
||||
self.comboBox.addItem("")
|
||||
self.comboBox.addItem("")
|
||||
self.comboBox.addItem("")
|
||||
self.comboBox.addItem("")
|
||||
self.comboBox.addItem("")
|
||||
self.comboBox.addItem("")
|
||||
self.comboBox.addItem("")
|
||||
|
||||
self.retranslateUi(MainWindow)
|
||||
self.comboBox.setCurrentIndex(0)
|
||||
QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
||||
|
||||
def retranslateUi(self, MainWindow):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
MainWindow.setWindowTitle(_translate("MainWindow", "Cryptocurrency Converter"))
|
||||
self.label.setText(_translate("MainWindow", "<html><head/><body><p><span >To</span></p></body></html>"))
|
||||
self.pushButton_n1.setText(_translate("MainWindow", "1"))
|
||||
self.pushButton_convert.setText(_translate("MainWindow", "Convert"))
|
||||
self.pushButton_del.setText(_translate("MainWindow", "del"))
|
||||
self.pushButton_n3.setText(_translate("MainWindow", "3"))
|
||||
self.pushButton_n2.setText(_translate("MainWindow", "2"))
|
||||
self.pushButton_n9.setText(_translate("MainWindow", "9"))
|
||||
self.pushButton_n8.setText(_translate("MainWindow", "8"))
|
||||
self.pushButton_n7.setText(_translate("MainWindow", "7"))
|
||||
self.pushButton_n6.setText(_translate("MainWindow", "6"))
|
||||
self.pushButton_n5.setText(_translate("MainWindow", "5"))
|
||||
self.pushButton_n4.setText(_translate("MainWindow", "4"))
|
||||
self.pushButton_n0.setText(_translate("MainWindow", "0"))
|
||||
self.label_1.setToolTip(_translate("MainWindow", "Enter a value to convert it."))
|
||||
self.label_1.setText(_translate("MainWindow", "0"))
|
||||
self.label_2.setToolTip(_translate("MainWindow", "Converted value"))
|
||||
self.label_2.setText(_translate("MainWindow", "0"))
|
||||
self.pushButton_n10.setText(_translate("MainWindow", "."))
|
||||
self.comboBox_2.setItemText(0, _translate("MainWindow", "USD"))
|
||||
self.comboBox_2.setItemText(1, _translate("MainWindow", "EUR"))
|
||||
self.comboBox_2.setItemText(2, _translate("MainWindow", "------"))
|
||||
self.comboBox_2.setItemText(3, _translate("MainWindow", "BTC"))
|
||||
self.comboBox_2.setItemText(4, _translate("MainWindow", "ETH"))
|
||||
self.comboBox_2.setItemText(5, _translate("MainWindow", "XRP"))
|
||||
self.comboBox_2.setItemText(6, _translate("MainWindow", "BCH"))
|
||||
self.comboBox_2.setItemText(7, _translate("MainWindow", "EOS"))
|
||||
self.comboBox_2.setItemText(8, _translate("MainWindow", "XLM"))
|
||||
self.comboBox_2.setItemText(9, _translate("MainWindow", "LTC"))
|
||||
self.comboBox_2.setItemText(10, _translate("MainWindow", "USDT"))
|
||||
self.comboBox_2.setItemText(11, _translate("MainWindow", "ADA"))
|
||||
self.comboBox_2.setItemText(12, _translate("MainWindow", "XMR"))
|
||||
self.comboBox_2.setItemText(13, _translate("MainWindow", "DASH"))
|
||||
self.comboBox_2.setItemText(14, _translate("MainWindow", "MIOTA"))
|
||||
self.comboBox_2.setItemText(15, _translate("MainWindow", "TRX"))
|
||||
self.comboBox_2.setItemText(16, _translate("MainWindow", "ETC"))
|
||||
self.comboBox_2.setItemText(17, _translate("MainWindow", "NEO"))
|
||||
self.comboBox_2.setItemText(18, _translate("MainWindow", "XTZ"))
|
||||
self.comboBox_2.setItemText(19, _translate("MainWindow", "BNB"))
|
||||
self.comboBox_2.setItemText(20, _translate("MainWindow", "XEM"))
|
||||
self.comboBox_2.setItemText(21, _translate("MainWindow", "VET"))
|
||||
self.comboBox_2.setItemText(22, _translate("MainWindow", "DOGE"))
|
||||
self.comboBox_2.setItemText(23, _translate("MainWindow", "ZEC"))
|
||||
self.comboBox_2.setItemText(24, _translate("MainWindow", "OMG"))
|
||||
self.comboBox_2.setItemText(25, _translate("MainWindow", "LSK"))
|
||||
self.comboBox_2.setItemText(26, _translate("MainWindow", "BTG"))
|
||||
self.comboBox_2.setItemText(27, _translate("MainWindow", "BCN"))
|
||||
self.comboBox_2.setItemText(28, _translate("MainWindow", "ONT"))
|
||||
self.comboBox_2.setItemText(29, _translate("MainWindow", "NANO"))
|
||||
self.comboBox_2.setItemText(30, _translate("MainWindow", "BTC"))
|
||||
self.comboBox_2.setItemText(31, _translate("MainWindow", "DCR"))
|
||||
self.comboBox_2.setItemText(32, _translate("MainWindow", "QTUM"))
|
||||
self.comboBox_2.setItemText(33, _translate("MainWindow", "MKR"))
|
||||
self.comboBox_2.setItemText(34, _translate("MainWindow", "ZRX"))
|
||||
self.comboBox_2.setItemText(35, _translate("MainWindow", "DGB"))
|
||||
self.comboBox_2.setItemText(36, _translate("MainWindow", "BCD"))
|
||||
self.comboBox_2.setItemText(37, _translate("MainWindow", "ZIL"))
|
||||
self.comboBox_2.setItemText(38, _translate("MainWindow", "ICX"))
|
||||
self.comboBox_2.setItemText(39, _translate("MainWindow", "STEEM"))
|
||||
self.comboBox.setCurrentText(_translate("MainWindow", "BTC"))
|
||||
self.comboBox.setItemText(0, _translate("MainWindow", "BTC"))
|
||||
self.comboBox.setItemText(1, _translate("MainWindow", "------"))
|
||||
self.comboBox.setItemText(2, _translate("MainWindow", "USD"))
|
||||
self.comboBox.setItemText(3, _translate("MainWindow", "EUR"))
|
||||
self.comboBox.setItemText(4, _translate("MainWindow", "------"))
|
||||
self.comboBox.setItemText(5, _translate("MainWindow", "ETH"))
|
||||
self.comboBox.setItemText(6, _translate("MainWindow", "XRP"))
|
||||
self.comboBox.setItemText(7, _translate("MainWindow", "BCH"))
|
||||
self.comboBox.setItemText(8, _translate("MainWindow", "EOS"))
|
||||
self.comboBox.setItemText(9, _translate("MainWindow", "XLM"))
|
||||
self.comboBox.setItemText(10, _translate("MainWindow", "LTC"))
|
||||
self.comboBox.setItemText(11, _translate("MainWindow", "USDT"))
|
||||
self.comboBox.setItemText(12, _translate("MainWindow", "ADA"))
|
||||
self.comboBox.setItemText(13, _translate("MainWindow", "XMR"))
|
||||
self.comboBox.setItemText(14, _translate("MainWindow", "DASH"))
|
||||
self.comboBox.setItemText(15, _translate("MainWindow", "MIOTA"))
|
||||
self.comboBox.setItemText(16, _translate("MainWindow", "TRX"))
|
||||
self.comboBox.setItemText(17, _translate("MainWindow", "ETC"))
|
||||
self.comboBox.setItemText(18, _translate("MainWindow", "NEO"))
|
||||
self.comboBox.setItemText(19, _translate("MainWindow", "XTZ"))
|
||||
self.comboBox.setItemText(20, _translate("MainWindow", "BNB"))
|
||||
self.comboBox.setItemText(21, _translate("MainWindow", "XEM"))
|
||||
self.comboBox.setItemText(22, _translate("MainWindow", "VET"))
|
||||
self.comboBox.setItemText(23, _translate("MainWindow", "DOGE"))
|
||||
self.comboBox.setItemText(24, _translate("MainWindow", "ZEC"))
|
||||
self.comboBox.setItemText(25, _translate("MainWindow", "OMG"))
|
||||
self.comboBox.setItemText(26, _translate("MainWindow", "LSK"))
|
||||
self.comboBox.setItemText(27, _translate("MainWindow", "BTG"))
|
||||
self.comboBox.setItemText(28, _translate("MainWindow", "BCN"))
|
||||
self.comboBox.setItemText(29, _translate("MainWindow", "ONT"))
|
||||
self.comboBox.setItemText(30, _translate("MainWindow", "NANO"))
|
||||
self.comboBox.setItemText(31, _translate("MainWindow", "BTC"))
|
||||
self.comboBox.setItemText(32, _translate("MainWindow", "DCR"))
|
||||
self.comboBox.setItemText(33, _translate("MainWindow", "QTUM"))
|
||||
self.comboBox.setItemText(34, _translate("MainWindow", "MKR"))
|
||||
self.comboBox.setItemText(35, _translate("MainWindow", "ZRX"))
|
||||
self.comboBox.setItemText(36, _translate("MainWindow", "DGB"))
|
||||
self.comboBox.setItemText(37, _translate("MainWindow", "BCD"))
|
||||
self.comboBox.setItemText(38, _translate("MainWindow", "ZIL"))
|
||||
self.comboBox.setItemText(39, _translate("MainWindow", "ICX"))
|
||||
self.comboBox.setItemText(40, _translate("MainWindow", "STEEM"))
|
||||
|
22
Cryptocurrency-converter/README.md
Normal file
22
Cryptocurrency-converter/README.md
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Cryptocurrency Converter
|
||||
A simple GUI of a cryptocurrency converter implemented in Python using PyQt. The UI was designed using Qt Creator.
|
||||
|
||||
<p align="center">
|
||||
<img src ="https://user-images.githubusercontent.com/20237313/45920700-4ebf3a00-bea0-11e8-9e1b-9c8270ac56a6.png"/>
|
||||
</p>
|
||||
|
||||
## Requirement
|
||||
|
||||
Python 3.xx
|
||||
PyQt5
|
||||
requests
|
||||
|
||||
## Usage
|
||||
To start converting your cryptocurrency to USD, EUR, or other cryptocurrencies type:
|
||||
```bash
|
||||
$ virtualenv crypto-env
|
||||
$ source crypto-env/bin/activate
|
||||
$ pip3 install -r requirements.txt
|
||||
$ python CryptoConverter.py
|
||||
```
|
||||
ENJOY 🤩
|
2
Cryptocurrency-converter/requirements.txt
Normal file
2
Cryptocurrency-converter/requirements.txt
Normal file
|
@ -0,0 +1,2 @@
|
|||
PyQt5>=5.6
|
||||
requests
|
|
@ -15,6 +15,7 @@ So far, the following projects have been integrated to this repo:
|
|||
|[AI chatbot](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Artificial-intelligence_bot) |[umar abdullahi](https://github.com/umarbrowser) |
|
||||
|[Asymmetric Encryption](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/asymmetric_cryptography) |[victor matheus](https://github.com/victormatheusc) |
|
||||
|[Bitcoin price GUI](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Bitcoin-Price-GUI) |[Amirul Abu](https://github.com/amirulabu) |
|
||||
|[Cryptocurrency Converter](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Cryptocurrency-converter) |[AdnCodz](https://github.com/AdnCodez) |
|
||||
|[Caesar Cipher](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/caeser_cipher) |[epi052](https://github.com/epi052) |
|
||||
|[Checksum tool](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Checksum) |[Austin Ewens](https://github.com/aewens) |
|
||||
|[Codechef autosubmitter](https://github.com/hastagAB/Awesome-Python-Scripts/tree/master/Codechef-Code-Submitter) |[Harshit Mahajan](https://github.com/hmahajan99) |
|
||||
|
|
Loading…
Reference in New Issue
Block a user