CMS 3D CMS Logo

IgQtAppToolBarService.h

Go to the documentation of this file.
00001 #ifndef IGUANA_STUDIO_IG_QT_APP_TOOL_BAR_SERVICE_H
00002 # define IGUANA_STUDIO_IG_QT_APP_TOOL_BAR_SERVICE_H
00003 
00004 //<<<<<< INCLUDES                                                       >>>>>>
00005 
00006 # include "Iguana/Studio/interface/config.h"
00007 # include "Iguana/Framework/interface/IgStateElement.h"
00008 # include <map>
00009 # include <string>
00010 
00011 //<<<<<< PUBLIC DEFINES                                                 >>>>>>
00012 //<<<<<< PUBLIC CONSTANTS                                               >>>>>>
00013 //<<<<<< PUBLIC TYPES                                                   >>>>>>
00014 
00015 class QWidget;
00016 class QToolBar;
00017 class QToolButton;
00018 class QIconSet;
00019 class QObject;
00020 
00021 //<<<<<< PUBLIC VARIABLES                                               >>>>>>
00022 //<<<<<< PUBLIC FUNCTIONS                                               >>>>>>
00023 //<<<<<< CLASS DECLARATIONS                                             >>>>>>
00024 
00025 class IGUANA_STUDIO_API IgQtAppToolBarService : public IgStateElement
00026 {
00027     IG_DECLARE_STATE_ELEMENT (IgQtAppToolBarService);
00028 public:
00029     IgQtAppToolBarService (IgState *state, QWidget *mainWindow);
00030     ~IgQtAppToolBarService (void);
00031 
00032     // FIXME: Provide methods to manage the tool bar.  Synchronise
00033     // with menu items and the app context service to enable/disable
00034     // items.
00035     QToolBar *toolBar (const int id, const std::string &label);
00036     QToolButton *toolBarButton (IgState *state,
00037                                 const int barId,
00038                                 const int buttonId,
00039                                 const QIconSet &iconSet,
00040                                 const std::string &name,
00041                                 QObject *target,
00042                                 const char *slot,
00043                                 const char *signal = "");
00044     
00045      QToolButton * getToolBarButton (const int barId,
00046                                      const int buttonId);
00047                                      
00048 private:
00049     IgState             *m_state;
00050     QWidget             *m_mainWindow;
00051 
00052     // undefined semantics
00053     IgQtAppToolBarService (const IgQtAppToolBarService &);
00054     IgQtAppToolBarService &operator= (const IgQtAppToolBarService &);
00055     
00056     // QUESTION: should we use QWidget instead?
00057     typedef std::map<int, QToolBar *>           ToolBarMap;
00058     typedef std::map<int, QToolButton *>        ToolButtonMap;
00059     
00060     ToolBarMap          m_toolBarMap;
00061     ToolButtonMap       m_toolButtonMap;    
00062 };
00063 
00064 //<<<<<< INLINE PUBLIC FUNCTIONS                                        >>>>>>
00065 //<<<<<< INLINE MEMBER FUNCTIONS                                        >>>>>>
00066 
00067 #endif // IGUANA_STUDIO_IG_QT_APP_TOOL_BAR_SERVICE_H

Generated on Tue Jun 9 17:38:48 2009 for CMSSW by  doxygen 1.5.4