CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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
FWViewContextMenuHandlerBase
contextMenuHandler () 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 35 of file FWViewBase.h.

Constructor & Destructor Documentation

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

Definition at line 34 of file FWViewBase.cc.

34  :
36  m_type(type)
37 {
38 }
type
Definition: HCALResponse.h:22
FWConfigurableParameterizable(unsigned int iVersion=1)
FWViewType m_type
Definition: FWViewBase.h:61
FWViewBase::~FWViewBase ( )
protectedvirtual

Definition at line 45 of file FWViewBase.cc.

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

Member Function Documentation

FWViewContextMenuHandlerBase * FWViewBase::contextMenuHandler ( ) const
virtual

Reimplemented in FWEveView.

Definition at line 113 of file FWViewBase.cc.

Referenced by FWGUIManager::createView().

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

Definition at line 65 of file FWViewBase.cc.

References beingDestroyed_.

Referenced by FWGUIManager::subviewDestroy().

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

Definition at line 74 of file FWViewBase.cc.

References gather_cfg::cout, dir, alignCSCRings::e, FWViewType::kTable, mergeVDriftHistosByStation::name, saveImageTo(), and typeId().

Referenced by CmsShowViewPopup::saveImage().

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

Referenced by destroy().

FWViewType FWViewBase::m_type
protected

Definition at line 61 of file FWViewBase.h.

Referenced by typeId(), and typeName().

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