KVIrc  4.9.2
DeveloperAPIs
KviCustomToolBar.h
Go to the documentation of this file.
1 #ifndef _KVI_CUSTOMTOOLBAR_H_
2 #define _KVI_CUSTOMTOOLBAR_H_
3 //=============================================================================
4 //
5 // File : KviCustomToolBar.h
6 // Creation date : Sun 21 Nov 2004 05:28:57 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 
27 #include "kvi_settings.h"
28 #include "KviToolBar.h"
29 #include "KviPointerHashTable.h"
30 
31 #ifdef COMPILE_ON_WINDOWS
33 #else
35 #endif
36 
38 {
40  Q_OBJECT
41 protected:
42  KviCustomToolBar(KviCustomToolBarDescriptor * d, const QString & szLabel, Qt::ToolBarArea type = Qt::TopToolBarArea, const char * pcName = "unnamed_customtoolbar");
43 
44 public:
46 
47 protected:
50 
51 public:
52  KviCustomToolBarDescriptor * descriptor() { return m_pDescriptor; };
53 protected:
54  virtual void dragEnterEvent(QDragEnterEvent * e);
55  virtual void dragMoveEvent(QDragMoveEvent * e);
56  virtual void dragLeaveEvent(QDragLeaveEvent * e);
57  virtual void dropEvent(QDropEvent * e);
58  virtual void childEvent(QChildEvent * e);
59  virtual bool eventFilter(QObject * o, QEvent * e);
60  QAction * actionForWidget(QWidget * pWidget);
61  void drag(QWidget * pChild, const QPoint & pnt);
62  void filterChild(QObject * o);
63  void unfilterChild(QObject * o);
64  virtual void paintEvent(QPaintEvent * e);
65  void syncDescriptor();
66 protected slots:
67  void beginCustomize();
68  void endCustomize();
69  void filteredChildDestroyed();
70 };
71 
72 class KviCustomToolBarSeparator : public QWidget
73 {
74  Q_OBJECT
75 public:
76  KviCustomToolBarSeparator(KviCustomToolBar * pParent, const char * pcName);
77 
78 protected:
80 
81 public:
82  QSize sizeHint() const;
83 
84 protected:
85  void paintEvent(QPaintEvent * e);
86 };
87 
88 #endif //_KVI_CUSTOMTOOLBAR_H_
Definition: KviCustomToolBar.h:37
#define KVIRC_API
Definition: kvi_settings.h:128
friend class KviCustomToolBar
Definition: KviCustomToolBarDescriptor.h:37
KviCustomToolBarDescriptor * descriptor()
Definition: KviCustomToolBar.h:52
KviCustomToolBarSeparator(KviCustomToolBar *pParent, const char *pcName)
Definition: KviCustomToolBar.cpp:346
QString type()
Definition: KviRuntimeInfo.cpp:646
KviCustomToolBar * m_pToolBar
Definition: KviCustomToolBar.h:79
#define e
Definition: detector.cpp:69
Pointer Hash Table.
char s d
Definition: KviIrcNumericCodes.h:391
Definition: KviCustomToolBar.h:72
KviCustomToolBarDescriptor * m_pDescriptor
Definition: KviCustomToolBar.h:48
#define o
Definition: detector.cpp:79
Definition: KviCustomToolBarDescriptor.h:35
void paintEvent(QPaintEvent *e)
Definition: KviCustomToolBar.cpp:366
This file contains compile time settings.
Definition: KviToolBar.h:31
QSize sizeHint() const
Definition: KviCustomToolBar.cpp:354
KviPointerHashTable< void *, bool > * m_pFilteredChildren
Definition: KviCustomToolBar.h:49