annotate gui/src/IRCWidget.h @ 13588:52fd3b9ea848

Changed all #defines for IRC Codes to constants, as it should be. Assorted them in namespaces and gave them better readable names.
author Jacob Dawid <jacob.dawid@googlemail.com>
date Wed, 03 Aug 2011 17:20:20 +0200
parents f0d6f2ff45de
children aa4e5bed1750
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
13504
13e3d60aff2d Replaced Quint with OctaveGUI.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13501
diff changeset
1 /* OctaveGUI - A graphical user interface for Octave
13501
86d6c3b90ad7 Added new gui files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
2 * Copyright (C) 2011 Jacob Dawid
86d6c3b90ad7 Added new gui files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
3 * jacob.dawid@googlemail.com
86d6c3b90ad7 Added new gui files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
4 *
86d6c3b90ad7 Added new gui files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
5 * This program is free software: you can redistribute it and/or modify
86d6c3b90ad7 Added new gui files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
6 * it under the terms of the GNU General Public License as published by
86d6c3b90ad7 Added new gui files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
7 * the Free Software Foundation, either version 3 of the License, or
86d6c3b90ad7 Added new gui files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
8 * (at your option) any later version.
86d6c3b90ad7 Added new gui files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
9 *
86d6c3b90ad7 Added new gui files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
10 * This program is distributed in the hope that it will be useful,
86d6c3b90ad7 Added new gui files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
86d6c3b90ad7 Added new gui files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
86d6c3b90ad7 Added new gui files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
13 * GNU General Public License for more details.
86d6c3b90ad7 Added new gui files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
14 *
86d6c3b90ad7 Added new gui files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License
86d6c3b90ad7 Added new gui files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
86d6c3b90ad7 Added new gui files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
17 */
86d6c3b90ad7 Added new gui files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
18
86d6c3b90ad7 Added new gui files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
19 #ifndef IRCWIDGET_H
86d6c3b90ad7 Added new gui files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
20 #define IRCWIDGET_H
86d6c3b90ad7 Added new gui files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
21
86d6c3b90ad7 Added new gui files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
22 #include <QWidget>
86d6c3b90ad7 Added new gui files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
23 #include <QTextEdit>
86d6c3b90ad7 Added new gui files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
24 #include <QPushButton>
86d6c3b90ad7 Added new gui files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
25 #include <QLineEdit>
86d6c3b90ad7 Added new gui files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
26 #include <QCompleter>
13585
f0d6f2ff45de Now making correct use of the interface for the IRC Interface.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13581
diff changeset
27 #include "IRCClientInterface.h"
13501
86d6c3b90ad7 Added new gui files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
28
13506
c70511cf64ee Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13504
diff changeset
29 class IRCWidget:public QWidget
13501
86d6c3b90ad7 Added new gui files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
30 {
13506
c70511cf64ee Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13504
diff changeset
31 Q_OBJECT public:
13537
a43ecce77eec Introduced a central ResourceManager class.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13522
diff changeset
32 explicit IRCWidget (QWidget * parent);
13506
c70511cf64ee Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13504
diff changeset
33 void connectToServer ();
13501
86d6c3b90ad7 Added new gui files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
34
13581
3e5a8ef9c76d Completely rewrote IRC client backend to make it platform-independent. Not all functionality has been reimplemented as of yet, though.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13537
diff changeset
35 public slots:
3e5a8ef9c76d Completely rewrote IRC client backend to make it platform-independent. Not all functionality has been reimplemented as of yet, though.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13537
diff changeset
36 void showStatusMessage (const QString&);
3e5a8ef9c76d Completely rewrote IRC client backend to make it platform-independent. Not all functionality has been reimplemented as of yet, though.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13537
diff changeset
37 void showErrorMessage (const QString&);
3e5a8ef9c76d Completely rewrote IRC client backend to make it platform-independent. Not all functionality has been reimplemented as of yet, though.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13537
diff changeset
38 void showMessage (const QString& channel, const QString& sender, const QString& message);
3e5a8ef9c76d Completely rewrote IRC client backend to make it platform-independent. Not all functionality has been reimplemented as of yet, though.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13537
diff changeset
39 void showNotification (const QString& sender, const QString& message);
3e5a8ef9c76d Completely rewrote IRC client backend to make it platform-independent. Not all functionality has been reimplemented as of yet, though.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13537
diff changeset
40
3e5a8ef9c76d Completely rewrote IRC client backend to make it platform-independent. Not all functionality has been reimplemented as of yet, though.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13537
diff changeset
41 void handleConnected (const QString& host);
3e5a8ef9c76d Completely rewrote IRC client backend to make it platform-independent. Not all functionality has been reimplemented as of yet, though.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13537
diff changeset
42 void joinOctaveChannel (const QString& nick);
3e5a8ef9c76d Completely rewrote IRC client backend to make it platform-independent. Not all functionality has been reimplemented as of yet, though.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13537
diff changeset
43
3e5a8ef9c76d Completely rewrote IRC client backend to make it platform-independent. Not all functionality has been reimplemented as of yet, though.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13537
diff changeset
44 void handleLoggedIn (const QString& nick);
3e5a8ef9c76d Completely rewrote IRC client backend to make it platform-independent. Not all functionality has been reimplemented as of yet, though.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13537
diff changeset
45 void handleNickChange (const QString& oldNick, const QString& newNick);
3e5a8ef9c76d Completely rewrote IRC client backend to make it platform-independent. Not all functionality has been reimplemented as of yet, though.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13537
diff changeset
46 void handleUserJoined (const QString& nick, const QString& channel);
3e5a8ef9c76d Completely rewrote IRC client backend to make it platform-independent. Not all functionality has been reimplemented as of yet, though.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13537
diff changeset
47 void handleUserQuit (const QString& nick, const QString& reason);
3e5a8ef9c76d Completely rewrote IRC client backend to make it platform-independent. Not all functionality has been reimplemented as of yet, though.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13537
diff changeset
48
13506
c70511cf64ee Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13504
diff changeset
49 void nickPopup ();
c70511cf64ee Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13504
diff changeset
50 void sendMessage (QString);
c70511cf64ee Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13504
diff changeset
51 void sendInputLine ();
13581
3e5a8ef9c76d Completely rewrote IRC client backend to make it platform-independent. Not all functionality has been reimplemented as of yet, though.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13537
diff changeset
52 void updateNickCompleter ();
13501
86d6c3b90ad7 Added new gui files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
53
86d6c3b90ad7 Added new gui files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
54 private:
13588
52fd3b9ea848 Changed all #defines for IRC Codes to constants, as it should be. Assorted them in namespaces and gave them better readable names.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13585
diff changeset
55 IRCClientInterface *m_ircClientInterface;
52fd3b9ea848 Changed all #defines for IRC Codes to constants, as it should be. Assorted them in namespaces and gave them better readable names.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13585
diff changeset
56 IRCChannelProxyInterface *m_octaveChannel;
13506
c70511cf64ee Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13504
diff changeset
57 QTextEdit *m_chatWindow;
c70511cf64ee Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13504
diff changeset
58 QPushButton *m_nickButton;
c70511cf64ee Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13504
diff changeset
59 QLineEdit *m_inputLine;
13501
86d6c3b90ad7 Added new gui files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
60
13506
c70511cf64ee Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13504
diff changeset
61 QString m_initialNick;
c70511cf64ee Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13504
diff changeset
62 bool m_autoIdentification;
c70511cf64ee Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13504
diff changeset
63 QString m_nickServPassword;
c70511cf64ee Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13504
diff changeset
64 QString m_settingsFile;
c70511cf64ee Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents: 13504
diff changeset
65 QStringList m_nickList;
13501
86d6c3b90ad7 Added new gui files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
66 };
86d6c3b90ad7 Added new gui files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
67
86d6c3b90ad7 Added new gui files.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
diff changeset
68 #endif // IRCWIDGET_H