File indexing completed on 2025-01-12 06:47:25
0001 // 0002 // C++ Interface: cdialoglist 0003 // 0004 // Description: List of dialogs. 0005 // 0006 /* 0007 Copyright 2007-2011 Tomas Mecir <kmuddy@kmuddy.com> 0008 0009 This program is free software; you can redistribute it and/or 0010 modify it under the terms of the GNU General Public License as 0011 published by the Free Software Foundation; either version 2 of 0012 the License, or (at your option) any later version. 0013 0014 This program is distributed in the hope that it will be useful, 0015 but WITHOUT ANY WARRANTY; without even the implied warranty of 0016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0017 GNU General Public License for more details. 0018 0019 You should have received a copy of the GNU General Public License 0020 along with this program. If not, see <http://www.gnu.org/licenses/>. 0021 */ 0022 0023 #ifndef CDIALOGLIST_H 0024 #define CDIALOGLIST_H 0025 0026 #include "cactionbase.h" 0027 #include <map> 0028 0029 #include <kmuddy_export.h> 0030 0031 class QDialog; 0032 0033 using namespace std; 0034 0035 /** 0036 This class stores dialog boxes. Its purpose is to allow plug-ins to extend these dialogs in various ways. 0037 0038 @author Tomas Mecir <kmuddy@kmuddy.com> 0039 */ 0040 class KMUDDY_EXPORT cDialogList : public cActionBase { 0041 public: 0042 static cDialogList *self (); 0043 ~cDialogList() override; 0044 QDialog *getDialog (const QString &name); 0045 void addDialog (const QString &name, QDialog *dlg); 0046 void removeDialog (const QString &name); 0047 private: 0048 cDialogList(); 0049 static cDialogList *_self; 0050 map<QString, QDialog *> dialogs; 0051 }; 0052 0053 #endif