File indexing completed on 2024-04-28 05:38:04

0001 /***************************************************************************
0002  *   Copyright (C) 2015 by Renaud Guezennec                                *
0003  *   https://rolisteam.org/contact                   *
0004  *                                                                         *
0005  *   rolisteam is free software; you can redistribute it and/or modify     *
0006  *   it under the terms of the GNU General Public License as published by  *
0007  *   the Free Software Foundation; either version 2 of the License, or     *
0008  *   (at your option) any later version.                                   *
0009  *                                                                         *
0010  *   This program is distributed in the hope that it will be useful,       *
0011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
0012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
0013  *   GNU General Public License for more details.                          *
0014  *                                                                         *
0015  *   You should have received a copy of the GNU General Public License     *
0016  *   along with this program; if not, write to the                         *
0017  *   Free Software Foundation, Inc.,                                       *
0018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
0019  ***************************************************************************/
0020 
0021 #ifndef VMAPTOOLBAR_H
0022 #define VMAPTOOLBAR_H
0023 
0024 #include <QComboBox>
0025 #include <QDoubleSpinBox>
0026 #include <QPointer>
0027 #include <QToolBar>
0028 
0029 #include "rwidgets_global.h"
0030 
0031 class VectorialMapController;
0032 class ColorButton;
0033 /**
0034  * @brief The VmapTopBar class
0035  */
0036 class RWIDGET_EXPORT VmapTopBar : public QToolBar
0037 {
0038     Q_OBJECT
0039 public:
0040     VmapTopBar(VectorialMapController* ctrl, QWidget* parent= nullptr);
0041     virtual ~VmapTopBar();
0042 
0043     void setupUi();
0044     void updateUI();
0045 
0046 private:
0047     void initActions();
0048     void updateUi();
0049 
0050 private:
0051     QPointer<VectorialMapController> m_ctrl;
0052 
0053     // Button
0054     ColorButton* m_bgSelector{nullptr};
0055     QAction* m_showSquareAct= nullptr;
0056     QAction* m_showHexagonAct= nullptr;
0057     QAction* m_gridAboveAct= nullptr;
0058 
0059     QAction* m_onlyGmPermAct= nullptr;
0060     QAction* m_characterOnlyPermAct= nullptr;
0061     QAction* m_allPermAct= nullptr;
0062 
0063     QAction* m_hiddenAct= nullptr;
0064     QAction* m_fogAct= nullptr;
0065     QAction* m_allAct= nullptr;
0066 
0067     QAction* m_groundAct= nullptr;
0068     QAction* m_objectAct= nullptr;
0069     QAction* m_characterAct= nullptr;
0070     QAction* m_gameMasterAct= nullptr;
0071     QAction* m_hideOtherAct= nullptr;
0072 
0073     QAction* m_characterVisionAct= nullptr;
0074     QAction* m_showTransparentAct= nullptr;
0075 
0076     QAction* m_showPcName= nullptr;
0077     QAction* m_showNpcName= nullptr;
0078     QAction* m_showNpcNumber= nullptr;
0079     QAction* m_showState= nullptr;
0080     QAction* m_showHealthBar= nullptr;
0081     QAction* m_showInit= nullptr;
0082 
0083     QSpinBox* m_gridSize= nullptr;
0084     QDoubleSpinBox* m_scaleSize= nullptr;
0085     QComboBox* m_gridUnit= nullptr;
0086 };
0087 
0088 #endif // VMAPTOOLBAR_H