Communi  1.1.0
A cross-platform IRC client library written with Qt 4
 All Classes Files Functions Enumerations Enumerator Properties Macros Groups Pages
ircsender.h
Go to the documentation of this file.
1 /*
2 * Copyright (C) 2008-2012 J-P Nurmi <jpnurmi@gmail.com>
3 *
4 * This library is free software; you can redistribute it and/or modify it
5 * under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or (at your
7 * option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
12 * License for more details.
13 */
14 
15 #ifndef IRCSENDER_H
16 #define IRCSENDER_H
17 
18 #include <IrcGlobal>
19 #include <QtCore/qstring.h>
20 #include <QtCore/qmetatype.h>
21 
22 class COMMUNI_EXPORT IrcSender
23 {
24 public:
25  IrcSender(const QString& prefix = QString());
26 
27  bool isValid() const;
28 
29  QString prefix() const;
30  void setPrefix(const QString& prefix);
31 
32  QString name() const { return n; }
33  void setName(const QString& name) { n = name; }
34 
35  QString user() const { return u; }
36  void setUser(const QString& user) { u = user; }
37 
38  QString host() const { return h; }
39  void setHost(const QString& host) { h = host; }
40 
41 private:
42  QString n;
43  QString u;
44  QString h;
45 };
46 
47 Q_DECLARE_METATYPE(IrcSender)
48 
49 #endif // IRCSENDER_H