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
18 #include <khtml_part.h>
19 #include "decoratedmove.h"
20 #include "pixmaploader.h"
21 #include "movelist_notifier.h"
28 class Textual
: public KHTMLPart
{
30 Index m_curr_selected
;
33 PixmapLoader m_loader
;
36 Textual(QWidget
*parent
= NULL
);
38 void settingsChanged() {}
40 void setLoaderBasePath(const QString
& p
){ m_loader
.setBasePath(p
); }
42 /** Sets the move comment at the given index */
43 void setComment(const Index
& index
, const QString
& comment
);
45 /** Sets the comment at the given index before the give subvariation */
46 void setVComment(const Index
& index
, int v
, const QString
& comment
);
48 /** Sets the move at the given index */
49 void setMove(const Index
& index
, int turn
, const DecoratedMove
& move
,
50 const QString
& comment
= QString());
52 /** Sets the move at the given index */
53 void setMove(const Index
& index
, int turn
, const QString
& move
,
54 const QString
& comment
= QString());
56 /** Removes the given index and all those that come after */
57 void remove(const Index
& index
);
61 Notifier
* getNotifier();
63 void setNotifier(Notifier
* n
, bool detach_prev
=true);
67 void setLayoutStyle(int x
);
69 /** Sets the currently selected index */
70 void select(const Index
& index
);
73 void onURL(const KUrl
&url
);
76 } //end namespace MoveList
81 #include "decoratedmove.h"
88 class Textual
: public QWidget
{
92 Textual(QWidget
*parent
= NULL
) : QWidget(parent
){}
94 void settingsChanged() {}
95 void setLoaderBasePath(const QString
& /*p*/){}
96 void setComment(const Index
& /*index*/, const QString
& /*comment*/){}
97 void setVComment(const Index
& /*index*/, int /*v*/, const QString
& /*comment*/){}
98 void setMove(const Index
& /*index*/, int /*turn*/, const DecoratedMove
& /*move*/,
99 const QString
& /*comment*/ = QString()){}
100 void setMove(const Index
& /*index*/, int /*turn*/, const QString
& /*move*/,
101 const QString
& /*comment*/ = QString()){}
102 void remove(const Index
& /*index*/){}
104 Notifier
* getNotifier(){ return NULL
; }
105 void setNotifier(Notifier
* /*n*/, bool /*detach_prev*/=true){}
106 int layoutStyle(){ return 0; }
107 void setLayoutStyle(int /*x*/){}
108 void select(const Index
& /*index*/){}
111 } //end namespace MoveList
115 #endif //MOVELIST_TEXTUAL_H