PageRenderTime 46ms CodeModel.GetById 20ms RepoModel.GetById 1ms app.codeStats 0ms

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