author | wazlaf <wazlaf> | 2002-10-16 21:04:15 (UTC) |
---|---|---|
committer | wazlaf <wazlaf> | 2002-10-16 21:04:15 (UTC) |
commit | 6ce0b792c67bf14db705c459a2690390aae70846 (patch) (unidiff) | |
tree | 3244d85cd7e57638bd11452ec7ed7bf51e633b89 | |
parent | 8834d3ee866fe9f0c093bf50fa78b4e0f5d2018c (diff) | |
download | opie-6ce0b792c67bf14db705c459a2690390aae70846.zip opie-6ce0b792c67bf14db705c459a2690390aae70846.tar.gz opie-6ce0b792c67bf14db705c459a2690390aae70846.tar.bz2 |
qwhatsthis are now complete
-rw-r--r-- | noncore/net/opieirc/ircchanneltab.cpp | 4 | ||||
-rw-r--r-- | noncore/net/opieirc/ircquerytab.cpp | 3 | ||||
-rw-r--r-- | noncore/net/opieirc/ircservertab.cpp | 3 | ||||
-rw-r--r-- | noncore/net/opieirc/irctab.cpp | 3 | ||||
-rw-r--r-- | noncore/net/opieirc/opie-irc.control | 2 |
5 files changed, 13 insertions, 2 deletions
diff --git a/noncore/net/opieirc/ircchanneltab.cpp b/noncore/net/opieirc/ircchanneltab.cpp index f19e019..c1964c8 100644 --- a/noncore/net/opieirc/ircchanneltab.cpp +++ b/noncore/net/opieirc/ircchanneltab.cpp | |||
@@ -1,58 +1,60 @@ | |||
1 | #include <qpe/qpeapplication.h> | 1 | #include <qpe/qpeapplication.h> |
2 | #include <qpe/resource.h> | 2 | #include <qpe/resource.h> |
3 | #include <qcursor.h> | 3 | #include <qcursor.h> |
4 | #include <stdio.h> | 4 | #include <qwhatsthis.h> |
5 | #include <qhbox.h> | 5 | #include <qhbox.h> |
6 | #include "ircchanneltab.h" | 6 | #include "ircchanneltab.h" |
7 | #include "ircservertab.h" | 7 | #include "ircservertab.h" |
8 | 8 | ||
9 | IRCChannelTab::IRCChannelTab(IRCChannel *channel, IRCServerTab *parentTab, MainWindow *mainWindow, QWidget *parent, const char *name, WFlags f) : IRCTab(parent, name, f) { | 9 | IRCChannelTab::IRCChannelTab(IRCChannel *channel, IRCServerTab *parentTab, MainWindow *mainWindow, QWidget *parent, const char *name, WFlags f) : IRCTab(parent, name, f) { |
10 | m_mainWindow = mainWindow; | 10 | m_mainWindow = mainWindow; |
11 | m_parentTab = parentTab; | 11 | m_parentTab = parentTab; |
12 | m_channel = channel; | 12 | m_channel = channel; |
13 | m_description->setText(tr("Talking on channel") + " <b>" + channel->channelname() + "</b>"); | 13 | m_description->setText(tr("Talking on channel") + " <b>" + channel->channelname() + "</b>"); |
14 | QHBox *hbox = new QHBox(this); | 14 | QHBox *hbox = new QHBox(this); |
15 | m_textview = new QTextView(hbox); | 15 | m_textview = new QTextView(hbox); |
16 | m_textview->setHScrollBarMode(QScrollView::AlwaysOff); | 16 | m_textview->setHScrollBarMode(QScrollView::AlwaysOff); |
17 | m_textview->setVScrollBarMode(QScrollView::AlwaysOn); | 17 | m_textview->setVScrollBarMode(QScrollView::AlwaysOn); |
18 | m_listVisible = TRUE; | 18 | m_listVisible = TRUE; |
19 | m_listButton = new QPushButton(">", m_textview); | 19 | m_listButton = new QPushButton(">", m_textview); |
20 | m_textview->setCornerWidget(m_listButton); | 20 | m_textview->setCornerWidget(m_listButton); |
21 | m_textview->setTextFormat(RichText); | 21 | m_textview->setTextFormat(RichText); |
22 | QWhatsThis::add(m_textview, tr("Channel discussion")); | ||
22 | connect(m_listButton, SIGNAL(clicked()), this, SLOT(toggleList())); | 23 | connect(m_listButton, SIGNAL(clicked()), this, SLOT(toggleList())); |
23 | m_list = new IRCChannelList(m_channel, hbox); | 24 | m_list = new IRCChannelList(m_channel, hbox); |
24 | m_list->update(); | 25 | m_list->update(); |
25 | m_list->setMaximumWidth(LISTWIDTH); | 26 | m_list->setMaximumWidth(LISTWIDTH); |
26 | m_field = new IRCHistoryLineEdit(this); | 27 | m_field = new IRCHistoryLineEdit(this); |
28 | QWhatsThis::add(m_field, tr("Type your message here to participate in the channel discussion")); | ||
27 | m_popup = new QPopupMenu(m_list); | 29 | m_popup = new QPopupMenu(m_list); |
28 | m_lines = 0; | 30 | m_lines = 0; |
29 | /* Required so that embedded-style "right" clicks work */ | 31 | /* Required so that embedded-style "right" clicks work */ |
30 | QPEApplication::setStylusOperation(m_list->viewport(), QPEApplication::RightOnHold); | 32 | QPEApplication::setStylusOperation(m_list->viewport(), QPEApplication::RightOnHold); |
31 | connect(m_list, SIGNAL(mouseButtonPressed(int, QListBoxItem *, const QPoint&)), this, SLOT(mouseButtonPressed(int, QListBoxItem *, const QPoint &))); | 33 | connect(m_list, SIGNAL(mouseButtonPressed(int, QListBoxItem *, const QPoint&)), this, SLOT(mouseButtonPressed(int, QListBoxItem *, const QPoint &))); |
32 | 34 | ||
33 | /* Construct the popup menu */ | 35 | /* Construct the popup menu */ |
34 | QPopupMenu *ctcpMenu = new QPopupMenu(m_list); | 36 | QPopupMenu *ctcpMenu = new QPopupMenu(m_list); |
35 | m_popup->insertItem(Resource::loadPixmap("opieirc/ctcp"), tr("CTCP"), ctcpMenu); | 37 | m_popup->insertItem(Resource::loadPixmap("opieirc/ctcp"), tr("CTCP"), ctcpMenu); |
36 | m_popup->insertItem(Resource::loadPixmap("opieirc/query"), tr("Query"), this, SLOT(popupQuery())); | 38 | m_popup->insertItem(Resource::loadPixmap("opieirc/query"), tr("Query"), this, SLOT(popupQuery())); |
37 | ctcpMenu->insertItem(Resource::loadPixmap("opieirc/ping"), tr("Ping"), this, SLOT(popupPing())); | 39 | ctcpMenu->insertItem(Resource::loadPixmap("opieirc/ping"), tr("Ping"), this, SLOT(popupPing())); |
38 | ctcpMenu->insertItem(Resource::loadPixmap("opieirc/version"), tr("Version"), this, SLOT(popupVersion())); | 40 | ctcpMenu->insertItem(Resource::loadPixmap("opieirc/version"), tr("Version"), this, SLOT(popupVersion())); |
39 | ctcpMenu->insertItem(Resource::loadPixmap("opieirc/whois"), tr("Whois"), this, SLOT(popupWhois())); | 41 | ctcpMenu->insertItem(Resource::loadPixmap("opieirc/whois"), tr("Whois"), this, SLOT(popupWhois())); |
40 | 42 | ||
41 | m_layout->add(hbox); | 43 | m_layout->add(hbox); |
42 | hbox->show(); | 44 | hbox->show(); |
43 | m_layout->add(m_field); | 45 | m_layout->add(m_field); |
44 | m_field->setFocus(); | 46 | m_field->setFocus(); |
45 | connect(m_field, SIGNAL(returnPressed()), this, SLOT(processCommand())); | 47 | connect(m_field, SIGNAL(returnPressed()), this, SLOT(processCommand())); |
46 | settingsChanged(); | 48 | settingsChanged(); |
47 | } | 49 | } |
48 | 50 | ||
49 | void IRCChannelTab::appendText(QString text) { | 51 | void IRCChannelTab::appendText(QString text) { |
50 | /* not using append because it creates layout problems */ | 52 | /* not using append because it creates layout problems */ |
51 | QString txt = m_textview->text() + text + "\n"; | 53 | QString txt = m_textview->text() + text + "\n"; |
52 | if (m_maxLines > 0 && m_lines >= m_maxLines) { | 54 | if (m_maxLines > 0 && m_lines >= m_maxLines) { |
53 | int firstBreak = txt.find('\n'); | 55 | int firstBreak = txt.find('\n'); |
54 | if (firstBreak != -1) { | 56 | if (firstBreak != -1) { |
55 | txt = "<qt bgcolor=\"" + m_backgroundColor + "\"/>" + txt.right(txt.length() - (firstBreak + 1)); | 57 | txt = "<qt bgcolor=\"" + m_backgroundColor + "\"/>" + txt.right(txt.length() - (firstBreak + 1)); |
56 | } | 58 | } |
57 | } else { | 59 | } else { |
58 | m_lines++; | 60 | m_lines++; |
diff --git a/noncore/net/opieirc/ircquerytab.cpp b/noncore/net/opieirc/ircquerytab.cpp index 869e4f7..21a53dc 100644 --- a/noncore/net/opieirc/ircquerytab.cpp +++ b/noncore/net/opieirc/ircquerytab.cpp | |||
@@ -1,48 +1,51 @@ | |||
1 | #include <qhbox.h> | 1 | #include <qhbox.h> |
2 | #include <qwhatsthis.h> | ||
2 | #include "ircquerytab.h" | 3 | #include "ircquerytab.h" |
3 | #include "ircservertab.h" | 4 | #include "ircservertab.h" |
4 | 5 | ||
5 | IRCQueryTab::IRCQueryTab(IRCPerson *person, IRCServerTab *parentTab, MainWindow *mainWindow, QWidget *parent, const char *name, WFlags f) : IRCTab(parent, name, f) { | 6 | IRCQueryTab::IRCQueryTab(IRCPerson *person, IRCServerTab *parentTab, MainWindow *mainWindow, QWidget *parent, const char *name, WFlags f) : IRCTab(parent, name, f) { |
6 | m_mainWindow = mainWindow; | 7 | m_mainWindow = mainWindow; |
7 | m_parentTab = parentTab; | 8 | m_parentTab = parentTab; |
8 | m_lines = 0; | 9 | m_lines = 0; |
9 | 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) */ |
10 | m_description->setText(tr("Talking to ") + " <b>" + person->nick() + "</b>"); | 11 | m_description->setText(tr("Talking to ") + " <b>" + person->nick() + "</b>"); |
11 | QHBox *hbox = new QHBox(this); | 12 | QHBox *hbox = new QHBox(this); |
12 | m_textview = new QTextView(hbox); | 13 | m_textview = new QTextView(hbox); |
13 | m_textview->setHScrollBarMode(QScrollView::AlwaysOff); | 14 | m_textview->setHScrollBarMode(QScrollView::AlwaysOff); |
14 | m_textview->setVScrollBarMode(QScrollView::AlwaysOn); | 15 | m_textview->setVScrollBarMode(QScrollView::AlwaysOn); |
15 | m_textview->setTextFormat(RichText); | 16 | m_textview->setTextFormat(RichText); |
17 | QWhatsThis::add(m_textview, tr("Private discussion")); | ||
16 | m_field = new IRCHistoryLineEdit(this); | 18 | m_field = new IRCHistoryLineEdit(this); |
19 | QWhatsThis::add(m_field, tr("Type your text here in order to send a message to the other person")); | ||
17 | m_layout->add(hbox); | 20 | m_layout->add(hbox); |
18 | hbox->show(); | 21 | hbox->show(); |
19 | m_layout->add(m_field); | 22 | m_layout->add(m_field); |
20 | m_field->setFocus(); | 23 | m_field->setFocus(); |
21 | connect(m_field, SIGNAL(returnPressed()), this, SLOT(processCommand())); | 24 | connect(m_field, SIGNAL(returnPressed()), this, SLOT(processCommand())); |
22 | settingsChanged(); | 25 | settingsChanged(); |
23 | } | 26 | } |
24 | 27 | ||
25 | void IRCQueryTab::appendText(QString text) { | 28 | void IRCQueryTab::appendText(QString text) { |
26 | /* not using append because it creates layout problems */ | 29 | /* not using append because it creates layout problems */ |
27 | QString txt = m_textview->text() + text + "\n"; | 30 | QString txt = m_textview->text() + text + "\n"; |
28 | if (m_maxLines > 0 && m_lines >= m_maxLines) { | 31 | if (m_maxLines > 0 && m_lines >= m_maxLines) { |
29 | int firstBreak = txt.find('\n'); | 32 | int firstBreak = txt.find('\n'); |
30 | if (firstBreak != -1) { | 33 | if (firstBreak != -1) { |
31 | txt = "<qt bgcolor=\"" + m_backgroundColor + "\"/>" + txt.right(txt.length() - (firstBreak + 1)); | 34 | txt = "<qt bgcolor=\"" + m_backgroundColor + "\"/>" + txt.right(txt.length() - (firstBreak + 1)); |
32 | } | 35 | } |
33 | } else { | 36 | } else { |
34 | m_lines++; | 37 | m_lines++; |
35 | } | 38 | } |
36 | m_textview->setText(txt); | 39 | m_textview->setText(txt); |
37 | m_textview->ensureVisible(0, m_textview->contentsHeight()); | 40 | m_textview->ensureVisible(0, m_textview->contentsHeight()); |
38 | emit changed(this); | 41 | emit changed(this); |
39 | } | 42 | } |
40 | 43 | ||
41 | IRCQueryTab::~IRCQueryTab() { | 44 | IRCQueryTab::~IRCQueryTab() { |
42 | m_parentTab->removeQueryTab(this); | 45 | m_parentTab->removeQueryTab(this); |
43 | delete m_person; | 46 | delete m_person; |
44 | } | 47 | } |
45 | 48 | ||
46 | void IRCQueryTab::processCommand() { | 49 | void IRCQueryTab::processCommand() { |
47 | QString text = m_field->text(); | 50 | QString text = m_field->text(); |
48 | if (text.length()>0) { | 51 | if (text.length()>0) { |
diff --git a/noncore/net/opieirc/ircservertab.cpp b/noncore/net/opieirc/ircservertab.cpp index 5d1e290..a46f105 100644 --- a/noncore/net/opieirc/ircservertab.cpp +++ b/noncore/net/opieirc/ircservertab.cpp | |||
@@ -1,49 +1,52 @@ | |||
1 | #include <qpe/config.h> | 1 | #include <qpe/config.h> |
2 | #include <qtextstream.h> | 2 | #include <qtextstream.h> |
3 | #include <qwhatsthis.h> | ||
3 | #include "ircservertab.h" | 4 | #include "ircservertab.h" |
4 | 5 | ||
5 | IRCServerTab::IRCServerTab(IRCServer server, MainWindow *mainWindow, QWidget *parent, const char *name, WFlags f) : IRCTab(parent, name, f) { | 6 | IRCServerTab::IRCServerTab(IRCServer server, MainWindow *mainWindow, QWidget *parent, const char *name, WFlags f) : IRCTab(parent, name, f) { |
6 | m_server = server; | 7 | m_server = server; |
7 | m_session = new IRCSession(&m_server); | 8 | m_session = new IRCSession(&m_server); |
8 | m_mainWindow = mainWindow; | 9 | m_mainWindow = mainWindow; |
9 | m_close = FALSE; | 10 | m_close = FALSE; |
10 | m_lines = 0; | 11 | m_lines = 0; |
11 | m_description->setText(tr("Connection to")+" <b>" + server.hostname() + ":" + QString::number(server.port()) + "</b>"); | 12 | m_description->setText(tr("Connection to")+" <b>" + server.hostname() + ":" + QString::number(server.port()) + "</b>"); |
12 | m_textview = new QTextView(this); | 13 | m_textview = new QTextView(this); |
13 | m_textview->setHScrollBarMode(QScrollView::AlwaysOff); | 14 | m_textview->setHScrollBarMode(QScrollView::AlwaysOff); |
14 | m_textview->setVScrollBarMode(QScrollView::AlwaysOn); | 15 | m_textview->setVScrollBarMode(QScrollView::AlwaysOn); |
15 | m_textview->setTextFormat(RichText); | 16 | m_textview->setTextFormat(RichText); |
17 | QWhatsThis::add(m_textview, tr("Server messages")); | ||
16 | m_layout->add(m_textview); | 18 | m_layout->add(m_textview); |
17 | m_field = new IRCHistoryLineEdit(this); | 19 | m_field = new IRCHistoryLineEdit(this); |
20 | QWhatsThis::add(m_textview, tr("Type commands here. A list of available commands can be found inside the OpieIRC help")); | ||
18 | m_layout->add(m_field); | 21 | m_layout->add(m_field); |
19 | connect(m_field, SIGNAL(returnPressed()), this, SLOT(processCommand())); | 22 | connect(m_field, SIGNAL(returnPressed()), this, SLOT(processCommand())); |
20 | m_field->setFocus(); | 23 | m_field->setFocus(); |
21 | connect(m_session, SIGNAL(outputReady(IRCOutput)), this, SLOT(display(IRCOutput))); | 24 | connect(m_session, SIGNAL(outputReady(IRCOutput)), this, SLOT(display(IRCOutput))); |
22 | settingsChanged(); | 25 | settingsChanged(); |
23 | } | 26 | } |
24 | 27 | ||
25 | void IRCServerTab::appendText(QString text) { | 28 | void IRCServerTab::appendText(QString text) { |
26 | /* not using append because it creates layout problems */ | 29 | /* not using append because it creates layout problems */ |
27 | QString txt = m_textview->text() + text + "\n"; | 30 | QString txt = m_textview->text() + text + "\n"; |
28 | if (m_maxLines > 0 && m_lines >= m_maxLines) { | 31 | if (m_maxLines > 0 && m_lines >= m_maxLines) { |
29 | int firstBreak = txt.find('\n'); | 32 | int firstBreak = txt.find('\n'); |
30 | if (firstBreak != -1) { | 33 | if (firstBreak != -1) { |
31 | txt = "<qt bgcolor=\"" + m_backgroundColor + "\"/>" + txt.right(txt.length() - (firstBreak + 1)); | 34 | txt = "<qt bgcolor=\"" + m_backgroundColor + "\"/>" + txt.right(txt.length() - (firstBreak + 1)); |
32 | } | 35 | } |
33 | } else { | 36 | } else { |
34 | m_lines++; | 37 | m_lines++; |
35 | } | 38 | } |
36 | m_textview->setText(txt); | 39 | m_textview->setText(txt); |
37 | m_textview->ensureVisible(0, m_textview->contentsHeight()); | 40 | m_textview->ensureVisible(0, m_textview->contentsHeight()); |
38 | emit changed(this); | 41 | emit changed(this); |
39 | } | 42 | } |
40 | 43 | ||
41 | IRCServerTab::~IRCServerTab() { | 44 | IRCServerTab::~IRCServerTab() { |
42 | delete m_session; | 45 | delete m_session; |
43 | } | 46 | } |
44 | 47 | ||
45 | void IRCServerTab::removeChannelTab(IRCChannelTab *tab) { | 48 | void IRCServerTab::removeChannelTab(IRCChannelTab *tab) { |
46 | m_channelTabs.remove(tab); | 49 | m_channelTabs.remove(tab); |
47 | } | 50 | } |
48 | 51 | ||
49 | void IRCServerTab::removeQueryTab(IRCQueryTab *tab) { | 52 | void IRCServerTab::removeQueryTab(IRCQueryTab *tab) { |
diff --git a/noncore/net/opieirc/irctab.cpp b/noncore/net/opieirc/irctab.cpp index 0bb9d4c..8a869d6 100644 --- a/noncore/net/opieirc/irctab.cpp +++ b/noncore/net/opieirc/irctab.cpp | |||
@@ -1,36 +1,39 @@ | |||
1 | #include <qpe/resource.h> | 1 | #include <qpe/resource.h> |
2 | #include <qpixmap.h> | 2 | #include <qpixmap.h> |
3 | #include <qpushbutton.h> | 3 | #include <qpushbutton.h> |
4 | #include <qwhatsthis.h> | ||
4 | #include "irctab.h" | 5 | #include "irctab.h" |
5 | 6 | ||
6 | QString IRCTab::m_errorColor; | 7 | QString IRCTab::m_errorColor; |
7 | QString IRCTab::m_serverColor; | 8 | QString IRCTab::m_serverColor; |
8 | QString IRCTab::m_textColor; | 9 | QString IRCTab::m_textColor; |
9 | QString IRCTab::m_backgroundColor; | 10 | QString IRCTab::m_backgroundColor; |
10 | QString IRCTab::m_selfColor; | 11 | QString IRCTab::m_selfColor; |
11 | QString IRCTab::m_otherColor; | 12 | QString IRCTab::m_otherColor; |
12 | QString IRCTab::m_notificationColor; | 13 | QString IRCTab::m_notificationColor; |
13 | int IRCTab::m_maxLines; | 14 | int IRCTab::m_maxLines; |
14 | 15 | ||
15 | IRCTab::IRCTab(QWidget *parent, const char *name, WFlags f) : QWidget(parent, name, f) { | 16 | IRCTab::IRCTab(QWidget *parent, const char *name, WFlags f) : QWidget(parent, name, f) { |
16 | m_layout = new QVBoxLayout(this); | 17 | m_layout = new QVBoxLayout(this); |
17 | QHBoxLayout *descLayout = new QHBoxLayout(m_layout); | 18 | QHBoxLayout *descLayout = new QHBoxLayout(m_layout); |
18 | descLayout->setMargin(5); | 19 | descLayout->setMargin(5); |
19 | m_description = new QLabel(tr("Missing description"), this); | 20 | m_description = new QLabel(tr("Missing description"), this); |
21 | QWhatsThis::add(m_description, tr("Description of the tab's content")); | ||
20 | descLayout->addWidget(m_description); | 22 | descLayout->addWidget(m_description); |
21 | descLayout->setStretchFactor(m_description, 5); | 23 | descLayout->setStretchFactor(m_description, 5); |
22 | QPushButton *close = new QPushButton(this); | 24 | QPushButton *close = new QPushButton(this); |
25 | QWhatsThis::add(close, tr("Close this tab")); | ||
23 | close->setPixmap(Resource::loadPixmap("close")); | 26 | close->setPixmap(Resource::loadPixmap("close")); |
24 | connect(close, SIGNAL(clicked()), this, SLOT(remove())); | 27 | connect(close, SIGNAL(clicked()), this, SLOT(remove())); |
25 | descLayout->addWidget(close); | 28 | descLayout->addWidget(close); |
26 | descLayout->setStretchFactor(m_description, 1); | 29 | descLayout->setStretchFactor(m_description, 1); |
27 | } | 30 | } |
28 | 31 | ||
29 | 32 | ||
30 | void IRCTab::setID(int id) { | 33 | void IRCTab::setID(int id) { |
31 | m_id = id; | 34 | m_id = id; |
32 | } | 35 | } |
33 | 36 | ||
34 | int IRCTab::id() { | 37 | int IRCTab::id() { |
35 | return m_id; | 38 | return m_id; |
36 | } | 39 | } |
diff --git a/noncore/net/opieirc/opie-irc.control b/noncore/net/opieirc/opie-irc.control index aada957..0bcdecd 100644 --- a/noncore/net/opieirc/opie-irc.control +++ b/noncore/net/opieirc/opie-irc.control | |||
@@ -1,8 +1,8 @@ | |||
1 | Files: bin/opieirc pics/opieirc apps/Applications/opieirc.desktop | 1 | Files: bin/opieirc pics/opieirc apps/Applications/opieirc.desktop help/en/html/opieirc.html help/en/html/opieirc |
2 | Priority: optional | 2 | Priority: optional |
3 | Section: Communications | 3 | Section: Communications |
4 | Maintainer: Wenzel Jakob <root@wazlaf.de> | 4 | Maintainer: Wenzel Jakob <root@wazlaf.de> |
5 | Architecture: arm | 5 | Architecture: arm |
6 | Version: $QPE_VERSION-$SUB_VERSION | 6 | Version: $QPE_VERSION-$SUB_VERSION |
7 | Depends: opie-base ($QPE_VERSION) | 7 | Depends: opie-base ($QPE_VERSION) |
8 | Description: The Opie IRC client lets you chat on your favorite IRC server using your handheld computer | 8 | Description: The Opie IRC client lets you chat on your favorite IRC server using your handheld computer |