void RPCConsole::clear() { ui->messagesWidget->clear(); history.clear(); historyPtr = 0; ui->lineEdit->clear(); ui->lineEdit->setFocus(); // Add smoothly scaled icon images. // (when using width/height on an img, Qt uses nearest instead of linear interpolation) for(int i=0; ICON_MAPPING[i].url; ++i) { ui->messagesWidget->document()->addResource( QTextDocument::ImageResource, QUrl(ICON_MAPPING[i].url), SingleColorImage(ICON_MAPPING[i].source, SingleColor()).scaled(ICON_SIZE, Qt::IgnoreAspectRatio, Qt::SmoothTransformation)); } // Set default style sheet ui->messagesWidget->document()->setDefaultStyleSheet( "table { }" "td.time { color: #808080; padding-top: 3px; } " "td.cmd-request { color: #006060; } " "td.cmd-error { color: red; } " "b { color: #006060; } " ); message(CMD_REPLY, (tr("Welcome to the Myriad Core RPC console.") + "<br>" + tr("Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen.") + "<br>" + tr("Type <b>help</b> for an overview of available commands.")), true); }
QIcon PlatformStyle::SingleColorIcon(const QIcon& icon) const { if (!colorizeIcons) return icon; return ColorizeIcon(icon, SingleColor()); }
QIcon PlatformStyle::SingleColorIcon(const QString& filename) const { if (!colorizeIcons) return QIcon(filename); return ColorizeIcon(filename, SingleColor()); }