summaryrefslogtreecommitdiffstats
path: root/khtml/testkhtml.h
blob: b945ec94278c4f46bb088e83762a1932bb241e79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef TESTKHTML_H
#define TESTKHTML_H

#include <kdebug.h>
#include <tqvaluelist.h>
#include <tqdatetime.h>

/**
 * @internal
 */
class Dummy : public QObject
{
  Q_OBJECT
public:
  Dummy( KHTMLPart *part ) : TQObject( part ) { m_part = part; };

private slots:
  void slotOpenURL( const KURL &url, const KParts::URLArgs &args )
  {
    m_part->browserExtension()->setURLArgs( args );
    m_part->openURL( url );
  }
  void reload()
  {
      KParts::URLArgs args; args.reload = true;
      m_part->browserExtension()->setURLArgs( args );
      m_part->openURL( m_part->url() );
  }
  
  void toggleNavigable(bool s)
  {
      m_part->setCaretMode(s);
  }

  void toggleEditable(bool s)
  {
  kdDebug() << "editable: " << s << endl;
      m_part->setEditable(s);
  }

  void doBenchmark();

  void handleDone();

private:
  KHTMLPart *m_part;
  TQValueList<TQString> filesToBenchmark;
  TQMap<TQString, TQValueList<int> > results;
  int                 benchmarkRun;
  TQTime               loadTimer;

  void nextRun();
};

#endif