summaryrefslogtreecommitdiff
path: root/noncore/net/opieirc
authorwazlaf <wazlaf>2002-10-15 10:11:31 (UTC)
committer wazlaf <wazlaf>2002-10-15 10:11:31 (UTC)
commite09b7ab685d29eba947c3bb021192408acae70be (patch) (unidiff)
tree5adf52c8d56819aab0daed8e7da189110276e90a /noncore/net/opieirc
parent31a73cafb40fffe2bbc12bb6fd0df6dc254d6646 (diff)
downloadopie-e09b7ab685d29eba947c3bb021192408acae70be.zip
opie-e09b7ab685d29eba947c3bb021192408acae70be.tar.gz
opie-e09b7ab685d29eba947c3bb021192408acae70be.tar.bz2
some qwhatsthis introduced, the IRCHistoryLineEdit now catches tabs
Diffstat (limited to 'noncore/net/opieirc') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieirc/ircmisc.cpp16
-rw-r--r--noncore/net/opieirc/ircmisc.h3
-rw-r--r--noncore/net/opieirc/ircservereditor.cpp10
-rw-r--r--noncore/net/opieirc/ircserverlist.cpp7
-rw-r--r--noncore/net/opieirc/ircsettings.cpp11
-rw-r--r--noncore/net/opieirc/mainwindow.cpp6
6 files changed, 48 insertions, 5 deletions
diff --git a/noncore/net/opieirc/ircmisc.cpp b/noncore/net/opieirc/ircmisc.cpp
index 2e7f316..c8e6190 100644
--- a/noncore/net/opieirc/ircmisc.cpp
+++ b/noncore/net/opieirc/ircmisc.cpp
@@ -73,2 +73,3 @@ IRCHistoryLineEdit::IRCHistoryLineEdit(QWidget *parent, const char *name) : QLin
73 m_index = -1; 73 m_index = -1;
74 installEventFilter(this);
74} 75}
@@ -94,2 +95,5 @@ void IRCHistoryLineEdit::keyPressEvent(QKeyEvent *event) {
94 m_index = -1; 95 m_index = -1;
96 } else if (key == Key_Tab) {
97 printf("got tab\n");
98 return;
95 } 99 }
@@ -97 +101,13 @@ void IRCHistoryLineEdit::keyPressEvent(QKeyEvent *event) {
97} 101}
102
103bool IRCHistoryLineEdit::eventFilter(QObject *object, QEvent *event) {
104 if (event->type() == QEvent::KeyPress) {
105 QKeyEvent *k = (QKeyEvent *) event;
106 /* Catch tab characters */
107 if (k->key() == Key_Tab) {
108 qDebug("tab!");
109 return TRUE;
110 }
111 }
112 return QLineEdit::eventFilter(object, event);
113}
diff --git a/noncore/net/opieirc/ircmisc.h b/noncore/net/opieirc/ircmisc.h
index 7151e6b..6a8db50 100644
--- a/noncore/net/opieirc/ircmisc.h
+++ b/noncore/net/opieirc/ircmisc.h
@@ -77,3 +77,3 @@ protected:
77 77
78/* A QLineEdit with history functionality */ 78/* A QLineEdit with history functionality and tab completion */
79 79
@@ -83,2 +83,3 @@ public:
83 IRCHistoryLineEdit(QWidget *parent = 0, const char *name = 0); 83 IRCHistoryLineEdit(QWidget *parent = 0, const char *name = 0);
84 virtual bool eventFilter(QObject *object, QEvent *event);
84protected: 85protected:
diff --git a/noncore/net/opieirc/ircservereditor.cpp b/noncore/net/opieirc/ircservereditor.cpp
index f976c84..8604835 100644
--- a/noncore/net/opieirc/ircservereditor.cpp
+++ b/noncore/net/opieirc/ircservereditor.cpp
@@ -3,5 +3,6 @@
3#include <qlabel.h> 3#include <qlabel.h>
4#include <qwhatsthis.h>
4#include "ircservereditor.h" 5#include "ircservereditor.h"
5 6
6IRCServerEditor::IRCServerEditor(IRCServer server, QWidget* parent, const char* name, bool modal = FALSE, WFlags f) : QDialog(parent, name, modal, f) { 7IRCServerEditor::IRCServerEditor(IRCServer server, QWidget* parent, const char* name, bool modal = FALSE, WFlags) : QDialog(parent, name, modal, WStyle_ContextHelp) {
7 QGridLayout *layout = new QGridLayout(this, 7, 2, 5, 5); 8 QGridLayout *layout = new QGridLayout(this, 7, 2, 5, 5);
@@ -9,2 +10,3 @@ IRCServerEditor::IRCServerEditor(IRCServer server, QWidget* parent, const char*
9 m_name = new QLineEdit(server.name(), this); 10 m_name = new QLineEdit(server.name(), this);
11 QWhatsThis::add(m_name, tr("The name of this server profile in the overview"));
10 layout->addWidget(label, 0, 0); 12 layout->addWidget(label, 0, 0);
@@ -13,2 +15,3 @@ IRCServerEditor::IRCServerEditor(IRCServer server, QWidget* parent, const char*
13 m_hostname = new QLineEdit(server.hostname(), this); 15 m_hostname = new QLineEdit(server.hostname(), this);
16 QWhatsThis::add(m_hostname, tr("The server to connect to - can be any valid host name or IP address"));
14 layout->addWidget(label, 1, 0); 17 layout->addWidget(label, 1, 0);
@@ -17,2 +20,3 @@ IRCServerEditor::IRCServerEditor(IRCServer server, QWidget* parent, const char*
17 m_port = new QLineEdit(QString::number(server.port()), this); 20 m_port = new QLineEdit(QString::number(server.port()), this);
21 QWhatsThis::add(m_port, tr("The server port to connect to. Usually 6667"));
18 layout->addWidget(label, 2, 0); 22 layout->addWidget(label, 2, 0);
@@ -21,2 +25,3 @@ IRCServerEditor::IRCServerEditor(IRCServer server, QWidget* parent, const char*
21 m_nickname = new QLineEdit(server.nick(), this); 25 m_nickname = new QLineEdit(server.nick(), this);
26 QWhatsThis::add(m_nickname, tr("Your nick name on the IRC network"));
22 layout->addWidget(label, 3, 0); 27 layout->addWidget(label, 3, 0);
@@ -25,2 +30,3 @@ IRCServerEditor::IRCServerEditor(IRCServer server, QWidget* parent, const char*
25 m_realname = new QLineEdit(server.realname(), this); 30 m_realname = new QLineEdit(server.realname(), this);
31 QWhatsThis::add(m_realname, tr("Your real name"));
26 layout->addWidget(label, 4, 0); 32 layout->addWidget(label, 4, 0);
@@ -29,2 +35,3 @@ IRCServerEditor::IRCServerEditor(IRCServer server, QWidget* parent, const char*
29 m_password = new QLineEdit(server.password(), this); 35 m_password = new QLineEdit(server.password(), this);
36 QWhatsThis::add(m_password, tr("Password to connect to the server (if required)"));
30 layout->addWidget(label, 5, 0); 37 layout->addWidget(label, 5, 0);
@@ -33,2 +40,3 @@ IRCServerEditor::IRCServerEditor(IRCServer server, QWidget* parent, const char*
33 m_channels = new QLineEdit(server.channels(), this); 40 m_channels = new QLineEdit(server.channels(), this);
41 QWhatsThis::add(m_channels, tr("Comma-Separated list of all channels you would like to join automatically"));
34 layout->addWidget(label, 6, 0); 42 layout->addWidget(label, 6, 0);
diff --git a/noncore/net/opieirc/ircserverlist.cpp b/noncore/net/opieirc/ircserverlist.cpp
index 3293591..595ae3e 100644
--- a/noncore/net/opieirc/ircserverlist.cpp
+++ b/noncore/net/opieirc/ircserverlist.cpp
@@ -4,2 +4,3 @@
4#include <qpushbutton.h> 4#include <qpushbutton.h>
5#include <qwhatsthis.h>
5#include "ircserverlist.h" 6#include "ircserverlist.h"
@@ -25,3 +26,3 @@ protected:
25 26
26IRCServerList::IRCServerList(QWidget* parent, const char *name, bool modal, WFlags f) : QDialog(parent, name, modal, f) { 27IRCServerList::IRCServerList(QWidget* parent, const char *name, bool modal, WFlags) : QDialog(parent, name, modal, WStyle_ContextHelp) {
27 QVBoxLayout *layout = new QVBoxLayout(this, 5, 5); 28 QVBoxLayout *layout = new QVBoxLayout(this, 5, 5);
@@ -32,2 +33,3 @@ IRCServerList::IRCServerList(QWidget* parent, const char *name, bool modal, WFla
32 m_list = new QListBox(this); 33 m_list = new QListBox(this);
34 QWhatsThis::add(m_list, tr("Select a server profile from this list and then tap on OK in the upper-right corner"));
33 layout->addWidget(m_list); 35 layout->addWidget(m_list);
@@ -37,2 +39,5 @@ IRCServerList::IRCServerList(QWidget* parent, const char *name, bool modal, WFla
37 QPushButton *add = new QPushButton(tr("Add"), buttons); 39 QPushButton *add = new QPushButton(tr("Add"), buttons);
40 QWhatsThis::add(del, tr("Delete the currently selected server profile"));
41 QWhatsThis::add(edit, tr("Edit the currently selected server profile"));
42 QWhatsThis::add(add, tr("Add a new server profile"));
38 connect(del, SIGNAL(clicked()), this, SLOT(delServer())); 43 connect(del, SIGNAL(clicked()), this, SLOT(delServer()));
diff --git a/noncore/net/opieirc/ircsettings.cpp b/noncore/net/opieirc/ircsettings.cpp
index 1903e87..78eaed3 100644
--- a/noncore/net/opieirc/ircsettings.cpp
+++ b/noncore/net/opieirc/ircsettings.cpp
@@ -3,2 +3,3 @@
3#include <qscrollview.h> 3#include <qscrollview.h>
4#include <qwhatsthis.h>
4#include "ircsettings.h" 5#include "ircsettings.h"
@@ -7,3 +8,3 @@
7 8
8IRCSettings::IRCSettings(QWidget* parent, const char* name, bool modal, WFlags f) : QDialog(parent, name, modal, f) { 9IRCSettings::IRCSettings(QWidget* parent, const char* name, bool modal, WFlags) : QDialog(parent, name, modal, WStyle_ContextHelp) {
9 setCaption("Settings"); 10 setCaption("Settings");
@@ -20,2 +21,3 @@ IRCSettings::IRCSettings(QWidget* parent, const char* name, bool modal, WFlags f
20 m_lines = new QLineEdit(m_config->readEntry("Lines", "100"), widget); 21 m_lines = new QLineEdit(m_config->readEntry("Lines", "100"), widget);
22 QWhatsThis::add(m_lines, tr("Amount of lines to be displayed in chats before old lines get deleted - this is necessary to restrain memory consumption. Set to 0 if you don't need this"));
21 QIntValidator *validator = new QIntValidator(this); 23 QIntValidator *validator = new QIntValidator(this);
@@ -36,2 +38,3 @@ IRCSettings::IRCSettings(QWidget* parent, const char* name, bool modal, WFlags f
36 m_background = new IRCFramedColorLabel(QColor(m_config->readEntry("BackgroundColor", "#FFFFFF")), widget); 38 m_background = new IRCFramedColorLabel(QColor(m_config->readEntry("BackgroundColor", "#FFFFFF")), widget);
39 QWhatsThis::add(m_background, tr("Background color to be used in chats"));
37 layout->addWidget(m_background, 0, 1); 40 layout->addWidget(m_background, 0, 1);
@@ -40,2 +43,3 @@ IRCSettings::IRCSettings(QWidget* parent, const char* name, bool modal, WFlags f
40 m_text = new IRCFramedColorLabel(m_config->readEntry("TextColor", "#000000"), widget); 43 m_text = new IRCFramedColorLabel(m_config->readEntry("TextColor", "#000000"), widget);
44 QWhatsThis::add(m_text, tr("Text color to be used in chats"));
41 layout->addWidget(m_text, 1, 1); 45 layout->addWidget(m_text, 1, 1);
@@ -44,2 +48,3 @@ IRCSettings::IRCSettings(QWidget* parent, const char* name, bool modal, WFlags f
44 m_error = new IRCFramedColorLabel(m_config->readEntry("ErrorColor", "#FF0000"), widget); 48 m_error = new IRCFramedColorLabel(m_config->readEntry("ErrorColor", "#FF0000"), widget);
49 QWhatsThis::add(m_error, tr("Text color to be used to display errors"));
45 layout->addWidget(m_error, 2, 1); 50 layout->addWidget(m_error, 2, 1);
@@ -48,2 +53,3 @@ IRCSettings::IRCSettings(QWidget* parent, const char* name, bool modal, WFlags f
48 m_self = new IRCFramedColorLabel(m_config->readEntry("SelfColor", "#CC0000"), widget); 53 m_self = new IRCFramedColorLabel(m_config->readEntry("SelfColor", "#CC0000"), widget);
54 QWhatsThis::add(m_self, tr("Text color to be used to identify text written by yourself"));
49 layout->addWidget(m_self, 3, 1); 55 layout->addWidget(m_self, 3, 1);
@@ -52,2 +58,3 @@ IRCSettings::IRCSettings(QWidget* parent, const char* name, bool modal, WFlags f
52 m_other = new IRCFramedColorLabel(m_config->readEntry("OtherColor", "#0000BB"), widget); 58 m_other = new IRCFramedColorLabel(m_config->readEntry("OtherColor", "#0000BB"), widget);
59 QWhatsThis::add(m_other, tr("Text color to be used to identify text written by others"));
53 layout->addWidget(m_other, 4, 1); 60 layout->addWidget(m_other, 4, 1);
@@ -56,2 +63,3 @@ IRCSettings::IRCSettings(QWidget* parent, const char* name, bool modal, WFlags f
56 m_server = new IRCFramedColorLabel(m_config->readEntry("ServerColor", "#0000FF"), widget); 63 m_server = new IRCFramedColorLabel(m_config->readEntry("ServerColor", "#0000FF"), widget);
64 QWhatsThis::add(m_server, tr("Text color to be used to identify text written by the server"));
57 layout->addWidget(m_server, 5, 1); 65 layout->addWidget(m_server, 5, 1);
@@ -60,2 +68,3 @@ IRCSettings::IRCSettings(QWidget* parent, const char* name, bool modal, WFlags f
60 m_notification = new IRCFramedColorLabel(m_config->readEntry("NotificationColor", "#AAE300"), widget); 68 m_notification = new IRCFramedColorLabel(m_config->readEntry("NotificationColor", "#AAE300"), widget);
69 QWhatsThis::add(m_notification, tr("Text color to be used to display notifications"));
61 layout->addWidget(m_notification, 6, 1); 70 layout->addWidget(m_notification, 6, 1);
diff --git a/noncore/net/opieirc/mainwindow.cpp b/noncore/net/opieirc/mainwindow.cpp
index bb03a1c..7928310 100644
--- a/noncore/net/opieirc/mainwindow.cpp
+++ b/noncore/net/opieirc/mainwindow.cpp
@@ -4,2 +4,3 @@
4#include <qpopupmenu.h> 4#include <qpopupmenu.h>
5#include <qwhatsthis.h>
5 6
@@ -10,5 +11,6 @@
10 11
11MainWindow::MainWindow(QWidget *parent, const char *name, WFlags f) : QMainWindow(parent, name, f) { 12MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(parent, name, WStyle_ContextHelp) {
12 setCaption(tr("IRC Client")); 13 setCaption(tr("IRC Client"));
13 m_tabWidget = new IRCTabWidget(this); 14 m_tabWidget = new IRCTabWidget(this);
15 QWhatsThis::add(m_tabWidget, tr("Server connections, channels, queries and other things will be placed here"));
14 connect(m_tabWidget, SIGNAL(currentChanged(QWidget *)), this, SLOT(selected(QWidget *))); 16 connect(m_tabWidget, SIGNAL(currentChanged(QWidget *)), this, SLOT(selected(QWidget *)));
@@ -21,4 +23,6 @@ MainWindow::MainWindow(QWidget *parent, const char *name, WFlags f) : QMainWindo
21 connect(a, SIGNAL(activated()), this, SLOT(newConnection())); 23 connect(a, SIGNAL(activated()), this, SLOT(newConnection()));
24 a->setWhatsThis(tr("Create a new connection to an IRC server"));
22 a->addTo(irc); 25 a->addTo(irc);
23 a = new QAction(tr("Settings"), Resource::loadPixmap("SettingsIcon"), QString::null, 0, this, 0); 26 a = new QAction(tr("Settings"), Resource::loadPixmap("SettingsIcon"), QString::null, 0, this, 0);
27 a->setWhatsThis(tr("Configure OpieIRC's behavior and appearance"));
24 connect(a, SIGNAL(activated()), this, SLOT(settings())); 28 connect(a, SIGNAL(activated()), this, SLOT(settings()));