31 #ifdef __GO4DESIGNER__
32 #include <QtDesigner/QDesignerExportWidget>
33 #define GO4_QWIDGET_EXPORT QDESIGNER_WIDGET_EXPORT
35 #define GO4_QWIDGET_EXPORT
53 enum { service_DragEnter = 1,
54 service_DropEvent = 2,
55 service_CreateItem = 3,
59 service_EditInSlot = 7,
61 service_UpdateAnalysisItem = 9,
62 service_StatusMessage = 15,
63 service_CreateViewPanel = 17,
64 service_BrowserItemRemote = 18,
66 service_SaveToMemory = 20,
67 service_GetAnalysis = 21,
68 service_AddEditorLink = 22,
69 service_AddDirectLink = 23,
70 service_AddLinkInSlot = 24,
71 service_GetTopSlot = 25,
72 service_AddEditorSlot = 26,
73 service_SetLinkedName = 27,
74 service_GetLinkedName = 28,
75 service_GetLinkedName2 = 29,
76 service_GetLinked0 = 30,
77 service_GetLinked1 = 31,
78 service_GetLinked2 = 32,
79 service_RemoveLink = 33,
80 service_RemoveAllLinks = 34,
81 service_ObjectCreated = 35,
82 service_ConnectPad = 36,
83 service_LastActivePanel = 37,
84 service_WhereItemDrawn = 38,
85 service_UndrawItem = 39,
87 service_PanelTimer = 41,
88 service_HelpWindow = 42,
89 service_HotStart = 43,
90 panel_Activated = 101,
93 panel_ActiveUpdated = 104,
94 panel_PadDeleted = 105,
95 panel_Deleted = 106 };
97 QGo4Widget(QWidget * parent = 0,
const char * name = 0, Qt::WindowFlags f = Qt::Widget );
100 virtual bool IsAcceptDrag(
const char* itemname, TClass* cl,
int kind);
101 virtual void DropItem(
const char* itemname, TClass* cl,
int kind);
102 virtual void ResetWidget();
104 void ObjectCreatedByWidget(
const char* itemname, TClass* cl);
106 void ProcessSignal(
const char* linkname,
bool assigned, TObject* obj,
TGo4Slot* slot);
108 static QAction* AddIdAction(QMenu* menu, QSignalMapper* map,
109 const QString& text,
int id,
int enabled = -1,
int checked = -1);
111 static QAction* AddIdAction(QMenu* menu, QSignalMapper* map,
112 const QIcon& icon,
const QString& text,
int id,
int enabled = -1,
int checked = -1);
114 static QAction* AddChkAction(QMenu* menu,
115 const QString& text,
bool checked,
116 QObject* recv,
const char* member);
118 static QAction* SetIdAction(QSignalMapper* map,
int id,
int enabled = -1,
int checked = -1);
121 void widgetService(
QGo4Widget* editor,
int serviceid,
const char* str,
void* par);
124 void ResetWidgetSlot();
125 void CloseMDIParentSlot();
129 virtual void dragEnterEvent(QDragEnterEvent *e);
130 virtual void dragMoveEvent(QDragMoveEvent* e);
131 virtual void dropEvent(QDropEvent* e);
134 void AddLink(
const char* itemname,
const char* linkname);
137 void AddLink(
TGo4Slot* slot,
const char* linkname);
143 TGo4Slot* GetTopSlot(
bool force =
false);
146 TGo4Slot* AddSlot(
const char* slotname);
149 void SetLinkedName(
TGo4Slot* slot,
const char* itemname);
152 const char* GetLinkedName(
const char* linkname);
155 const char* GetLinkedName(
TGo4Slot* slot);
157 TObject* GetLinked(
const char* linkname,
int updatelevel);
158 void RemoveLink(
const char* linkname,
bool blockreset =
true);
159 void RemoveAllLinks(
bool blockreset =
true);
160 void RemoveLinksMasked(
const char* startedwith = 0,
bool blockreset =
true);
162 bool BrowserItemRemote(
const char* itemname);
171 void AskToCreateObject(TClass* cl,
int isremote);
172 void ShowItemInfo(
const QString& itemname);
174 TGo4ViewPanel* DrawItem(
const QString& itemname,
TGo4ViewPanel* panel = 0, TPad* pad = 0,
bool activate =
true,
int updatelevel = -1);
177 void UndrawItem(
const char* itemname);
179 void EditItem(
const QString& itemname);
180 void EditObjectInSlot(
TGo4Slot* slot);
181 QString SaveObjectInMemory(
const char* foldername, TObject* obj);
182 bool SaveItemToFile(
const char* itemname,
const char* subfolder = 0);
183 bool UpdateItemInAnalysis(
const char* itemname, TObject* obj = 0);
184 void InformThatObjectCreated(
const char* itemname, TClass* cl);
186 void StartHotstart(
const char* filename);
189 void ConnectPad(TPad* pad);
191 void CallServiceFunc(
int id,
const char* str = 0,
void* par = 0);
192 void ServiceCall(
const char* name,
void* par = 0);
194 virtual void requestedObjectCreated(
const char* itemname, TClass* cl);
195 virtual void linkedObjectUpdated(
const char* linkname, TObject* obj);
196 virtual void linkedObjectRemoved(
const char* linkname);
197 virtual void linkedUpdated(
TGo4Slot* slot, TObject* obj);
198 virtual void linkedRemoved(
TGo4Slot* slot, TObject* obj);
202 void CallPanelFunc(
int id, TPad* pad = 0);
204 void ShootResetWidget();
205 void ShootCloseWidget(
bool closeparent =
false);
void StatusMessage(const QString &mess)
void HelpWindow(const char *filename, const char *msg=0)
TGo4BrowserProxy * Browser()
virtual void closeEvent(QCloseEvent *ce)