File indexing completed on 2024-04-21 04:03:09

0001 /***************************************************************************
0002                                cmappluginbase.cpp
0003                              -------------------
0004     begin                : Mon Aug 6 2001
0005     copyright            : (C) 2001 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 #include "cmappluginbase.h"
0019 
0020 #include "cmappropertiespanebase.h"
0021 #include "cmaptoolbase.h"
0022 #include "cmapmanager.h"
0023 #include "cmapview.h"
0024 
0025 CMapPluginBase::CMapPluginBase(QObject *parent)
0026 {
0027   mapManager = (dynamic_cast<CMapView *>(parent))->getManager();
0028 }
0029 
0030 CMapPluginBase::~CMapPluginBase()
0031 {
0032 }
0033 
0034 /** Used to get a list of the tools */
0035 QList<CMapToolBase *> *CMapPluginBase::getToolList(void)
0036 {
0037     return &toolList;
0038 }
0039 
0040 /** Used to get a list of the property pages for a map element */
0041 QList<CMapPropertiesPaneBase *> CMapPluginBase::createPropertyPanes(elementTyp ,CMapElement *,QWidget *)
0042 {
0043   return QList<CMapPropertiesPaneBase *>();
0044 }
0045 
0046 /** Used to tell the tool were to find the map manager */
0047 void CMapPluginBase::setManager(CMapManager *manager)
0048 {
0049     mapManager = manager;
0050 }
0051 
0052 /** Used to get the map manager */
0053 CMapManager *CMapPluginBase::getManager(void)
0054 {
0055     return mapManager;
0056 }
0057 
0058 /** This is called before a element menu is openend */
0059 void CMapPluginBase::beforeOpenElementMenu(CMapElement *)
0060 {
0061 }
0062 
0063 /** This is called before a element is deleted */
0064 void CMapPluginBase::beforeElementDeleted(CMapElement *)
0065 {
0066 }
0067 
0068 /** This is called when a element is changed */
0069 void CMapPluginBase::elementChanged(CMapElement *)
0070 {
0071 }
0072 
0073 void CMapPluginBase::saveConfigOptions(void)
0074 {
0075 }
0076 
0077 void CMapPluginBase::loadConfigOptions(void)
0078 {
0079 }
0080 
0081 void CMapPluginBase::mapErased(void)
0082 {
0083 }
0084 
0085 /** This method is called after undoing a delete action
0086   * @param element The elemening being restored */
0087 void CMapPluginBase::afterElementUndeleted(CMapElement *)
0088 {   
0089 }
0090 
0091 
0092 void CMapPluginBase::createGlobalConfigPanes()
0093 {
0094 }
0095 
0096 void CMapPluginBase::createProfileConfigPanes()
0097 {
0098 }
0099 
0100 #include "moc_cmappluginbase.cpp"