ColorPlugin.hh 1.67 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63
#ifndef COLORPLUGIN_HH
#define COLORPLUGIN_HH

#include <QObject>
#include <QMenuBar>
#include "ColorPlugin.hh"


#include <ACG/QtWidgets/QtExaminerViewer.hh>

#include <OpenFlipper/common/Types.hh>
#include <OpenFlipper/BasePlugin/BaseInterface.hh>
#include <OpenFlipper/BasePlugin/MenuInterface.hh>
#include <OpenFlipper/BasePlugin/ScriptInterface.hh>
#include <OpenFlipper/BasePlugin/ToolbarInterface.hh>
#include "OpenFlipper/BasePlugin/StatusbarInterface.hh"

class ColorPlugin : public QObject, BaseInterface, MenuInterface, ScriptInterface, ToolbarInterface, StatusbarInterface
{
   Q_OBJECT
   Q_INTERFACES(BaseInterface)
   Q_INTERFACES(MenuInterface)
   Q_INTERFACES(ScriptInterface)
   Q_INTERFACES(ToolbarInterface)
   Q_INTERFACES(StatusbarInterface)

   signals:
     void update_view();
     
     void scriptInfo( QString _functionName );

     void addMenu(QMenu* _menu, MenuType _type);
     
     void addToolbar(QToolBar* _toolbar);
     void removeToolbar(QToolBar* _toolbar);
     
     void showStatusMessage(QString _message, int _timeout = 0);
     
  private slots:
    
     void pluginsInitialized();
     
   public :
     void init();
     
     QString name() { return (QString("Color Plugin")); };
     QString description( ) { return (QString("Sets the Default colors e.g. for slides, paper,... snapshots")); }; 
     
   public slots:
      void setDefaultColor();
      void setPowerpointColor();
      void setPaperColor();
      
      /// Set the Background Color
      void setBackgroundColor( Vector _color );
      
   private :
      QAction* AC_set_Default_color;
      QAction* AC_set_Powerpoint_color;
      QAction* AC_set_Paper_color;
};

#endif //COLORPLUGIN_HH