Mercurial > octave-nkf
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 |
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 | 2 * Copyright (C) 2011 Jacob Dawid |
3 * jacob.dawid@googlemail.com | |
4 * | |
5 * This program is free software: you can redistribute it and/or modify | |
6 * it under the terms of the GNU General Public License as published by | |
7 * the Free Software Foundation, either version 3 of the License, or | |
8 * (at your option) any later version. | |
9 * | |
10 * This program is distributed in the hope that it will be useful, | |
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 * GNU General Public License for more details. | |
14 * | |
15 * You should have received a copy of the GNU General Public License | |
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. | |
17 */ | |
18 | |
19 #ifndef IRCWIDGET_H | |
20 #define IRCWIDGET_H | |
21 | |
22 #include <QWidget> | |
23 #include <QTextEdit> | |
24 #include <QPushButton> | |
25 #include <QLineEdit> | |
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 | 28 |
13506
c70511cf64ee
Reformatted to GNU Style.
Jacob Dawid <jacob.dawid@googlemail.com>
parents:
13504
diff
changeset
|
29 class IRCWidget:public QWidget |
13501 | 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 | 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 | 53 |
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 | 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 | 66 }; |
67 | |
68 #endif // IRCWIDGET_H |