summaryrefslogtreecommitdiff
path: root/noncore/net/opieirc/ircquerytab.cpp
Side-by-side diff
Diffstat (limited to 'noncore/net/opieirc/ircquerytab.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieirc/ircquerytab.cpp9
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
m_mainWindow = mainWindow;
m_parentTab = parentTab;
m_lines = 0;
m_person = new IRCPerson(*person); /* We need this (the person might sign off and the original IRCPerson gets deleted) */
m_description->setText(tr("Talking to ") + " <b>" + person->nick() + "</b>");
QHBox *hbox = new QHBox(this);
m_textview = new QTextView(hbox);
m_textview->setHScrollBarMode(QScrollView::AlwaysOff);
m_textview->setVScrollBarMode(QScrollView::AlwaysOn);
m_textview->setTextFormat(RichText);
QWhatsThis::add(m_textview, tr("Private discussion"));
m_field = new IRCHistoryLineEdit(this);
+
connect(m_field, SIGNAL(nextTab()), this, SIGNAL(nextTab()));
connect(m_field, SIGNAL(prevTab()), this, SIGNAL(prevTab()));
- connect(m_field, SIGNAL(closeTab()),this, SIGNAL(closeTab()));
-
+ connect(m_field, SIGNAL(closeTab()),this, SLOT(remove()));
+ connect(this, SIGNAL(editFocus()), m_field, SLOT(setEditFocus()));
QWhatsThis::add(m_field, tr("Type your text here in order to send a message to the other person"));
m_layout->add(hbox);
hbox->show();
m_layout->add(m_field);
- m_field->setFocus();
+
connect(m_field, SIGNAL(returnPressed()), this, SLOT(processCommand()));
connect(m_mainWindow, SIGNAL(updateScroll()), this, SLOT(scrolling()));
settingsChanged();
+ m_field->setFocus();
+ m_field->setActiveWindow();
}
void IRCQueryTab::scrolling(){
m_textview->ensureVisible(0, m_textview->contentsHeight());
}
void IRCQueryTab::appendText(QString text) {
/* not using append because it creates layout problems */
QString txt = m_textview->text() + text + "\n";
if (m_maxLines > 0 && m_lines >= m_maxLines) {
int firstBreak = txt.find('\n');