File indexing completed on 2024-12-08 03:47:27
0001 /* This file is part of KsirK. 0002 Copyright (C) 2001-2007 Gael de Chalendar <kleag@free.fr> 0003 0004 KsirK is free software; you can redistribute it and/or 0005 modify it under the terms of the GNU General Public 0006 License as published by the Free Software Foundation, either version 2 0007 of the License, or (at your option) any later version. 0008 0009 This program is distributed in the hope that it will be useful, 0010 but WITHOUT ANY WARRANTY; without even the implied warranty of 0011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 0012 General Public License for more details. 0013 0014 You should have received a copy of the GNU General Public License 0015 along with this program; if not, write to the Free Software 0016 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 0017 02110-1301, USA 0018 */ 0019 0020 #ifndef INVASIONSLIDER_H 0021 #define INVASIONSLIDER_H 0022 0023 #include <QDialog> 0024 0025 class QLabel; 0026 class QSlider; 0027 0028 namespace Ksirk 0029 { 0030 class KGameWindow; 0031 0032 namespace GameLogic 0033 { 0034 class Country; 0035 } 0036 /** 0037 * 0038 * @author Gael de Chalendar (aka Kleag) 0039 * @version $Id: kgamewin.h 243 2007-02-24 00:22:58Z kleag $ 0040 */ 0041 class InvasionSlider: public QDialog 0042 { 0043 Q_OBJECT 0044 0045 public: 0046 enum InvasionType {Invasion, Moving}; 0047 0048 InvasionSlider(KGameWindow* game, GameLogic::Country *,GameLogic::Country *, InvasionType invasionType = Invasion); 0049 0050 0051 protected: 0052 0053 0054 public Q_SLOTS: 0055 0056 void slideMove(int v); 0057 void slideReleased(); 0058 void slideClose(); 0059 void slideCancel(); 0060 0061 private: 0062 KGameWindow* m_game; 0063 0064 int m_nbRArmy; 0065 int m_nbLArmy; 0066 int m_currentSlideValue; 0067 int m_previousSlideValue; 0068 0069 QLabel * m_nbLArmies; 0070 QLabel * m_nbRArmies; 0071 QSlider * m_invadeSlide; 0072 }; 0073 0074 } // closing namespace Ksirk 0075 0076 #endif // INVASIONSLIDER_H 0077