KVIrc  4.9.2
DeveloperAPIs
NotifierMessage.h
Go to the documentation of this file.
1 #ifndef _NOTIFIERMESSAGE_H_
2 #define _NOTIFIERMESSAGE_H_
3 //=============================================================================
4 //
5 // File : NotifierMessage.h
6 // Creation date : Mar 02 Nov 2004 02:41:18 by Iacopo Palazzi
7 //
8 // This file is part of the KVIrc distribution
9 // Copyright (C) 2004 Szymon Stefanek (pragma at kvirc dot net)
10 // Copyright (C) 2004-2008 Iacopo Palazzi < iakko(at)siena(dot)linux(dot)it >
11 // Copyright (C) 2009 Fabio Bas < ctrlaltca at gmail dot com >
12 //
13 // This program is FREE software. You can redistribute it and/or
14 // modify it under the terms of the GNU General Public License
15 // as published by the Free Software Foundation; either version 2
16 // of the License, or (at your option) any later version.
17 //
18 // This program is distributed in the HOPE that it will be USEFUL,
19 // but WITHOUT ANY WARRANTY; without even the implied warranty of
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
21 // See the GNU General Public License for more details.
22 //
23 // You should have received a copy of the GNU General Public License
24 // along with this program. If not, write to the Free Software Foundation,
25 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
26 //
27 //=============================================================================
28 
29 #include <QHBoxLayout>
30 #include <QLabel>
31 #include <QPixmap>
32 #include <QString>
33 #include <QWidget>
34 
43 class NotifierMessage : public QWidget
44 {
45  friend class NotifierWindow;
46 
47 public:
54  NotifierMessage(QPixmap * pPixmap, const QString & szText);
59 
60 private:
62  QString m_szText;
64  QPixmap * m_pPixmap;
66  QHBoxLayout * m_pHBox;
68  QLabel * m_pLabel0;
70  QLabel * m_pLabel1;
71 
72 public:
77  inline QString text() const { return m_szText; };
82  inline QPixmap * pixmap() const { return m_pPixmap; };
87  void updateGui();
88 };
89 
90 #endif
NotifierMessage(QPixmap *pPixmap, const QString &szText)
Constructs the NotifierMessage object.
Definition: NotifierMessage.cpp:35
QPixmap * m_pPixmap
The message icon (can be null)
Definition: NotifierMessage.h:64
QHBoxLayout * m_pHBox
Layout for the labels.
Definition: NotifierMessage.h:66
~NotifierMessage()
Destroys the NotifierMessage object.
Definition: NotifierMessage.cpp:54
QPixmap * pixmap() const
Returns the message icon.
Definition: NotifierMessage.h:82
QString text() const
Returns the original irc message.
Definition: NotifierMessage.h:77
QLabel * m_pLabel0
Label for the message icon.
Definition: NotifierMessage.h:68
void updateGui()
Updates the aspect of this message.
Definition: NotifierMessage.cpp:64
QString m_szText
The message text.
Definition: NotifierMessage.h:62
QLabel * m_pLabel1
Label for the message text.
Definition: NotifierMessage.h:70
Definition: NotifierWindow.h:57
A single message in a notifier window.
Definition: NotifierMessage.h:43