CMS 3D CMS Logo

Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions

FWViewBase Class Reference

#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

List of all members.

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 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 &)

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.

FWViewBase::~FWViewBase ( ) [protected, virtual]

Definition at line 45 of file FWViewBase.cc.

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

                                     {
   return 0;
}
void FWViewBase::destroy ( )

Definition at line 65 of file FWViewBase.cc.

References beingDestroyed_.

Referenced by FWGUIManager::subviewDestroy().

{
   beingDestroyed_(this);
}
const FWViewBase& FWViewBase::operator= ( const FWViewBase ) [private]
virtual void FWViewBase::populateController ( ViewerParameterGUI ) const [inline, virtual]
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(), AlCaHLTBitMon_QueryRunRegistry::string, and typeId().

Referenced by CmsShowViewPopup::saveImage().

{
   if (typeId() < FWViewType::kTable)
   {
   try {
      static TString dir(".");
      const char *  kImageExportTypes[] = {"PNG",                     "*.png",
                                           "GIF",                     "*.gif",
                                           "JPEG",                    "*.jpg",
                                           "PDF",                     "*.pdf",
                                           "Encapsulated PostScript", "*.eps",
                                           0, 0};

      TGFileInfo fi;
      fi.fFileTypes = kImageExportTypes;
      fi.fIniDir    = StrDup(dir);
      new TGFileDialog(gClient->GetDefaultRoot(), iParent,
                       kFDSave,&fi);
      dir = fi.fIniDir;
      if (fi.fFilename != 0) {
         std::string name = fi.fFilename;
         // fi.fFileTypeIdx points to the name of the file type
         // selected in the drop-down menu, so fi.fFileTypeIdx gives us
         // the extension
         std::string ext = kImageExportTypes[fi.fFileTypeIdx + 1] + 1;
         if (name.find(ext) == name.npos)
            name += ext;
         saveImageTo(name);
      }
   }
   catch (std::runtime_error &e) { std::cout << e.what() << std::endl; }
   }
   else
   {
      saveImageTo("dummy");
   }
}
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().

Definition at line 61 of file FWViewBase.h.

Referenced by typeId(), and typeName().

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