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.
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"
29 class Textual
: public KHTMLPart
{
31 Index m_curr_selected
;
34 PixmapLoader m_loader
;
37 Textual(QWidget
*parent
= NULL
);
39 void settingsChanged() {}
41 void setLoaderTheme(const ThemeInfo
& theme
) { m_loader
.setTheme(theme
); }
43 /** Sets the move comment at the given index */
44 void setComment(const Index
& index
, const QString
& comment
);
46 /** Sets the comment at the given index before the give subvariation */
47 void setVComment(const Index
& index
, int v
, const QString
& comment
);
49 /** Sets the move at the given index */
50 void setMove(const Index
& index
, int turn
, const DecoratedMove
& move
,
51 const QString
& comment
= QString());
53 /** Sets the move at the given index */
54 void setMove(const Index
& index
, int turn
, const QString
& move
,
55 const QString
& comment
= QString());
57 /** Removes the given index and all those that come after */
58 void remove(const Index
& index
);
62 Notifier
* getNotifier();
64 void setNotifier(Notifier
* n
, bool detach_prev
=true);
68 void setLayoutStyle(int x
);
70 /** Sets the currently selected index */
71 void select(const Index
& index
);
74 void onURL(const KUrl
&url
);
77 } //end namespace MoveList
82 #include "decoratedmove.h"
91 class Textual
: public QWidget
{
95 Textual(QWidget
*parent
= NULL
) : QWidget(parent
){}
97 void settingsChanged() {}
98 void setLoaderTheme(const ThemeInfo
& /*theme*/){}
99 void setComment(const Index
& /*index*/, const QString
& /*comment*/){}
100 void setVComment(const Index
& /*index*/, int /*v*/, const QString
& /*comment*/){}
101 void setMove(const Index
& /*index*/, int /*turn*/, const DecoratedMove
& /*move*/,
102 const QString
& /*comment*/ = QString()){}
103 void setMove(const Index
& /*index*/, int /*turn*/, const QString
& /*move*/,
104 const QString
& /*comment*/ = QString()){}
105 void remove(const Index
& /*index*/){}
107 Notifier
* getNotifier(){ return NULL
; }
108 void setNotifier(Notifier
* /*n*/, bool /*detach_prev*/=true){}
109 int layoutStyle(){ return 0; }
110 void setLayoutStyle(int /*x*/){}
111 void select(const Index
& /*index*/){}
114 } //end namespace MoveList
118 #endif //MOVELIST_TEXTUAL_H