VR-Forces 4.0.4 Class Documentation
examples/addTask/addTaskGui/DtTaskRetreatDialog.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002 ** Copyright (c) 2012 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *******************************************************************************/
00005 
00006 //\file DtTaskRetreatDialog.h
00007 //\brief Contains DtTaskRetreatDialog class.
00008 //This class can configure DtRetreatTask's. It is based on 
00009 //DtBaseYesNoTaskSetDialog which provides a simple layout which includes a
00010 //label, combobox and ok/cancel buttons.
00011 
00012 #pragma once
00013 
00014 #include <vrfGuiCoreQt/vrfGuiCoreQt.h>
00015 #include <vrfGuiCoreQt/DtBaseYesNoTaskSetDialog.h>
00016 
00017 namespace vrfAddTaskExample
00018 {
00019    class DtTaskRetreatDialog : public makVrf::DtBaseYesNoTaskSetDialog
00020    {
00021    public:
00022       //Constructor. Sets the window title to "Retreat".
00023       DtTaskRetreatDialog(makVrv::DtDe& de, QWidget* parent, 
00024          const Qt::WindowFlags& flags = 0);
00025 
00026       //Destructor 
00027       virtual ~DtTaskRetreatDialog();
00028 
00029    public:
00030       //Updates current selection in myComboBox to match the given string
00031       virtual void setRetreatKind(const QString& retreatKind);
00032       //Returns the current selection from myComboBox
00033       virtual QString retreatKind() const;
00034 
00035    protected:
00036       //Reconfigure the label widget provided by the base class so it 
00037       //reads "Retreat:"
00038       virtual QWidget* contents(const std::vector<makVrv::DtSimEntry*>& data);
00039 
00040       //Create and send a DtRetreatTask based on what the user selects in
00041       //the dialog.
00042       virtual void sendRequest();
00043 
00044    protected:
00045       //\brief Add possible values to combo box
00046       virtual void initializeItems(const std::vector<makVrv::DtSimEntry*>& data);
00047 
00048    protected:
00049       //Sets up the dialog based on an existing task from a plan. This
00050       //allows you to double click on a Retreat task in the plan window to
00051       //edit it.
00052       virtual void setupStatement(const DtSimStatement*);
00053    };
00054 
00055    class DtTaskRetreatDialogCreator : public makVrf::DtVrfTaskSetDialogCreator
00056    {
00057    public:
00058       //Creates a new instance of DtTaskRetreatDialog
00059       virtual makVrf::DtTaskSetDialogInterface* create(makVrv::DtDe&, QWidget* parent);
00060 
00061       //Returns true if type == DtRetreatTask::type(). Called by
00062       //DtVrfTaskSetDialogManager::statementIsEditable to check that the
00063       //dialog supports editing the statement type.
00064       bool supportsType(int type, const DtSimStatement* stmt) const;
00065    };
00066 }

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)