summaryrefslogtreecommitdiffstats
path: root/tdehtml/testtdehtml.h
blob: 4fd76d044cdfe2ed6cff1e78b3b34703e5060f3b (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 TQObject
{
  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