llpanelLCD.cpp

Go to the documentation of this file.
00001 
00032 #include "llviewerprecompiledheaders.h"
00033 
00034 #include "llpanelLCD.h"
00035 
00036 // linden library includes
00037 #include "llerror.h"
00038 #include "llrect.h"
00039 #include "llfontgl.h"
00040 #include "message.h"
00041 #include "llvieweruictrlfactory.h"
00042 
00043 // project includes
00044 #include "llviewerwindow.h"
00045 #include "llcheckboxctrl.h"
00046 #include "llradiogroup.h"
00047 #include "llresmgr.h"
00048 #include "lltextbox.h"
00049 #include "llui.h"
00050 #include "viewer.h"
00051 
00052 //Ventrella
00053 #include "llagent.h"
00054 //end Ventrella
00055 
00056 // for Logitech LCD keyboards / speakers
00057 #ifndef LL_LCD_H
00058 #include "lllcd.h"
00059 #endif
00060 
00061 
00062 //
00063 // Globals
00064 //
00065 
00066 //
00067 // Static functions
00068 //
00069 
00070 
00071 LLPanelLCD::LLPanelLCD() 
00072 {
00073         gUICtrlFactory->buildPanel(this, "panel_preferences_lcd.xml");
00074 }
00075 
00076 BOOL LLPanelLCD::postBuild()
00077 {
00078         requires("LCDDestination", WIDGET_TYPE_RADIO_GROUP);
00079         requires("DisplayLinden", WIDGET_TYPE_CHECKBOX);
00080         requires("DisplayDebug", WIDGET_TYPE_CHECKBOX);
00081         requires("DisplayDebugConsole", WIDGET_TYPE_CHECKBOX);
00082         requires("DisplayRegion", WIDGET_TYPE_CHECKBOX);
00083         requires("DisplayChat", WIDGET_TYPE_CHECKBOX);
00084         requires("DisplayIM", WIDGET_TYPE_CHECKBOX);
00085 
00086         if (!checkRequirements())
00087         {
00088                 return FALSE;
00089         }       
00090 
00091         refresh();
00092 
00093         return TRUE;
00094 }
00095 
00096 
00097 LLPanelLCD::~LLPanelLCD()
00098 {
00099         // Children all cleaned up by default view destructor.
00100 }
00101 
00102 void LLPanelLCD::refresh()
00103 {
00104         mLCDDestination = gSavedSettings.getS32("LCDDestination");
00105         mDisplayChat = gSavedSettings.getBOOL("DisplayChat");
00106         mDisplayIM = gSavedSettings.getBOOL("DisplayIM");
00107         mDisplayRegion = gSavedSettings.getBOOL("DisplayRegion");
00108         mDisplayDebug = gSavedSettings.getBOOL("DisplayDebug");
00109         mDisplayDebugConsole = gSavedSettings.getBOOL("DisplayDebugConsole");
00110         mDisplayLinden = gSavedSettings.getBOOL("DisplayLinden");
00111 
00112         LLPanel::refresh();
00113 }
00114 
00115 void LLPanelLCD::apply()
00116 {
00117         // nothing really to do here.
00118 }
00119 
00120 
00121 void LLPanelLCD::cancel()
00122 {
00123         // doing this to restore situation when we entered this function
00124         gSavedSettings.setS32("LCDDestination", mLCDDestination);
00125         gSavedSettings.setBOOL("DisplayChat", mDisplayChat);
00126         gSavedSettings.setBOOL("DisplayIM", mDisplayIM);
00127         gSavedSettings.setBOOL("DisplayRegion", mDisplayRegion);
00128         gSavedSettings.setBOOL("DisplayDebug", mDisplayDebug);
00129         gSavedSettings.setBOOL("DisplayDebugConsole", mDisplayDebugConsole);
00130         gSavedSettings.setBOOL("DisplayLinden", mDisplayLinden);
00131 }

Generated on Thu Jul 1 06:08:58 2010 for Second Life Viewer by  doxygen 1.4.7