Commit 1e3d56ed authored by Tomas Mecir's avatar Tomas Mecir

Fix links to show. They cannot actually be clicked yet.

parent a4b5c520
......@@ -32,6 +32,7 @@
#include <KActionCollection>
class cTextOutputItem : public QGraphicsTextItem {
public:
cTextOutputItem(bool sec) {
......@@ -131,7 +132,7 @@ cConsole::cConsole(QWidget *parent) : QGraphicsView(parent) {
connect (verticalScrollBar (), SIGNAL (valueChanged (int)), this, SLOT (sliderChanged (int)));
d->text = new QTextDocument;
QString stylesheet = "* { color: " + QColor (Qt::lightGray).name() + "; white-space: pre-wrap; } ";
QString stylesheet = "* { color: " + QColor (Qt::lightGray).name() + "; white-space: pre-wrap; } a { color: " + QColor (Qt::blue).name() + ": } ";
d->text->setDefaultStyleSheet (stylesheet);
QTextOption opt;
opt.setWrapMode (QTextOption::WrapAtWordBoundaryOrAnywhere);
......
......@@ -34,8 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <stdlib.h>
QColor chunkLink::linkColor = Qt::blue;
/** state variables needed to paint a row */
/*
struct paintStatus {
......@@ -1283,15 +1281,16 @@ QString chunkBg::toHTML (QString &suffix)
return chunkBg::constructHTML (_bg, suffix);
}
QColor chunkLink::linkColor = Qt::blue;
QString chunkLink::toHTML (QString &)
{
if (_iscommand)
{
return _text;
return "<a rel=\"command\" href=\"" + _target + "\">" + _text + "</a>";
}
else
{
return "<a style=\"color: " + linkColor.name() + "\" href=\"" + _target + "\">" + _text + "</a>";
return "<a rel=\"link\" href=\"" + _target + "\">" + _text + "</a>";
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment