CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions
FWViewBase Class Referenceabstract

#include <Fireworks/Core/interface/FWViewBase.h>

Inheritance diagram for FWViewBase:
FWConfigurableParameterizable FWParameterizable FWConfigurable FWEveView FWGeometryTableViewBase FWTableView FWTriggerTableView FW3DViewBase FWGlimpseView FWLegoViewBase FWRPZView FWGeometryTableView FWOverlapTableView FWHLTTriggerTableView FWL1TriggerTableView

Public Member Functions

virtual FWViewContextMenuHandlerBasecontextMenuHandler () const
 
void destroy ()
 
 FWViewBase (FWViewType::EType, unsigned int iVersion=1)
 
virtual void populateController (ViewerParameterGUI &) const
 
void promptForSaveImageTo (TGFrame *) const
 
virtual void saveImageTo (const std::string &iName) const =0
 
FWViewType::EType typeId () const
 
const std::string & typeName () const
 
- Public Member Functions inherited from FWConfigurableParameterizable
virtual void addTo (FWConfiguration &) const
 
 FWConfigurableParameterizable (unsigned int iVersion=1)
 
virtual void setFrom (const FWConfiguration &)
 
unsigned int version () const
 
virtual ~FWConfigurableParameterizable ()
 
- Public Member Functions inherited from FWParameterizable
void add (FWParameterBase *)
 
const_iterator begin () const
 
const_iterator end () const
 
 FWParameterizable ()
 
virtual ~FWParameterizable ()
 
- Public Member Functions inherited from FWConfigurable
 FWConfigurable ()
 
virtual ~FWConfigurable ()
 

Public Attributes

sigc::signal< void, const FWViewBase * > beingDestroyed_
 
sigc::signal< void, Int_t, Int_t > openSelectedModelContextMenu_
 

Protected Member Functions

virtual ~FWViewBase ()
 

Protected Attributes

FWViewType m_type
 

Private Member Functions

 FWViewBase (const FWViewBase &)
 
const FWViewBaseoperator= (const FWViewBase &)
 

Additional Inherited Members

- Public Types inherited from FWParameterizable
typedef std::vector< FWParameterBase * >::const_iterator const_iterator
 

Detailed Description

Description: Base class for all View instances

Usage: <usage>

Definition at line 36 of file FWViewBase.h.

Constructor & Destructor Documentation

FWViewBase::FWViewBase ( FWViewType::EType  type,
unsigned int  iVersion = 1 
)

Definition at line 33 of file FWViewBase.cc.

33  :
35  m_type(type)
36 {
37 }
type
Definition: HCALResponse.h:21
FWConfigurableParameterizable(unsigned int iVersion=1)
FWViewType m_type
Definition: FWViewBase.h:62
FWViewBase::~FWViewBase ( )
protectedvirtual

Definition at line 44 of file FWViewBase.cc.

45 {
46 }
FWViewBase::FWViewBase ( const FWViewBase )
private

Member Function Documentation

FWViewContextMenuHandlerBase * FWViewBase::contextMenuHandler ( ) const
virtual

Reimplemented in FWEveView.

Definition at line 112 of file FWViewBase.cc.

References AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by FWGUIManager::createView(), and typeId().

112  {
113  return 0;
114 }
void FWViewBase::destroy ( )

Definition at line 64 of file FWViewBase.cc.

References beingDestroyed_.

Referenced by populateController(), and FWGUIManager::subviewDestroy().

65 {
66  beingDestroyed_(this);
67 }
sigc::signal< void, const FWViewBase * > beingDestroyed_
Definition: FWViewBase.h:57
const FWViewBase& FWViewBase::operator= ( const FWViewBase )
private
virtual void FWViewBase::populateController ( ViewerParameterGUI ) const
inlinevirtual
void FWViewBase::promptForSaveImageTo ( TGFrame *  iParent) const

Definition at line 73 of file FWViewBase.cc.

References gather_cfg::cout, dir, MillePedeFileConverter_cfg::e, FWViewType::kTable, dataset::name, saveImageTo(), AlCaHLTBitMon_QueryRunRegistry::string, and typeId().

Referenced by CmsShowViewPopup::saveImage(), and typeId().

74 {
75  if (typeId() < FWViewType::kTable)
76  {
77  try {
78  static TString dir(".");
79  const char * kImageExportTypes[] = {"PNG", "*.png",
80  "GIF", "*.gif",
81  "JPEG", "*.jpg",
82  "PDF", "*.pdf",
83  "Encapsulated PostScript", "*.eps",
84  0, 0};
85 
86  TGFileInfo fi;
87  fi.fFileTypes = kImageExportTypes;
88  fi.fIniDir = StrDup(dir);
89  new TGFileDialog(gClient->GetDefaultRoot(), iParent,
90  kFDSave,&fi);
91  dir = fi.fIniDir;
92  if (fi.fFilename != 0) {
93  std::string name = fi.fFilename;
94  // fi.fFileTypeIdx points to the name of the file type
95  // selected in the drop-down menu, so fi.fFileTypeIdx gives us
96  // the extension
97  std::string ext = kImageExportTypes[fi.fFileTypeIdx + 1] + 1;
98  if (name.find(ext) == name.npos)
99  name += ext;
100  saveImageTo(name);
101  }
102  }
103  catch (std::runtime_error &e) { std::cout << e.what() << std::endl; }
104  }
105  else
106  {
107  saveImageTo("dummy");
108  }
109 }
virtual void saveImageTo(const std::string &iName) const =0
dbl *** dir
Definition: mlp_gen.cc:35
Definition: memstream.h:15
FWViewType::EType typeId() const
Definition: FWViewBase.h:43
virtual void FWViewBase::saveImageTo ( const std::string &  iName) const
pure virtual
FWViewType::EType FWViewBase::typeId ( ) const
inline
const std::string & FWViewBase::typeName ( ) const

Member Data Documentation

sigc::signal<void,const FWViewBase*> FWViewBase::beingDestroyed_

Definition at line 57 of file FWViewBase.h.

Referenced by destroy().

FWViewType FWViewBase::m_type
protected

Definition at line 62 of file FWViewBase.h.

Referenced by typeId(), and typeName().

sigc::signal<void,Int_t,Int_t> FWViewBase::openSelectedModelContextMenu_