options now. Changed some options inside kpdf.kcfg (KConfigXT configuration description). svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=360658remotes/origin/kpdf-experiments
parent
0f7917bf94
commit
c051a6d137
10 changed files with 240 additions and 119 deletions
@ -1,50 +0,0 @@ |
||||
/***************************************************************************
|
||||
* Copyright (C) 2004 by Enrico Ros <eros.kde@email.it> * |
||||
* * |
||||
* This program is free software; you can redistribute it and/or modify * |
||||
* it under the terms of the GNU General Public License as published by * |
||||
* the Free Software Foundation; either version 2 of the License, or * |
||||
* (at your option) any later version. * |
||||
***************************************************************************/ |
||||
|
||||
#include "settings.h" |
||||
|
||||
|
||||
void DlgAccessibility::init() |
||||
{ |
||||
switch ( Settings::renderMode() ) |
||||
{ |
||||
case Settings::EnumRenderMode::Normal: |
||||
radioNormal->setChecked( true ); |
||||
break; |
||||
case Settings::EnumRenderMode::Inverted: |
||||
radioInverted->setChecked( true ); |
||||
break; |
||||
case Settings::EnumRenderMode::Recolor: |
||||
radioRecolor->setChecked( true ); |
||||
break; |
||||
case Settings::EnumRenderMode::BlackWhite: |
||||
radioContrast->setChecked( true );
|
||||
break; |
||||
} |
||||
} |
||||
|
||||
void DlgAccessibility::radioNormal_toggled( bool on ) |
||||
{ |
||||
if ( on ) Settings::setRenderMode( Settings::EnumRenderMode::Normal ); |
||||
} |
||||
|
||||
void DlgAccessibility::radioInverted_toggled( bool on ) |
||||
{ |
||||
if ( on ) Settings::setRenderMode( Settings::EnumRenderMode::Inverted ); |
||||
} |
||||
|
||||
void DlgAccessibility::radioRecolor_toggled( bool on ) |
||||
{ |
||||
if ( on ) Settings::setRenderMode( Settings::EnumRenderMode::Recolor ); |
||||
} |
||||
|
||||
void DlgAccessibility::radioContrast_toggled( bool on ) |
||||
{ |
||||
if ( on ) Settings::setRenderMode( Settings::EnumRenderMode::BlackWhite ); |
||||
} |
||||
@ -0,0 +1,160 @@ |
||||
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> |
||||
<class>DlgPerformance</class> |
||||
<widget class="QWidget"> |
||||
<property name="name"> |
||||
<cstring>DlgPerformance</cstring> |
||||
</property> |
||||
<property name="geometry"> |
||||
<rect> |
||||
<x>0</x> |
||||
<y>0</y> |
||||
<width>350</width> |
||||
<height>218</height> |
||||
</rect> |
||||
</property> |
||||
<property name="caption"> |
||||
<string>DlgPerformance</string> |
||||
</property> |
||||
<vbox> |
||||
<property name="name"> |
||||
<cstring>unnamed</cstring> |
||||
</property> |
||||
<property name="margin"> |
||||
<number>0</number> |
||||
</property> |
||||
<widget class="QGroupBox"> |
||||
<property name="name"> |
||||
<cstring>groupBox1</cstring> |
||||
</property> |
||||
<property name="title"> |
||||
<string>CPU Usage</string> |
||||
</property> |
||||
<vbox> |
||||
<property name="name"> |
||||
<cstring>unnamed</cstring> |
||||
</property> |
||||
<widget class="QCheckBox"> |
||||
<property name="name"> |
||||
<cstring>kcfg_UseCompositing</cstring> |
||||
</property> |
||||
<property name="text"> |
||||
<string>Enable transparency and other effects (default)</string> |
||||
</property> |
||||
</widget> |
||||
<widget class="QCheckBox"> |
||||
<property name="name"> |
||||
<cstring>kcfg_TempDrawBoundaries</cstring> |
||||
</property> |
||||
<property name="text"> |
||||
<string>(TEMP) DRAW BOUNDARIES</string> |
||||
</property> |
||||
<property name="accel"> |
||||
<string></string> |
||||
</property> |
||||
</widget> |
||||
</vbox> |
||||
</widget> |
||||
<widget class="QButtonGroup"> |
||||
<property name="name"> |
||||
<cstring>kcfg_MemoryLevel</cstring> |
||||
</property> |
||||
<property name="title"> |
||||
<string>Memory Usage</string> |
||||
</property> |
||||
<vbox> |
||||
<property name="name"> |
||||
<cstring>unnamed</cstring> |
||||
</property> |
||||
<widget class="QRadioButton"> |
||||
<property name="name"> |
||||
<cstring>lowRadio</cstring> |
||||
</property> |
||||
<property name="text"> |
||||
<string>Low</string> |
||||
</property> |
||||
</widget> |
||||
<widget class="QRadioButton"> |
||||
<property name="name"> |
||||
<cstring>normalRadio</cstring> |
||||
</property> |
||||
<property name="text"> |
||||
<string>Normal (default)</string> |
||||
</property> |
||||
</widget> |
||||
<widget class="QRadioButton"> |
||||
<property name="name"> |
||||
<cstring>aggressiveRadio</cstring> |
||||
</property> |
||||
<property name="text"> |
||||
<string>Aggressive</string> |
||||
</property> |
||||
</widget> |
||||
<widget class="QLabel"> |
||||
<property name="name"> |
||||
<cstring>descLabel</cstring> |
||||
</property> |
||||
<property name="text"> |
||||
<string>...</string> |
||||
</property> |
||||
<property name="textFormat"> |
||||
<enum>PlainText</enum> |
||||
</property> |
||||
<property name="alignment"> |
||||
<set>WordBreak|AlignVCenter</set> |
||||
</property> |
||||
</widget> |
||||
</vbox> |
||||
</widget> |
||||
<spacer> |
||||
<property name="name"> |
||||
<cstring>spacer3</cstring> |
||||
</property> |
||||
<property name="orientation"> |
||||
<enum>Vertical</enum> |
||||
</property> |
||||
<property name="sizeType"> |
||||
<enum>Expanding</enum> |
||||
</property> |
||||
<property name="sizeHint"> |
||||
<size> |
||||
<width>20</width> |
||||
<height>90</height> |
||||
</size> |
||||
</property> |
||||
</spacer> |
||||
</vbox> |
||||
</widget> |
||||
<connections> |
||||
<connection> |
||||
<sender>lowRadio</sender> |
||||
<signal>toggled(bool)</signal> |
||||
<receiver>DlgPerformance</receiver> |
||||
<slot>lowRadio_toggled(bool)</slot> |
||||
</connection> |
||||
<connection> |
||||
<sender>normalRadio</sender> |
||||
<signal>toggled(bool)</signal> |
||||
<receiver>DlgPerformance</receiver> |
||||
<slot>normalRadio_toggled(bool)</slot> |
||||
</connection> |
||||
<connection> |
||||
<sender>aggressiveRadio</sender> |
||||
<signal>toggled(bool)</signal> |
||||
<receiver>DlgPerformance</receiver> |
||||
<slot>aggressiveRadio_toggled(bool)</slot> |
||||
</connection> |
||||
</connections> |
||||
<includes> |
||||
<include location="global" impldecl="in implementation">kdialog.h</include> |
||||
<include location="local" impldecl="in implementation">dlgperformance.ui.h</include> |
||||
</includes> |
||||
<slots> |
||||
<slot>lowRadio_toggled( bool on )</slot> |
||||
<slot>normalRadio_toggled( bool on )</slot> |
||||
<slot>aggressiveRadio_toggled( bool on )</slot> |
||||
</slots> |
||||
<functions> |
||||
<function access="private">init()</function> |
||||
</functions> |
||||
<layoutdefaults spacing="6" margin="11"/> |
||||
</UI> |
||||
@ -0,0 +1,37 @@ |
||||
/****************************************************************************
|
||||
** ui.h extension file, included from the uic-generated form implementation. |
||||
** |
||||
** If you want to add, delete, or rename functions or slots, use |
||||
** Qt Designer to update this file, preserving your code. |
||||
** |
||||
** You should not define a constructor or destructor in this file. |
||||
** Instead, write your code in functions called init() and destroy(). |
||||
** These will automatically be called by the form's constructor and |
||||
** destructor. |
||||
*****************************************************************************/ |
||||
|
||||
#include <klocale.h> |
||||
|
||||
|
||||
void DlgPerformance::init() |
||||
{ |
||||
QFont labelFont = descLabel->font(); |
||||
labelFont.setBold( true ); |
||||
descLabel->setFont( labelFont ); |
||||
} |
||||
|
||||
void DlgPerformance::lowRadio_toggled( bool on ) |
||||
{ |
||||
if ( on ) descLabel->setText( i18n("Keeps used memory as low as possible. Don't reuse anything. (for systems with low memory)") ); |
||||
} |
||||
|
||||
void DlgPerformance::normalRadio_toggled( bool on ) |
||||
{ |
||||
if ( on ) 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)") ); |
||||
} |
||||
|
||||
void DlgPerformance::aggressiveRadio_toggled( bool on ) |
||||
{ |
||||
if ( on ) descLabel->setText( i18n("Keeps everything in mempory. Preload next pages. Boost searches. (for systems with more than 512MB of memory)") ); |
||||
} |
||||
|
||||
Loading…
Reference in new issue