19 #include <QDragMoveEvent>
20 #include <QCloseEvent>
22 #include <QDragEnterEvent>
39 #define GO4_CLASS_EXPORT __declspec(dllexport)
41 #define GO4_CLASS_EXPORT __declspec(dllimport)
46 #define GO4_CLASS_EXPORT
54 #include <QtDesigner/QDesignerExportWidget>
55 class QDESIGNER_WIDGET_EXPORT
QGo4Widget :
public QWidget {
63 enum { service_DragEnter = 1,
64 service_DropEvent = 2,
65 service_CreateItem = 3,
69 service_EditInSlot = 7,
71 service_UpdateAnalysisItem = 9,
72 service_StatusMessage = 15,
73 service_CreateViewPanel = 17,
74 service_BrowserItemRemote = 18,
76 service_SaveToMemory = 20,
77 service_GetAnalysis = 21,
78 service_AddEditorLink = 22,
79 service_AddDirectLink = 23,
80 service_AddLinkInSlot = 24,
81 service_GetTopSlot = 25,
82 service_AddEditorSlot = 26,
83 service_SetLinkedName = 27,
84 service_GetLinkedName = 28,
85 service_GetLinkedName2 = 29,
86 service_GetLinked0 = 30,
87 service_GetLinked1 = 31,
88 service_GetLinked2 = 32,
89 service_RemoveLink = 33,
90 service_RemoveAllLinks = 34,
91 service_ObjectCreated = 35,
92 service_ConnectPad = 36,
93 service_LastActivePanel = 37,
94 service_WhereItemDrawn = 38,
95 service_UndrawItem = 39,
97 service_PanelTimer = 41,
98 service_HelpWindow = 42,
99 service_HotStart = 43,
100 panel_Activated = 101,
101 panel_Modified = 102,
103 panel_ActiveUpdated = 104,
104 panel_PadDeleted = 105,
105 panel_Deleted = 106 };
107 QGo4Widget(QWidget * parent = 0,
const char * name = 0, Qt::WindowFlags f = 0 );
110 virtual bool IsAcceptDrag(
const char* itemname, TClass* cl,
int kind);
111 virtual void DropItem(
const char* itemname, TClass* cl,
int kind);
112 virtual void ResetWidget();
114 void ObjectCreatedByWidget(
const char* itemname, TClass* cl);
116 void ProcessSignal(
const char* linkname,
bool assigned, TObject* obj,
TGo4Slot* slot);
119 void widgetService(
QGo4Widget* editor,
int serviceid,
const char* str,
void* par);
122 void ResetWidgetSlot();
123 void CloseMDIParentSlot();
127 virtual void dragEnterEvent(QDragEnterEvent *e);
128 virtual void dragMoveEvent(QDragMoveEvent* e);
129 virtual void dropEvent(QDropEvent* e);
132 void AddLink(
const char* itemname,
const char* linkname);
135 void AddLink(
TGo4Slot* slot,
const char* linkname);
141 TGo4Slot* GetTopSlot(
bool force =
false);
144 TGo4Slot* AddSlot(
const char* slotname);
147 void SetLinkedName(
TGo4Slot* slot,
const char* itemname);
150 const char* GetLinkedName(
const char* linkname);
153 const char* GetLinkedName(
TGo4Slot* slot);
155 TObject* GetLinked(
const char* linkname,
int updatelevel);
156 void RemoveLink(
const char* linkname,
bool blockreset =
true);
157 void RemoveAllLinks(
bool blockreset =
true);
158 void RemoveLinksMasked(
const char* startedwith = 0,
bool blockreset =
true);
160 bool BrowserItemRemote(
const char* itemname);
169 void AskToCreateObject(TClass* cl,
int isremote);
170 void ShowItemInfo(
const QString& itemname);
172 TGo4ViewPanel* DrawItem(
const QString& itemname,
TGo4ViewPanel* panel = 0, TPad* pad = 0,
bool activate =
true,
int updatelevel = -1);
175 void UndrawItem(
const char* itemname);
177 void EditItem(
const QString& itemname);
178 void EditObjectInSlot(
TGo4Slot* slot);
179 QString SaveObjectInMemory(
const char* foldername, TObject* obj);
180 bool SaveItemToFile(
const char* itemname,
const char* subfolder = 0);
181 bool UpdateItemInAnalysis(
const char* itemname, TObject* obj = 0);
182 void InformThatObjectCreated(
const char* itemname, TClass* cl);
184 void StartHotstart(
const char* filename);
187 void ConnectPad(TPad* pad);
189 void CallServiceFunc(
int id,
const char* str = 0,
void* par = 0);
190 void ServiceCall(
const char* name,
void* par = 0);
192 virtual void requestedObjectCreated(
const char* itemname, TClass* cl);
193 virtual void linkedObjectUpdated(
const char* linkname, TObject* obj);
194 virtual void linkedObjectRemoved(
const char* linkname);
195 virtual void linkedUpdated(
TGo4Slot* slot, TObject* obj);
196 virtual void linkedRemoved(
TGo4Slot* slot, TObject* obj);
200 void CallPanelFunc(
int id, TPad* pad = 0);
202 void ShootResetWidget();
203 void ShootCloseWidget(
bool closeparent =
false);
217 const QString& text,
bool checked,
218 QObject* recv,
const char* member);
220 extern QAction*
AddIdAction(QMenu* menu, QSignalMapper* map,
221 const QString& text,
int id,
int enabled = -1,
int checked = -1);
223 extern QAction*
AddIdAction(QMenu* menu, QSignalMapper* map,
224 const QIcon& icon,
const QString& text,
int id,
int enabled = -1,
int checked = -1);
226 QAction*
SetIdAction(QSignalMapper* map,
int id,
int enabled = -1,
int checked = -1);
void StatusMessage(const QString &mess)
void HelpWindow(const char *filename, const char *msg=0)
TGo4BrowserProxy * Browser()
virtual void closeEvent(QCloseEvent *ce)