1 /* 2 * This file is part of Licq, an instant messaging client for UNIX. 3 * Copyright (C) 2012 Licq developers <licq-dev@googlegroups.com> 4 * 5 * Licq 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 2 of the License, or 8 * (at your option) any later version. 9 * 10 * Licq 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 Licq; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 18 */ 19 20 #ifndef SETTINGS_PLUGINS_H 21 #define SETTINGS_PLUGINS_H 22 23 #include <QObject> 24 25 class QPushButton; 26 class QTreeWidget; 27 class QTreeWidgetItem; 28 class QWidget; 29 30 namespace LicqQtGui 31 { 32 class SettingsDlg; 33 34 namespace Settings 35 { 36 37 /** 38 * Settings pages for plugins 39 */ 40 class Plugins : public QObject 41 { 42 Q_OBJECT 43 44 public: 45 /** 46 * Constructor 47 * 48 * @param parent Settings dialog 49 */ 50 Plugins(SettingsDlg* parent); 51 52 /// Destructor ~Plugins()53 virtual ~Plugins() {} 54 55 private slots: 56 /// Reload the plugin list 57 void updatePluginList(); 58 59 /// Update buttons for current selection 60 void updatePluginButtons(); 61 62 /// Load selected plugin 63 void loadPlugin(); 64 65 /// Unload selected plugin 66 void unloadPlugin(); 67 68 /// Enable selected plugin 69 void enablePlugin(); 70 71 /// Disable selected plugin 72 void disablePlugin(); 73 74 /// Plugin was double clicked 75 void pluginDoubleClicked(QTreeWidgetItem* item, int index); 76 77 private: 78 /** 79 * Setup page for plugin management 80 * 81 * @param parent Parent widget for page 82 * @return a widget with the plugin management 83 */ 84 QWidget* createPagePlugins(QWidget* parent); 85 86 QTreeWidget* myPluginsList; 87 QPushButton* myLoadButton; 88 QPushButton* myUnloadButton; 89 QPushButton* myEnableButton; 90 QPushButton* myDisableButton; 91 }; 92 93 } // namespace Settings 94 } // namespace LicqQtGui 95 96 #endif 97