1 /*************************************************************************** 2 * Copyright (C) 2011 by Lasath Fernando <kde@lasath.org> 3 * Copyright (C) 2011 by David Edmundson <kde@davidedmundson.co.uk> 4 * 5 * * 6 * This program is free software; you can redistribute it and/or modify * 7 * it under the terms of the GNU General Public License as published by * 8 * the Free Software Foundation; either version 2 of the License, or * 9 * (at your option) any later version. * 10 * * 11 * This program is distributed in the hope that it will be useful, * 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 14 * GNU General Public License for more details. * 15 * * 16 * You should have received a copy of the GNU General Public License * 17 * along with this program; if not, write to the * 18 * Free Software Foundation, Inc., * 19 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * 20 ***************************************************************************/ 21 22 23 #ifndef BEHAVIOR_CONFIG_H 24 #define BEHAVIOR_CONFIG_H 25 26 #include <KCModule> 27 #include "text-chat-config.h" 28 29 namespace Ui { 30 class BehaviorConfigUi; 31 } 32 33 class BehaviorConfig : public KCModule 34 { 35 Q_OBJECT 36 37 public: 38 explicit BehaviorConfig(QWidget *parent = 0, const QVariantList &args = QVariantList()); 39 virtual ~BehaviorConfig(); 40 41 public Q_SLOTS: 42 virtual void load(); 43 virtual void save(); 44 45 protected: 46 virtual void changeEvent(QEvent *e); 47 48 private Q_SLOTS: 49 void onRadioSelected(int id); 50 void onScrollbackLengthChanged(); 51 void onShowMeTypingChanged(bool state); 52 void onShowOthersTypingChanged(bool state); 53 void onNicknameCompletionStyleChanged(int index); 54 void onImageSharingServiceChanged(int index); 55 void onDontLeaveGroupChatsChanged(bool state); 56 void onRememberTabKeyboardLayoutChanged(bool state); 57 58 private: 59 TextChatConfig::TabOpenMode m_openMode; 60 int m_scrollbackLength; 61 bool m_showMeTyping; // show others I am typing 62 bool m_showOthersTyping; // show me others are typing 63 bool m_dontLeaveGroupChats; 64 bool m_rememberTabKeyboardLayout; 65 QString m_nicknameCompletionSuffix; 66 ShareProvider::ShareService m_imageShareServiceType; 67 Ui::BehaviorConfigUi *ui; 68 69 static const QStringList nicknameCompletionSuffixes; 70 }; 71 72 #endif // BEHAVIOR_CONFIG_H 73