VR-Forces 4.0.4 Class Documentation
include/vrvCoreQt/DtCheckedItem.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 2008 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 /******************************************************************************
00006 ** $RCSfile: DtCheckedItem.h,v $ $Revision: 1.9 $ $State: Exp $
00007 ******************************************************************************/
00008 
00012 
00013 #ifndef DtCheckedItem_H_
00014 #define DtCheckedItem_H_
00015 
00016 #include <vrvCoreQt/vrvCoreQt.h>
00017 #include <vrvCoreQt/DtMenuItem.h>
00018 
00019 namespace makVrv
00020 {
00024    class DT_DLL_VRVCOREQT DtCheckedItem : public DtMenuItem
00025    {
00026       Q_OBJECT
00027 
00028    public:
00030       DtCheckedItem(DtDe& de, const std::string& className);
00031 
00033       virtual ~DtCheckedItem();
00034 
00036       virtual QAction* createAction(DtDe&, QWidget* parent);
00037 
00039       virtual void on_settingChanged(bool value);
00040 
00041       //Update the check state with the value returned from getValue()
00042       //This does not emit any signals.
00043       void updateValue();
00044 
00045    protected:
00046 
00047       virtual void on_triggered();
00048 
00049       //Set the value due to being triggered.
00050       virtual void setValue(bool value) = 0;
00051 
00052       //Get the current value.
00053       virtual bool getValue() const = 0;     
00054 
00055       bool myState;
00056       QString myOnText;
00057       QString myOffText;
00058       QString myToolTip;
00059       QString myIcon;
00060       QAction* myAction;
00061 
00062    protected:
00063       DtDe& myDe;
00064 
00065    };
00066 }
00067 
00068 #endif
00069 

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)