KVIrc 5.2.0
Developer APIs
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
41protected:
42 KviCustomToolBar(KviCustomToolBarDescriptor * d, const QString & szLabel, Qt::ToolBarArea type = Qt::TopToolBarArea, const char * pcName = "unnamed_customtoolbar");
43
44public:
46
47protected:
50
51public:
52 KviCustomToolBarDescriptor * descriptor() { return m_pDescriptor; };
53protected:
54 void dragEnterEvent(QDragEnterEvent * e) override;
55 void dragMoveEvent(QDragMoveEvent * e) override;
56 void dragLeaveEvent(QDragLeaveEvent * e) override;
57 void dropEvent(QDropEvent * e) override;
58 void childEvent(QChildEvent * e) override;
59 bool eventFilter(QObject * o, QEvent * e) override;
60 QAction * actionForWidget(QWidget * pWidget);
61 void drag(QWidget * pChild, const QPoint & pnt);
62 void filterChild(QObject * o);
63 void unfilterChild(QObject * o);
64 void paintEvent(QPaintEvent * e) override;
65 void syncDescriptor();
66protected slots:
67 void beginCustomize();
68 void endCustomize();
69 void filteredChildDestroyed();
70};
71
72class KviCustomToolBarSeparator : public QWidget
73{
74 Q_OBJECT
75public:
76 KviCustomToolBarSeparator(KviCustomToolBar * pParent, const char * pcName);
77
78protected:
80
81public:
82 QSize sizeHint() const override;
83
84protected:
85 void paintEvent(QPaintEvent * e) override;
86};
87
88#endif //_KVI_CUSTOMTOOLBAR_H_
Pointer Hash Table.
Definition KviCustomToolBarDescriptor.h:36
Definition KviCustomToolBar.h:73
QSize sizeHint() const override
Definition KviCustomToolBar.cpp:354
KviCustomToolBar * m_pToolBar
Definition KviCustomToolBar.h:79
void paintEvent(QPaintEvent *e) override
Definition KviCustomToolBar.cpp:366
Definition KviCustomToolBar.h:38
KviPointerHashTable< void *, bool > * m_pFilteredChildren
Definition KviCustomToolBar.h:49
KviCustomToolBarDescriptor * m_pDescriptor
Definition KviCustomToolBar.h:48
void drag(QWidget *pChild, const QPoint &pnt)
KviCustomToolBarDescriptor * descriptor()
Definition KviCustomToolBar.h:52
A fast pointer hash table implementation.
Definition KviPointerHashTable.h:450
Definition KviToolBar.h:32
#define d
Definition detector.cpp:69
#define e
Definition detector.cpp:70
#define o
Definition detector.cpp:80
This file contains compile time settings.
#define KVIRC_API
Definition kvi_settings.h:127