Main Page | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals

TQQObjectGControl.h

Go to the documentation of this file.
00001 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
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   // Graphical ListTreeItems of Signals/Slot etc.
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   // Build the signal/slot/delegation listtree into
00078   // the ListTree list starting at item "parent"
00079 
00080   void     ListTree(TGControlList  *list   = NULL,
00081             TGListTreeItem *parent = NULL); 
00082 
00083   // Build the connections-listtree of the signal "signal"
00084   // into the listree starting at item
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   // Slots
00101   
00102 
00103   virtual void Update();
00104   virtual void HandlePopup(Int_t);
00105   
00106   virtual void     TempSignal(){ Emit("TempSignal()");}; //*SIGNAL*
00107   virtual void     Paint() {     Emit("Paint()");};       //*SIGNAL*
00108   virtual void     NeedPaint() { Emit("NeedPaint()");};   //*SIGNAL*
00109 
00110   virtual ~TQQObjectGControl();
00111  
00112 
00113   ClassDef(TQQObjectGControl,1)
00114 
00115 };
00116 
00118 //
00119 // This makes the Dialog for a signal "signal" on the
00120 // the Object "op"
00121 //
00123 
00124 class SignalDialog : public TGTabDialog {
00125   // the operator control
00126 
00127   TQQObjectGControl   *fObjectControl;
00128 
00129   TGListTreeItem      *fItem;
00130 
00131   // the Delegation to process
00132 
00133   char                *fSignal;               
00134 
00135   // 1. Tab
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   // Signals
00146 
00147   virtual void Apply();
00148  
00149 };
00150 
00152 //
00153 // This makes the Dialog for a slot "slot" on the
00154 // the Object "op"
00155 //
00157 
00158 class SlotDialog : public TGTabDialog {
00159   // the operator control
00160 
00161   TQQObjectGControl   *fObjectControl;
00162   TGListTreeItem      *fItem;
00163 
00164   // the Delegation to process
00165 
00166   char                *fSlot;               
00167 
00168   // 1. Tab
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   // Signals
00179 
00180   virtual void Apply();
00181  
00182 };
00183 
00185 //
00186 // This makes the Dialog for a connection of signal with "connection"
00187 // "signal" 
00188 //
00190 
00191 class ConnectionDialog : public TGTabDialog {
00192  
00193   // the operator control
00194 
00195   TQQObjectGControl   *fObjectControl;
00196   TGListTreeItem      *fItem;
00197 
00198   // the Signal to process
00199 
00200   char                *fSignal;               
00201 
00202   // the Connection to process
00203   
00204   char                *fConnection;
00205 
00206   // 1. Tab
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   // Signals
00218 
00219   virtual void Apply();
00220  
00221 };
00222 
00224 //
00225 // This makes the Dialog for a delegation "delegation" on the
00226 // the Object "op"
00227 //
00229 
00230 class DelegationDialog : public TGTabDialog {  // the operator control
00231 
00232   TQQObjectGControl   *fObjectControl;
00233   TGListTreeItem      *fItem;
00234 
00235   // the Delegation to process
00236 
00237   char                *fDelegation;               
00238 
00239   // 1. Tab
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   // Signals
00250 
00251   virtual void Apply();
00252  
00253 };
00254 #endif

Generated on Fri Apr 23 16:23:44 2004 by doxygen 1.3.2