compile
[kdegraphics.git] / okular / conf / dlgperformance.cpp
bloba9e777cdb2466e888edfc95260f45424e9d14947
1 /***************************************************************************
2 * Copyright (C) 2006 by Pino Toscano <toscano.pino@tiscali.it> *
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 ***************************************************************************/
10 #include "dlgperformance.h"
12 #include <qfont.h>
13 #include <kiconloader.h>
15 #include "ui_dlgperformancebase.h"
17 DlgPerformance::DlgPerformance( QWidget * parent )
18 : QWidget( parent )
20 m_dlg = new Ui_DlgPerformanceBase();
21 m_dlg->setupUi( this );
23 QFont labelFont = m_dlg->descLabel->font();
24 labelFont.setBold( true );
25 m_dlg->descLabel->setFont( labelFont );
27 m_dlg->cpuLabel->setPixmap( BarIcon( "cpu", 32 ) );
28 // m_dlg->memoryLabel->setPixmap( BarIcon( "kcmmemory", 32 ) ); // TODO: enable again when proper icon is available
30 connect( m_dlg->kcfg_MemoryLevel, SIGNAL( changed( int ) ), this, SLOT( radioGroup_changed( int ) ) );
33 DlgPerformance::~DlgPerformance()
35 delete m_dlg;
38 void DlgPerformance::radioGroup_changed( int which )
40 switch ( which )
42 case 0:
43 m_dlg->descLabel->setText( i18n("Keeps used memory as low as possible. Do not reuse anything. (For systems with low memory.)") );
44 break;
45 case 1:
46 m_dlg->descLabel->setText( i18n("A good compromise between memory usage and speed gain. Preload next page and boost searches. (For systems with 256MB of memory, typically.)") );
47 break;
48 case 2:
49 m_dlg->descLabel->setText( i18n("Keeps everything in memory. Preload next pages. Boost searches. (For systems with more than 512MB of memory.)") );
50 break;
55 #include "dlgperformance.moc"