2013-11-04 16:20:43 +01:00
|
|
|
// Copyright (c) 2011-2013 The Bitcoin developers
|
|
|
|
// Distributed under the MIT/X11 software license, see the accompanying
|
|
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
|
2011-06-10 15:05:51 +02:00
|
|
|
#include "transactiondescdialog.h"
|
|
|
|
#include "ui_transactiondescdialog.h"
|
|
|
|
|
|
|
|
#include "transactiontablemodel.h"
|
|
|
|
|
|
|
|
#include <QModelIndex>
|
2015-03-08 01:58:09 +01:00
|
|
|
#include <QFile>
|
|
|
|
#include <QSettings>
|
|
|
|
#include <QString>
|
2011-06-10 15:05:51 +02:00
|
|
|
|
|
|
|
TransactionDescDialog::TransactionDescDialog(const QModelIndex &idx, QWidget *parent) :
|
|
|
|
QDialog(parent),
|
|
|
|
ui(new Ui::TransactionDescDialog)
|
|
|
|
{
|
|
|
|
ui->setupUi(this);
|
2015-03-08 01:58:09 +01:00
|
|
|
|
|
|
|
/* Open CSS when configured */
|
|
|
|
QSettings settings;
|
|
|
|
QString theme = settings.value("theme", "").toString();
|
|
|
|
if(!theme.isEmpty()){
|
|
|
|
// QFile qFile(":/css/drkblue");
|
|
|
|
QFile qFile(theme); // for development only
|
|
|
|
if (qFile.open(QFile::ReadOnly)) {
|
|
|
|
QString styleSheet = QLatin1String(qFile.readAll());
|
|
|
|
this->setStyleSheet(styleSheet);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-06-10 15:05:51 +02:00
|
|
|
QString desc = idx.data(TransactionTableModel::LongDescriptionRole).toString();
|
|
|
|
ui->detailText->setHtml(desc);
|
|
|
|
}
|
|
|
|
|
|
|
|
TransactionDescDialog::~TransactionDescDialog()
|
|
|
|
{
|
|
|
|
delete ui;
|
|
|
|
}
|