KVIrc  4.9.2
DeveloperAPIs
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_WEBKIT_SUPPORT
36 #include <QtWebKitWidgets/QWebView>
37 #endif
38 
40 {
41  Q_OBJECT
42 public:
44 
45 public:
46  QWidget * widget() { return (QWidget *)object(); };
47 
48 protected:
49  virtual bool init(KviKvsRunTimeContext * pContext, KviKvsVariantList * pParams);
50 
51 #ifdef COMPILE_WEBKIT_SUPPORT
52  QWebView * m_pWebview;
53 #endif
54  virtual bool eventFilter(QObject * o, QEvent * e);
56  QGraphicsDropShadowEffect * pGraphicsEffect;
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 
92  bool raise(KviKvsObjectFunctionCall *);
125  bool x(KviKvsObjectFunctionCall *);
126  bool y(KviKvsObjectFunctionCall *);
127 
129 #ifdef COMPILE_WEBKIT_SUPPORT
130  bool setWebView(KviKvsObjectFunctionCall * c);
131 #endif
132 
133 signals:
134  void aboutToDie();
135 };
136 
137 class KviKvsWidget : public QWidget
138 {
139  Q_OBJECT
140  Q_PROPERTY(QSize sizeHint READ sizeHint)
141 public:
142  KviKvsWidget(KvsObject_widget * ob, QWidget * par);
143  virtual ~KviKvsWidget();
144 
145 protected:
147 
148 public:
149  QSize sizeHint() const;
150 };
151 #endif //_CLASS_WIDGET_H_
Definition: KvsObject_widget.h:39
bool fontMetricsWidth(KviKvsObjectFunctionCall *c)
bool isTopLevel(KviKvsObjectFunctionCall *c)
char s char s char s s s s s char char c s *s c s s s d c s *s d c d d d d c
Definition: KviIrcNumericCodes.h:391
bool addWidgetToWrappedLayout(KviKvsObjectFunctionCall *c)
bool setBackgroundColor(KviKvsObjectFunctionCall *c)
bool fontMetricsLineSpacing(KviKvsObjectFunctionCall *c)
Class to handle variant variables lists.
Definition: KviKvsVariantList.h:41
bool setFocus(KviKvsObjectFunctionCall *c)
bool setMaximumWidth(KviKvsObjectFunctionCall *c)
bool backgroundColor(KviKvsObjectFunctionCall *c)
bool parentWidget(KviKvsObjectFunctionCall *c)
Definition: KviKvsObjectFunctionCall.h:33
bool setWindowTitle(KviKvsObjectFunctionCall *c)
Definition: KviKvsObject.h:50
bool insertIntoStatusBar(KviKvsObjectFunctionCall *c)
bool show(KviKvsObjectFunctionCall *c)
bool setMinimumHeight(KviKvsObjectFunctionCall *c)
bool mapFromGlobal(KviKvsObjectFunctionCall *c)
bool x(KviKvsObjectFunctionCall *)
bool resize(KviKvsObjectFunctionCall *c)
bool mapToGlobal(KviKvsObjectFunctionCall *c)
KvsObject_widget * m_pObject
Definition: KvsObject_widget.h:146
KviKvsRunTimeContext * m_pContext
Definition: KvsObject_widget.h:55
#define e
Definition: detector.cpp:69
Definition: KvsObject_widget.h:137
QWidget * widget()
Definition: KvsObject_widget.h:46
bool screenResolution(KviKvsObjectFunctionCall *c)
bool windowTitle(KviKvsObjectFunctionCall *c)
bool globalCursorY(KviKvsObjectFunctionCall *c)
bool setFocusPolicy(KviKvsObjectFunctionCall *c)
bool setMouseTracking(KviKvsObjectFunctionCall *c)
bool width(KviKvsObjectFunctionCall *)
bool setMask(KviKvsObjectFunctionCall *c)
bool loadInterface(KviKvsObjectFunctionCall *c)
bool isEnabled(KviKvsObjectFunctionCall *c)
bool isVisible(KviKvsObjectFunctionCall *c)
bool fontAscent(KviKvsObjectFunctionCall *c)
bool fontMetricsHeight(KviKvsObjectFunctionCall *c)
bool setBackgroundImage(KviKvsObjectFunctionCall *c)
bool move(KviKvsObjectFunctionCall *c)
bool centerToScreen(KviKvsObjectFunctionCall *c)
bool setForegroundColor(KviKvsObjectFunctionCall *c)
#define KVSO_DECLARE_OBJECT(__className)
Definition: object_macros.h:33
virtual ~KviKvsWidget()
bool setToolTip(KviKvsObjectFunctionCall *)
bool repaint(KviKvsObjectFunctionCall *c)
QGraphicsDropShadowEffect * pGraphicsEffect
Definition: KvsObject_widget.h:56
bool geometry(KviKvsObjectFunctionCall *c)
bool setGeometry(KviKvsObjectFunctionCall *c)
bool setWFlags(KviKvsObjectFunctionCall *c)
bool removeFromStatusBar(KviKvsObjectFunctionCall *c)
bool setWindowIcon(KviKvsObjectFunctionCall *c)
QObject * object() const
Definition: KviKvsObject.h:94
virtual bool init(KviKvsRunTimeContext *pContext, KviKvsVariantList *pParams)
Definition: KvsObject_widget.cpp:702
Definition: KviKvsRunTimeContext.h:103
#define o
Definition: detector.cpp:79
bool height(KviKvsObjectFunctionCall *)
bool sizeHint(KviKvsObjectFunctionCall *c)
bool setParent(KviKvsObjectFunctionCall *c)
bool foregroundColor(KviKvsObjectFunctionCall *c)
bool globalCursorX(KviKvsObjectFunctionCall *c)
bool hasFocus(KviKvsObjectFunctionCall *c)
bool setAttribute(KviKvsObjectFunctionCall *c)
bool update(KviKvsObjectFunctionCall *c)
bool setStyleSheet(KviKvsObjectFunctionCall *c)
bool hide(KviKvsObjectFunctionCall *)
bool fontDescent(KviKvsObjectFunctionCall *c)
bool setMaximumHeight(KviKvsObjectFunctionCall *c)
This file contains compile time settings.
QSize sizeHint() const
KviKvsWidget(KvsObject_widget *ob, QWidget *par)
Definition: KvsObject_widget.cpp:63
bool setKeyShortcut(KviKvsObjectFunctionCall *c)
bool colorPalette(KviKvsObjectFunctionCall *c)
bool grab(KviKvsObjectFunctionCall *)
bool lower(KviKvsObjectFunctionCall *)
bool y(KviKvsObjectFunctionCall *)
bool setEnabled(KviKvsObjectFunctionCall *c)
virtual bool eventFilter(QObject *o, QEvent *e)
Definition: KvsObject_widget.cpp:710
bool setFont(KviKvsObjectFunctionCall *c)
bool setMinimumWidth(KviKvsObjectFunctionCall *c)