KVIrc 5.2.6
Developer APIs
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
43class NotifierMessage : public QWidget
44{
45 friend class NotifierWindow;
46
47 Q_OBJECT
48public:
55 NotifierMessage(QPixmap * pPixmap, QString szText);
60
61private:
63 QString m_szText;
65 QPixmap * m_pPixmap = nullptr;
67 QHBoxLayout * m_pHBox = nullptr;
69 QLabel * m_pLabel0 = nullptr;
71 QLabel * m_pLabel1 = nullptr;
72
73public:
78 const QString & text() const { return m_szText; }
83 QPixmap * pixmap() const { return m_pPixmap; }
88 void updateGui();
89};
90
91#endif
QPixmap * pixmap() const
Returns the message icon.
Definition NotifierMessage.h:83
QLabel * m_pLabel0
Label for the message icon.
Definition NotifierMessage.h:69
void updateGui()
Updates the aspect of this message.
Definition NotifierMessage.cpp:57
friend class NotifierWindow
Definition NotifierMessage.h:45
NotifierMessage(QPixmap *pPixmap, QString szText)
Constructs the NotifierMessage object.
Definition NotifierMessage.cpp:36
QLabel * m_pLabel1
Label for the message text.
Definition NotifierMessage.h:71
QString m_szText
The message text.
Definition NotifierMessage.h:63
QHBoxLayout * m_pHBox
Layout for the labels.
Definition NotifierMessage.h:67
QPixmap * m_pPixmap
The message icon (can be null)
Definition NotifierMessage.h:65
~NotifierMessage()
Destroys the NotifierMessage object.
Definition NotifierMessage.cpp:47
const QString & text() const
Returns the original irc message.
Definition NotifierMessage.h:78