forked from wowlet/wowlet
Merge pull request 'XMRig - Simple mining GUI to download/run XMRig' (#76) from dsc/feather:xmrig-tab into master
Reviewed-on: feather/feather#76tobtoht-patch-1
commit
96ac717ede
After Width: | Height: | Size: 5.3 KiB |
After Width: | Height: | Size: 955 B |
@ -0,0 +1,98 @@
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
// Copyright (c) 2020, The Monero Project.
|
||||
|
||||
#include <QtCore>
|
||||
#include <QScreen>
|
||||
#include <QDesktopWidget>
|
||||
#include <QProcess>
|
||||
#include <QDesktopServices>
|
||||
|
||||
#include "utils/utils.h"
|
||||
#include "utils/xmrig.h"
|
||||
|
||||
#include "appcontext.h"
|
||||
|
||||
|
||||
XMRig::XMRig(QObject *parent) : QObject(parent)
|
||||
{
|
||||
qDebug() << "Using embedded tor instance";
|
||||
m_process.setProcessChannelMode(QProcess::MergedChannels);
|
||||
|
||||
connect(&m_process, &QProcess::readyReadStandardOutput, this, &XMRig::handleProcessOutput);
|
||||
connect(&m_process, &QProcess::errorOccurred, this, &XMRig::handleProcessError);
|
||||
connect(&m_process, &QProcess::stateChanged, this, &XMRig::stateChanged);
|
||||
}
|
||||
|
||||
void XMRig::stop() {
|
||||
if(m_process.state() == QProcess::Running)
|
||||
m_process.kill();
|
||||
}
|
||||
|
||||
void XMRig::terminate() {
|
||||
if(m_process.state() == QProcess::Running)
|
||||
m_process.terminate();
|
||||
}
|
||||
|
||||
void XMRig::start(unsigned int threads, const QString &pool_name, const QString &receiving_address, bool tor) {
|
||||
auto state = m_process.state();
|
||||
if (state == QProcess::ProcessState::Running || state == QProcess::ProcessState::Starting) {
|
||||
emit error("Can't start XMRig, already running or starting");
|
||||
return;
|
||||
}
|
||||
|
||||
auto path = config()->get(Config::xmrigPath).toString();
|
||||
if(path.isEmpty()) {
|
||||
emit error("Please set path to XMRig binary before starting.");
|
||||
return;
|
||||
}
|
||||
|
||||
if(!Utils::fileExists(path)) {
|
||||
emit error("Path to XMRig binary invalid; file does not exist.");
|
||||
return;
|
||||
}
|
||||
|
||||
QStringList arguments;
|
||||
arguments << "-o" << pool_name;
|
||||
arguments << "-a" << "rx/0";
|
||||
arguments << "-u" << receiving_address;
|
||||
arguments << "-p" << "featherwallet";
|
||||
arguments << "--no-color";
|
||||
arguments << "-t" << QString::number(threads);
|
||||
if(tor)
|
||||
arguments << "-x" << QString("%1:%2").arg(Tor::torHost).arg(Tor::torPort);
|
||||
|
||||
QString cmd = QString("%1 %2").arg(path, arguments.join(" "));
|
||||
emit output(cmd.toUtf8());
|
||||
m_process.start(path, arguments);
|
||||
}
|
||||
|
||||
void XMRig::stateChanged(QProcess::ProcessState state) {
|
||||
if(state == QProcess::ProcessState::Running)
|
||||
emit output("XMRig started");
|
||||
else if (state == QProcess::ProcessState::NotRunning)
|
||||
emit output("XMRig stopped");
|
||||
}
|
||||
|
||||
void XMRig::handleProcessOutput() {
|
||||
QByteArray _output = m_process.readAllStandardOutput();
|
||||
if(_output.contains("miner") && _output.contains("speed")) {
|
||||
// detect hashrate
|
||||
auto str = Utils::barrayToString(_output);
|
||||
auto spl = str.mid(str.indexOf("speed")).split(" ");
|
||||
auto rate = spl.at(2) + "H/s";
|
||||
qDebug() << "mining hashrate: " << rate;
|
||||
emit hashrate(rate);
|
||||
}
|
||||
|
||||
emit output(_output);
|
||||
}
|
||||
|
||||
void XMRig::handleProcessError(QProcess::ProcessError err) {
|
||||
if (err == QProcess::ProcessError::Crashed)
|
||||
emit error("XMRig crashed or killed");
|
||||
else if (err == QProcess::ProcessError::FailedToStart) {
|
||||
auto path = config()->get(Config::xmrigPath).toString();
|
||||
emit error(QString("XMRig binary failed to start: %1").arg(path));
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,43 @@
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
// Copyright (c) 2020, The Monero Project.
|
||||
|
||||
#ifndef FEATHER_XMRIG_H
|
||||
#define FEATHER_XMRIG_H
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <iostream>
|
||||
#include <QtCore>
|
||||
#include <QRegExp>
|
||||
#include <QtNetwork>
|
||||
#include <QApplication>
|
||||
#include <QMainWindow>
|
||||
|
||||
#include "utils/childproc.h"
|
||||
|
||||
class XMRig : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit XMRig(QObject *parent = nullptr);
|
||||
|
||||
void start(unsigned int threads, const QString &pool_name, const QString &receiving_address, bool tor = false);
|
||||
void stop();
|
||||
void terminate();
|
||||
|
||||
signals:
|
||||
void error(const QString &msg);
|
||||
void output(const QByteArray &data);
|
||||
void hashrate(const QString &rate);
|
||||
|
||||
private slots:
|
||||
void stateChanged(QProcess::ProcessState);
|
||||
void handleProcessOutput();
|
||||
void handleProcessError(QProcess::ProcessError error);
|
||||
|
||||
private:
|
||||
ChildProcess m_process;
|
||||
};
|
||||
|
||||
#endif //FEATHER_XMRIG_H
|
@ -0,0 +1,226 @@
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
// Copyright (c) 2020, The Monero Project.
|
||||
|
||||
#include <QStandardItemModel>
|
||||
#include <QTableWidget>
|
||||
#include <QProgressBar>
|
||||
#include <QMessageBox>
|
||||
#include <QDesktopServices>
|
||||
#include <QSysInfo>
|
||||
#include <QScrollBar>
|
||||
#include <QFileDialog>
|
||||
#include <QStandardPaths>
|
||||
|
||||
#include "xmrigwidget.h"
|
||||
#include "ui_xmrigwidget.h"
|
||||
#include "utils/utils.h"
|
||||
|
||||
XMRigWidget::XMRigWidget(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::XMRigWidget),
|
||||
m_model(new QStandardItemModel(this)),
|
||||
m_contextMenu(new QMenu(this))
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
QPixmap p(":assets/images/xmrig.svg");
|
||||
ui->lbl_logo->setPixmap(p.scaled(64, 64, Qt::KeepAspectRatio, Qt::SmoothTransformation));
|
||||
|
||||
// table
|
||||
ui->tableView->setModel(this->m_model);
|
||||
m_contextMenu->addAction(QIcon(":/assets/images/network.png"), "Download file", this, &XMRigWidget::linkClicked);
|
||||
connect(ui->tableView, &QHeaderView::customContextMenuRequested, this, &XMRigWidget::showContextMenu);
|
||||
connect(ui->tableView, &QTableView::doubleClicked, this, &XMRigWidget::linkClicked);
|
||||
|
||||
// XMRig core
|
||||
m_rig = new XMRig(this);
|
||||
connect(m_rig, &XMRig::output, this, &XMRigWidget::onProcessOutput);
|
||||
connect(m_rig, &XMRig::error, this, &XMRigWidget::onProcessError);
|
||||
connect(m_rig, &XMRig::hashrate, this, &XMRigWidget::onHashrate);
|
||||
|
||||
// threads
|
||||
ui->threadSlider->setMinimum(1);
|
||||
int threads = QThread::idealThreadCount();
|
||||
m_threads = (unsigned int) threads / 2;
|
||||
ui->threadSlider->setMaximum(threads);
|
||||
ui->threadSlider->setValue(m_threads);
|
||||
ui->label_threads->setText(QString("CPU threads: %1").arg(m_threads));
|
||||
connect(ui->threadSlider, &QSlider::valueChanged, this, &XMRigWidget::onThreadsValueChanged);
|
||||
|
||||
// buttons
|
||||
connect(ui->btn_start, &QPushButton::clicked, this, &XMRigWidget::onStartClicked);
|
||||
connect(ui->btn_stop, &QPushButton::clicked, this, &XMRigWidget::onStopClicked);
|
||||
connect(ui->btn_browse, &QPushButton::clicked, this, &XMRigWidget::onBrowseClicked);
|
||||
connect(ui->btn_clear, &QPushButton::clicked, this, &XMRigWidget::onClearClicked);
|
||||
|
||||
// defaults
|
||||
ui->btn_stop->setEnabled(false);
|
||||
ui->check_autoscroll->setChecked(true);
|
||||
ui->relayTor->setChecked(true);
|
||||
ui->label_status->setTextInteractionFlags(Qt::TextSelectableByMouse);
|
||||
// XMRig binary
|
||||
auto path = config()->get(Config::xmrigPath).toString();
|
||||
ui->lineEdit_path->setText(path);
|
||||
ui->label_status->hide();
|
||||
if(path.isEmpty())
|
||||
ui->tabWidget->setCurrentIndex(1);
|
||||
|
||||
// pools
|
||||
ui->combo_pools->insertItems(0, m_pools);
|
||||
auto preferredPool = config()->get(Config::xmrigPool).toString();
|
||||
if (m_pools.contains(preferredPool))
|
||||
ui->combo_pools->setCurrentIndex(m_pools.indexOf(preferredPool));
|
||||
connect(ui->combo_pools, QOverload<int>::of(&QComboBox::currentIndexChanged), this, &XMRigWidget::onPoolChanged);
|
||||
|
||||
// info
|
||||
ui->console->appendPlainText(QString("Detected %1 CPU threads.").arg(threads));
|
||||
if(!path.isEmpty() && !Utils::fileExists(path))
|
||||
ui->console->appendPlainText("Invalid path to XMRig binary detected. Please reconfigure on the Settings tab.");
|
||||
else
|
||||
ui->console->appendPlainText(QString("XMRig path set to %1").arg(path));
|
||||
ui->console->appendPlainText("Ready to mine.");
|
||||
}
|
||||
|
||||
void XMRigWidget::onThreadsValueChanged(int threads) {
|
||||
m_threads = (unsigned int) threads;
|
||||
ui->label_threads->setText(QString("CPU threads: %1").arg(m_threads));
|
||||
}
|
||||
|
||||
void XMRigWidget::onPoolChanged(int pos) {
|
||||
config()->set(Config::xmrigPool, m_pools.at(pos));
|
||||
}
|
||||
|
||||
void XMRigWidget::onBrowseClicked() {
|
||||
QString fileName = QFileDialog::getOpenFileName(
|
||||
this, "Path to XMRig executable", QDir::homePath());
|
||||
if (fileName.isEmpty()) return;
|
||||
config()->set(Config::xmrigPath, fileName);
|
||||
ui->lineEdit_path->setText(fileName);
|
||||
}
|
||||
|
||||
void XMRigWidget::onClearClicked() {
|
||||
ui->console->clear();
|
||||
}
|
||||
|
||||
void XMRigWidget::onStartClicked() {
|
||||
auto pool_name = config()->get(Config::xmrigPool).toString();
|
||||
auto addy = ui->lineEdit_address->text();
|
||||
if(addy.isEmpty()) {
|
||||
Utils::showMessageBox("Error", "Please specify a receiving address on the Settings screen", true);
|
||||
return;
|
||||
}
|
||||
|
||||
m_rig->start(m_threads, pool_name, addy, ui->relayTor->isChecked());
|
||||
ui->btn_start->setEnabled(false);
|
||||
ui->btn_stop->setEnabled(true);
|
||||
emit miningStarted();
|
||||
}
|
||||
|
||||
void XMRigWidget::onStopClicked() {
|
||||
m_rig->terminate();
|
||||
ui->btn_start->setEnabled(true);
|
||||
ui->btn_stop->setEnabled(false);
|
||||
ui->label_status->hide();
|
||||
emit miningEnded();
|
||||
}
|
||||
|
||||
void XMRigWidget::onProcessOutput(const QByteArray &data) {
|
||||
auto output = Utils::barrayToString(data);
|
||||
if(output.endsWith("\n"))
|
||||
output = output.trimmed();
|
||||
|
||||
ui->console->appendPlainText(output);
|
||||
|
||||
if(ui->check_autoscroll->isChecked())
|
||||
ui->console->verticalScrollBar()->setValue(ui->console->verticalScrollBar()->maximum());
|
||||
}
|
||||
|
||||
void XMRigWidget::onProcessError(const QString &msg) {
|
||||
ui->console->appendPlainText("\n" + msg);
|
||||
ui->btn_start->setEnabled(true);
|
||||
ui->btn_stop->setEnabled(false);
|
||||
ui->label_status->hide();
|
||||
emit miningEnded();
|
||||
}
|
||||
|
||||
void XMRigWidget::onHashrate(const QString &hashrate) {
|
||||
ui->label_status->show();
|
||||
ui->label_status->setText(QString("Mining at %1").arg(hashrate));
|
||||
}
|
||||
|
||||
void XMRigWidget::onDownloads(const QJsonObject &data) {
|
||||
// For the downloads table we'll manually update the table
|
||||
// with items once, as opposed to creating a class in
|
||||
// src/models/. Saves effort; full-blown model
|
||||
// is unnecessary in this case.
|
||||
|
||||
m_model->clear();
|
||||
m_urls.clear();
|
||||
|
||||
auto version = data.value("version").toString();
|
||||
ui->label_latest_version->setText(QString("Latest version: %1").arg(version));
|
||||
QJsonObject assets = data.value("assets").toObject();
|
||||
|
||||
const auto _linux = assets.value("linux").toArray();
|
||||
const auto macos = assets.value("macos").toArray();
|
||||
const auto windows = assets.value("windows").toArray();
|
||||
|
||||
auto info = QSysInfo::productType();
|
||||
QJsonArray *os_assets;
|
||||
if(info == "osx") {
|
||||
os_assets = const_cast<QJsonArray *>(&macos);
|
||||
} else if (info == "windows") {
|
||||
os_assets = const_cast<QJsonArray *>(&windows);
|
||||
} else {
|
||||
// assume linux
|
||||
os_assets = const_cast<QJsonArray *>(&_linux);
|
||||
}
|
||||
|
||||
unsigned int i = 0;
|
||||
for(const auto &entry: *os_assets) {
|
||||
auto _obj = entry.toObject();
|
||||
auto _name = _obj.value("name").toString();
|
||||
auto _url = _obj.value("url").toString();
|
||||
auto _created_at = _obj.value("created_at").toString();
|
||||
|
||||
m_urls.append(_url);
|
||||
auto download_count = _obj.value("download_count").toInt();
|
||||
|
||||
m_model->setItem(i, 0, Utils::qStandardItem(_name));
|
||||
m_model->setItem(i, 1, Utils::qStandardItem(_created_at));
|
||||
m_model->setItem(i, 2, Utils::qStandardItem(QString::number(download_count)));
|
||||
i++;
|
||||
}
|
||||
|
||||
m_model->setHeaderData(0, Qt::Horizontal, tr("Filename"), Qt::DisplayRole);
|
||||
m_model->setHeaderData(1, Qt::Horizontal, tr("Date"), Qt::DisplayRole);
|
||||
m_model->setHeaderData(2, Qt::Horizontal, tr("Downloads"), Qt::DisplayRole);
|
||||
|
||||
ui->tableView->verticalHeader()->setVisible(false);
|
||||
ui->tableView->setSelectionBehavior(QAbstractItemView::SelectRows);
|
||||
ui->tableView->horizontalHeader()->setSectionResizeMode(QHeaderView::ResizeToContents);
|
||||
ui->tableView->horizontalHeader()->setSectionResizeMode(0, QHeaderView::Stretch);
|
||||
ui->tableView->setColumnWidth(2, 100);
|
||||
}
|
||||
|
||||
void XMRigWidget::showContextMenu(const QPoint &pos) {
|
||||
QModelIndex index = ui->tableView->indexAt(pos);
|
||||
if (!index.isValid()) {
|
||||
return;
|
||||
}
|
||||
m_contextMenu->exec(ui->tableView->viewport()->mapToGlobal(pos));
|
||||
}
|
||||
|
||||
void XMRigWidget::linkClicked() {
|
||||
QModelIndex index = ui->tableView->currentIndex();
|
||||
auto download_link = m_urls.at(index.row());
|
||||
Utils::externalLinkWarning(download_link);
|
||||
}
|
||||
|
||||
QStandardItemModel *XMRigWidget::model() {
|
||||
return m_model;
|
||||
}
|
||||
|
||||
XMRigWidget::~XMRigWidget() {
|
||||
delete ui;
|
||||
}
|
@ -0,0 +1,58 @@
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
// Copyright (c) 2020, The Monero Project.
|
||||
|
||||
#ifndef XMRIGWIDGET_H
|
||||
#define XMRIGWIDGET_H
|
||||
|
||||
#include <QMenu>
|
||||
#include <QWidget>
|
||||
#include <QItemSelection>
|
||||
|
||||
#include "utils/xmrig.h"
|
||||
#include "utils/config.h"
|
||||
|
||||
namespace Ui {
|
||||
class XMRigWidget;
|
||||
}
|
||||
|
||||
class XMRigWidget : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit XMRigWidget(QWidget *parent = nullptr);
|
||||
~XMRigWidget();
|
||||
QStandardItemModel *model();
|
||||
|
||||
public slots:
|
||||
void onStartClicked();
|
||||
void onStopClicked();
|
||||
void onClearClicked();
|
||||
void onDownloads(const QJsonObject &data);
|
||||
void linkClicked();
|
||||
|
||||
private slots:
|
||||
void onBrowseClicked();
|
||||
void onProcessError(const QString &msg);
|
||||
void onProcessOutput(const QByteArray &msg);
|
||||
void onThreadsValueChanged(int date);
|
||||
void onPoolChanged(int pos);
|
||||
void onHashrate(const QString &hashrate);
|
||||
|
||||
signals:
|
||||
void miningStarted();
|
||||
void miningEnded();
|
||||
|
||||
private:
|
||||
void showContextMenu(const QPoint &pos);
|
||||
|
||||
Ui::XMRigWidget *ui;
|
||||
QStandardItemModel *m_model;
|
||||
QMenu *m_contextMenu;
|
||||
unsigned int m_threads;
|
||||
QStringList m_urls;
|
||||
QStringList m_pools{"pool.xmr.pt:5555", "pool.supportxmr.com:3333", "mine.xmrpool.net:3333", "xmrpool.eu:5555", "xmr-eu1.nanopool.org:14444", "pool.minexmr.com:4444", "monerohash.com:2222"};
|
||||
XMRig *m_rig;
|
||||
};
|
||||
|
||||
#endif // REDDITWIDGET_H
|
@ -0,0 +1,387 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>XMRigWidget</class>
|
||||
<widget class="QWidget" name="XMRigWidget">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>556</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<widget class="QTabWidget" name="tabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
<string>Mining</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QFrame" name="outputFrame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QPlainTextEdit" name="console">
|
||||
<property name="readOnly">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QPushButton" name="btn_clear">
|
||||
<property name="text">
|
||||
<string>Clear</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="check_autoscroll">
|
||||
<property name="text">
|
||||
<string>auto-scroll</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_status">
|
||||
<property name="text">
|
||||
<string>Mining at</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btn_stop">
|
||||
<property name="text">
|
||||
<string>Stop</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btn_start">
|
||||
<property name="text">
|
||||
<string>Start mining</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_3">
|
||||
<attribute name="title">
|
||||
<string>Settings</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_4">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_6">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_6">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>Path to XMRig executable</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_path"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btn_browse">
|
||||
<property name="text">
|
||||
<string>Browse</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Receiving address</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_address"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_threads">
|
||||
<property name="text">
|
||||
<string>Threads: </string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QSlider" name="threadSlider">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>Pool</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QComboBox" name="combo_pools">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="relayTor">
|
||||
<property name="text">
|
||||
<string>Relay over Tor</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Maximum</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_5">
|
||||
<item>
|
||||
<widget class="QLabel" name="lbl_logo">
|
||||
<property name="text">
|
||||
<string>logoimg</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>2000</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_2">
|
||||
<attribute name="title">
|
||||
<string>Downloads</string>
|
||||
</attribute>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_7">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_latest_version">
|
||||
<property name="text">
|
||||
<string>Latest version:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_version">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>(right-click to download)</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QTableView" name="tableView">
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::CustomContextMenu</enum>
|
||||
</property>
|
||||
<property name="editTriggers">
|
||||
<set>QAbstractItemView::NoEditTriggers</set>
|
||||
</property>
|
||||
<property name="selectionMode">
|
||||
<enum>QAbstractItemView::SingleSelection</enum>
|
||||
</property>
|
||||
<property name="selectionBehavior">
|
||||
<enum>QAbstractItemView::SelectRows</enum>
|
||||
</property>
|
||||
<property name="sortingEnabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<attribute name="horizontalHeaderStretchLastSection">
|
||||
<bool>false</bool>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Powered by Github API v3</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
<slots>
|
||||
<slot>linkClicked()</slot>
|
||||
</slots>
|
||||
</ui>
|
Loading…
Reference in new issue