1 // preferences.h 2 // 3 // Copyright 2011 David Vachulka <arch_dvx@users.sourceforge.net> 4 // 5 // This program is free software; you can redistribute it and/or modify 6 // it under the terms of the GNU General Public License as published by 7 // the Free Software Foundation; either version 3 of the License, or 8 // (at your option) any later version. 9 // 10 // This program is distributed in the hope that it will be useful, 11 // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 // GNU General Public License for more details. 14 // 15 // You should have received a copy of the GNU General Public License 16 // along with this program; if not, write to the Free Software 17 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 18 // MA 02110-1301, USA. 19 20 21 #ifndef PREFERENCES_H 22 #define PREFERENCES_H 23 24 class Preferences 25 { 26 public: 27 Preferences(); 28 Preferences(const Preferences &p); 29 30 //Save to FXSettings 31 void save(); 32 //Load from FXSettings 33 void load(); 34 35 //General settings pane in Configdialog 36 FXbool m_oneInstance; 37 FXbool m_disableSortTabs; 38 FXbool m_reconnect; 39 FXint m_numberAttempt; 40 FXint m_delayAttempt; 41 FXint m_joinDelay; 42 FXint m_maxAway; 43 FXbool m_useTray; 44 FXbool m_closeToTray; 45 FXbool m_useSpell; 46 FXbool m_ownServerWindow; 47 FXbool m_logging; 48 FXString m_logPath; 49 FXbool m_autoload; 50 FXString m_autoloadPath; 51 52 //Look settings pane in Configdialog 53 ColorTheme m_appTheme; 54 FXColor m_trayColor; 55 FXColor m_unreadColor; 56 FXColor m_highlightColor; 57 FXint m_tabPosition; 58 FXString m_font; 59 60 //Irc Text settings pane in Configdialog 61 IrcColor m_colors; 62 FXString m_ircFont; 63 FXString m_nickCompletionChar; 64 FXbool m_sameCmd; 65 FXbool m_sameList; 66 FXbool m_coloredNick; 67 FXbool m_stripColors; 68 FXbool m_loadLog; 69 FXint m_loadLines; 70 71 //NickList settings pane in Configdialog 72 FXString m_themePath; 73 FXString m_themesList; 74 FXbool m_sortUserMode; 75 76 //Ignore settings pane in Configdialog 77 FXString m_ignoreCommandsList; 78 dxUserInfoArray m_ignoreUsersList; 79 80 //DCC settings pane in Configdialog 81 FXString m_dccPath; 82 FXString m_dccIP; 83 FXint m_dccPortD; 84 FXint m_dccPortH; 85 FXint m_dccTimeout; 86 FXbool m_autoDccChat; 87 FXbool m_autoDccFile; 88 89 //Notification settings pane in Configdialog 90 dxUserInfoArray m_friendsList; 91 FXbool m_sounds; 92 FXbool m_soundConnect; 93 FXString m_pathConnect; 94 FXbool m_soundDisconnect; 95 FXString m_pathDisconnect; 96 FXbool m_soundMessage; 97 FXString m_pathMessage; 98 FXbool m_notify; 99 FXint m_notifyPosition; 100 FXbool m_notifyConnect; 101 FXbool m_notifyDisconnect; 102 FXbool m_notifyMessage; 103 FXbool m_notifyTray; 104 105 //Smileys settings pane in Configdialog 106 FXbool m_useSmileys; 107 dxStringMap m_smileysMap; 108 109 //Other settings value 110 dxServerInfoArray m_serverList; 111 FXbool m_usersShown; 112 FXbool m_statusShown; 113 FXint m_x; 114 FXint m_y; 115 FXint m_w; 116 FXint m_h; 117 FXbool m_maximized; 118 FXbool m_showSpellCombo; 119 dxStringMap m_langs; //map between channel and spelllang 120 dxStringMap m_keybindings; 121 122 FXString getBinding(const FXString &key); 123 FXString getBindingName(const FXString &key); getDefaultKeybindings()124 dxStringMap getDefaultKeybindings() { return m_defaultkeybindings; } 125 private: 126 dxStringMap m_defaultkeybindings; 127 dxStringMap m_namekeybindings; 128 129 void fillDefaultKeybindings(); 130 }; 131 132 #endif /* PREFERENCES_H */ 133