/TeXmacs-1.0.7.11-src/src/Plugins/Qt/qt_view_widget.hpp
C++ Header | 56 lines | 24 code | 11 blank | 21 comment | 0 complexity | 14cdcf24cb528040f30e566ffca01dc5 MD5 | raw file
Possible License(s): GPL-3.0, GPL-2.0, MPL-2.0-no-copyleft-exception
1
2/******************************************************************************
3 * MODULE : qt_view_widget.hpp
4 * DESCRIPTION: QT view widget class
5 * COPYRIGHT : (C) 2008 Massimiliano Gubinelli
6 *******************************************************************************
7 * This software falls under the GNU general public license version 3 or later.
8 * It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
9 * in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
10 ******************************************************************************/
11
12#ifndef QT_VIEW_WIDGET_HPP
13#define QT_VIEW_WIDGET_HPP
14
15#include "widget.hpp"
16#include "basic_renderer.hpp"
17#include "qt_widget.hpp"
18
19class QWidget;
20
21/**
22 * TODO: description!
23 */
24class qt_view_widget_rep: public qt_widget_rep {
25public:
26 QWidget *view;
27 basic_renderer current_renderer;
28
29public:
30 qt_view_widget_rep (QWidget *v);
31 ~qt_view_widget_rep ();
32
33 virtual void send (slot s, blackbox val);
34 // send a message val to the slot s
35 virtual blackbox query (slot s, int type_id);
36 // obtain information of a given type from the slot s
37 virtual widget read (slot s, blackbox index);
38 // abstract read access (of type s) of a subwidget at position index
39 virtual void write (slot s, blackbox index, widget w);
40 // abstract write access (of type s) of a subwidget at position index
41 virtual void notify (slot s, blackbox new_val);
42 // notification of a change on a slot s which contains a state variable
43 //virtual void connect (slot s, widget w2, slot s2);
44 // connect a state slot s to another slot s2 of another widget w2
45 //virtual void deconnect (slot s, widget w2, slot s2);
46 // deconnect a state slot s from another slot s2 of another widget w2
47
48 virtual widget plain_window_widget (string s);
49 void set_current_renderer(basic_renderer _r) { current_renderer = _r; }
50 basic_renderer get_current_renderer() { return current_renderer; }
51 virtual QWidget* as_qwidget () { return view ; };
52
53};
54
55
56#endif // QT_VIEW_WIDGET_HPP