KVIrc  4.9.2
DeveloperAPIs
NotifierWindowTab.h
Go to the documentation of this file.
1 #ifndef _KVINOTIFIERWINDOWTAB_H_
2 #define _KVINOTIFIERWINDOWTAB_H_
3 //=============================================================================
4 //
5 // File : NotifierWindowTab.h
6 // Creation date : Tue 07 Jul 2009 10:28 by Fabio Bas
7 //
8 // This file is part of the KVIrc distribution
9 // Copyright (C) 2009 Fabio Bas < ctrlaltca at gmail dot com >
10 //
11 // This program is FREE software. You can redistribute it and/or
12 // modify it under the terms of the GNU General Public License
13 // as published by the Free Software Foundation; either version 2
14 // of the License, or (at your option) any later version.
15 //
16 // This program is distributed in the HOPE that it will be USEFUL,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19 // See the GNU General Public License for more details.
20 //
21 // You should have received a copy of the GNU General Public License
22 // along with this program. If not, write to the Free Software Foundation,
23 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 //
25 //=============================================================================
26 
33 #include "NotifierMessage.h"
34 
35 #include "kvi_settings.h"
36 
37 #include <QScrollArea>
38 
39 class QVBoxLayout;
40 class QWidget;
41 class QTabWidget;
42 class QPainter;
43 class KviWindow;
44 
49 class NotifierWindowTab : public QScrollArea
50 {
51  Q_OBJECT
52 public:
59  NotifierWindowTab(KviWindow * pWnd, QTabWidget * pParent);
60 
65 
66 private:
67  QString m_szLabel;
69  QTabWidget * m_pParent;
70  QVBoxLayout * m_pVBox;
71  QWidget * m_pVWidget;
72 
73 public:
79  void appendMessage(NotifierMessage * pMessage);
80 
85  void updateGui();
86 
91  inline QString label() const { return m_szLabel; };
92 
97  inline KviWindow * wnd() const { return m_pWnd; };
98 protected:
99  virtual void mouseDoubleClickEvent(QMouseEvent * e);
100  virtual void resizeEvent(QResizeEvent * e);
101  virtual void paintEvent(QPaintEvent * e);
102 private slots:
107  void scrollRangeChanged(int, int);
108 
113  void labelChanged();
114 
119  void closeMe();
120 };
121 
122 #endif
QVBoxLayout * m_pVBox
Definition: NotifierWindowTab.h:70
void labelChanged()
Emitted when the window changes its name.
Definition: NotifierWindowTab.cpp:134
void closeMe()
Emitted when the window is being destroyed.
Definition: NotifierWindowTab.cpp:166
void appendMessage(NotifierMessage *pMessage)
Appends the given message to the window.
Definition: NotifierWindowTab.cpp:102
Defines an object for every single tab about the tabs area.
Definition: NotifierWindowTab.h:49
QString m_szLabel
Definition: NotifierWindowTab.h:67
QTabWidget * m_pParent
Definition: NotifierWindowTab.h:69
KviWindow * m_pWnd
Definition: NotifierWindowTab.h:68
#define e
Definition: detector.cpp:69
QWidget * m_pVWidget
Definition: NotifierWindowTab.h:71
void scrollRangeChanged(int, int)
Emitted when the scrollbar range is changed.
Definition: NotifierWindowTab.cpp:127
virtual void resizeEvent(QResizeEvent *e)
Definition: NotifierWindowTab.cpp:179
virtual void paintEvent(QPaintEvent *e)
Definition: NotifierWindowTab.cpp:194
Base class for all windows in KVIrc.
Definition: KviWindow.h:74
KviWindow * wnd() const
Returns the pointer of the current window.
Definition: NotifierWindowTab.h:97
virtual void mouseDoubleClickEvent(QMouseEvent *e)
Definition: NotifierWindowTab.cpp:145
~NotifierWindowTab()
Destroys the tab object.
Definition: NotifierWindowTab.cpp:94
NotifierWindowTab(KviWindow *pWnd, QTabWidget *pParent)
Creates the tab object.
Definition: NotifierWindowTab.cpp:53
This file contains compile time settings.
void updateGui()
Updates the GUI.
Definition: NotifierWindowTab.cpp:116
A single message in a notifier window.
Definition: NotifierMessage.h:43
QString label() const
Returns the name of the current window.
Definition: NotifierWindowTab.h:91