Changeset View
Changeset View
Standalone View
Standalone View
src/qt/optionsmodel.h
// Copyright (c) 2011-2016 The Bitcoin Core developers | // Copyright (c) 2011-2016 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#ifndef BITCOIN_QT_OPTIONSMODEL_H | #ifndef BITCOIN_QT_OPTIONSMODEL_H | ||||
#define BITCOIN_QT_OPTIONSMODEL_H | #define BITCOIN_QT_OPTIONSMODEL_H | ||||
#include <amount.h> | #include <amount.h> | ||||
#include <qt/guiconstants.h> | #include <qt/guiconstants.h> | ||||
#include <QAbstractListModel> | #include <QAbstractListModel> | ||||
#include <cassert> | #include <cassert> | ||||
#include <cstdint> | |||||
namespace interfaces { | namespace interfaces { | ||||
class Node; | class Node; | ||||
} | } | ||||
QT_BEGIN_NAMESPACE | QT_BEGIN_NAMESPACE | ||||
class QNetworkProxy; | class QNetworkProxy; | ||||
QT_END_NAMESPACE | QT_END_NAMESPACE | ||||
extern const char *DEFAULT_GUI_PROXY_HOST; | extern const char *DEFAULT_GUI_PROXY_HOST; | ||||
static constexpr unsigned short DEFAULT_GUI_PROXY_PORT = 9050; | static constexpr uint16_t DEFAULT_GUI_PROXY_PORT = 9050; | ||||
/** | /** | ||||
* Convert configured prune target MiB to displayed GB. Round up to avoid | * Convert configured prune target MiB to displayed GB. Round up to avoid | ||||
* underestimating max disk usage. | * underestimating max disk usage. | ||||
*/ | */ | ||||
static inline int PruneMiBtoGB(int64_t mib) { | static inline int PruneMiBtoGB(int64_t mib) { | ||||
return (mib * 1024 * 1024 + GB_BYTES - 1) / GB_BYTES; | return (mib * 1024 * 1024 + GB_BYTES - 1) / GB_BYTES; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 114 Lines • Show Last 20 Lines |