summaryrefslogtreecommitdiff
path: root/noncore/net/opieirc/irctab.cpp
Unidiff
Diffstat (limited to 'noncore/net/opieirc/irctab.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieirc/irctab.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/noncore/net/opieirc/irctab.cpp b/noncore/net/opieirc/irctab.cpp
index 2b3ecd4..fbbf303 100644
--- a/noncore/net/opieirc/irctab.cpp
+++ b/noncore/net/opieirc/irctab.cpp
@@ -15,12 +15,28 @@ QString IRCTab::m_textColor;
15QString IRCTab::m_backgroundColor; 15QString IRCTab::m_backgroundColor;
16QString IRCTab::m_selfColor; 16QString IRCTab::m_selfColor;
17QString IRCTab::m_otherColor; 17QString IRCTab::m_otherColor;
18QString IRCTab::m_notificationColor; 18QString IRCTab::m_notificationColor;
19int IRCTab::m_maxLines; 19int IRCTab::m_maxLines;
20 20
21
22static bool g_useTime = false;
23
24void IRCTab::setUseTimeStamps( bool b ) {
25 g_useTime = b;
26}
27
28// ## FIXME use TimeString later for AM/PM Setting
29QString IRCTab::appendTimestamp( const QString& text ) {
30 return g_useTime ?
31 "[" +QTime::currentTime().toString()+"]" + text + "\n" :
32 text + "\n";
33
34}
35
36
21IRCTab::IRCTab(QWidget *parent, const char *name, WFlags f) : QWidget(parent, name, f) { 37IRCTab::IRCTab(QWidget *parent, const char *name, WFlags f) : QWidget(parent, name, f) {
22 m_layout = new QVBoxLayout(this); 38 m_layout = new QVBoxLayout(this);
23 QHBoxLayout *descLayout = new QHBoxLayout(m_layout); 39 QHBoxLayout *descLayout = new QHBoxLayout(m_layout);
24 descLayout->setMargin(5); 40 descLayout->setMargin(5);
25 m_description = new QLabel(tr("Missing description"), this); 41 m_description = new QLabel(tr("Missing description"), this);
26 QWhatsThis::add(m_description, tr("Description of the tab's content")); 42 QWhatsThis::add(m_description, tr("Description of the tab's content"));