File indexing completed on 2024-09-29 06:39:19

0001 /* This file is part of KsirK.
0002    Copyright (C) 2005-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 KSIRK_GAMELOGICEVENTSLISTPROPERTY_H
0021 #define KSIRK_GAMELOGICEVENTSLISTPROPERTY_H
0022 
0023 #include<qstring.h>
0024 #include<qpoint.h>
0025 #include<qpair.h>
0026 #include <QList>
0027 namespace Ksirk {
0028 
0029 namespace GameLogic {
0030 
0031 /**
0032   * Currently unused. But could be rebirthed in the future.
0033   * @author Gaƫl de Chalendar
0034   * 
0035   */
0036 // class EventsListProperty : public KGamePropertyList< QPair< QString, QPoint > >
0037 class EventsListProperty : public QList< QPair< QString, QPointF > >
0038 {
0039 public:
0040   EventsListProperty();
0041 
0042   virtual ~EventsListProperty();
0043 
0044   /**
0045     * This will read the value of this property from the stream. You MUST
0046     * overwrite this method in order to use this class
0047     * @param s The stream to read from
0048     **/
0049 //   virtual void load(QDataStream& s);
0050   
0051   /**
0052     * Write the value into a stream. MUST be overwritten
0053     **/
0054 //   virtual void save(QDataStream& s);
0055   
0056   /**
0057     * send a command to advanced properties like arrays
0058     * @param stream The stream containing the data of the comand
0059     * @param msgid The ID of the command - see PropertyCommandIds
0060     * @param isSender whether this client is also the sender of the command
0061     **/
0062 //   virtual void command(QDataStream &stream, int msgid, bool isSender=false);
0063   
0064   void pop_front();
0065   
0066   void push_back(const QPair<QString, QPointF>& pair);
0067 
0068 private:
0069 //   QByteArray buffer;
0070   
0071 };
0072 
0073 }
0074 
0075 }
0076 
0077 #endif