summaryrefslogtreecommitdiff
path: root/client/resumewidget.cc
diff options
context:
space:
mode:
authordeva <deva>2008-10-08 11:58:34 +0000
committerdeva <deva>2008-10-08 11:58:34 +0000
commit9b697d2d3e34962385cd85a14d4cb14d5b1763ce (patch)
tree0bd158b1e747850e293f0dac714b7afaeaf0b895 /client/resumewidget.cc
parent8bbcc59fd1488833a4d8dd346b6e8fec2a0021a8 (diff)
Removed obsolete macro.{cc,h}. Made the passing of the Netcom class, use a pointer.
Diffstat (limited to 'client/resumewidget.cc')
-rw-r--r--client/resumewidget.cc32
1 files changed, 31 insertions, 1 deletions
diff --git a/client/resumewidget.cc b/client/resumewidget.cc
index 80643db..b991ccf 100644
--- a/client/resumewidget.cc
+++ b/client/resumewidget.cc
@@ -27,16 +27,46 @@
#include "resumewidget.h"
#include <QHBoxLayout>
+#include <QBoxLayout>
+
+//#define RICH
ResumeWidget::ResumeWidget()
{
setLayout(new QHBoxLayout());
- resume = new QLabel();
+ layout()->setContentsMargins(10,2,2,2);
+ resume = new QLabel("Endnu ikke udfyldt");
+
+#ifdef RICH
+ resume->setTextFormat(Qt::RichText);
+#endif
+
resume->setWordWrap(true);
+ resume->setEnabled(false);
+ /*
+ resume->setFixedWidth(300);
+ ((QBoxLayout*)layout())->addStretch();
+ */
layout()->addWidget(resume);
}
void ResumeWidget::setText(QString text)
{
+ resume->setEnabled(true);
+
+#ifdef RICH
+ QString f;
+
+ for(int i = 0; i < text.length(); i++) {
+ if(text[i] >= '0' && text[i] <= '9') f += "<font style='color: #55F;'>" + text[i] + "</font>";
+ else if(text[i] == '\n') f += "<br/>";
+ else if(text[i] == ' ') f += "&nbsp;";
+ else f += text[i];
+ }
+
+ resume->setText(f);
+ resume->setWordWrap(true);
+#else
resume->setText(text);
+#endif
}