summaryrefslogtreecommitdiff
path: root/core/settings/light-and-power
authoralwin <alwin>2004-03-02 12:14:15 (UTC)
committer alwin <alwin>2004-03-02 12:14:15 (UTC)
commit0d59c780513da78033f4d9040475dee9db0256d4 (patch) (side-by-side diff)
tree503d320b4aa3daae9982082e7b34e3e2c48bdfb7 /core/settings/light-and-power
parenta0981652d61776d70f25980f035748b21339e946 (diff)
downloadopie-0d59c780513da78033f4d9040475dee9db0256d4.zip
opie-0d59c780513da78033f4d9040475dee9db0256d4.tar.gz
opie-0d59c780513da78033f4d9040475dee9db0256d4.tar.bz2
run the optimize_connect script
the whole cvs is tagged with "before_optimize_connect" if there are problems you can check the diff (but it had compiled and run here)
Diffstat (limited to 'core/settings/light-and-power') (more/less context) (ignore whitespace changes)
-rw-r--r--core/settings/light-and-power/light.cpp14
-rw-r--r--core/settings/light-and-power/sensor.cpp8
2 files changed, 11 insertions, 11 deletions
diff --git a/core/settings/light-and-power/light.cpp b/core/settings/light-and-power/light.cpp
index 4baff8e..ce45836 100644
--- a/core/settings/light-and-power/light.cpp
+++ b/core/settings/light-and-power/light.cpp
@@ -151,85 +151,85 @@ LightSettings::LightSettings( QWidget* parent, const char* name, WFlags )
brightness_ac-> setTickInterval ( QMAX( 16, 256 / m_bres ));
brightness_ac-> setLineStep ( QMAX( 1, 256 / m_bres ));
brightness_ac-> setPageStep ( QMAX( 1, 256 / m_bres ));
brightness_ac-> setValue ( bright );
if (m_cres) {
contr = config. readNumEntry ( "Contrast", 127);
contrast_ac-> setTickInterval ( QMAX( 16, 256 / m_cres ));
contrast_ac-> setLineStep ( QMAX( 1, 256 / m_cres ));
contrast_ac-> setPageStep ( QMAX( 1, 256 / m_cres ));
contrast_ac-> setValue ( contr );
}
// light sensor
auto_brightness_ac-> setChecked ( config. readBoolEntry ( "LightSensor", false ));
m_sensordata_ac = config. readListEntry ( "LightSensorData", ';' );
// warnings
config. setGroup ( "Warnings" );
warnintervalBox-> setValue ( config. readNumEntry ( "checkinterval", 10000 ) / 1000 );
lowSpinBox-> setValue ( config. readNumEntry ( "powerverylow", 10 ) );
criticalSpinBox-> setValue ( config. readNumEntry ( "powercritical", 5 ) );
m_resettimer = new QTimer ( this );
- connect ( m_resettimer, SIGNAL( timeout ( )), this, SLOT( resetBacklight ( )));
+ connect ( m_resettimer, SIGNAL( timeout()), this, SLOT( resetBacklight()));
if ( PowerStatusManager::readStatus ( ). acStatus ( ) != PowerStatus::Online ) {
tabs-> setCurrentPage ( 0 );
}
else {
tabs-> setCurrentPage ( 1 );
}
- connect ( brightness, SIGNAL( valueChanged ( int )), this, SLOT( setBacklight ( int )));
- connect ( brightness_ac, SIGNAL( valueChanged ( int )), this, SLOT( setBacklight ( int )));
+ connect ( brightness, SIGNAL( valueChanged(int)), this, SLOT( setBacklight(int)));
+ connect ( brightness_ac, SIGNAL( valueChanged(int)), this, SLOT( setBacklight(int)));
if (m_cres) {
- connect ( contrast, SIGNAL( valueChanged ( int )), this, SLOT( setContrast ( int )));
- connect ( contrast_ac, SIGNAL( valueChanged ( int )), this, SLOT( setContrast ( int )));
+ connect ( contrast, SIGNAL( valueChanged(int)), this, SLOT( setContrast(int)));
+ connect ( contrast_ac, SIGNAL( valueChanged(int)), this, SLOT( setContrast(int)));
}
connect( frequency, SIGNAL( activated(int) ), this, SLOT( setFrequency(int) ) );
connect( frequency_ac, SIGNAL( activated(int) ), this, SLOT( setFrequency(int) ) );
connect( closeHingeAction, SIGNAL( activated(int) ), this, SLOT( setCloseHingeAction(int) ) );
connect( closeHingeAction_ac, SIGNAL( activated(int) ), this, SLOT( setCloseHingeAction(int) ) );
}
LightSettings::~LightSettings ( )
{
}
void LightSettings::calibrateSensor ( )
{
Sensor *s = new Sensor ( m_sensordata, this );
- connect ( s, SIGNAL( viewBacklight ( int )), this, SLOT( setBacklight ( int )));
+ connect ( s, SIGNAL( viewBacklight(int)), this, SLOT( setBacklight(int)));
QPEApplication::execDialog( s );
delete s;
}
void LightSettings::calibrateSensorAC ( )
{
Sensor *s = new Sensor ( m_sensordata_ac, this );
- connect ( s, SIGNAL( viewBacklight ( int )), this, SLOT( setBacklight ( int )));
+ connect ( s, SIGNAL( viewBacklight(int)), this, SLOT( setBacklight(int)));
QPEApplication::execDialog ( s );
delete s;
}
void LightSettings::setBacklight ( int bright )
{
QCopEnvelope e ( "QPE/System", "setBacklight(int)" );
e << bright;
if ( bright != -1 ) {
m_resettimer-> stop ( );
m_resettimer-> start ( 4000, true );
}
}
void LightSettings::setContrast ( int contr )
{
if (contr == -1) contr = m_oldcontrast;
ODevice::inst ( )-> setDisplayContrast(contr);
}
void LightSettings::setFrequency ( int index )
{
qWarning("LightSettings::setFrequency(%d)", index);
diff --git a/core/settings/light-and-power/sensor.cpp b/core/settings/light-and-power/sensor.cpp
index 41de851..013e655 100644
--- a/core/settings/light-and-power/sensor.cpp
+++ b/core/settings/light-and-power/sensor.cpp
@@ -52,51 +52,51 @@ Sensor::Sensor ( QStringList &params, QWidget *parent, const char *name )
case 5: lmin = params [4]. toInt ( );
case 4: smax = params [3]. toInt ( );
case 3: smin = params [2]. toInt ( );
case 2: steps = params [1]. toInt ( );
case 1: inter = params [0]. toInt ( ) / 1000;
}
int xscale = ODevice::inst ( )-> lightSensorResolution ( );
int yscale = ODevice::inst ( )-> displayBrightnessResolution ( );
QVBoxLayout *lay = new QVBoxLayout ( frame );
lay-> setMargin ( 2 );
m_calib = new Calibration ( frame );
lay-> add ( m_calib );
m_calib-> setScale ( QSize ( xscale, yscale ));
m_calib-> setLineSteps ( steps );
m_calib-> setInterval ( inter );
m_calib-> setStartPoint ( QPoint ( smin * xscale / 256, lmax * yscale / 256 ));
m_calib-> setEndPoint ( QPoint ( smax * xscale / 256, lmin * yscale / 256 ));
interval-> setValue ( inter );
linesteps-> setValue ( steps );
- connect ( interval, SIGNAL( valueChanged ( int )), m_calib, SLOT( setInterval ( int )));
- connect ( linesteps, SIGNAL( valueChanged ( int )), m_calib, SLOT( setLineSteps ( int )));
+ connect ( interval, SIGNAL( valueChanged(int)), m_calib, SLOT( setInterval(int)));
+ connect ( linesteps, SIGNAL( valueChanged(int)), m_calib, SLOT( setLineSteps(int)));
- connect ( m_calib, SIGNAL( startPointChanged ( const QPoint & )), this, SLOT( pointDrag ( const QPoint & )));
- connect ( m_calib, SIGNAL( endPointChanged ( const QPoint & )), this, SLOT( pointDrag ( const QPoint & )));
+ connect ( m_calib, SIGNAL( startPointChanged(const QPoint&)), this, SLOT( pointDrag(const QPoint&)));
+ connect ( m_calib, SIGNAL( endPointChanged(const QPoint&)), this, SLOT( pointDrag(const QPoint&)));
}
void Sensor::accept ( )
{
int xscale = ODevice::inst ( )-> lightSensorResolution ( );
int yscale = ODevice::inst ( )-> displayBrightnessResolution ( );
m_params. clear ( );
m_params << QString::number ( m_calib-> interval ( ) * 1000 )
<< QString::number ( m_calib-> lineSteps ( ))
<< QString::number ( m_calib-> startPoint ( ). x ( ) * 256 / xscale )
<< QString::number ( m_calib-> endPoint ( ). x ( ) * 256 / xscale )
<< QString::number ( m_calib-> endPoint ( ). y ( ) * 256 / yscale )
<< QString::number ( m_calib-> startPoint ( ). y ( ) * 256 / yscale );
QDialog::accept ( );
}
void Sensor::pointDrag ( const QPoint &p )
{
emit viewBacklight ( p. y ( ));
}