author | zecke <zecke> | 2004-09-08 21:51:06 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-09-08 21:51:06 (UTC) |
commit | ebb830522c9662bda4c4453e532bcc29631c5d60 (patch) (unidiff) | |
tree | 5cf95975e91cb2db78be5cdf47c01a340109c1f4 /noncore/net/opieirc/ircquerytab.cpp | |
parent | f0fdb800d57e9a1d95ba593185e9462300539eea (diff) | |
download | opie-ebb830522c9662bda4c4453e532bcc29631c5d60.zip opie-ebb830522c9662bda4c4453e532bcc29631c5d60.tar.gz opie-ebb830522c9662bda4c4453e532bcc29631c5d60.tar.bz2 |
-Close Tab Keyboard Accelerator with delayed deletion of the tab
-Optionally add a TimeStamp to the Tab
-Remove not implemented CTCP actions from the Channel PopupMenu
-Give Focus to the Edit Line
-Some more ping handling
patch inspired and copied from zautrix fork
Diffstat (limited to 'noncore/net/opieirc/ircquerytab.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opieirc/ircquerytab.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/noncore/net/opieirc/ircquerytab.cpp b/noncore/net/opieirc/ircquerytab.cpp index 1fddc6d..53474b9 100644 --- a/noncore/net/opieirc/ircquerytab.cpp +++ b/noncore/net/opieirc/ircquerytab.cpp | |||
@@ -7,37 +7,40 @@ IRCQueryTab::IRCQueryTab(IRCPerson *person, IRCServerTab *parentTab, MainWindow | |||
7 | m_mainWindow = mainWindow; | 7 | m_mainWindow = mainWindow; |
8 | m_parentTab = parentTab; | 8 | m_parentTab = parentTab; |
9 | m_lines = 0; | 9 | m_lines = 0; |
10 | m_person = new IRCPerson(*person); /* We need this (the person might sign off and the original IRCPerson gets deleted) */ | 10 | m_person = new IRCPerson(*person); /* We need this (the person might sign off and the original IRCPerson gets deleted) */ |
11 | m_description->setText(tr("Talking to ") + " <b>" + person->nick() + "</b>"); | 11 | m_description->setText(tr("Talking to ") + " <b>" + person->nick() + "</b>"); |
12 | QHBox *hbox = new QHBox(this); | 12 | QHBox *hbox = new QHBox(this); |
13 | m_textview = new QTextView(hbox); | 13 | m_textview = new QTextView(hbox); |
14 | m_textview->setHScrollBarMode(QScrollView::AlwaysOff); | 14 | m_textview->setHScrollBarMode(QScrollView::AlwaysOff); |
15 | m_textview->setVScrollBarMode(QScrollView::AlwaysOn); | 15 | m_textview->setVScrollBarMode(QScrollView::AlwaysOn); |
16 | m_textview->setTextFormat(RichText); | 16 | m_textview->setTextFormat(RichText); |
17 | QWhatsThis::add(m_textview, tr("Private discussion")); | 17 | QWhatsThis::add(m_textview, tr("Private discussion")); |
18 | m_field = new IRCHistoryLineEdit(this); | 18 | m_field = new IRCHistoryLineEdit(this); |
19 | |||
19 | connect(m_field, SIGNAL(nextTab()), this, SIGNAL(nextTab())); | 20 | connect(m_field, SIGNAL(nextTab()), this, SIGNAL(nextTab())); |
20 | connect(m_field, SIGNAL(prevTab()), this, SIGNAL(prevTab())); | 21 | connect(m_field, SIGNAL(prevTab()), this, SIGNAL(prevTab())); |
21 | connect(m_field, SIGNAL(closeTab()),this, SIGNAL(closeTab())); | 22 | connect(m_field, SIGNAL(closeTab()),this, SLOT(remove())); |
22 | 23 | connect(this, SIGNAL(editFocus()), m_field, SLOT(setEditFocus())); | |
23 | 24 | ||
24 | QWhatsThis::add(m_field, tr("Type your text here in order to send a message to the other person")); | 25 | QWhatsThis::add(m_field, tr("Type your text here in order to send a message to the other person")); |
25 | m_layout->add(hbox); | 26 | m_layout->add(hbox); |
26 | hbox->show(); | 27 | hbox->show(); |
27 | m_layout->add(m_field); | 28 | m_layout->add(m_field); |
28 | m_field->setFocus(); | 29 | |
29 | connect(m_field, SIGNAL(returnPressed()), this, SLOT(processCommand())); | 30 | connect(m_field, SIGNAL(returnPressed()), this, SLOT(processCommand())); |
30 | connect(m_mainWindow, SIGNAL(updateScroll()), this, SLOT(scrolling())); | 31 | connect(m_mainWindow, SIGNAL(updateScroll()), this, SLOT(scrolling())); |
31 | settingsChanged(); | 32 | settingsChanged(); |
33 | m_field->setFocus(); | ||
34 | m_field->setActiveWindow(); | ||
32 | } | 35 | } |
33 | 36 | ||
34 | void IRCQueryTab::scrolling(){ | 37 | void IRCQueryTab::scrolling(){ |
35 | m_textview->ensureVisible(0, m_textview->contentsHeight()); | 38 | m_textview->ensureVisible(0, m_textview->contentsHeight()); |
36 | } | 39 | } |
37 | 40 | ||
38 | 41 | ||
39 | void IRCQueryTab::appendText(QString text) { | 42 | void IRCQueryTab::appendText(QString text) { |
40 | /* not using append because it creates layout problems */ | 43 | /* not using append because it creates layout problems */ |
41 | QString txt = m_textview->text() + text + "\n"; | 44 | QString txt = m_textview->text() + text + "\n"; |
42 | if (m_maxLines > 0 && m_lines >= m_maxLines) { | 45 | if (m_maxLines > 0 && m_lines >= m_maxLines) { |
43 | int firstBreak = txt.find('\n'); | 46 | int firstBreak = txt.find('\n'); |