VR-Forces 4.0.4 Class Documentation
include/vrfGuiCoreQt/DtBasePlanWidget.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2009 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 /*******************************************************************************
00006 ** $RCSfile: DtBasePlanWidget.h,v $ $Revision: 1.2 $ $State: Exp $
00007 *******************************************************************************/
00008 
00011 
00012 #pragma once
00013 
00014 #include <vrvUtil/signalslib.h>
00015 
00016 #include <vrfGuiCoreQt/vrfGuiCoreQt.h>
00017 #include <vrfGuiCoreQt/planWidgetUi.hpp>
00018 #include <vrfGuiCoreQt/DtPlanWidgetInterface.h>
00019 #include <vrfGuiCoreQt/DtConfigurableMenu.h>
00020 
00021 #include <vrvCore/DtSelectionManager.h>
00022 #include <vrvCoreQt/DtMenuManager.h>
00023 #include <vrvCore/DtMenuPath.h>
00024 #include <vrvCore/DtMenuConfiguration.h>
00025 #include <vrvUtil/DtSignalConnectionManager.h>
00026 #include <vrvCoreQt/DtQtMenuAssembler.h>
00027 
00028 #include <QtGui/QWidget>
00029 
00033 
00034 class QMenu;
00035 
00036 namespace makVrv
00037 {
00038    class DtDe;
00039 }
00040 
00041 namespace makVrf
00042 {
00043    class DtBasePlanWidgetLogic;
00044 
00045    class DT_DLL_VRFGUICOREQT DtEditPlanMenuManager : public makVrv::DtMenuManager
00046    {
00047    public:
00048       DtEditPlanMenuManager() : makVrv::DtMenuManager()
00049       {
00050       }
00051    };
00052 
00053    class DT_DLL_VRFGUICOREQT DtEditPlanMenuAssembler : public makVrv::DtQtMenuAssembler
00054    {
00055    public:
00056       DtEditPlanMenuAssembler(makVrv::DtDe&, QWidget*, QMenuBar*);
00057 
00058       virtual ~DtEditPlanMenuAssembler()
00059       {
00060          myMenuBuilders.clear();
00061          myMenuItemBuilders.clear();
00062       }
00063 
00064       virtual void unregisterMenu(const std::string& s)
00065       {
00066          makVrv::DtMenu* b = menuBuilder(s);
00067 
00068          if (b)
00069          {
00070             MenuBuilderMap::iterator iter = myMenuBuilders.begin();
00071 
00072             while (iter != myMenuBuilders.end())
00073             {
00074                if (iter->second == b)
00075                {
00076                   myMenuBuilders.erase(iter);
00077                }
00078                ++iter;
00079             }
00080          }
00081       }
00082 
00084       QMenuBar* menuBar()
00085       {
00086          return myMenuBar;
00087       }
00088 
00090       virtual QWidget* menuWindow();
00091 
00093       virtual makVrv::DtMenuManager& menuManager();
00094 
00096       QMenu* findMenu(const makVrv::DtMenuPath& path)
00097       {
00098          return myMenuManager.findMenu(path);
00099       }
00100 
00101    protected:
00102       QWidget*              myMainWindow;
00103       QMenuBar*             myMenuBar;
00104       DtEditPlanMenuManager myMenuManager;
00105    };
00106 
00107    class DT_DLL_VRFGUICOREQT DtBasePlanWidget : public QWidget,
00108       public DtPlanWidgetInterface
00109    {
00110       Q_OBJECT
00111 
00112    public:
00113 
00115       DtBasePlanWidget(makVrv::DtDe&, QWidget* parent = NULL, const Qt::WindowFlags& flags = 0);
00116 
00118       virtual ~DtBasePlanWidget();
00119 
00121       virtual bool init(const makVrv::DtSelectionManager::IdSet&);
00122 
00123       virtual DtPlanListBoxItem* currentItem();
00124 
00125       virtual bool deletePending() const;
00126 
00127    protected:
00128       virtual void setupGui();
00129 
00130    protected slots:
00131       virtual void onItemSelectionChanged();
00132 
00134       virtual void onPrintPlan();
00135 
00137       virtual void onCopyPlan();
00138 
00140       virtual void accept();
00141 
00143       virtual void cancel();
00144 
00145    protected:
00146       virtual QTreeWidget* planListBox();
00147       virtual QWidget* widget();
00148 
00149       virtual QPushButton* applyButton();
00150       virtual QPushButton* restartButton();
00151       virtual QPushButton* okButton();
00152       virtual QPushButton* editButton();
00153       virtual QPushButton* cancelButton();
00154       virtual QPushButton* deleteButton();
00155       virtual QPushButton* abandonPlanButton();
00156       virtual QPushButton* replacePlanButton();
00157       virtual QPushButton* printButton();
00158       virtual QPushButton* copyPlanButton();
00159 
00160       virtual bool showCurrentWithArrow() const;
00161       virtual void setPlanStatus(const QString&);
00162       virtual void keyPressEvent(QKeyEvent *e);
00163       virtual bool eventFilter(QObject *o, QEvent *e);
00164 
00165       virtual void closeWidget();
00166 
00167       virtual void refreshDisplay();
00168 
00169    protected:
00170       makVrv::DtDe&            myDe;
00171 
00172       Ui_DtPlanWidgetUI       myUiImpl;
00173 
00178       bool                    myShowCurrentWithArrow;
00179 
00180       DtBasePlanWidgetLogic*  myLogic;
00181       QMenuBar*               myMenuBar;
00182 
00183       bool                    myDeletePending;
00184 
00185       makVrv::DtSignalConnectionManager myConnections;
00186 
00187    private:
00189       DtBasePlanWidget(const DtBasePlanWidget& orig);
00190 
00192       DtBasePlanWidget& operator=(const DtBasePlanWidget& rhs);
00193    };
00194 }

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)