lgrAppGuiEvent.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 1992-2010 VT MAK
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 
00008 
00009 #ifndef lgrAppGuiEvent_H_
00010 #define lgrAppGuiEvent_H_
00011 
00012 #include "lgrGui.h"
00013 
00014 #include "virtualConstructor.h"
00015 #include "lgrMenu.h"
00016 
00017 #include <commonWidgets/dynamicMenuItem.h>
00018 #include <QtCore/QEvent>
00019 #include <QtCore/QString>
00020 
00021 class QAction;
00022 class QDialog;
00023 class QWidget;
00024 
00025 namespace MAKLogger
00026 {   
00027    class DtLgrExportDialog;
00028    class DtLgrGuiComponent;
00029 
00032    class DT_DLL_LGRGUI DtLgrAppGuiEvent : public QEvent
00033    {
00034 
00035    public:
00036 
00037       //@name Static Helper functions
00039       static DtLgrAppGuiEvent* addToolBarWidget(QWidget* widget,QString toolBarName);
00040       static DtLgrAppGuiEvent* addGuiComponent(DtLgrGuiComponent* component);
00041       static DtLgrAppGuiEvent* addMenu(DtLgrMenu* menu, QString previousMenuName);
00042       static DtLgrAppGuiEvent* addStatusWidget(QWidget* widget);
00043       static DtLgrAppGuiEvent* connectActionToMenu( QAction* action, 
00044          QString menuName,QString menuItemName );
00045 
00046       typedef DtLgrExportDialog* (*ExportDialogCreator)(DtLgrGuiModel*,QWidget* parent);
00047       static DtLgrAppGuiEvent* addExportDialog(QString exportType,ExportDialogCreator);
00049 
00050 
00051       enum LgrAppGuiEventType
00052       {
00053          AddMenu,
00054          RemoveMenu,
00055          AddMenuItem,
00056          RemoveMenuItem,
00057          ConnectMenuItem,
00058          AddComponentControl,
00059          RemoveComponentContol,
00060          ShowComponentControl,
00061          HideComponentControl,
00062          ShowControls,
00063          HideControls,
00064          ShowTimebar,
00065          HideTimebar,
00066          AddStatusBarWidget,
00067          RemoveStatusBarWidget,
00068          ShowStatusBar,
00069          HideStatusBar,
00070          AddToolBarWidget,
00071          RemoveToolBarWidget,
00072          AddExportDialog
00073       };
00074 
00075       struct AddMenuArgs
00076       {
00077          DtLgrMenu* menu;
00078          QString previousMenuName;
00079       };
00080 
00081       struct RemoveMainMenuArgs
00082       {
00083          QString name;
00084       };
00085 
00086       struct AddMenuItemArgs
00087       {
00088          MAKCommonWidgets::DtDynamicMenuItem* item;
00089          QString parentName;
00090          int index;
00091       };
00092 
00093       struct RemoveMenuItemArgs
00094       {
00095          QString menuName;
00096          QString parentName;
00097       };
00098 
00099       struct ConnectMenuItemArgs
00100       {
00101          QString itemName;
00102          QString parentName;
00103          QAction* action;
00104       };
00105 
00106       struct AddComponentControlArgs
00107       {
00108          DtLgrGuiComponent* component;
00109       };
00110 
00111       struct AddToolBarWidgetArgs
00112       {
00113          QWidget* widget;
00114          QString toolBarName;
00115       };
00116 
00117       struct AddStatusBarWidgetArgs
00118       {
00119          QWidget* widget;
00120       };
00121      
00122       struct AddExportDialogArgs
00123       {
00124          QString exportType;
00125          ExportDialogCreator creator;
00126       };
00127 
00128       union EventArgs
00129       {
00130          AddMenuArgs* addMenuArgs;
00131          RemoveMainMenuArgs* removeMenuArgs;
00132          AddMenuItemArgs* addMenuItemArgs;
00133          RemoveMenuItemArgs* removeMenuItemArgs;
00134          ConnectMenuItemArgs* connectMenuItemArgs;
00135          AddComponentControlArgs* addComponentControlArgs;
00136          AddToolBarWidgetArgs* addToolBarWidgetArgs;
00137          AddStatusBarWidgetArgs* addStatusBarWidgetsArgs;
00138          AddExportDialogArgs* addExportDialogArgs;
00139       };
00140 
00141       DT_VIRTUAL_CTR(DtLgrAppGuiEvent,(LgrAppGuiEventType type,EventArgs args))
00142       
00143       virtual ~DtLgrAppGuiEvent();
00144 
00146       virtual LgrAppGuiEventType eventType() const;
00147       virtual EventArgs arguments() const;
00148 
00149       static const QEvent::Type theLgrAppEventId = (QEvent::Type)(QEvent::User + 101);
00150 
00151    protected:
00152 
00153       LgrAppGuiEventType myType;
00154       EventArgs myArguments;
00155    };
00156 
00157 
00158 
00159 }
00160 
00161 #endif

Document ID: Generated on Tue Oct 11 19:41:03 EDT 2011 from SVN revision 107422
Copyright © 2005-2011 VT MÄK Inc. All Rights Reserved (www.mak.com)