2 Copyright (c) 2006 Paolo Capriotti <p.capriotti@sns.it>
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.
11 #ifndef MOVELIST_TEXTUAL_H
12 #define MOVELIST_TEXTUAL_H
16 #include <khtml_part.h>
17 #include "decoratedmove.h"
18 #include "spriteloader.h"
19 #include "movelist_notifier.h"
26 class Textual
: public KHTMLPart
{
28 Index m_curr_selected
;
31 SpriteLoader m_loader
;
34 Textual(QWidget
*parent
= NULL
);
36 void settingsChanged() {}
38 void setLoaderBasePath(const QString
& p
){ m_loader
.setBasePath(p
); }
40 /** Sets the move comment at the given index */
41 void setComment(const Index
& index
, const QString
& comment
);
43 /** Sets the comment at the given index before the give subvariation */
44 void setVComment(const Index
& index
, int v
, const QString
& comment
);
46 /** Sets the move at the given index */
47 void setMove(const Index
& index
, int turn
, const DecoratedMove
& move
,
48 const QString
& comment
= QString());
50 /** Sets the move at the given index */
51 void setMove(const Index
& index
, int turn
, const QString
& move
,
52 const QString
& comment
= QString());
54 /** Removes the given index and all those that come after */
55 void remove(const Index
& index
);
59 Notifier
* getNotifier();
61 void setNotifier(Notifier
* n
, bool detach_prev
=true);
65 void setLayoutStyle(int x
);
67 /** Sets the currently selected index */
68 void select(const Index
& index
);
71 void onURL(const KUrl
&url
);
74 } //end namespace MoveList
76 #endif //MOVELIST_TEXTUAL_H