1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
|
#ifndef _KVI_ACTIONDRAWER_H_
#define _KVI_ACTIONDRAWER_H_
//=============================================================================
//
// File : kvi_actiondrawer.h
// Created on Sun 21 Nov 2004 05:44:22 by Szymon Stefanek
//
// This file is part of the KVIrc IRC Client distribution
// Copyright (C) 2004 Szymon Stefanek <pragma at kvirc dot net>
//
// This program is FREE software. You can redistribute it and/or
// modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your opinion) any later version.
//
// This program is distributed in the HOPE that it will be USEFUL,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, write to the Free Software Foundation,
// Inc. ,51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
//=============================================================================
#include "kvi_settings.h"
#include "kvi_qstring.h"
#include <qwidget.h>
#include <qtabwidget.h>
#include "kvi_listview.h"
class KviActionDrawerPage;
class QPixmap;
#ifdef COMPILE_USE_QT4
class Q3SimpleRichText;
#else
class QSimpleRichText;
#endif
class KviAction;
class KVIRC_API KviActionDrawerPageListViewItem : public KviTalListViewItem
{
public:
KviActionDrawerPageListViewItem(KviTalListView * v,KviAction * a);
~KviActionDrawerPageListViewItem();
protected:
QString m_szName;
#ifdef COMPILE_USE_QT4
Q3SimpleRichText * m_pText;
#else
QSimpleRichText * m_pText;
#endif
QPixmap * m_pIcon;
KviTalListView * m_pListView;
QString m_szKey;
public:
QPixmap * icon(){ return m_pIcon; };
const QString & name(){ return m_szName; };
protected:
virtual void paintCell(QPainter * p,const QColorGroup & cg,int column,int width,int align);
virtual void setup();
virtual QString key(int,bool) const;
};
class KVIRC_API KviActionDrawerPageListView : public KviListView
{
friend class KviActionDrawerPage;
Q_OBJECT
protected:
KviActionDrawerPageListView(KviActionDrawerPage * pParent);
public:
~KviActionDrawerPageListView();
//protected:
// KviActionDrawerPage * m_pPage;
protected:
virtual void resizeEvent(QResizeEvent * e);
virtual void contentsMousePressEvent(QMouseEvent * e);
};
class KVIRC_API KviActionDrawerPage : public QWidget
{
friend class KviActionDrawer;
Q_OBJECT
protected:
KviActionDrawerPage(QWidget * pParent,const QString &szDescription);
public:
~KviActionDrawerPage();
protected:
KviActionDrawerPageListView * m_pListView;
protected:
void add(KviAction * a);
};
class KVIRC_API KviActionDrawer : public QTabWidget
{
Q_OBJECT
public:
KviActionDrawer(QWidget * pParent);
~KviActionDrawer();
public:
void fill();
};
#endif //!_KVI_ACTIONDRAWER_H_
|