summaryrefslogtreecommitdiff
path: root/noncore/settings/sysinfo/benchmarkinfo.cpp
Unidiff
Diffstat (limited to 'noncore/settings/sysinfo/benchmarkinfo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/sysinfo/benchmarkinfo.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/settings/sysinfo/benchmarkinfo.cpp b/noncore/settings/sysinfo/benchmarkinfo.cpp
index ac6e1fa..8de9aa1 100644
--- a/noncore/settings/sysinfo/benchmarkinfo.cpp
+++ b/noncore/settings/sysinfo/benchmarkinfo.cpp
@@ -5,97 +5,97 @@
5** 5**
6** Copyright (C) 2004 Michael Lauer <mickey@vanille.de> 6** Copyright (C) 2004 Michael Lauer <mickey@vanille.de>
7** Inspired by ZBench (C) 2002 Satoshi <af230533@im07.alpha-net.ne.jp> 7** Inspired by ZBench (C) 2002 Satoshi <af230533@im07.alpha-net.ne.jp>
8** 8**
9** This file may be distributed and/or modified under the terms of the 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 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 11** Foundation and appearing in the file LICENSE.GPL included in the
12** packaging of this file. 12** packaging of this file.
13** 13**
14** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 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. 15** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
16** 16**
17**********************************************************************/ 17**********************************************************************/
18 18
19#include "benchmarkinfo.h" 19#include "benchmarkinfo.h"
20 20
21/* OPIE */ 21/* OPIE */
22#include <opie2/odebug.h> 22#include <opie2/odebug.h>
23#include <opie2/ostorageinfo.h> 23#include <opie2/ostorageinfo.h>
24#include <opie2/olistview.h> 24#include <opie2/olistview.h>
25#include <opie2/oresource.h> 25#include <opie2/oresource.h>
26#include <qpe/qpeapplication.h> 26#include <qpe/qpeapplication.h>
27#include <qpe/qcopenvelope_qws.h> 27#include <qpe/qcopenvelope_qws.h>
28#include <qpe/qpedecoration_qws.h> 28#include <qpe/qpedecoration_qws.h>
29#include <qpe/config.h> 29#include <qpe/config.h>
30using namespace Opie::Core; 30using namespace Opie::Core;
31using namespace Opie::Ui; 31using namespace Opie::Ui;
32 32
33/* QT */ 33/* QT */
34#include <qclipboard.h> 34#include <qclipboard.h>
35#include <qcolor.h> 35#include <qcolor.h>
36#include <qcombobox.h> 36#include <qcombobox.h>
37#include <qdirectpainter_qws.h> 37#include <qdirectpainter_qws.h>
38#include <qfile.h> 38#include <qfile.h>
39#include <qtextstream.h> 39#include <qtextstream.h>
40#include <qfiledialog.h> 40#include <qfiledialog.h>
41#include <qlabel.h> 41#include <qlabel.h>
42#include <qlayout.h> 42#include <qlayout.h>
43#include <qpainter.h> 43#include <qpainter.h>
44#include <qpushbutton.h> 44#include <qpushbutton.h>
45#include <qtimer.h> 45#include <qtimer.h>
46#include <qwhatsthis.h> 46#include <qwhatsthis.h>
47 47
48/* STD */ 48/* STD */
49#include <time.h> 49#include <time.h>
50#include <stdio.h> 50#include <stdio.h>
51#include <stdlib.h> 51#include <stdlib.h>
52#include <math.h> 52#include <math.h>
53#if defined (__GNUC__) && (__GNUC__ < 3) 53#if (defined (__GNUC__) && (__GNUC__ < 3)) || defined(__UCLIBC__)
54#define round qRound 54#define round qRound
55#endif 55#endif
56 56
57extern "C" 57extern "C"
58{ 58{
59 void BenchFFT( void ); 59 void BenchFFT( void );
60 double dhry_main( int ); 60 double dhry_main( int );
61} 61}
62 62
63#define DHRYSTONE_RUNS 20000000 63#define DHRYSTONE_RUNS 20000000
64#define TEST_DURATION 3 64#define TEST_DURATION 3
65 65
66//=========================================================================== 66//===========================================================================
67 67
68class BenchmarkPaintWidget : public QWidget 68class BenchmarkPaintWidget : public QWidget
69{ 69{
70 public: 70 public:
71 BenchmarkPaintWidget() : QWidget( 0, "Benchmark Paint Widget", WStyle_Customize|WStyle_StaysOnTop|WPaintUnclipped|WPaintClever ) 71 BenchmarkPaintWidget() : QWidget( 0, "Benchmark Paint Widget", WStyle_Customize|WStyle_StaysOnTop|WPaintUnclipped|WPaintClever )
72 { 72 {
73 resize( QApplication::desktop()->size() ); 73 resize( QApplication::desktop()->size() );
74 show(); 74 show();
75 p.begin( this ); 75 p.begin( this );
76 }; 76 };
77 77
78 ~BenchmarkPaintWidget() 78 ~BenchmarkPaintWidget()
79 { 79 {
80 p.end(); 80 p.end();
81 hide(); 81 hide();
82 }; 82 };
83 83
84 QPainter p; 84 QPainter p;
85}; 85};
86 86
87//=========================================================================== 87//===========================================================================
88 88
89BenchmarkInfo::BenchmarkInfo( QWidget *parent, const char *name, int wFlags ) 89BenchmarkInfo::BenchmarkInfo( QWidget *parent, const char *name, int wFlags )
90 : QWidget( parent, name, wFlags ) 90 : QWidget( parent, name, wFlags )
91{ 91{
92 92
93 setMinimumSize( 200, 150 ); 93 setMinimumSize( 200, 150 );
94 94
95 QVBoxLayout* vb = new QVBoxLayout( this ); 95 QVBoxLayout* vb = new QVBoxLayout( this );
96 vb->setSpacing( 4 ); 96 vb->setSpacing( 4 );
97 vb->setMargin( 4 ); 97 vb->setMargin( 4 );
98 98
99 tests = new OListView( this ); 99 tests = new OListView( this );
100 QWhatsThis::add( tests->viewport(), tr( "This area shows the available tests, the results for which the tests " 100 QWhatsThis::add( tests->viewport(), tr( "This area shows the available tests, the results for which the tests "
101 "have been performed, and comparison values for one selected device. " 101 "have been performed, and comparison values for one selected device. "