summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-25 00:39:59 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-25 00:39:59 +0000
commitfa5d50518e81eb42a8220c9c09abf01029d79091 (patch)
treed98138dc70e9d3a0c0c20ae2bc02432c5638010a
parent9cff39bc34d1f0579b2f9841f55c6cebc87fed57 (diff)
downloadtdebase-fa5d50518e81eb42a8220c9c09abf01029d79091.tar.gz
tdebase-fa5d50518e81eb42a8220c9c09abf01029d79091.zip
Add gamma configuration tab to display control module
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1249377 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r--kcontrol/displayconfig/CMakeLists.txt2
-rw-r--r--kcontrol/displayconfig/displayconfig.cpp266
-rw-r--r--kcontrol/displayconfig/displayconfig.h11
-rw-r--r--kcontrol/displayconfig/displayconfigbase.ui290
-rw-r--r--kcontrol/displayconfig/pics/CMakeLists.txt23
-rw-r--r--kcontrol/displayconfig/pics/gamma1.4.gifbin0 -> 1878 bytes
-rw-r--r--kcontrol/displayconfig/pics/gamma1.4.pngbin0 -> 490 bytes
-rw-r--r--kcontrol/displayconfig/pics/gamma1.6.gifbin0 -> 1877 bytes
-rw-r--r--kcontrol/displayconfig/pics/gamma1.6.pngbin0 -> 486 bytes
-rw-r--r--kcontrol/displayconfig/pics/gamma1.8.gifbin0 -> 1877 bytes
-rw-r--r--kcontrol/displayconfig/pics/gamma1.8.pngbin0 -> 481 bytes
-rw-r--r--kcontrol/displayconfig/pics/gamma2.0.gifbin0 -> 1877 bytes
-rw-r--r--kcontrol/displayconfig/pics/gamma2.0.pngbin0 -> 488 bytes
-rw-r--r--kcontrol/displayconfig/pics/gamma2.2.gifbin0 -> 1875 bytes
-rw-r--r--kcontrol/displayconfig/pics/gamma2.2.pngbin0 -> 493 bytes
-rw-r--r--kcontrol/displayconfig/pics/gamma2.4.gifbin0 -> 1883 bytes
-rw-r--r--kcontrol/displayconfig/pics/gamma2.4.pngbin0 -> 489 bytes
17 files changed, 587 insertions, 5 deletions
diff --git a/kcontrol/displayconfig/CMakeLists.txt b/kcontrol/displayconfig/CMakeLists.txt
index a96b60197..9f5192b9e 100644
--- a/kcontrol/displayconfig/CMakeLists.txt
+++ b/kcontrol/displayconfig/CMakeLists.txt
@@ -9,6 +9,8 @@
#
#################################################
+add_subdirectory( pics )
+
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}
diff --git a/kcontrol/displayconfig/displayconfig.cpp b/kcontrol/displayconfig/displayconfig.cpp
index 98285276a..3498327b0 100644
--- a/kcontrol/displayconfig/displayconfig.cpp
+++ b/kcontrol/displayconfig/displayconfig.cpp
@@ -43,6 +43,7 @@
#include <kurlrequester.h>
#include <kcmoduleloader.h>
#include <kgenericfactory.h>
+#include <kstandarddirs.h>
#include <unistd.h>
#include <ksimpleconfig.h>
@@ -642,18 +643,84 @@ void KDisplayConfig::moveMonitor(DraggableMonitor* monitor, int realx, int realy
monitor->move(base->monitorPhyArrange->width(), base->monitorPhyArrange->height());
}
+// int KDisplayConfig::realResolutionSliderValue() {
+// return base->resolutionSlider->maxValue() - base->resolutionSlider->value();
+// }
+//
+// void KDisplayConfig::setRealResolutionSliderValue(int index) {
+// base->resolutionSlider->setValue(base->resolutionSlider->maxValue() - index);
+// }
+
+TQStringList sortResolutions(TQStringList unsorted) {
+ int i;
+ int xres;
+ int largest;
+ TQStringList sorted;
+ TQStringList::Iterator it;
+ TQStringList::Iterator largestit;
+
+ while (unsorted.count()) {
+ largest = -1;
+ for ( it = unsorted.begin(); it != unsorted.end(); ++it ) {
+ TQString resolutionstring = *it;
+ int separator_pos = resolutionstring.find(" x ");
+ TQString x_res_string = resolutionstring.left(separator_pos);
+ TQString y_res_string = resolutionstring.right(resolutionstring.length()-separator_pos-3);
+ xres = x_res_string.toInt();
+ if (xres > largest) {
+ largest = xres;
+ largestit = it;
+ }
+ }
+ sorted.prepend(*largestit);
+ unsorted.remove(largestit);
+ }
+
+ return sorted;
+}
+
int KDisplayConfig::realResolutionSliderValue() {
- return base->resolutionSlider->maxValue() - base->resolutionSlider->value();
+ int i;
+ int j;
+ SingleScreenData *screendata;
+
+ screendata = m_screenInfoArray.at(base->monitorDisplaySelectDD->currentItem());
+ TQStringList sortedList = screendata->resolutions;
+ sortedList = sortResolutions(sortedList);
+
+ j=0;
+ for (i=0; i<screendata->resolutions.count(); i++) {
+ if ((*sortedList.at(base->resolutionSlider->value())) == (*screendata->resolutions.at(i))) {
+ j=i;
+ }
+ }
+
+ return j;
}
void KDisplayConfig::setRealResolutionSliderValue(int index) {
- base->resolutionSlider->setValue(base->resolutionSlider->maxValue() - index);
+ int i;
+ int j;
+ SingleScreenData *screendata;
+
+ screendata = m_screenInfoArray.at(base->monitorDisplaySelectDD->currentItem());
+ TQStringList sortedList = screendata->resolutions;
+ sortedList = sortResolutions(sortedList);
+
+ j=0;
+ for (i=0; i<screendata->resolutions.count(); i++) {
+ if ((*sortedList.at(i)) == (*screendata->resolutions.at(index))) {
+ j=i;
+ }
+ }
+
+ base->resolutionSlider->setValue(j);
}
/**** KDisplayConfig ****/
KDisplayConfig::KDisplayConfig(TQWidget *parent, const char *name, const TQStringList &)
- : KCModule(KDisplayCFactory::instance(), parent, name), m_randrsimple(0)
+ : KCModule(KDisplayCFactory::instance(), parent, name), m_randrsimple(0), m_gammaApplyTimer(0)
{
m_randrsimple = new KRandrSimpleAPI();
@@ -669,6 +736,9 @@ KDisplayConfig::KDisplayConfig(TQWidget *parent, const char *name, const TQStrin
about->addAuthor("Timothy Pearson", 0, "kb9vqf@pearsoncomputing.net");
setAboutData( about );
+ m_gammaApplyTimer = new TQTimer();
+ connect(m_gammaApplyTimer, SIGNAL(timeout()), this, SLOT(applyGamma()));
+
base = new DisplayConfigBase(this);
layout->add(base);
@@ -678,12 +748,19 @@ KDisplayConfig::KDisplayConfig(TQWidget *parent, const char *name, const TQStrin
connect(base->systemEnableSupport, TQT_SIGNAL(clicked()), TQT_SLOT(changed()));
connect(base->systemEnableSupport, TQT_SIGNAL(clicked()), TQT_SLOT(processLockoutControls()));
connect(base->monitorDisplaySelectDD, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
+ connect(base->gammamonitorDisplaySelectDD, TQT_SIGNAL(activated(int)), TQT_SLOT(changed()));
+ connect(base->gammaTargetSelectDD, TQT_SIGNAL(activated(int)), TQT_SLOT(gammaTargetChanged(int)));
connect(base->rotationSelectDD, TQT_SIGNAL(activated(int)), TQT_SLOT(rotationInfoChanged()));
connect(base->refreshRateDD, TQT_SIGNAL(activated(int)), TQT_SLOT(refreshInfoChanged()));
connect(base->orientationHFlip, TQT_SIGNAL(clicked()), TQT_SLOT(rotationInfoChanged()));
connect(base->orientationVFlip, TQT_SIGNAL(clicked()), TQT_SLOT(rotationInfoChanged()));
connect(base->resolutionSlider, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(resolutionSliderChanged(int)));
+ connect(base->gammaAllSlider, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(gammaAllSliderChanged(int)));
+ connect(base->gammaRedSlider, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(gammaRedSliderChanged(int)));
+ connect(base->gammaGreenSlider, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(gammaGreenSliderChanged(int)));
+ connect(base->gammaBlueSlider, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(gammaBlueSliderChanged(int)));
connect(base->monitorDisplaySelectDD, TQT_SIGNAL(activated(int)), TQT_SLOT(selectScreen(int)));
+ connect(base->gammamonitorDisplaySelectDD, TQT_SIGNAL(activated(int)), TQT_SLOT(gammaselectScreen(int)));
connect(base->monitorPhyArrange, TQT_SIGNAL(workspaceRelayoutNeeded()), this, TQT_SLOT(layoutDragDropDisplay()));
connect(base->isPrimaryMonitorCB, TQT_SIGNAL(clicked()), TQT_SLOT(changed()));
@@ -708,6 +785,10 @@ KDisplayConfig::KDisplayConfig(TQWidget *parent, const char *name, const TQStrin
KDisplayConfig::~KDisplayConfig()
{
delete systemconfig;
+ if (m_gammaApplyTimer) {
+ delete m_gammaApplyTimer;
+ m_gammaApplyTimer = 0;
+ }
if (m_randrsimple) {
delete m_randrsimple;
m_randrsimple = 0;
@@ -750,7 +831,7 @@ void KDisplayConfig::identifyMonitors () {
ScreenInfo *randr_screen_info;
XRROutputInfo *output_info;
- randr_display = XOpenDisplay(NULL);
+ randr_display = qt_xdisplay();
randr_screen_info = m_randrsimple->read_screen_info(randr_display);
for (i = 0; i < randr_screen_info->n_output; i++) {
@@ -774,6 +855,8 @@ void KDisplayConfig::identifyMonitors () {
KDialog::centerOnScreen(idWidget, i);
TQTimer::singleShot(3000, idWidget, SLOT(close()));
}
+
+ m_randrsimple->freeScreenInfoStructure(randr_screen_info);
}
void KDisplayConfig::deleteProfile () {
@@ -803,6 +886,7 @@ void KDisplayConfig::selectProfile (int slotNumber) {
void KDisplayConfig::selectScreen (int slotNumber) {
base->monitorDisplaySelectDD->setCurrentItem(slotNumber);
+ base->gammamonitorDisplaySelectDD->setCurrentItem(slotNumber);
updateDisplayedInformation();
}
@@ -920,6 +1004,12 @@ void KDisplayConfig::refreshDisplayedInformation () {
base->monitorDisplaySelectDD->insertItem(screendata->screenFriendlyName, i);
}
base->monitorDisplaySelectDD->setCurrentItem(currentScreenIndex);
+ base->gammamonitorDisplaySelectDD->clear();
+ for (i=0;i<numberOfScreens;i++) {
+ screendata = m_screenInfoArray.at(i);
+ base->gammamonitorDisplaySelectDD->insertItem(screendata->screenFriendlyName, i);
+ }
+ base->gammamonitorDisplaySelectDD->setCurrentItem(currentScreenIndex);
updateDisplayedInformation();
@@ -956,7 +1046,7 @@ void KDisplayConfig::updateDragDropDisplay() {
for (j=0;j<2;j++) {
for (i=0;i<numberOfScreens;i++) {
screendata = m_screenInfoArray.at(i);
- if (((j==0) && (screendata->is_primary==true)) || (j==1)) { // This ensures that the primary monitor is always the first one created and placed on the configuration widget
+ if (((j==0) && (screendata->is_primary==true)) || ((j==1) && (screendata->is_primary==false))) { // This ensures that the primary monitor is always the first one created and placed on the configuration widget
TQString rotationDesired = *screendata->rotations.at(screendata->current_rotation_index);
bool isvisiblyrotated = ((rotationDesired == "Rotate 90 degrees") || (rotationDesired == "Rotate 270 degrees"));
DraggableMonitor *m = new DraggableMonitor( base->monitorPhyArrange, 0, WStyle_Customize | WDestructiveClose | WStyle_NoBorder | WX11BypassWM );
@@ -1080,18 +1170,173 @@ int KDisplayConfig::findScreenIndex(TQString screenName) {
}
+void KDisplayConfig::setGammaLabels() {
+ SingleScreenData *screendata;
+
+ screendata = m_screenInfoArray.at(base->gammamonitorDisplaySelectDD->currentItem());
+
+ // Round off the gammas to one decimal place
+ screendata->gamma_red = floorf(screendata->gamma_red * 10 + 0.5) / 10;
+ screendata->gamma_green = floorf(screendata->gamma_green * 10 + 0.5) / 10;
+ screendata->gamma_blue = floorf(screendata->gamma_blue * 10 + 0.5) / 10;
+
+ // Set the labels
+ base->gammaAllLabel->setText(TQString("%1").tqarg(((float)base->gammaAllSlider->value())/10.0, 0, 'f', 1));
+ base->gammaRedLabel->setText(TQString("%1").tqarg(((float)base->gammaRedSlider->value())/10.0, 0, 'f', 1));
+ base->gammaGreenLabel->setText(TQString("%1").tqarg(((float)base->gammaGreenSlider->value())/10.0, 0, 'f', 1));
+ base->gammaBlueLabel->setText(TQString("%1").tqarg(((float)base->gammaBlueSlider->value())/10.0, 0, 'f', 1));
+}
+
+void KDisplayConfig::gammaSetAverageAllSlider() {
+ float average_gamma;
+ SingleScreenData *screendata;
+
+ screendata = m_screenInfoArray.at(base->gammamonitorDisplaySelectDD->currentItem());
+ average_gamma = (screendata->gamma_red+screendata->gamma_green+screendata->gamma_blue)/3.0;
+ average_gamma = floorf(average_gamma* 10 + 0.5) / 10; // Round off the gamma to one decimal place
+ base->gammaAllSlider->setValue(average_gamma*10.0);
+}
+
+void KDisplayConfig::gammaselectScreen (int slotNumber) {
+ SingleScreenData *screendata;
+
+ base->gammaAllSlider->blockSignals(true);
+ base->gammaRedSlider->blockSignals(true);
+ base->gammaGreenSlider->blockSignals(true);
+ base->gammaBlueSlider->blockSignals(true);
+
+ screendata = m_screenInfoArray.at(base->gammamonitorDisplaySelectDD->currentItem());
+ base->gammaRedSlider->setValue(screendata->gamma_red*10.0);
+ base->gammaGreenSlider->setValue(screendata->gamma_green*10.0);
+ base->gammaBlueSlider->setValue(screendata->gamma_blue*10.0);
+ gammaSetAverageAllSlider();
+ setGammaLabels();
+
+ base->gammaAllSlider->blockSignals(false);
+ base->gammaRedSlider->blockSignals(false);
+ base->gammaGreenSlider->blockSignals(false);
+ base->gammaBlueSlider->blockSignals(false);
+}
+
+void KDisplayConfig::gammaAllSliderChanged(int index) {
+ SingleScreenData *screendata;
+
+ base->gammaAllSlider->blockSignals(true);
+ base->gammaRedSlider->blockSignals(true);
+ base->gammaGreenSlider->blockSignals(true);
+ base->gammaBlueSlider->blockSignals(true);
+
+ screendata = m_screenInfoArray.at(base->gammamonitorDisplaySelectDD->currentItem());
+
+ base->gammaRedSlider->setValue(base->gammaAllSlider->value());
+ base->gammaGreenSlider->setValue(base->gammaAllSlider->value());
+ base->gammaBlueSlider->setValue(base->gammaAllSlider->value());
+ setGammaLabels();
+
+ screendata->gamma_red = ((float)base->gammaAllSlider->value())/10.0;
+ screendata->gamma_green = ((float)base->gammaAllSlider->value())/10.0;
+ screendata->gamma_blue = ((float)base->gammaAllSlider->value())/10.0;
+
+ m_gammaApplyTimer->start(10, TRUE);
+
+ base->gammaAllSlider->blockSignals(false);
+ base->gammaRedSlider->blockSignals(false);
+ base->gammaGreenSlider->blockSignals(false);
+ base->gammaBlueSlider->blockSignals(false);
+
+ changed();
+}
+
+void KDisplayConfig::gammaRedSliderChanged(int index) {
+ SingleScreenData *screendata;
+
+ base->gammaAllSlider->blockSignals(true);
+ base->gammaRedSlider->blockSignals(true);
+ base->gammaGreenSlider->blockSignals(true);
+ base->gammaBlueSlider->blockSignals(true);
+
+ screendata = m_screenInfoArray.at(base->gammamonitorDisplaySelectDD->currentItem());
+ screendata->gamma_red = ((float)index)/10.0;
+ gammaSetAverageAllSlider();
+ setGammaLabels();
+ m_gammaApplyTimer->start(10, TRUE);
+
+ base->gammaAllSlider->blockSignals(false);
+ base->gammaRedSlider->blockSignals(false);
+ base->gammaGreenSlider->blockSignals(false);
+ base->gammaBlueSlider->blockSignals(false);
+
+ changed();
+}
+
+void KDisplayConfig::gammaGreenSliderChanged(int index) {
+ SingleScreenData *screendata;
+
+ base->gammaAllSlider->blockSignals(true);
+ base->gammaRedSlider->blockSignals(true);
+ base->gammaGreenSlider->blockSignals(true);
+ base->gammaBlueSlider->blockSignals(true);
+
+ screendata = m_screenInfoArray.at(base->gammamonitorDisplaySelectDD->currentItem());
+ screendata->gamma_green = ((float)index)/10.0;
+ gammaSetAverageAllSlider();
+ setGammaLabels();
+ m_gammaApplyTimer->start(10, TRUE);
+
+ base->gammaAllSlider->blockSignals(false);
+ base->gammaRedSlider->blockSignals(false);
+ base->gammaGreenSlider->blockSignals(false);
+ base->gammaBlueSlider->blockSignals(false);
+
+ changed();
+}
+
+void KDisplayConfig::gammaBlueSliderChanged(int index) {
+ SingleScreenData *screendata;
+
+ base->gammaAllSlider->blockSignals(true);
+ base->gammaRedSlider->blockSignals(true);
+ base->gammaGreenSlider->blockSignals(true);
+ base->gammaBlueSlider->blockSignals(true);
+
+ screendata = m_screenInfoArray.at(base->gammamonitorDisplaySelectDD->currentItem());
+ screendata->gamma_blue = ((float)index)/10.0;
+ gammaSetAverageAllSlider();
+ setGammaLabels();
+ m_gammaApplyTimer->start(10, TRUE);
+
+ base->gammaAllSlider->blockSignals(false);
+ base->gammaRedSlider->blockSignals(false);
+ base->gammaGreenSlider->blockSignals(false);
+ base->gammaBlueSlider->blockSignals(false);
+
+ changed();
+}
+
+void KDisplayConfig::applyGamma() {
+ m_randrsimple->applySystemwideDisplayGamma(m_screenInfoArray);
+}
+
+void KDisplayConfig::gammaTargetChanged (int slotNumber) {
+ TQPixmap gammaPixmap( locate("data", TQString("kcontrol/pics/gamma%1.png").arg(base->gammaTargetSelectDD->text(slotNumber))) );
+ base->gammaTestImage->setBackgroundPixmap( gammaPixmap );
+}
+
void KDisplayConfig::processLockoutControls() {
if (getuid() != 0 || !systemconfig->checkConfigFilesWritable( true )) {
base->globalTab->setEnabled(false);
base->resolutionTab->setEnabled(false);
+ base->gammaTab->setEnabled(false);
}
else {
base->globalTab->setEnabled(true);
if (base->systemEnableSupport->isChecked()) {
base->resolutionTab->setEnabled(true);
+ base->gammaTab->setEnabled(true);
}
else {
base->resolutionTab->setEnabled(false);
+ base->gammaTab->setEnabled(false);
}
}
@@ -1133,6 +1378,17 @@ void KDisplayConfig::load(bool useDefaults )
refreshDisplayedInformation();
+ gammaselectScreen(base->gammamonitorDisplaySelectDD->currentItem());
+ base->gammaTargetSelectDD->clear();
+ base->gammaTargetSelectDD->insertItem("1.4", 0);
+ base->gammaTargetSelectDD->insertItem("1.6", 1);
+ base->gammaTargetSelectDD->insertItem("1.8", 2);
+ base->gammaTargetSelectDD->insertItem("2.0", 3);
+ base->gammaTargetSelectDD->insertItem("2.2", 4);
+ base->gammaTargetSelectDD->insertItem("2.4", 5);
+ base->gammaTargetSelectDD->setCurrentItem(4);
+ gammaTargetChanged(4);
+
emit changed(useDefaults);
}
diff --git a/kcontrol/displayconfig/displayconfig.h b/kcontrol/displayconfig/displayconfig.h
index 835f1209a..cddb8186e 100644
--- a/kcontrol/displayconfig/displayconfig.h
+++ b/kcontrol/displayconfig/displayconfig.h
@@ -91,6 +91,10 @@ private:
bool applyMonitorLayoutRules(void);
bool applyMonitorLayoutRules(DraggableMonitor* primary_monitor);
void updateDraggableMonitorInformationInternal (int, bool);
+ TQTimer* m_gammaApplyTimer;
+ void gammaSetAverageAllSlider();
+ void setGammaLabels();
+ void generateSortedResolutions();
private slots:
void selectProfile (int slotNumber);
@@ -114,6 +118,13 @@ private slots:
void identifyMonitors (void);
void rescanHardware (void);
void reloadProfile (void);
+ void gammaAllSliderChanged(int index);
+ void gammaRedSliderChanged(int index);
+ void gammaGreenSliderChanged(int index);
+ void gammaBlueSliderChanged(int index);
+ void applyGamma();
+ void gammaselectScreen (int slotNumber);
+ void gammaTargetChanged (int slotNumber);
};
#endif
diff --git a/kcontrol/displayconfig/displayconfigbase.ui b/kcontrol/displayconfig/displayconfigbase.ui
index cbffc91fd..a0d73f4e9 100644
--- a/kcontrol/displayconfig/displayconfigbase.ui
+++ b/kcontrol/displayconfig/displayconfigbase.ui
@@ -302,6 +302,296 @@
</spacer>
</grid>
</widget>
+ <widget class="TQWidget">
+ <property name="name">
+ <cstring>gammaTab</cstring>
+ </property>
+ <attribute name="title">
+ <string>Brightness and Gamma</string>
+ </attribute>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <grid>
+ <property name="name">
+ <cstring>unnamed</cstring>
+ </property>
+ <widget class="TQLabel" row="0" column="0" colspan="1">
+ <property name="name">
+ <cstring>textLabel7_4</cstring>
+ </property>
+ <property name="text">
+ <string>Display:</string>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="1" column="0" colspan="1">
+ <property name="name">
+ <cstring>gammamonitorDisplaySelectDD</cstring>
+ </property>
+ </widget>
+ <widget class="TQGroupBox" row="2" column="0">
+ <property name="name">
+ <cstring>groupGamma</cstring>
+ </property>
+ <property name="title">
+ <string>Gamma</string>
+ </property>
+ <grid>
+ <widget class="TQGroupBox" row="0" column="0" colspan="1">
+ <property name="name">
+ <cstring>groupGammaImages</cstring>
+ </property>
+ <property name="title">
+ <string>Visual Calibration Aid</string>
+ </property>
+ <grid>
+ <widget class="TQWidget" row="0" column="0" colspan="2">
+ <property name="name">
+ <cstring>gammaTestImage</cstring>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>305</width>
+ <height>105</height>
+ </size>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>305</width>
+ <height>105</height>
+ </size>
+ </property>
+ </widget>
+ <widget class="TQLabel" row="1" column="0" colspan="1">
+ <property name="name">
+ <cstring>textLabel7_4</cstring>
+ </property>
+ <property name="text">
+ <string>Target gamma:</string>
+ </property>
+ </widget>
+ <widget class="KComboBox" row="1" column="1" colspan="1">
+ <property name="name">
+ <cstring>gammaTargetSelectDD</cstring>
+ </property>
+ </widget>
+ <spacer row="0" column="2">
+ <property name="name" stdset="0">
+ <cstring>Spacer6</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="tqsizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <spacer row="1" column="2">
+ <property name="name" stdset="0">
+ <cstring>Spacer7</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="tqsizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+ </widget>
+ <widget class="TQGroupBox" row="1" column="0" colspan="1">
+ <property name="name">
+ <cstring>groupHardware</cstring>
+ </property>
+ <property name="title">
+ <string>Hardware Gamma Control</string>
+ </property>
+ <grid>
+ <widget class="TQLabel" row="0" column="0">
+ <property name="name">
+ <cstring>textLabel7_0</cstring>
+ </property>
+ <property name="text">
+ <string>All</string>
+ </property>
+ </widget>
+ <widget class="TQSlider" row="0" column="1" colspan="1">
+ <property name="name">
+ <cstring>gammaAllSlider</cstring>
+ </property>
+ <property name="maxValue">
+ <number>30</number>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="tickmarks">
+ <enum>Below</enum>
+ </property>
+ <property name="tickInterval">
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="TQLabel" row="0" column="2">
+ <property name="name">
+ <cstring>gammaAllLabel</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="TQLabel" row="1" column="0">
+ <property name="name">
+ <cstring>textLabel7_1</cstring>
+ </property>
+ <property name="text">
+ <string>Red</string>
+ </property>
+ </widget>
+ <widget class="TQSlider" row="1" column="1" colspan="1">
+ <property name="name">
+ <cstring>gammaRedSlider</cstring>
+ </property>
+ <property name="maxValue">
+ <number>30</number>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="tickmarks">
+ <enum>Below</enum>
+ </property>
+ <property name="tickInterval">
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="TQLabel" row="1" column="2">
+ <property name="name">
+ <cstring>gammaRedLabel</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="TQLabel" row="2" column="0">
+ <property name="name">
+ <cstring>textLabel7_2</cstring>
+ </property>
+ <property name="text">
+ <string>Green</string>
+ </property>
+ </widget>
+ <widget class="TQSlider" row="2" column="1" colspan="1">
+ <property name="name">
+ <cstring>gammaGreenSlider</cstring>
+ </property>
+ <property name="maxValue">
+ <number>30</number>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="tickmarks">
+ <enum>Below</enum>
+ </property>
+ <property name="tickInterval">
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="TQLabel" row="2" column="2">
+ <property name="name">
+ <cstring>gammaGreenLabel</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ <widget class="TQLabel" row="3" column="0">
+ <property name="name">
+ <cstring>textLabel7_3</cstring>
+ </property>
+ <property name="text">
+ <string>Blue</string>
+ </property>
+ </widget>
+ <widget class="TQSlider" row="3" column="1" colspan="1">
+ <property name="name">
+ <cstring>gammaBlueSlider</cstring>
+ </property>
+ <property name="maxValue">
+ <number>30</number>
+ </property>
+ <property name="orientation">
+ <enum>Horizontal</enum>
+ </property>
+ <property name="tickmarks">
+ <enum>Below</enum>
+ </property>
+ <property name="tickInterval">
+ <number>1</number>
+ </property>
+ </widget>
+ <widget class="TQLabel" row="3" column="2">
+ <property name="name">
+ <cstring>gammaBlueLabel</cstring>
+ </property>
+ <property name="text">
+ <string></string>
+ </property>
+ </widget>
+ </grid>
+ </widget>
+ <widget class="TQLabel" row="2" column="0" colspan="1">
+ <property name="name">
+ <cstring>gammaTipText</cstring>
+ </property>
+ <property name="text">
+ <string>Adjust the gamma sliders to make the squares above fade into their backgrounds as much as possible.</string>
+ </property>
+ </widget>
+ <widget class="TQLabel" row="3" column="0" colspan="1">
+ <property name="name">
+ <cstring>gammaTipText2</cstring>
+ </property>
+ <property name="text">
+ <string>Tip: Most computer software expects a gamma of 2.2.</string>
+ </property>
+ </widget>
+ <spacer row="4" column="0">
+ <property name="name" stdset="0">
+ <cstring>Spacer4</cstring>
+ </property>
+ <property name="orientation">
+ <enum>Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>Expanding</enum>
+ </property>
+ <property name="tqsizeHint">
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </grid>
+ </widget>
+ </grid>
+ </grid>
+ </widget>
</widget>
</grid>
</widget>
diff --git a/kcontrol/displayconfig/pics/CMakeLists.txt b/kcontrol/displayconfig/pics/CMakeLists.txt
new file mode 100644
index 000000000..bfee8505e
--- /dev/null
+++ b/kcontrol/displayconfig/pics/CMakeLists.txt
@@ -0,0 +1,23 @@
+#################################################
+#
+# (C) 2010-2011 Serghei Amelian
+# serghei (DOT) amelian (AT) gmail.com
+#
+# Improvements and feedback are welcome
+#
+# This file is released under GPL >= 2
+#
+#################################################
+
+install( FILES gamma1.4.gif DESTINATION ${DATA_INSTALL_DIR}/kcontrol/pics )
+install( FILES gamma1.4.png DESTINATION ${DATA_INSTALL_DIR}/kcontrol/pics )
+install( FILES gamma1.6.gif DESTINATION ${DATA_INSTALL_DIR}/kcontrol/pics )
+install( FILES gamma1.6.png DESTINATION ${DATA_INSTALL_DIR}/kcontrol/pics )
+install( FILES gamma1.8.gif DESTINATION ${DATA_INSTALL_DIR}/kcontrol/pics )
+install( FILES gamma1.8.png DESTINATION ${DATA_INSTALL_DIR}/kcontrol/pics )
+install( FILES gamma2.0.gif DESTINATION ${DATA_INSTALL_DIR}/kcontrol/pics )
+install( FILES gamma2.0.png DESTINATION ${DATA_INSTALL_DIR}/kcontrol/pics )
+install( FILES gamma2.2.gif DESTINATION ${DATA_INSTALL_DIR}/kcontrol/pics )
+install( FILES gamma2.2.png DESTINATION ${DATA_INSTALL_DIR}/kcontrol/pics )
+install( FILES gamma2.4.gif DESTINATION ${DATA_INSTALL_DIR}/kcontrol/pics )
+install( FILES gamma2.4.png DESTINATION ${DATA_INSTALL_DIR}/kcontrol/pics ) \ No newline at end of file
diff --git a/kcontrol/displayconfig/pics/gamma1.4.gif b/kcontrol/displayconfig/pics/gamma1.4.gif
new file mode 100644
index 000000000..3813ffe79
--- /dev/null
+++ b/kcontrol/displayconfig/pics/gamma1.4.gif
Binary files differ
diff --git a/kcontrol/displayconfig/pics/gamma1.4.png b/kcontrol/displayconfig/pics/gamma1.4.png
new file mode 100644
index 000000000..f193a4c09
--- /dev/null
+++ b/kcontrol/displayconfig/pics/gamma1.4.png
Binary files differ
diff --git a/kcontrol/displayconfig/pics/gamma1.6.gif b/kcontrol/displayconfig/pics/gamma1.6.gif
new file mode 100644
index 000000000..4dd9af3c8
--- /dev/null
+++ b/kcontrol/displayconfig/pics/gamma1.6.gif
Binary files differ
diff --git a/kcontrol/displayconfig/pics/gamma1.6.png b/kcontrol/displayconfig/pics/gamma1.6.png
new file mode 100644
index 000000000..0110dad26
--- /dev/null
+++ b/kcontrol/displayconfig/pics/gamma1.6.png
Binary files differ
diff --git a/kcontrol/displayconfig/pics/gamma1.8.gif b/kcontrol/displayconfig/pics/gamma1.8.gif
new file mode 100644
index 000000000..a73c83249
--- /dev/null
+++ b/kcontrol/displayconfig/pics/gamma1.8.gif
Binary files differ
diff --git a/kcontrol/displayconfig/pics/gamma1.8.png b/kcontrol/displayconfig/pics/gamma1.8.png
new file mode 100644
index 000000000..71fc121aa
--- /dev/null
+++ b/kcontrol/displayconfig/pics/gamma1.8.png
Binary files differ
diff --git a/kcontrol/displayconfig/pics/gamma2.0.gif b/kcontrol/displayconfig/pics/gamma2.0.gif
new file mode 100644
index 000000000..2e98232a4
--- /dev/null
+++ b/kcontrol/displayconfig/pics/gamma2.0.gif
Binary files differ
diff --git a/kcontrol/displayconfig/pics/gamma2.0.png b/kcontrol/displayconfig/pics/gamma2.0.png
new file mode 100644
index 000000000..6a3f72a8f
--- /dev/null
+++ b/kcontrol/displayconfig/pics/gamma2.0.png
Binary files differ
diff --git a/kcontrol/displayconfig/pics/gamma2.2.gif b/kcontrol/displayconfig/pics/gamma2.2.gif
new file mode 100644
index 000000000..cb10c1fd2
--- /dev/null
+++ b/kcontrol/displayconfig/pics/gamma2.2.gif
Binary files differ
diff --git a/kcontrol/displayconfig/pics/gamma2.2.png b/kcontrol/displayconfig/pics/gamma2.2.png
new file mode 100644
index 000000000..573a57e70
--- /dev/null
+++ b/kcontrol/displayconfig/pics/gamma2.2.png
Binary files differ
diff --git a/kcontrol/displayconfig/pics/gamma2.4.gif b/kcontrol/displayconfig/pics/gamma2.4.gif
new file mode 100644
index 000000000..c7bde1117
--- /dev/null
+++ b/kcontrol/displayconfig/pics/gamma2.4.gif
Binary files differ
diff --git a/kcontrol/displayconfig/pics/gamma2.4.png b/kcontrol/displayconfig/pics/gamma2.4.png
new file mode 100644
index 000000000..88bc32395
--- /dev/null
+++ b/kcontrol/displayconfig/pics/gamma2.4.png
Binary files differ