File indexing completed on 2024-06-02 04:05:34

0001 /***************************************************************************
0002                                cmaptexttool.h
0003                              -------------------
0004     begin                : Thu Aug 9 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 #ifndef CMAPTOOLTEXT_H
0019 #define CMAPTOOLTEXT_H
0020 
0021 #include <qobject.h>
0022 #include <qcursor.h>
0023 #include <qevent.h>
0024 
0025 #include "../../../cmaptoolbase.h"
0026 
0027 /**This tool is used to delete map elements
0028   *@author Kmud Developer Team
0029   */
0030 
0031 class CMapToolText : public CMapToolBase
0032 {
0033    Q_OBJECT
0034 public:
0035     CMapToolText(KActionCollection *actionCollection,CMapManager *manager);
0036     ~CMapToolText() override;
0037 
0038     /** Called when the tool recives a mouse release event */
0039     void mouseReleaseEvent(QPoint mousePos, QMouseEvent *e, CMapLevel *currentLevel) override;
0040     /** This is called when a key is pressed */
0041     void keyPressEvent(QKeyEvent *e) override;
0042 
0043     /** This function called when a tool is selected */
0044     void toolSelected(void) override;
0045     /** This function is called when a tool is unselected */
0046     void toolUnselected(void) override;
0047 
0048 private:
0049     /** The mouse cursor */
0050     QCursor *textCursor;
0051 
0052 };
0053 
0054 #endif