Add texture filter combobox to advanced gl options

svn path=/trunk/KDE/kdebase/workspace/; revision=704350
This commit is contained in:
Rivo Laks 2007-08-24 17:34:09 +00:00
parent 22d72c572a
commit 5fce729794
2 changed files with 35 additions and 2 deletions

View file

@ -30,6 +30,7 @@ KWinAdvancedCompositingOptions::KWinAdvancedCompositingOptions(QWidget* parent,
connect(ui.compositingType, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
connect(ui.glMode, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
connect(ui.glTextureFilter, SIGNAL(currentIndexChanged(int)), this, SLOT(changed()));
connect(ui.glDirect, SIGNAL(toggled(bool)), this, SLOT(changed()));
connect(ui.glVSync, SIGNAL(toggled(bool)), this, SLOT(changed()));
@ -57,6 +58,7 @@ void KWinAdvancedCompositingOptions::load()
ui.compositingType->setCurrentIndex((backend == "XRender") ? 1 : 0);
QString glMode = config.readEntry("GLMode", "TFP");
ui.glMode->setCurrentIndex((glMode == "TFP") ? 0 : ((glMode == "SHM") ? 1 : 2));
ui.glTextureFilter->setCurrentIndex(config.readEntry("GLTextureFilter", 1));
ui.glDirect->setChecked(config.readEntry("GLDirect", true));
ui.glVSync->setChecked(config.readEntry("GLVSync", true));
}
@ -72,6 +74,7 @@ void KWinAdvancedCompositingOptions::save()
config.writeEntry("Backend", (ui.compositingType->currentIndex() == 0) ? "OpenGL" : "XRender");
QString glModes[] = { "TFP", "SHM", "Fallback" };
config.writeEntry("GLMode", glModes[ui.glMode->currentIndex()]);
config.writeEntry("GLTextureFilter", ui.glTextureFilter->currentIndex());
config.writeEntry("GLDirect", ui.glDirect->isChecked());
config.writeEntry("GLVSync", ui.glVSync->isChecked());

View file

@ -71,6 +71,36 @@
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" >
<item>
<widget class="QLabel" name="label_3" >
<property name="text" >
<string>Texture filter:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="glTextureFilter" >
<item>
<property name="text" >
<string>Nearest (fastest)</string>
</property>
</item>
<item>
<property name="text" >
<string>Bilinear</string>
</property>
</item>
<item>
<property name="text" >
<string>Trilinear (best quality)</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QCheckBox" name="glDirect" >
<property name="text" >
@ -95,8 +125,8 @@
</property>
<property name="sizeHint" >
<size>
<width>20</width>
<height>31</height>
<width>382</width>
<height>101</height>
</size>
</property>
</spacer>