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
void addTo (FWConfiguration &) const override
 
 FWConfigurableParameterizable (unsigned int iVersion=1)
 
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 ()
 
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

 ~FWViewBase () override
 

Protected Attributes

FWViewType m_type
 

Private Member Functions

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

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.

◆ ~FWViewBase()

FWViewBase::~FWViewBase ( )
overrideprotected

Definition at line 40 of file FWViewBase.cc.

40 {}

◆ FWViewBase() [2/2]

FWViewBase::FWViewBase ( const FWViewBase )
privatedelete

Member Function Documentation

◆ contextMenuHandler()

FWViewContextMenuHandlerBase * FWViewBase::contextMenuHandler ( ) const
virtual

Reimplemented in FWEveView.

Definition at line 102 of file FWViewBase.cc.

102 { return nullptr; }

Referenced by FWGUIManager::createView().

◆ destroy()

void FWViewBase::destroy ( )

Definition at line 57 of file FWViewBase.cc.

57 { beingDestroyed_(this); }

References beingDestroyed_.

Referenced by FWGUIManager::subviewDestroy().

◆ operator=()

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

◆ populateController()

virtual void FWViewBase::populateController ( ViewerParameterGUI ) const
inlinevirtual

◆ promptForSaveImageTo()

void FWViewBase::promptForSaveImageTo ( TGFrame *  iParent) const

Definition at line 62 of file FWViewBase.cc.

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 }

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().

◆ 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_
ext
Definition: memstream.h:15
gather_cfg.cout
cout
Definition: gather_cfg.py:144
FWViewBase::typeId
FWViewType::EType typeId() const
Definition: FWViewBase.h:42
FWViewType::name
const std::string & name() const
Definition: FWViewType.cc:66
FWViewBase::saveImageTo
virtual void saveImageTo(const std::string &iName) const =0
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
FWViewType::id
EType id() const
Definition: FWViewType.cc:68
FWViewBase::m_type
FWViewType m_type
Definition: FWViewBase.h:61
FWViewBase::beingDestroyed_
sigc::signal< void, const FWViewBase * > beingDestroyed_
Definition: FWViewBase.h:56
DeadROC_duringRun.dir
dir
Definition: DeadROC_duringRun.py:23
FWConfigurableParameterizable::FWConfigurableParameterizable
FWConfigurableParameterizable(unsigned int iVersion=1)
Definition: FWConfigurableParameterizable.cc:32
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
FWViewType::kTable
Definition: FWViewType.h:39