fix logic
[personal-kdelibs.git] / khtml / testkhtml.h
blob26ebd12b1af088311aa2424811b6b736ffa04396
1 #ifndef TESTKHTML_H
2 #define TESTKHTML_H
4 #include <kdebug.h>
5 #include <khtml_part.h>
6 #include <QList>
7 #include <QMap>
9 /**
10 * @internal
12 class Dummy : public QObject
14 Q_OBJECT
15 public:
16 Dummy( KHTMLPart *part ) : QObject( part ) { m_part = part; }
18 private Q_SLOTS:
19 void slotOpenURL( const KUrl &url, const KParts::OpenUrlArguments& args, const KParts::BrowserArguments& browserArgs )
21 m_part->setArguments( args );
22 m_part->browserExtension()->setBrowserArguments( browserArgs );
23 m_part->openUrl( url );
25 void reload()
27 KParts::OpenUrlArguments args;
28 args.setReload( true );
29 m_part->setArguments( args );
30 m_part->openUrl( m_part->url() );
33 void toggleNavigable(bool s)
35 m_part->setCaretMode(s);
38 void toggleEditable(bool s)
40 kDebug() << "editable: " << s;
41 m_part->setEditable(s);
44 void doBenchmark();
46 void handleDone();
48 void nextRun();
49 private:
50 KHTMLPart *m_part;
51 QList<QString> filesToBenchmark;
52 QMap<QString, QList<int> > results;
53 int benchmarkRun;
54 QTime loadTimer;
58 #endif