Prepare 1.0 alpha3 release.
[tagua/yd.git] / src / decoratedmove.h
blob93a161cf4fafee7934a1a2290225e7e5556debf3
1 /*
2 Copyright (c) 2006 Paolo Capriotti <p.capriotti@gmail.com>
3 (c) 2006 Maurizio Monge <maurizio.monge@kdemail.net>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9 */
11 #ifndef DECORATEDMOVE_H
12 #define DECORATEDMOVE_H
14 #include <QString>
15 #include <QList>
17 #include "export.h"
19 class MovePart {
20 public:
21 enum Type {
22 Text,
23 Figurine
26 QString m_string;
27 Type m_type;
29 MovePart(const QString& s, Type t = Text)
30 : m_string(s), m_type(t) {}
33 class TAGUA_EXPORT DecoratedMove {
34 typedef QList<MovePart> ElementList;
36 ElementList m_elements;
37 public:
38 DecoratedMove();
39 explicit DecoratedMove(const QString& str);
40 void load(const QString& str);
42 MovePart operator[](int index) const;
43 unsigned int size() const;
45 // deprecated methods
46 void push_back(const MovePart& part);
51 #endif //DECORATEDMOVE_H