00001 // $Id: QFitItem.h 1134 2014-01-22 14:53:40Z linev $ 00002 //----------------------------------------------------------------------- 00003 // The GSI Online Offline Object Oriented (Go4) Project 00004 // Experiment Data Processing at EE department, GSI 00005 //----------------------------------------------------------------------- 00006 // Copyright (C) 2000- GSI Helmholtzzentrum für Schwerionenforschung GmbH 00007 // Planckstr. 1, 64291 Darmstadt, Germany 00008 // Contact: http://go4.gsi.de 00009 //----------------------------------------------------------------------- 00010 // This software can be used under the license agreements as stated 00011 // in Go4License.txt file which is part of the distribution. 00012 //----------------------------------------------------------------------- 00013 00014 #ifndef QFITITEM_H 00015 #define QFITITEM_H 00016 00017 #include <QTreeWidgetItem> 00018 00019 class TObject; 00020 class TGo4FitPanel; 00021 00022 class QFitItem : public QTreeWidgetItem { 00023 public: 00024 QFitItem(TGo4FitPanel* panel, QTreeWidgetItem* parent, TObject* iObj, int iObjectType, int iWidgetType = -1, int iPopupMenuType = -1, int iGraphType = -1, int iTag = 0); 00025 virtual ~QFitItem(); 00026 00027 TObject* Object() const { return fxObj; } 00028 void SetObject(TObject* obj) { fxObj = obj; } 00029 int ObjectType() const { return fiObjectType; } 00030 int WidgetType() const { return fiWidgetType; } 00031 int PopupMenuType() const { return fiPopupMenuType; } 00032 int GraphType() const { return fiGraphType; } 00033 int Tag() const { return fiTag; } 00034 00035 QFitItem* Parent() const { return dynamic_cast<QFitItem*> (parent()); } 00036 00037 00038 QFitItem* DefineWidgetItem(); 00039 QFitItem* DefineGraphItem(); 00040 bool FindInParents(QFitItem* item); 00041 00042 protected: 00043 TGo4FitPanel* fxPanel; 00044 TObject* fxObj; 00045 int fiObjectType; 00046 int fiWidgetType; 00047 int fiPopupMenuType; 00048 int fiGraphType; 00049 int fiTag; 00050 }; 00051 00052 #endif // QFITITEM_H