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 TQQOBJECTCONTROL_H 00019 #define TQQOBJECTCONTROL_H 00020 00021 #include <TBrowser.h> 00022 #include <TQQObject.h> 00023 00029 class TQQObjectControl { 00030 00031 protected: 00032 00033 TQQObject *fObject; 00034 00035 public: 00036 TQQObjectControl(); 00037 virtual ~TQQObjectControl(); 00038 00039 // Get/Set the Object to control 00040 // 00041 virtual TQQObject *GetObject() { return fObject; }; // Get the Object to control 00042 virtual void SetObject(TQQObject *o) { fObject = o;}; // Set the Object to control 00043 00044 void Browse(TBrowser *b = NULL) { 00045 TQQObject *o = GetObject(); 00046 if (!b) { 00047 b = new TBrowser("browse",o,o->GetName()); 00048 } else 00049 o->Browse(b); 00050 } 00051 00052 // The Slot used to tell the control that something changed in the 00053 // Object 00054 virtual void Update() {}; 00055 00056 ClassDef(TQQObjectControl,1) 00057 00058 }; 00059 00060 #endif
1.3.2