summaryrefslogtreecommitdiff
path: root/noncore/settings/sysinfo/benchmarkinfo.h
Unidiff
Diffstat (limited to 'noncore/settings/sysinfo/benchmarkinfo.h') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sysinfo/benchmarkinfo.h72
1 files changed, 72 insertions, 0 deletions
diff --git a/noncore/settings/sysinfo/benchmarkinfo.h b/noncore/settings/sysinfo/benchmarkinfo.h
new file mode 100644
index 0000000..2c7fa40
--- a/dev/null
+++ b/noncore/settings/sysinfo/benchmarkinfo.h
@@ -0,0 +1,72 @@
1/**********************************************************************
2** BenchmarkInfo
3**
4** A benchmark for Qt/Embedded
5**
6** Copyright (C) 2004 Michael Lauer <mickey@vanille.de>
7** Inspired by ZBench (C) 2002 Satoshi <af230533@im07.alpha-net.ne.jp>
8**
9** This file may be distributed and/or modified under the terms of the
10** GNU General Public License version 2 as published by the Free Software
11** Foundation and appearing in the file LICENSE.GPL included in the
12** packaging of this file.
13**
14** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
15** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
16**
17**********************************************************************/
18
19#include <qwidget.h>
20#include <qdialog.h>
21
22class QClipboard;
23class QCheckListItem;
24class QPushButton;
25class QListView;
26
27//#define INT_TEST_ITERATIONS 50
28//#define CHAR_TEST_ITERATIONS 15000
29//#define DRAW_TEST_ITERATIONS 5000
30
31#define INT_TEST_ITERATIONS 50
32#define CHAR_TEST_ITERATIONS 15000
33#define DRAW_TEST_ITERATIONS 5000
34
35class BenchmarkInfo : public QWidget
36{
37 Q_OBJECT
38
39public:
40 BenchmarkInfo( QWidget *parent = 0, const char *name = 0, int wFlags = 0 );
41 ~BenchmarkInfo();
42
43 QCheckListItem* test_alu;
44 QCheckListItem* test_fpu;
45 QCheckListItem* test_txt;
46 QCheckListItem* test_gfx;
47 QCheckListItem* test_ram;
48 QCheckListItem* test_sd;
49 QCheckListItem* test_cf;
50
51 bool main_rd;
52 bool main_wt;
53 bool sd_rd;
54 bool sd_wt;
55 bool cf_rd;
56 bool cf_wt;
57
58 QClipboard* clb;
59
60 QListView* tests;
61 QPushButton* startButton;
62
63 void benchInteger() const;
64 void paintChar();
65 void paintLineRect();
66 bool writeFile( const QString& );
67 bool readFile( const QString& );
68
69private slots:
70 void run();
71
72};