File indexing completed on 2024-10-06 03:46:07
0001 /*************************************************************************** 0002 cmapcmdelementproperties.h 0003 ------------------- 0004 begin : Wed Feb 27 2002 0005 copyright : (C) 2002 by Kmud Developer Team 0006 email : kmud-devel@kmud.de 0007 ***************************************************************************/ 0008 0009 /*************************************************************************** 0010 * * 0011 * This program is free software; you can redistribute it and/or modify * 0012 * it under the terms of the GNU General Public License as published by * 0013 * the Free Software Foundation; either version 2 of the License, or * 0014 * (at your option) any later version. * 0015 * * 0016 ***************************************************************************/ 0017 0018 #ifndef CMAPCMDELEMENTPROPERTIES_H 0019 #define CMAPCMDELEMENTPROPERTIES_H 0020 0021 0022 #include <qstringlist.h> 0023 #include <qfont.h> 0024 #include <qpoint.h> 0025 0026 #include "cmapcommand.h" 0027 #include "cmapelementutil.h" 0028 0029 #include "kmemconfig.h" 0030 #include <kconfiggroup.h> 0031 0032 class CMapElement; 0033 class CMapManager; 0034 class CMapLevel; 0035 class CMapRoom; 0036 class CMapZone; 0037 class CMapText; 0038 class CMapPath; 0039 0040 class CMapCmdElementProperties : public CMapCommand 0041 { 0042 public: 0043 CMapCmdElementProperties(CMapManager *mapManager,QString name,CMapElement *element); 0044 ~CMapCmdElementProperties() override; 0045 void redo() override; 0046 void undo() override; 0047 KConfigGroup getOrgProperties(void); 0048 KConfigGroup getNewProperties(void); 0049 0050 /** Used to store check if the values are different and store then if they are */ 0051 void compare(QString id,QString orgValue,QString dialogValue); 0052 void compare(QString id,bool orgValue,bool dialogValue); 0053 void compare(QString id,QColor orgValue,QColor dialogValue); 0054 void compare(QString id,int orgValue,int dialogValue); 0055 void compare(QString id,QStringList orgValue,QStringList dialogValue); 0056 void compare(QString id,QFont orgValue,QFont dialogValue); 0057 void compare(QString id,QSize orgValue,QSize dialogValue); 0058 0059 void setNewProperties(KConfigGroup newProperties); 0060 void setOldProperties(KConfigGroup oldProperties); 0061 0062 private: 0063 CMapManager *m_manager; 0064 KMemConfig *m_properties; 0065 }; 0066 0067 #endif