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 "lluictrlfactory.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 "llviewercontrol.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 LLUICtrlFactory::getInstance()->buildPanel(this, "panel_preferences_lcd.xml"); 00074 } 00075 00076 BOOL LLPanelLCD::postBuild() 00077 { 00078 requires<LLRadioGroup>("LCDDestination"); 00079 requires<LLCheckBoxCtrl>("DisplayLinden"); 00080 requires<LLCheckBoxCtrl>("DisplayDebug"); 00081 requires<LLCheckBoxCtrl>("DisplayDebugConsole"); 00082 requires<LLCheckBoxCtrl>("DisplayRegion"); 00083 requires<LLCheckBoxCtrl>("DisplayChat"); 00084 requires<LLCheckBoxCtrl>("DisplayIM"); 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 }