KVIrc  4.9.2
DeveloperAPIs
KviActionDrawer.h
Go to the documentation of this file.
1 #ifndef _KVI_ACTIONDRAWER_H_
2 #define _KVI_ACTIONDRAWER_H_
3 //=============================================================================
4 //
5 // File : KviActionDrawer.h
6 // Creation date : Sun 21 Nov 2004 05:44:22 by Szymon Stefanek
7 //
8 // This file is part of the KVIrc IRC Client distribution
9 // Copyright (C) 2004-2010 Szymon Stefanek <pragma at kvirc dot net>
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 "kvi_settings.h"
34 #include "KviQString.h"
35 #include "KviTalListWidget.h"
36 
37 #include <QWidget>
38 #include <QTabWidget>
39 
40 class QPixmap;
41 class KviAction;
43 
48 class KVIRC_API KviActionDrawer : public QTabWidget
49 {
50  Q_OBJECT
51 public:
57  KviActionDrawer(QWidget * pParent);
58 
62  ~KviActionDrawer();
63 
64 public:
69  void fill();
70 };
71 
76 class KVIRC_API KviActionDrawerPage : public QWidget
77 {
78  friend class KviActionDrawer;
79  Q_OBJECT
80 protected:
87  KviActionDrawerPage(QWidget * pParent, const QString & szDescription);
88 
89 public:
94 
95 protected:
97 
98 protected:
104  void add(KviAction * pAction);
105 };
106 
112 {
113  friend class KviActionDrawerPage;
114  Q_OBJECT
115 protected:
122 
123 public:
128 
129 protected:
130  virtual void resizeEvent(QResizeEvent * e);
131  virtual void mousePressEvent(QMouseEvent * e);
132 };
133 
139 {
140 public:
148 
153 
154 protected:
155  QString m_szName;
156  QPixmap * m_pIcon;
158  QString m_szKey;
159 
160 public:
161  QPixmap * icon() { return m_pIcon; };
162  const QString & name() { return m_szName; };
163  /*
164 protected:
165  virtual void paintCell(QPainter * p,const QColorGroup & cg,int column,int width,int align);
166  virtual void setup();
167  virtual QString key(int,bool) const;
168 */
169 };
170 
171 #endif //_KVI_ACTIONDRAWER_H_
QPixmap * m_pIcon
Definition: KviActionDrawer.h:156
Definition: KviTalListWidget.h:35
#define KVIRC_API
Definition: kvi_settings.h:128
KviActionDrawerPageListWidget * m_pListWidget
Definition: KviActionDrawer.h:96
const QString & name()
Definition: KviActionDrawer.h:162
Defines an action inside KVIrc.
Definition: KviAction.h:100
Definition: KviActionDrawer.h:138
KviTalListWidget * m_pListWidget
Definition: KviActionDrawer.h:157
#define e
Definition: detector.cpp:69
QString m_szKey
Definition: KviActionDrawer.h:158
Action drawer class.
Definition: KviActionDrawer.h:48
QString m_szName
Definition: KviActionDrawer.h:155
Definition: KviActionDrawer.h:76
Definition: KviTalListWidget.h:51
QPixmap * icon()
Definition: KviActionDrawer.h:161
This file contains compile time settings.
Helper functions for the QString class.
Definition: KviActionDrawer.h:111