KVIrc 5.2.6
Developer APIs
KvsObject_widget.h
Go to the documentation of this file.
1#ifndef _CLASS_WIDGET_H_
2#define _CLASS_WIDGET_H_
3//=============================================================================
4//
5// File : KvsObject_widget.h
6// Creation date : Mon Sep 11 16:35:32 CET 2000 by Krzysztof Godlewski
7//
8// This file is part of the KVIrc IRC client distribution
9// Copyright (C) 2000 Krzysztof Godlewski
10// Copyright (C) 2000-2010 Szymon Stefanek (pragma at kvirc dot net)
11//
12// This program is FREE software. You can redistribute it and/or
13// modify it under the terms of the GNU General Public License
14// as published by the Free Software Foundation; either version 2
15// of the License, or (at your option) any later version.
16//
17// This program is distributed in the HOPE that it will be USEFUL,
18// but WITHOUT ANY WARRANTY; without even the implied warranty of
19// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20// See the GNU General Public License for more details.
21//
22// You should have received a copy of the GNU General Public License
23// along with this program. If not, write to the Free Software Foundation,
24// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
25//
26//=============================================================================
27
28#include "kvi_settings.h"
29#include "KviCString.h"
30#include "KviTalToolTip.h"
31#include "object_macros.h"
32
33#include <QGraphicsEffect>
34
35#ifdef COMPILE_WEBENGINE_SUPPORT
36#include <QWebEngineView>
37#endif
38
40{
41 Q_OBJECT
42public:
44
45public:
46 QWidget * widget() { return (QWidget *)object(); };
47
48protected:
49 bool init(KviKvsRunTimeContext * pContext, KviKvsVariantList * pParams) override;
50
51#ifdef COMPILE_WEBENGINE_SUPPORT
52 QWebEngineView * m_pWebview = nullptr;
53#endif
54 bool eventFilter(QObject * o, QEvent * e) override;
56 QGraphicsDropShadowEffect * pGraphicsEffect = nullptr;
57 // ok, it is clear that we're messing with the naming conventions for the
58 // object classes :D
59 // let's try to use this one:
60 // isEnabled
61 // setEnabled..
62 // ... etc
63 // so the name of the C++ function matches exactly the name of the KVS function at this point
64
65 // let's also try to keep alphabetic order for the functions here.. so one can find them quickly
66
131
133#ifdef COMPILE_WEBENGINE_SUPPORT
134 bool setWebView(KviKvsObjectFunctionCall * c);
135#endif
136
137signals:
139};
140
141class KviKvsWidget : public QWidget
142{
143 Q_OBJECT
144 Q_PROPERTY(QSize sizeHint READ sizeHint)
145public:
146 KviKvsWidget(KvsObject_widget * ob, QWidget * par);
148
149protected:
151
152public:
153 QSize sizeHint() const override;
154};
155#endif //_CLASS_WIDGET_H_
Definition KviKvsObjectFunctionCall.h:34
Definition KviKvsObject.h:51
QObject * object() const
Definition KviKvsObject.h:94
Definition KviKvsRunTimeContext.h:104
Class to handle variant variables lists.
Definition KviKvsVariantList.h:42
Definition KvsObject_widget.h:142
QSize sizeHint
Definition KvsObject_widget.h:144
KvsObject_widget * m_pObject
Definition KvsObject_widget.h:150
KviKvsWidget(KvsObject_widget *ob, QWidget *par)
Definition KvsObject_widget.cpp:59
Definition KvsObject_widget.h:40
bool setGeometry(KviKvsObjectFunctionCall *c)
bool colorPalette(KviKvsObjectFunctionCall *c)
QWidget * widget()
Definition KvsObject_widget.h:46
bool setForegroundColor(KviKvsObjectFunctionCall *c)
bool hasFocus(KviKvsObjectFunctionCall *c)
bool grab(KviKvsObjectFunctionCall *)
bool lower(KviKvsObjectFunctionCall *)
bool setFont(KviKvsObjectFunctionCall *c)
bool setFocusPolicy(KviKvsObjectFunctionCall *c)
bool screenResolution(KviKvsObjectFunctionCall *c)
bool removeFromStatusBar(KviKvsObjectFunctionCall *c)
bool foregroundColor(KviKvsObjectFunctionCall *c)
bool windowTitle(KviKvsObjectFunctionCall *c)
bool loadInterface(KviKvsObjectFunctionCall *c)
bool height(KviKvsObjectFunctionCall *)
bool fontMetricsHeight(KviKvsObjectFunctionCall *c)
bool fontAscent(KviKvsObjectFunctionCall *c)
bool isEnabled(KviKvsObjectFunctionCall *c)
bool mapToGlobal(KviKvsObjectFunctionCall *c)
bool globalCursorX(KviKvsObjectFunctionCall *c)
bool setWindowTitle(KviKvsObjectFunctionCall *c)
bool isTopLevel(KviKvsObjectFunctionCall *c)
bool setMaximumHeight(KviKvsObjectFunctionCall *c)
bool setMaximumWidth(KviKvsObjectFunctionCall *c)
bool repaint(KviKvsObjectFunctionCall *c)
bool sizeHint(KviKvsObjectFunctionCall *c)
bool mapFromGlobal(KviKvsObjectFunctionCall *c)
bool eventFilter(QObject *o, QEvent *e) override
Definition KvsObject_widget.cpp:724
bool setFixedSize(KviKvsObjectFunctionCall *c)
bool setWindowIcon(KviKvsObjectFunctionCall *c)
bool insertIntoStatusBar(KviKvsObjectFunctionCall *c)
bool setFixedHeight(KviKvsObjectFunctionCall *c)
bool move(KviKvsObjectFunctionCall *c)
bool isVisible(KviKvsObjectFunctionCall *c)
bool setMinimumWidth(KviKvsObjectFunctionCall *c)
bool width(KviKvsObjectFunctionCall *)
bool setFixedWidth(KviKvsObjectFunctionCall *c)
bool setFocus(KviKvsObjectFunctionCall *c)
bool setSizePolicy(KviKvsObjectFunctionCall *c)
bool centerToScreen(KviKvsObjectFunctionCall *c)
bool setKeyShortcut(KviKvsObjectFunctionCall *c)
bool resize(KviKvsObjectFunctionCall *c)
bool update(KviKvsObjectFunctionCall *c)
bool setStyleSheet(KviKvsObjectFunctionCall *c)
bool fontMetricsWidth(KviKvsObjectFunctionCall *c)
QGraphicsDropShadowEffect * pGraphicsEffect
Definition KvsObject_widget.h:56
KviKvsRunTimeContext * m_pContext
Definition KvsObject_widget.h:55
bool show(KviKvsObjectFunctionCall *c)
bool setToolTip(KviKvsObjectFunctionCall *)
bool globalCursorY(KviKvsObjectFunctionCall *c)
bool raise(KviKvsObjectFunctionCall *)
bool setMinimumHeight(KviKvsObjectFunctionCall *c)
bool x(KviKvsObjectFunctionCall *)
bool setBackgroundColor(KviKvsObjectFunctionCall *c)
bool backgroundColor(KviKvsObjectFunctionCall *c)
bool setBackgroundImage(KviKvsObjectFunctionCall *c)
bool addWidgetToWrappedLayout(KviKvsObjectFunctionCall *c)
bool setEnabled(KviKvsObjectFunctionCall *c)
bool setWFlags(KviKvsObjectFunctionCall *c)
bool hide(KviKvsObjectFunctionCall *)
bool fontDescent(KviKvsObjectFunctionCall *c)
bool setMask(KviKvsObjectFunctionCall *c)
bool setAttribute(KviKvsObjectFunctionCall *c)
bool geometry(KviKvsObjectFunctionCall *c)
bool fontMetricsLineSpacing(KviKvsObjectFunctionCall *c)
bool setMouseTracking(KviKvsObjectFunctionCall *c)
bool setParent(KviKvsObjectFunctionCall *c)
bool y(KviKvsObjectFunctionCall *)
bool parentWidget(KviKvsObjectFunctionCall *c)
#define e
Definition detector.cpp:70
#define o
Definition detector.cpp:80
This file contains compile time settings.
#define KVSO_DECLARE_OBJECT(__className)
Definition object_macros.h:33
int init()
Definition winamp.cpp:118