SuppressibleMsgDlg.h

Go to the documentation of this file.
00001 /*
00002  * The information in this file is
00003  * Copyright(c) 2009 Ball Aerospace & Technologies Corporation
00004  * and is subject to the terms and conditions of the
00005  * GNU Lesser General Public License Version 2.1
00006  * The license text is available from   
00007  * http://www.gnu.org/licenses/lgpl.html
00008  */
00009 
00010 #ifndef SUPPRESSIBLEMSGDLG_H
00011 #define SUPPRESSIBLEMSGDLG_H
00012 
00013 #include <QtGui/QDialog>
00014 
00015 #include "TypesFile.h"
00016 
00017 class QCheckBox;
00018 
00019 /**
00020  *    This interface class manages and displays a suppressible message box that 
00021  *    can be disabled by the user.
00022  *
00023  *    A suppressible message dialog is a pop-up box that can be used to display a message to the user. 
00024  *    This type of dialog will display a message with a check box. 
00025  */
00026 class SuppressibleMsgDlg : public QDialog
00027 {
00028    Q_OBJECT
00029 public:
00030 
00031    /**
00032    *   This method creates a message box with a "Don't show this again" 
00033    *   check box.
00034    *
00035    *   @param dialogTitle
00036    *          The message box title.
00037    *   @param dialogMsg
00038    *          The message that will be displayed in the message box.
00039    *   @param type
00040    *          The type of message.
00041    *   @param checkBoxState
00042    *          The state of the check box.
00043    *   @param pParent
00044    *          The parent widget.
00045    */
00046    SuppressibleMsgDlg(const std::string& dialogTitle, const std::string& dialogMsg, MessageType type, 
00047                bool checkBoxState = false, QWidget* pParent = NULL);
00048 
00049    /**
00050     *  Destroys the message box.
00051     */
00052    ~SuppressibleMsgDlg();
00053 
00054    /**
00055     *  This method will return a bool value indicating whether the dialog will be 
00056     *  visible to the user.
00057     *  
00058     *  @return \c false if the dialog check box is checked. If the check box hasn't been checked,
00059     *          then return \c true.
00060     */
00061    virtual bool getDontShowAgain() const;
00062 
00063    /**
00064     *  This method will set a bool value that will indicate whether the dialog will be 
00065     *  visible to the user.
00066     *
00067     *  @param bEnable
00068     *         \c False to uncheck the check box, \c true to check the check box.
00069     */
00070    virtual void setDontShowAgain(bool bEnable);
00071 
00072 private:
00073    SuppressibleMsgDlg(const SuppressibleMsgDlg& rhs);
00074    SuppressibleMsgDlg& operator=(const SuppressibleMsgDlg& rhs);
00075    QCheckBox* mpDontShow;
00076 };
00077 
00078 #endif

Software Development Kit - Opticks 4.9.0 Build 16218