Changeset View
Changeset View
Standalone View
Standalone View
conf/dlgperformance.cpp
1 | /*************************************************************************** | 1 | /*************************************************************************** | ||
---|---|---|---|---|---|
2 | * Copyright (C) 2006 by Pino Toscano <toscano.pino@tiscali.it> * | 2 | * Copyright (C) 2006 by Pino Toscano <toscano.pino@tiscali.it> * | ||
3 | * * | 3 | * * | ||
4 | * This program is free software; you can redistribute it and/or modify * | 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 * | 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 * | 6 | * the Free Software Foundation; either version 2 of the License, or * | ||
7 | * (at your option) any later version. * | 7 | * (at your option) any later version. * | ||
8 | ***************************************************************************/ | 8 | ***************************************************************************/ | ||
9 | 9 | | |||
10 | #include "dlgperformance.h" | 10 | #include "dlgperformance.h" | ||
11 | 11 | | |||
12 | #include <QButtonGroup> | 12 | #include <QButtonGroup> | ||
13 | #include <QFont> | 13 | #include <QFont> | ||
14 | 14 | | |||
15 | #include <KConfigDialogManager> | 15 | #include <KConfigDialogManager> | ||
16 | #include <KIconLoader> | | |||
17 | 16 | | |||
18 | #include "settings_core.h" | 17 | #include "settings_core.h" | ||
19 | #include "ui_dlgperformancebase.h" | 18 | #include "ui_dlgperformancebase.h" | ||
20 | 19 | | |||
21 | DlgPerformance::DlgPerformance( QWidget * parent ) | 20 | DlgPerformance::DlgPerformance( QWidget * parent ) | ||
22 | : QWidget( parent ) | 21 | : QWidget( parent ) | ||
23 | { | 22 | { | ||
24 | Q_PROPERTY( QButtonGroup checkedId READ checkedId USER true ); | 23 | Q_PROPERTY( QButtonGroup checkedId READ checkedId USER true ); | ||
25 | m_dlg = new Ui_DlgPerformanceBase(); | 24 | m_dlg = new Ui_DlgPerformanceBase(); | ||
26 | m_dlg->setupUi( this ); | 25 | m_dlg->setupUi( this ); | ||
27 | 26 | | |||
28 | QFont labelFont = m_dlg->descLabel->font(); | 27 | QFont labelFont = m_dlg->descLabel->font(); | ||
29 | labelFont.setBold( true ); | 28 | labelFont.setBold( true ); | ||
30 | m_dlg->descLabel->setFont( labelFont ); | 29 | m_dlg->descLabel->setFont( labelFont ); | ||
31 | 30 | | |||
32 | m_dlg->cpuLabel->setPixmap( BarIcon( QStringLiteral("cpu"), 32 ) ); | 31 | m_dlg->cpuLabel->setPixmap( QIcon::fromTheme( QStringLiteral("cpu") ).pixmap( 32 ) ); | ||
33 | // m_dlg->memoryLabel->setPixmap( BarIcon( "kcmmemory", 32 ) ); // TODO: enable again when proper icon is available | 32 | // m_dlg->memoryLabel->setPixmap( QIcon::fromTheme( "kcmmemory" ).pixmap( 32 ) ); // TODO: enable again when proper icon is available | ||
34 | 33 | | |||
35 | m_dlg->memoryLevelGroup->setId(m_dlg->lowRadio, 0); | 34 | m_dlg->memoryLevelGroup->setId(m_dlg->lowRadio, 0); | ||
36 | m_dlg->memoryLevelGroup->setId(m_dlg->normalRadio, 1); | 35 | m_dlg->memoryLevelGroup->setId(m_dlg->normalRadio, 1); | ||
37 | m_dlg->memoryLevelGroup->setId(m_dlg->aggressiveRadio, 2); | 36 | m_dlg->memoryLevelGroup->setId(m_dlg->aggressiveRadio, 2); | ||
38 | m_dlg->memoryLevelGroup->setId(m_dlg->greedyRadio, 3); | 37 | m_dlg->memoryLevelGroup->setId(m_dlg->greedyRadio, 3); | ||
39 | 38 | | |||
40 | 39 | | |||
41 | connect(m_dlg->memoryLevelGroup, static_cast<void(QButtonGroup::*)(int)>(&QButtonGroup::buttonClicked), | 40 | connect(m_dlg->memoryLevelGroup, static_cast<void(QButtonGroup::*)(int)>(&QButtonGroup::buttonClicked), | ||
Show All 29 Lines |