00001
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef TQQOBJECTGCONTROL_H
00019 #define TQQOBJECTGCONTROL_H
00020
00021 #include <TGListTree.h>
00022 #include <TGTab.h>
00023 #include <TGWindow.h>
00024 #include <TGListTree.h>
00025 #include <TGButton.h>
00026 #include <TGCanvas.h>
00027 #include <TGMenu.h>
00028 #include <TQQGControl.h>
00029 #include <TQQObjectControl.h>
00030 #include <TGControlList.h>
00031 #include <TGTabDialog.h>
00032
00038 #define kAddDelegation 1000
00039 #define kEditDelegation 1001
00040
00041 #define kAddSignal 2000
00042 #define kEditSignal 2001
00043 #define kEmitSignal 2002
00044
00045 #define kAddSlot 3000
00046 #define kEditSlot 3001
00047 #define kCallSlot 3002
00048
00049 #define kAddConnection 4000
00050 #define kEditConnection 4001
00051 #define kDelConnection 4002
00052
00053 class TQQObjectGControl : public TQQGControl, public TQQObjectControl {
00054
00055 private:
00056
00057 TString fVisibleBaseClass;
00058
00059
00060
00061 TGListTreeItem *fSignalsListTreeItem;
00062 TGListTreeItem *fSlotsListTreeItem;
00063 TGListTreeItem *fDelegationsListTreeItem;
00064
00065 TGPopupMenu *fSignalsListPopup;
00066 TGPopupMenu *fSlotsListPopup;
00067 TGPopupMenu *fDelegationsListPopup;
00068
00069 public:
00070
00071
00072 TQQObjectGControl(const TGWindow *parent=NULL,
00073 UInt_t w=150,
00074 UInt_t h=150,
00075 UInt_t options = 0);
00076
00077
00078
00079
00080 void ListTree(TGControlList *list = NULL,
00081 TGListTreeItem *parent = NULL);
00082
00083
00084
00085
00086 virtual Bool_t UpdateConnections(TGControlList*,
00087 TGListTreeItem *,
00088 char *signal);
00089
00090 virtual void UpdateDelegation(TGControlList*,
00091 TGListTreeItem *,
00092 char *delegation);
00093
00094
00095 virtual void SetObject(TQQObject *o);
00096
00097 virtual void AddVisibleBaseClass(char *name) { fVisibleBaseClass = name;};
00098
00099
00100
00101
00102
00103 virtual void Update();
00104 virtual void HandlePopup(Int_t);
00105
00106 virtual void TempSignal(){ Emit("TempSignal()");};
00107 virtual void Paint() { Emit("Paint()");};
00108 virtual void NeedPaint() { Emit("NeedPaint()");};
00109
00110 virtual ~TQQObjectGControl();
00111
00112
00113 ClassDef(TQQObjectGControl,1)
00114
00115 };
00116
00118
00119
00120
00121
00123
00124 class SignalDialog : public TGTabDialog {
00125
00126
00127 TQQObjectGControl *fObjectControl;
00128
00129 TGListTreeItem *fItem;
00130
00131
00132
00133 char *fSignal;
00134
00135
00136 TGTextEntry *fTxt1;
00137 public:
00138 SignalDialog(TQQObjectGControl*,
00139 char* ,
00140 const TGWindow *p,
00141 const TGWindow *main, UInt_t w=500, UInt_t h=300,
00142 UInt_t options = kVerticalFrame);
00143 ~SignalDialog();
00144
00145
00146
00147 virtual void Apply();
00148
00149 };
00150
00152
00153
00154
00155
00157
00158 class SlotDialog : public TGTabDialog {
00159
00160
00161 TQQObjectGControl *fObjectControl;
00162 TGListTreeItem *fItem;
00163
00164
00165
00166 char *fSlot;
00167
00168
00169 TGTextEntry *fTxt1;
00170 public:
00171 SlotDialog(TQQObjectGControl*,
00172 char* ,
00173 const TGWindow *p,
00174 const TGWindow *main, UInt_t w=500, UInt_t h=300,
00175 UInt_t options = kVerticalFrame);
00176 ~SlotDialog();
00177
00178
00179
00180 virtual void Apply();
00181
00182 };
00183
00185
00186
00187
00188
00190
00191 class ConnectionDialog : public TGTabDialog {
00192
00193
00194
00195 TQQObjectGControl *fObjectControl;
00196 TGListTreeItem *fItem;
00197
00198
00199
00200 char *fSignal;
00201
00202
00203
00204 char *fConnection;
00205
00206
00207 TGTextEntry *fTxt1;
00208 public:
00209 ConnectionDialog(TQQObjectGControl*,
00210 char* signal,
00211 char* connection,
00212 const TGWindow *p,
00213 const TGWindow *main, UInt_t w=500, UInt_t h=300,
00214 UInt_t options = kVerticalFrame);
00215 ~ConnectionDialog();
00216
00217
00218
00219 virtual void Apply();
00220
00221 };
00222
00224
00225
00226
00227
00229
00230 class DelegationDialog : public TGTabDialog {
00231
00232 TQQObjectGControl *fObjectControl;
00233 TGListTreeItem *fItem;
00234
00235
00236
00237 char *fDelegation;
00238
00239
00240 TGTextEntry *fTxt1;
00241 public:
00242 DelegationDialog(TQQObjectGControl*,
00243 char* delegation,
00244 const TGWindow *p,
00245 const TGWindow *main, UInt_t w=500, UInt_t h=300,
00246 UInt_t options = kVerticalFrame);
00247 ~DelegationDialog();
00248
00249
00250
00251 virtual void Apply();
00252
00253 };
00254 #endif