HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HOM_qt.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * COMMENTS:
7  */
8 
9 #ifndef __HOM_qt_h__
10 #define __HOM_qt_h__
11 
12 #include "HOM_API.h"
13 #include "HOM_Defines.h"
14 #include "HOM_Module.h"
15 
16 class HOM_FloatingPanel;
17 class HOM_Node;
18 
19 SWIGOUT(%rename(qt) HOM_qt;)
21 {
22 public:
23  virtual ~HOM_qt()
24  {}
25 
26  virtual std::string __repr__() = 0;
27 
28  virtual void* _mainWindow() = 0;
29  virtual void* _floatingPanelWindow(HOM_FloatingPanel *panel) = 0;
30 
31  virtual void* _createWindow() = 0;
32  virtual void* _createDialog() = 0;
33  virtual void* _createMenu() = 0;
34  virtual void* _createIcon(const char* icon_name, int width, int height) = 0;
35  virtual bool canCreateIcon(const char *icon_name) = 0;
36 
37  virtual void* _createParmDialog(HOM_Node *hom_node, bool showTitleBar, bool compact, double labelsize) = 0;
38  virtual void _setParmDialogNode(void *widget, HOM_Node *hom_node) = 0;
39  virtual HOM_Node* _parmDialogNode(void *widget) = 0;
40 
41  virtual std::vector<std::string> _getParmDialogValueNames(void *widget) = 0;
42  virtual std::string _getParmDialogValue(void *widget,const char *name) = 0;
43  virtual bool _setParmDialogValue(void *widget,const char *name, const char* value) = 0;
44  virtual bool _pressParmDialogButton(void *widget,const char *name) = 0;
45 
46  virtual std::vector<HOM_ElemPtr<HOM_ParmTuple> > _getParmDialogVisibleParms(void *widget) = 0;
47 
48  virtual void* _getColor(const char* color_name) = 0;
49  virtual void* _getCursor(const char *cursor_name) = 0;
50  virtual void* _getBrush(const char* color_name) = 0;
51 
52  virtual std::string styleSheet(const char *file_path=nullptr) = 0;
53 
54  virtual std::map<std::string, int> _qtKeyToUIKey(int qtKey,
55  int qtKeymodifiers) = 0;
56  virtual std::string _qtKeyToString(int qtKey,
57  int qtKeymodifiers,
58  std::string qtkeystring) = 0;
59 
60  virtual HOM_OptionalInt _nativeModifierIndependentKeyCode(
61  int native_scan_code,
62  int native_virtual_key) = 0;
63  virtual bool _hasExtendedKeyEventInfo(int native_key_code) = 0;
64  virtual int _eventKeyIfNoModifiers(int native_key_code) = 0;
65  virtual std::string _eventTextIfNoModifiers(int native_key_code) = 0;
66 
67  SWIGOUT(%ignore _registerOpaqueKeyResolveInfoCallback;)
68  virtual void _registerOpaqueKeyResolveInfoCallback(
69  void *widget,
70  void *py_callback) = 0;
71  SWIGOUT(%ignore _unregisterOpaqueKeyResolveInfoCallback;)
72  virtual void _unregisterOpaqueKeyResolveInfoCallback(
73  void *widget) = 0;
74 
75  SWIGOUT(%ignore _opaqueHotkeyAssignments;)
76  virtual void _opaqueHotkeyAssignments(
77  void *widget,
78  const std::vector<std::string> &hotkey_symbols,
79  std::vector<std::vector<std::string> > &result) = 0;
80 
81 #ifdef SWIG
82 %extend
83 {
84  // TODO: Take an InterpreterObject for the widget and call python to run
85  // hou.qt.__utils__.getCppPointer() on it ourselves?
86  void _registerKeyResolveInfoCallback(int64 widget,
87  InterpreterObject callback)
88  {
89  self->_registerOpaqueKeyResolveInfoCallback(
90  reinterpret_cast<void *>(widget), callback);
91  }
92 
93  void _unregisterKeyResolveInfoCallback(int64 widget)
94  {
95  self->_unregisterOpaqueKeyResolveInfoCallback(
96  reinterpret_cast<void *>(widget));
97  }
98 
99  std::vector<std::vector<std::string> >
100  _hotkeyAssignments(int64 widget,
101  const std::vector<std::string> &hotkey_symbols)
102  {
103  std::vector<std::vector<std::string> > result;
104  self->_opaqueHotkeyAssignments(
105  reinterpret_cast<void *>(widget), hotkey_symbols, result);
106  return result;
107  }
108 }
109 #endif
110 
111  virtual std::string _resolveKeyToCommand(
112  const char *key,
113  const std::vector<std::string> &override_contexts) = 0;
114 
115  virtual double inchesToPixels(double inches) = 0;
116  virtual double pixelsToInches(double pixels) = 0;
117 
118  virtual void skipClosingMenusForCurrentButtonPress() = 0;
119 
120  virtual bool _launchRenderGalleryBackgroundRender(
121  const char *delegate,
122  const char *usd_filepath,
123  const char *rendersettings_prim,
124  const char *override_camera,
125  int override_res_x, int override_res_y,
126  const char *lopnet_path,
127  const char *item_id
128  ) = 0;
129 
130  virtual void _renderGalleryBackgroundRenderMouseClick(
131  int x, int y, const char *lopnet_path,
132  const char *item_id
133  ) = 0;
134 
135  virtual void _stopRenderGalleryBackgroundRender(
136  const char *lopnet_path,
137  const char *item_id
138  ) = 0;
139 
140  // Supported mime-types for drag-and-drop.
141  virtual std::string _channelPathMimeType() = 0;
142  virtual std::string _chopTrackPathMimeType() = 0;
143  virtual std::string _galleryEntryMimeType() = 0;
144  virtual std::string _galleryEntryNameMimeType() = 0;
145  virtual std::string _itemPathMimeType() = 0;
146  virtual std::string _nodeFlagPathMimeType() = 0;
147  virtual std::string _nodePathMimeType() = 0;
148  virtual std::string _orboltNodeTypeNameMimeType() = 0;
149  virtual std::string _paneTabNameMimeType() = 0;
150  virtual std::string _parmPathMimeType() = 0;
151  virtual std::string _persistentHandleNameMimeType() = 0;
152  virtual std::string _primitivePathMimeType() = 0;
153  virtual std::string _shelfNameMimeType() = 0;
154  virtual std::string _shelfToolNameMimeType() = 0;
155  virtual std::string _takeNameMimeType() = 0;
156  virtual std::string _usdPrimitivePathMimeType() = 0;
157  virtual std::string _usdPrimitivePythonMimeType() = 0;
158  virtual std::string _usdPropertyPathMimeType() = 0;
159  virtual std::string _usdPropertyPythonMimeType() = 0;
160  virtual std::string _assetGalleryEntryMimeType() = 0;
161 
162  virtual int _galleryNameRole() = 0;
163  virtual int _galleryThumbRole() = 0;
164  virtual int _galleryCreationDateRole() = 0;
165  virtual int _galleryStarRole() = 0;
166  virtual int _galleryDiffMarkerRole() = 0;
167  virtual int _galleryColorRole() = 0;
168  virtual int _galleryTagsRole() = 0;
169  virtual int _galleryThumbValidRole() = 0;
170  virtual int _galleryMetadataRole() = 0;
171  virtual int _gallerySnapshotFileRole() = 0;
172  virtual int _gallerySnapshotRole() = 0;
173  virtual int _galleryRenderingRole() = 0;
174  virtual int _galleryCloneIdRole() = 0;
175 };
176 
177 #endif
virtual ~HOM_qt()
Definition: HOM_qt.h:23
GLsizei const GLchar *const * string
Definition: glcorearb.h:814
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
string __repr__(VtArray< T > const &self)
Definition: wrapArray.h:349
GLint GLint GLsizei GLint GLenum GLenum const void * pixels
Definition: glcorearb.h:108
GLint y
Definition: glcorearb.h:103
**But if you need a result
Definition: thread.h:613
Definition: HOM_qt.h:20
GLint GLsizei GLsizei height
Definition: glcorearb.h:103
#define HOM_API
Definition: HOM_API.h:13
void ignore(T const &) VULKAN_HPP_NOEXCEPT
Definition: vulkan.hpp:6508
long long int64
Definition: SYS_Types.h:116
UT_Optional< int > HOM_OptionalInt
Definition: HOM_Defines.h:46
GLuint const GLchar * name
Definition: glcorearb.h:786
GLint GLenum GLint x
Definition: glcorearb.h:409
OIIO_UTIL_API bool rename(string_view from, string_view to, std::string &err)
GLint GLsizei width
Definition: glcorearb.h:103
Definition: core.h:1131