CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
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)
 
 FWViewBase (const FWViewBase &)=delete
 
const FWViewBaseoperator= (const FWViewBase &)=delete
 
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
void addTo (FWConfiguration &) const override
 
 FWConfigurableParameterizable (unsigned int iVersion=1)
 
 FWConfigurableParameterizable (const FWConfigurableParameterizable &)=delete
 
const FWConfigurableParameterizableoperator= (const FWConfigurableParameterizable &)=delete
 
void setFrom (const FWConfiguration &) override
 
unsigned int version () const
 
 ~FWConfigurableParameterizable () override
 
- Public Member Functions inherited from FWParameterizable
void add (FWParameterBase *)
 
const_iterator begin () const
 
const_iterator end () const
 
 FWParameterizable ()
 
 FWParameterizable (const FWParameterizable &)=delete
 
const FWParameterizableoperator= (const FWParameterizable &)=delete
 
virtual ~FWParameterizable ()
 
- Public Member Functions inherited from FWConfigurable
 FWConfigurable ()
 
 FWConfigurable (const FWConfigurable &)=delete
 
const FWConfigurableoperator= (const FWConfigurable &)=delete
 
virtual ~FWConfigurable ()
 

Public Attributes

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

Protected Member Functions

 ~FWViewBase () override
 

Protected Attributes

FWViewType m_type
 

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() [1/2]

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

Definition at line 32 of file FWViewBase.cc.

FWConfigurableParameterizable(unsigned int iVersion=1)
FWViewType m_type
Definition: FWViewBase.h:61

◆ ~FWViewBase()

FWViewBase::~FWViewBase ( )
overrideprotected

Definition at line 40 of file FWViewBase.cc.

40 {}

◆ FWViewBase() [2/2]

FWViewBase::FWViewBase ( const FWViewBase )
delete

Member Function Documentation

◆ contextMenuHandler()

FWViewContextMenuHandlerBase * FWViewBase::contextMenuHandler ( ) const
virtual

Reimplemented in FWEveView.

Definition at line 102 of file FWViewBase.cc.

Referenced by FWGUIManager::createView().

102 { return nullptr; }

◆ destroy()

void FWViewBase::destroy ( )

Definition at line 57 of file FWViewBase.cc.

References beingDestroyed_.

Referenced by FWGUIManager::subviewDestroy().

57 { beingDestroyed_(this); }
sigc::signal< void(const FWViewBase *)> beingDestroyed_
Definition: FWViewBase.h:56

◆ operator=()

const FWViewBase& FWViewBase::operator= ( const FWViewBase )
delete

◆ populateController()

virtual void FWViewBase::populateController ( ViewerParameterGUI ) const
inlinevirtual

◆ promptForSaveImageTo()

void FWViewBase::promptForSaveImageTo ( TGFrame *  iParent) const

Definition at line 62 of file FWViewBase.cc.

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

Referenced by CmsShowViewPopup::saveImage().

62  {
63  if (typeId() < FWViewType::kTable) {
64  try {
65  static TString dir(".");
66  const char* kImageExportTypes[] = {"PNG",
67  "*.png",
68  "GIF",
69  "*.gif",
70  "JPEG",
71  "*.jpg",
72  "PDF",
73  "*.pdf",
74  "Encapsulated PostScript",
75  "*.eps",
76  nullptr,
77  nullptr};
78 
79  TGFileInfo fi;
80  fi.fFileTypes = kImageExportTypes;
81  fi.fIniDir = StrDup(dir);
82  new TGFileDialog(gClient->GetDefaultRoot(), iParent, kFDSave, &fi);
83  dir = fi.fIniDir;
84  if (fi.fFilename != nullptr) {
85  std::string name = fi.fFilename;
86  // fi.fFileTypeIdx points to the name of the file type
87  // selected in the drop-down menu, so fi.fFileTypeIdx gives us
88  // the extension
89  std::string ext = kImageExportTypes[fi.fFileTypeIdx + 1] + 1;
90  if (name.find(ext) == name.npos)
91  name += ext;
93  }
94  } catch (std::runtime_error& e) {
95  std::cout << e.what() << std::endl;
96  }
97  } else {
98  saveImageTo("dummy");
99  }
100 }
virtual void saveImageTo(const std::string &iName) const =0
FWViewType::EType typeId() const
Definition: FWViewBase.h:42
Definition: memstream.h:15

◆ saveImageTo()

virtual void FWViewBase::saveImageTo ( const std::string &  iName) const
pure virtual

◆ typeId()

FWViewType::EType FWViewBase::typeId ( ) const
inline

◆ typeName()

const std::string & FWViewBase::typeName ( ) const

Member Data Documentation

◆ beingDestroyed_

sigc::signal<void(const FWViewBase*)> FWViewBase::beingDestroyed_

Definition at line 56 of file FWViewBase.h.

Referenced by destroy().

◆ m_type

FWViewType FWViewBase::m_type
protected

Definition at line 61 of file FWViewBase.h.

Referenced by typeId(), and typeName().

◆ openSelectedModelContextMenu_

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