File indexing completed on 2024-04-28 04:02:52
0001 /*************************************************************************** 0002 dlgmappathproperties.h - description 0003 ------------------- 0004 begin : Thu Mar 8 2001 0005 copyright : (C) 2001 by KMud Development 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 DLGMAPPATHPROPERTIES_H 0019 #define DLGMAPPATHPROPERTIES_H 0020 0021 #include <QDialog> 0022 0023 #include "ui_dlgmappathpropertiesbase.h" 0024 0025 #include "../cmapelement.h" 0026 #include <kconfiggroup.h> 0027 0028 class CMapPath; 0029 class CMapManager; 0030 0031 /**The map path properties dialog 0032 *@author KMud Development Team 0033 */ 0034 0035 class DlgMapPathProperties : public QDialog, private Ui::DlgMapPathPropertiesBase 0036 { 0037 Q_OBJECT 0038 public: 0039 DlgMapPathProperties(CMapManager *manager,KConfigGroup pathProperties,bool undoable=true,QWidget *parent=nullptr); 0040 DlgMapPathProperties(CMapManager *manager,CMapPath *pathElement,bool undoable=true,QWidget *parent=nullptr); 0041 0042 bool getTwoWay(void); 0043 QString getSpecialCmdDest(void); 0044 QString getDestAfterCmd(void); 0045 QString getDestBeforeCmd(void); 0046 0047 0048 ~DlgMapPathProperties() override; 0049 0050 private slots: 0051 void slotAccept(); 0052 void slotDirectionChange(); 0053 void slotExitTypeChange(); 0054 0055 void slotDestDown(); 0056 void slotDestE(); 0057 void slotDestN(); 0058 void slotDestNE(); 0059 void slotDestNW(); 0060 void slotDestS(); 0061 void slotDestSE(); 0062 void slotDestSW(); 0063 void slotDestUp(); 0064 void slotDestW(); 0065 0066 void slotSrcDown(); 0067 void slotSrcE(); 0068 void slotSrcN(); 0069 void slotSrcNE(); 0070 void slotSrcNW(); 0071 void slotSrcS(); 0072 void slotSrcSE(); 0073 void slotSrcSW(); 0074 void slotSrcUp(); 0075 void slotSrcW(); 0076 0077 private: 0078 void propertiesAccept(QString cmdName); 0079 void pathAccept(QString cmdName); 0080 void setSrcDirection(directionTyp direction); 0081 void setDestDirection(directionTyp direction); 0082 directionTyp getSrcDirection(void); 0083 directionTyp getDestDirection(void); 0084 0085 private: 0086 bool useProperties; 0087 KConfigGroup properties; 0088 bool pathUndoable; 0089 CMapPath *path; 0090 CMapManager *mapManager; 0091 }; 0092 0093 #endif