summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show 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
m_index = -1;
+ installEventFilter(this);
}
@@ -94,2 +95,5 @@ void IRCHistoryLineEdit::keyPressEvent(QKeyEvent *event) {
m_index = -1;
+ } else if (key == Key_Tab) {
+ printf("got tab\n");
+ return;
}
@@ -97 +101,13 @@ void IRCHistoryLineEdit::keyPressEvent(QKeyEvent *event) {
}
+
+bool IRCHistoryLineEdit::eventFilter(QObject *object, QEvent *event) {
+ if (event->type() == QEvent::KeyPress) {
+ QKeyEvent *k = (QKeyEvent *) event;
+ /* Catch tab characters */
+ if (k->key() == Key_Tab) {
+ qDebug("tab!");
+ return TRUE;
+ }
+ }
+ return QLineEdit::eventFilter(object, event);
+}
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:
-/* A QLineEdit with history functionality */
+/* A QLineEdit with history functionality and tab completion */
@@ -83,2 +83,3 @@ public:
IRCHistoryLineEdit(QWidget *parent = 0, const char *name = 0);
+ virtual bool eventFilter(QObject *object, QEvent *event);
protected:
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 @@
#include <qlabel.h>
+#include <qwhatsthis.h>
#include "ircservereditor.h"
-IRCServerEditor::IRCServerEditor(IRCServer server, QWidget* parent, const char* name, bool modal = FALSE, WFlags f) : QDialog(parent, name, modal, f) {
+IRCServerEditor::IRCServerEditor(IRCServer server, QWidget* parent, const char* name, bool modal = FALSE, WFlags) : QDialog(parent, name, modal, WStyle_ContextHelp) {
QGridLayout *layout = new QGridLayout(this, 7, 2, 5, 5);
@@ -9,2 +10,3 @@ IRCServerEditor::IRCServerEditor(IRCServer server, QWidget* parent, const char*
m_name = new QLineEdit(server.name(), this);
+ QWhatsThis::add(m_name, tr("The name of this server profile in the overview"));
layout->addWidget(label, 0, 0);
@@ -13,2 +15,3 @@ IRCServerEditor::IRCServerEditor(IRCServer server, QWidget* parent, const char*
m_hostname = new QLineEdit(server.hostname(), this);
+ QWhatsThis::add(m_hostname, tr("The server to connect to - can be any valid host name or IP address"));
layout->addWidget(label, 1, 0);
@@ -17,2 +20,3 @@ IRCServerEditor::IRCServerEditor(IRCServer server, QWidget* parent, const char*
m_port = new QLineEdit(QString::number(server.port()), this);
+ QWhatsThis::add(m_port, tr("The server port to connect to. Usually 6667"));
layout->addWidget(label, 2, 0);
@@ -21,2 +25,3 @@ IRCServerEditor::IRCServerEditor(IRCServer server, QWidget* parent, const char*
m_nickname = new QLineEdit(server.nick(), this);
+ QWhatsThis::add(m_nickname, tr("Your nick name on the IRC network"));
layout->addWidget(label, 3, 0);
@@ -25,2 +30,3 @@ IRCServerEditor::IRCServerEditor(IRCServer server, QWidget* parent, const char*
m_realname = new QLineEdit(server.realname(), this);
+ QWhatsThis::add(m_realname, tr("Your real name"));
layout->addWidget(label, 4, 0);
@@ -29,2 +35,3 @@ IRCServerEditor::IRCServerEditor(IRCServer server, QWidget* parent, const char*
m_password = new QLineEdit(server.password(), this);
+ QWhatsThis::add(m_password, tr("Password to connect to the server (if required)"));
layout->addWidget(label, 5, 0);
@@ -33,2 +40,3 @@ IRCServerEditor::IRCServerEditor(IRCServer server, QWidget* parent, const char*
m_channels = new QLineEdit(server.channels(), this);
+ QWhatsThis::add(m_channels, tr("Comma-Separated list of all channels you would like to join automatically"));
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 @@
#include <qpushbutton.h>
+#include <qwhatsthis.h>
#include "ircserverlist.h"
@@ -25,3 +26,3 @@ protected:
-IRCServerList::IRCServerList(QWidget* parent, const char *name, bool modal, WFlags f) : QDialog(parent, name, modal, f) {
+IRCServerList::IRCServerList(QWidget* parent, const char *name, bool modal, WFlags) : QDialog(parent, name, modal, WStyle_ContextHelp) {
QVBoxLayout *layout = new QVBoxLayout(this, 5, 5);
@@ -32,2 +33,3 @@ IRCServerList::IRCServerList(QWidget* parent, const char *name, bool modal, WFla
m_list = new QListBox(this);
+ QWhatsThis::add(m_list, tr("Select a server profile from this list and then tap on OK in the upper-right corner"));
layout->addWidget(m_list);
@@ -37,2 +39,5 @@ IRCServerList::IRCServerList(QWidget* parent, const char *name, bool modal, WFla
QPushButton *add = new QPushButton(tr("Add"), buttons);
+ QWhatsThis::add(del, tr("Delete the currently selected server profile"));
+ QWhatsThis::add(edit, tr("Edit the currently selected server profile"));
+ QWhatsThis::add(add, tr("Add a new server profile"));
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 @@
#include <qscrollview.h>
+#include <qwhatsthis.h>
#include "ircsettings.h"
@@ -7,3 +8,3 @@
-IRCSettings::IRCSettings(QWidget* parent, const char* name, bool modal, WFlags f) : QDialog(parent, name, modal, f) {
+IRCSettings::IRCSettings(QWidget* parent, const char* name, bool modal, WFlags) : QDialog(parent, name, modal, WStyle_ContextHelp) {
setCaption("Settings");
@@ -20,2 +21,3 @@ IRCSettings::IRCSettings(QWidget* parent, const char* name, bool modal, WFlags f
m_lines = new QLineEdit(m_config->readEntry("Lines", "100"), widget);
+ 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"));
QIntValidator *validator = new QIntValidator(this);
@@ -36,2 +38,3 @@ IRCSettings::IRCSettings(QWidget* parent, const char* name, bool modal, WFlags f
m_background = new IRCFramedColorLabel(QColor(m_config->readEntry("BackgroundColor", "#FFFFFF")), widget);
+ QWhatsThis::add(m_background, tr("Background color to be used in chats"));
layout->addWidget(m_background, 0, 1);
@@ -40,2 +43,3 @@ IRCSettings::IRCSettings(QWidget* parent, const char* name, bool modal, WFlags f
m_text = new IRCFramedColorLabel(m_config->readEntry("TextColor", "#000000"), widget);
+ QWhatsThis::add(m_text, tr("Text color to be used in chats"));
layout->addWidget(m_text, 1, 1);
@@ -44,2 +48,3 @@ IRCSettings::IRCSettings(QWidget* parent, const char* name, bool modal, WFlags f
m_error = new IRCFramedColorLabel(m_config->readEntry("ErrorColor", "#FF0000"), widget);
+ QWhatsThis::add(m_error, tr("Text color to be used to display errors"));
layout->addWidget(m_error, 2, 1);
@@ -48,2 +53,3 @@ IRCSettings::IRCSettings(QWidget* parent, const char* name, bool modal, WFlags f
m_self = new IRCFramedColorLabel(m_config->readEntry("SelfColor", "#CC0000"), widget);
+ QWhatsThis::add(m_self, tr("Text color to be used to identify text written by yourself"));
layout->addWidget(m_self, 3, 1);
@@ -52,2 +58,3 @@ IRCSettings::IRCSettings(QWidget* parent, const char* name, bool modal, WFlags f
m_other = new IRCFramedColorLabel(m_config->readEntry("OtherColor", "#0000BB"), widget);
+ QWhatsThis::add(m_other, tr("Text color to be used to identify text written by others"));
layout->addWidget(m_other, 4, 1);
@@ -56,2 +63,3 @@ IRCSettings::IRCSettings(QWidget* parent, const char* name, bool modal, WFlags f
m_server = new IRCFramedColorLabel(m_config->readEntry("ServerColor", "#0000FF"), widget);
+ QWhatsThis::add(m_server, tr("Text color to be used to identify text written by the server"));
layout->addWidget(m_server, 5, 1);
@@ -60,2 +68,3 @@ IRCSettings::IRCSettings(QWidget* parent, const char* name, bool modal, WFlags f
m_notification = new IRCFramedColorLabel(m_config->readEntry("NotificationColor", "#AAE300"), widget);
+ QWhatsThis::add(m_notification, tr("Text color to be used to display notifications"));
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 @@
#include <qpopupmenu.h>
+#include <qwhatsthis.h>
@@ -10,5 +11,6 @@
-MainWindow::MainWindow(QWidget *parent, const char *name, WFlags f) : QMainWindow(parent, name, f) {
+MainWindow::MainWindow(QWidget *parent, const char *name, WFlags) : QMainWindow(parent, name, WStyle_ContextHelp) {
setCaption(tr("IRC Client"));
m_tabWidget = new IRCTabWidget(this);
+ QWhatsThis::add(m_tabWidget, tr("Server connections, channels, queries and other things will be placed here"));
connect(m_tabWidget, SIGNAL(currentChanged(QWidget *)), this, SLOT(selected(QWidget *)));
@@ -21,4 +23,6 @@ MainWindow::MainWindow(QWidget *parent, const char *name, WFlags f) : QMainWindo
connect(a, SIGNAL(activated()), this, SLOT(newConnection()));
+ a->setWhatsThis(tr("Create a new connection to an IRC server"));
a->addTo(irc);
a = new QAction(tr("Settings"), Resource::loadPixmap("SettingsIcon"), QString::null, 0, this, 0);
+ a->setWhatsThis(tr("Configure OpieIRC's behavior and appearance"));
connect(a, SIGNAL(activated()), this, SLOT(settings()));