summaryrefslogtreecommitdiff
path: root/core/settings
Unidiff
Diffstat (limited to 'core/settings') (more/less context) (ignore whitespace changes)
-rw-r--r--core/settings/button/buttonsettings.cpp2
-rw-r--r--core/settings/button/remapdlg.cpp2
-rw-r--r--core/settings/citytime/citytime.cpp4
-rw-r--r--core/settings/citytime/citytimebase.cpp2
-rw-r--r--core/settings/citytime/zonemap.cpp16
-rw-r--r--core/settings/launcher/menusettings.cpp4
-rw-r--r--core/settings/launcher/tabdialog.cpp18
-rw-r--r--core/settings/launcher/tabssettings.cpp6
-rw-r--r--core/settings/launcher/taskbarsettings.cpp2
-rw-r--r--core/settings/light-and-power/light.cpp14
-rw-r--r--core/settings/light-and-power/sensor.cpp8
11 files changed, 39 insertions, 39 deletions
diff --git a/core/settings/button/buttonsettings.cpp b/core/settings/button/buttonsettings.cpp
index 141e0f6..d80e496 100644
--- a/core/settings/button/buttonsettings.cpp
+++ b/core/settings/button/buttonsettings.cpp
@@ -115,49 +115,49 @@ ButtonSettings::ButtonSettings ( QWidget *parent , const char *name, bool modal
115 lay-> addWidget ( l, i, 3, AlignLeft | AlignBottom ); 115 lay-> addWidget ( l, i, 3, AlignLeft | AlignBottom );
116 bi-> m_plabel = l; 116 bi-> m_plabel = l;
117 117
118 l = new QLabel ( this ); 118 l = new QLabel ( this );
119 l-> setFixedSize ( 16, 16 ); 119 l-> setFixedSize ( 16, 16 );
120 lay-> addWidget ( l, i + 1, 2, AlignLeft | AlignTop ); 120 lay-> addWidget ( l, i + 1, 2, AlignLeft | AlignTop );
121 bi-> m_hicon = l; 121 bi-> m_hicon = l;
122 122
123 l = new QLabel ( this ); 123 l = new QLabel ( this );
124 l-> setAlignment ( AlignLeft | AlignVCenter | SingleLine ); 124 l-> setAlignment ( AlignLeft | AlignVCenter | SingleLine );
125 lay-> addWidget ( l, i + 1, 3, AlignLeft | AlignTop ); 125 lay-> addWidget ( l, i + 1, 3, AlignLeft | AlignTop );
126 bi-> m_hlabel = l; 126 bi-> m_hlabel = l;
127 127
128 i += 2; 128 i += 2;
129 129
130 m_infos. append ( bi ); 130 m_infos. append ( bi );
131 } 131 }
132 132
133 toplay-> addStretch ( 10 ); 133 toplay-> addStretch ( 10 );
134 134
135 m_last_button = 0; 135 m_last_button = 0;
136 m_lock = false; 136 m_lock = false;
137 137
138 m_timer = new QTimer ( this ); 138 m_timer = new QTimer ( this );
139 connect ( m_timer, SIGNAL( timeout ( )), this, SLOT( keyTimeout ( ))); 139 connect ( m_timer, SIGNAL( timeout()), this, SLOT( keyTimeout()));
140 140
141 updateLabels ( ); 141 updateLabels ( );
142 142
143 QPEApplication::grabKeyboard ( ); 143 QPEApplication::grabKeyboard ( );
144} 144}
145 145
146ButtonSettings::~ButtonSettings ( ) 146ButtonSettings::~ButtonSettings ( )
147{ 147{
148 QPEApplication::ungrabKeyboard ( ); 148 QPEApplication::ungrabKeyboard ( );
149} 149}
150 150
151void ButtonSettings::updateLabels ( ) 151void ButtonSettings::updateLabels ( )
152{ 152{
153 for ( QListIterator <buttoninfo> it ( m_infos ); *it; ++it ) { 153 for ( QListIterator <buttoninfo> it ( m_infos ); *it; ++it ) {
154 qCopInfo cip = ButtonUtils::inst ( )-> messageToInfo ((*it)-> m_pmsg ); 154 qCopInfo cip = ButtonUtils::inst ( )-> messageToInfo ((*it)-> m_pmsg );
155 155
156 (*it)-> m_picon-> setPixmap ( cip. m_icon ); 156 (*it)-> m_picon-> setPixmap ( cip. m_icon );
157 (*it)-> m_plabel-> setText ( cip. m_name ); 157 (*it)-> m_plabel-> setText ( cip. m_name );
158 158
159 qCopInfo cih = ButtonUtils::inst ( )-> messageToInfo ((*it)-> m_hmsg ); 159 qCopInfo cih = ButtonUtils::inst ( )-> messageToInfo ((*it)-> m_hmsg );
160 160
161 (*it)-> m_hicon-> setPixmap ( cih. m_icon ); 161 (*it)-> m_hicon-> setPixmap ( cih. m_icon );
162 (*it)-> m_hlabel-> setText ( cih. m_name ); 162 (*it)-> m_hlabel-> setText ( cih. m_name );
163 } 163 }
diff --git a/core/settings/button/remapdlg.cpp b/core/settings/button/remapdlg.cpp
index 7dabe68..121173a 100644
--- a/core/settings/button/remapdlg.cpp
+++ b/core/settings/button/remapdlg.cpp
@@ -58,49 +58,49 @@ RemapDlg::RemapDlg ( const Opie::ODeviceButton *b, bool hold, QWidget *parent, c
58 m_map_none = new NoSortItem ( w_list, 0, tr( "No mapping" )); 58 m_map_none = new NoSortItem ( w_list, 0, tr( "No mapping" ));
59 m_map_preset = new NoSortItem ( w_list, 1, tr( "Default" ), m_msg_preset. channel ( ), m_msg_preset. message ( )); 59 m_map_preset = new NoSortItem ( w_list, 1, tr( "Default" ), m_msg_preset. channel ( ), m_msg_preset. message ( ));
60 ((NoSortItem *) m_map_preset )-> setDefault ( true ); 60 ((NoSortItem *) m_map_preset )-> setDefault ( true );
61 61
62 if (m_msg. channel ( ) == "ignore") 62 if (m_msg. channel ( ) == "ignore")
63 { 63 {
64 m_map_custom = new NoSortItem ( w_list, 2, tr( "Custom" ), m_msg_preset. channel ( ), m_msg_preset. message ( )); 64 m_map_custom = new NoSortItem ( w_list, 2, tr( "Custom" ), m_msg_preset. channel ( ), m_msg_preset. message ( ));
65 65
66 m_current = m_map_none; 66 m_current = m_map_none;
67 } 67 }
68 else 68 else
69 { 69 {
70 m_map_custom = new NoSortItem ( w_list, 2, tr( "Custom" ), m_msg. channel ( ), m_msg. message ( )); 70 m_map_custom = new NoSortItem ( w_list, 2, tr( "Custom" ), m_msg. channel ( ), m_msg. message ( ));
71 m_current = m_map_custom; 71 m_current = m_map_custom;
72 } 72 }
73 73
74 QListViewItem *it = new NoSortItem ( w_list, 3, tr( "Actions" )); 74 QListViewItem *it = new NoSortItem ( w_list, 3, tr( "Actions" ));
75 ButtonUtils::inst ( )-> insertActions ( it ); 75 ButtonUtils::inst ( )-> insertActions ( it );
76 it-> setOpen ( true ); 76 it-> setOpen ( true );
77 77
78 m_map_show = new NoSortItem ( w_list, 4, tr( "Show" )); 78 m_map_show = new NoSortItem ( w_list, 4, tr( "Show" ));
79 79
80 w_list-> setCurrentItem ( m_current ); 80 w_list-> setCurrentItem ( m_current );
81 81
82 QTimer::singleShot ( 0, this, SLOT( delayedInit ( ))); 82 QTimer::singleShot ( 0, this, SLOT( delayedInit()));
83} 83}
84 84
85RemapDlg::~RemapDlg ( ) 85RemapDlg::~RemapDlg ( )
86{ 86{
87} 87}
88 88
89void RemapDlg::delayedInit ( ) 89void RemapDlg::delayedInit ( )
90{ 90{
91 bool b = w_list-> viewport ( )-> isUpdatesEnabled ( ); 91 bool b = w_list-> viewport ( )-> isUpdatesEnabled ( );
92 w_list-> viewport ( )-> setUpdatesEnabled ( false ); 92 w_list-> viewport ( )-> setUpdatesEnabled ( false );
93 93
94 ButtonUtils::inst ( )-> insertAppLnks ( m_map_show ); 94 ButtonUtils::inst ( )-> insertAppLnks ( m_map_show );
95 95
96 w_list-> viewport ( )-> setUpdatesEnabled ( b ); 96 w_list-> viewport ( )-> setUpdatesEnabled ( b );
97 97
98 m_map_show-> repaint ( ); 98 m_map_show-> repaint ( );
99} 99}
100 100
101void RemapDlg::itemChanged ( QListViewItem *it ) 101void RemapDlg::itemChanged ( QListViewItem *it )
102{ 102{
103 bool enabled = false; 103 bool enabled = false;
104 OQCopMessage m; 104 OQCopMessage m;
105 105
106 m_current = it; 106 m_current = it;
diff --git a/core/settings/citytime/citytime.cpp b/core/settings/citytime/citytime.cpp
index e7f0c46..721285d 100644
--- a/core/settings/citytime/citytime.cpp
+++ b/core/settings/citytime/citytime.cpp
@@ -88,50 +88,50 @@ CityTime::CityTime( QWidget *parent, const char* name,
88 cmdCity7->hide(); 88 cmdCity7->hide();
89 cmdCity8->hide(); 89 cmdCity8->hide();
90 cmdCity9->hide(); 90 cmdCity9->hide();
91 } else { 91 } else {
92 listCities.append( cmdCity7 ); 92 listCities.append( cmdCity7 );
93 listCities.append( cmdCity8 ); 93 listCities.append( cmdCity8 );
94 listCities.append( cmdCity9 ); 94 listCities.append( cmdCity9 );
95 listTimes.append( lblCTime7 ); 95 listTimes.append( lblCTime7 );
96 listTimes.append( lblCTime8 ); 96 listTimes.append( lblCTime8 );
97 listTimes.append( lblCTime9 ); 97 listTimes.append( lblCTime9 );
98 lblCTime4->hide(); 98 lblCTime4->hide();
99 lblCTime5->hide(); 99 lblCTime5->hide();
100 lblCTime6->hide(); 100 lblCTime6->hide();
101 cmdCity4->hide(); 101 cmdCity4->hide();
102 cmdCity5->hide(); 102 cmdCity5->hide();
103 cmdCity6->hide(); 103 cmdCity6->hide();
104 } 104 }
105 105
106 selWidget = frmMap->selectionWidget( this ); 106 selWidget = frmMap->selectionWidget( this );
107 selWidget->hide(); 107 selWidget->hide();
108 CityTimeBaseLayout->addWidget( selWidget ); 108 CityTimeBaseLayout->addWidget( selWidget );
109 bAdded = true; 109 bAdded = true;
110 readInTimes(); 110 readInTimes();
111 changed = FALSE; 111 changed = FALSE;
112 QObject::connect( qApp, SIGNAL( clockChanged( bool ) ), 112 QObject::connect( qApp, SIGNAL( clockChanged(bool) ),
113 this, SLOT( changeClock( bool ) ) ); 113 this, SLOT( changeClock(bool) ) );
114 // now start the timer so we can update the time quickly every second 114 // now start the timer so we can update the time quickly every second
115 timerEvent( 0 ); 115 timerEvent( 0 );
116} 116}
117 117
118CityTime::~CityTime() 118CityTime::~CityTime()
119{ 119{
120 if ( changed ) { 120 if ( changed ) {
121 Config cfg("CityTime"); 121 Config cfg("CityTime");
122 cfg.setGroup("TimeZones"); 122 cfg.setGroup("TimeZones");
123 QListIterator<QToolButton> itCity( listCities ); 123 QListIterator<QToolButton> itCity( listCities );
124 int i; 124 int i;
125 bool realTzWritten = FALSE; 125 bool realTzWritten = FALSE;
126 for ( i = 0, itCity.toFirst(); i < CITIES; i++, ++itCity ) { 126 for ( i = 0, itCity.toFirst(); i < CITIES; i++, ++itCity ) {
127 if ( !strCityTz[i].isNull() ) { 127 if ( !strCityTz[i].isNull() ) {
128 cfg.writeEntry("Zone"+QString::number(i), strCityTz[i]); 128 cfg.writeEntry("Zone"+QString::number(i), strCityTz[i]);
129 cfg.writeEntry("ZoneName"+QString::number(i), itCity.current()->text()); 129 cfg.writeEntry("ZoneName"+QString::number(i), itCity.current()->text());
130 if ( strCityTz[i] == strRealTz ) 130 if ( strCityTz[i] == strRealTz )
131 realTzWritten = TRUE; 131 realTzWritten = TRUE;
132 } 132 }
133 } 133 }
134 if ( realTzWritten ) { 134 if ( realTzWritten ) {
135 cfg.removeEntry("Zone"+QString::number(CITIES)); 135 cfg.removeEntry("Zone"+QString::number(CITIES));
136 cfg.removeEntry("ZoneName"+QString::number(CITIES)); 136 cfg.removeEntry("ZoneName"+QString::number(CITIES));
137 } else { 137 } else {
diff --git a/core/settings/citytime/citytimebase.cpp b/core/settings/citytime/citytimebase.cpp
index a3483cc..323929b 100644
--- a/core/settings/citytime/citytimebase.cpp
+++ b/core/settings/citytime/citytimebase.cpp
@@ -209,49 +209,49 @@ CityTimeBase::CityTimeBase( QWidget* parent, const char* name, WFlags )
209 209
210 lblCTime3 = new QLabel( buttonWidget, "lblCTime3" ); 210 lblCTime3 = new QLabel( buttonWidget, "lblCTime3" );
211 QFont lblCTime3_font( lblCTime3->font() ); 211 QFont lblCTime3_font( lblCTime3->font() );
212 lblCTime3_font.setPointSize( 10 ); 212 lblCTime3_font.setPointSize( 10 );
213 lblCTime3->setFont( lblCTime3_font ); 213 lblCTime3->setFont( lblCTime3_font );
214 lblCTime3->setText( tr( "" ) ); 214 lblCTime3->setText( tr( "" ) );
215 lblCTime3->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); 215 lblCTime3->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) );
216 216
217 Layout2->addWidget( lblCTime3, 2, 1 ); 217 Layout2->addWidget( lblCTime3, 2, 1 );
218 218
219 cmdCity9 = new QToolButton( buttonWidget, "cmdCity9" ); 219 cmdCity9 = new QToolButton( buttonWidget, "cmdCity9" );
220 cmdCity9->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, cmdCity9->sizePolicy().hasHeightForWidth() ) ); 220 cmdCity9->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, cmdCity9->sizePolicy().hasHeightForWidth() ) );
221 QFont cmdCity9_font( cmdCity9->font() ); 221 QFont cmdCity9_font( cmdCity9->font() );
222 cmdCity9_font.setBold( TRUE ); 222 cmdCity9_font.setBold( TRUE );
223 cmdCity9->setFont( cmdCity9_font ); 223 cmdCity9->setFont( cmdCity9_font );
224 cmdCity9->setFocusPolicy( QToolButton::TabFocus ); 224 cmdCity9->setFocusPolicy( QToolButton::TabFocus );
225 cmdCity9->setText( tr( "" ) ); 225 cmdCity9->setText( tr( "" ) );
226 cmdCity9->setToggleButton( TRUE ); 226 cmdCity9->setToggleButton( TRUE );
227 cmdCity9->setToggleButton( TRUE ); 227 cmdCity9->setToggleButton( TRUE );
228 228
229 Layout2->addWidget( cmdCity9, 2, 2 ); 229 Layout2->addWidget( cmdCity9, 2, 2 );
230 CityTimeBaseLayout->addWidget( buttonWidget ); 230 CityTimeBaseLayout->addWidget( buttonWidget );
231 231
232 // signals and slots connections 232 // signals and slots connections
233 connect( frmMap, SIGNAL( signalTz(const QString &, const QString &) ), this, SLOT( slotNewTz(const QString &, const QString &) ) ); 233 connect( frmMap, SIGNAL( signalTz(const QString&,const QString&) ), this, SLOT( slotNewTz(const QString&,const QString&) ) );
234 connect( cmdCity1, SIGNAL( toggled(bool) ), cmdCity2, SLOT( setDisabled(bool) ) ); 234 connect( cmdCity1, SIGNAL( toggled(bool) ), cmdCity2, SLOT( setDisabled(bool) ) );
235 connect( cmdCity1, SIGNAL( toggled(bool) ), cmdCity3, SLOT( setDisabled(bool) ) ); 235 connect( cmdCity1, SIGNAL( toggled(bool) ), cmdCity3, SLOT( setDisabled(bool) ) );
236 connect( cmdCity1, SIGNAL( toggled(bool) ), cmdCity4, SLOT( setDisabled(bool) ) ); 236 connect( cmdCity1, SIGNAL( toggled(bool) ), cmdCity4, SLOT( setDisabled(bool) ) );
237 connect( cmdCity1, SIGNAL( toggled(bool) ), cmdCity7, SLOT( setDisabled(bool) ) ); 237 connect( cmdCity1, SIGNAL( toggled(bool) ), cmdCity7, SLOT( setDisabled(bool) ) );
238 connect( cmdCity1, SIGNAL( toggled(bool) ), cmdCity8, SLOT( setDisabled(bool) ) ); 238 connect( cmdCity1, SIGNAL( toggled(bool) ), cmdCity8, SLOT( setDisabled(bool) ) );
239 connect( cmdCity2, SIGNAL( toggled(bool) ), cmdCity1, SLOT( setDisabled(bool) ) ); 239 connect( cmdCity2, SIGNAL( toggled(bool) ), cmdCity1, SLOT( setDisabled(bool) ) );
240 connect( cmdCity2, SIGNAL( toggled(bool) ), cmdCity3, SLOT( setDisabled(bool) ) ); 240 connect( cmdCity2, SIGNAL( toggled(bool) ), cmdCity3, SLOT( setDisabled(bool) ) );
241 connect( cmdCity2, SIGNAL( toggled(bool) ), cmdCity4, SLOT( setDisabled(bool) ) ); 241 connect( cmdCity2, SIGNAL( toggled(bool) ), cmdCity4, SLOT( setDisabled(bool) ) );
242 connect( cmdCity4, SIGNAL( toggled(bool) ), cmdCity7, SLOT( setDisabled(bool) ) ); 242 connect( cmdCity4, SIGNAL( toggled(bool) ), cmdCity7, SLOT( setDisabled(bool) ) );
243 connect( cmdCity2, SIGNAL( toggled(bool) ), cmdCity8, SLOT( setDisabled(bool) ) ); 243 connect( cmdCity2, SIGNAL( toggled(bool) ), cmdCity8, SLOT( setDisabled(bool) ) );
244 connect( cmdCity2, SIGNAL( toggled(bool) ), cmdCity7, SLOT( setDisabled(bool) ) ); 244 connect( cmdCity2, SIGNAL( toggled(bool) ), cmdCity7, SLOT( setDisabled(bool) ) );
245 connect( cmdCity3, SIGNAL( toggled(bool) ), cmdCity1, SLOT( setDisabled(bool) ) ); 245 connect( cmdCity3, SIGNAL( toggled(bool) ), cmdCity1, SLOT( setDisabled(bool) ) );
246 connect( cmdCity3, SIGNAL( toggled(bool) ), cmdCity2, SLOT( setDisabled(bool) ) ); 246 connect( cmdCity3, SIGNAL( toggled(bool) ), cmdCity2, SLOT( setDisabled(bool) ) );
247 connect( cmdCity3, SIGNAL( toggled(bool) ), cmdCity4, SLOT( setDisabled(bool) ) ); 247 connect( cmdCity3, SIGNAL( toggled(bool) ), cmdCity4, SLOT( setDisabled(bool) ) );
248 connect( cmdCity3, SIGNAL( toggled(bool) ), cmdCity7, SLOT( setDisabled(bool) ) ); 248 connect( cmdCity3, SIGNAL( toggled(bool) ), cmdCity7, SLOT( setDisabled(bool) ) );
249 connect( cmdCity3, SIGNAL( toggled(bool) ), cmdCity8, SLOT( setDisabled(bool) ) ); 249 connect( cmdCity3, SIGNAL( toggled(bool) ), cmdCity8, SLOT( setDisabled(bool) ) );
250 connect( cmdCity4, SIGNAL( toggled(bool) ), cmdCity1, SLOT( setDisabled(bool) ) ); 250 connect( cmdCity4, SIGNAL( toggled(bool) ), cmdCity1, SLOT( setDisabled(bool) ) );
251 connect( cmdCity4, SIGNAL( toggled(bool) ), cmdCity2, SLOT( setDisabled(bool) ) ); 251 connect( cmdCity4, SIGNAL( toggled(bool) ), cmdCity2, SLOT( setDisabled(bool) ) );
252 connect( cmdCity4, SIGNAL( toggled(bool) ), cmdCity3, SLOT( setDisabled(bool) ) ); 252 connect( cmdCity4, SIGNAL( toggled(bool) ), cmdCity3, SLOT( setDisabled(bool) ) );
253 connect( cmdCity4, SIGNAL( toggled(bool) ), cmdCity8, SLOT( setDisabled(bool) ) ); 253 connect( cmdCity4, SIGNAL( toggled(bool) ), cmdCity8, SLOT( setDisabled(bool) ) );
254 connect( cmdCity7, SIGNAL( toggled(bool) ), cmdCity1, SLOT( setDisabled(bool) ) ); 254 connect( cmdCity7, SIGNAL( toggled(bool) ), cmdCity1, SLOT( setDisabled(bool) ) );
255 connect( cmdCity7, SIGNAL( toggled(bool) ), cmdCity2, SLOT( setDisabled(bool) ) ); 255 connect( cmdCity7, SIGNAL( toggled(bool) ), cmdCity2, SLOT( setDisabled(bool) ) );
256 connect( cmdCity7, SIGNAL( toggled(bool) ), cmdCity3, SLOT( setDisabled(bool) ) ); 256 connect( cmdCity7, SIGNAL( toggled(bool) ), cmdCity3, SLOT( setDisabled(bool) ) );
257 connect( cmdCity7, SIGNAL( toggled(bool) ), cmdCity4, SLOT( setDisabled(bool) ) ); 257 connect( cmdCity7, SIGNAL( toggled(bool) ), cmdCity4, SLOT( setDisabled(bool) ) );
diff --git a/core/settings/citytime/zonemap.cpp b/core/settings/citytime/zonemap.cpp
index b83da59..b6843d2 100644
--- a/core/settings/citytime/zonemap.cpp
+++ b/core/settings/citytime/zonemap.cpp
@@ -166,54 +166,54 @@ ZoneMap::ZoneMap( QWidget *parent, const char* name )
166 (QSizePolicy::SizeType)0, 166 (QSizePolicy::SizeType)0,
167 cmdZoom->sizePolicy().hasHeightForWidth() ) ); 167 cmdZoom->sizePolicy().hasHeightForWidth() ) );
168 cmdZoom->setMaximumSize( cmdZoom->sizeHint() ); 168 cmdZoom->setMaximumSize( cmdZoom->sizeHint() );
169 // probably don't need this, but just in case... 169 // probably don't need this, but just in case...
170 cmdZoom->move( width() - cmdZoom->width(), height() - cmdZoom->height() ); 170 cmdZoom->move( width() - cmdZoom->width(), height() - cmdZoom->height() );
171 171
172 172
173 lblCity = new QLabel( tr( "CITY" ), this, "City Label" ); 173 lblCity = new QLabel( tr( "CITY" ), this, "City Label" );
174 lblCity->setMinimumSize( lblCity->sizeHint() ); 174 lblCity->setMinimumSize( lblCity->sizeHint() );
175 lblCity->setFrameStyle( QFrame::Plain | QFrame::Box ); 175 lblCity->setFrameStyle( QFrame::Plain | QFrame::Box );
176 lblCity->setBackgroundColor( yellow ); 176 lblCity->setBackgroundColor( yellow );
177 lblCity->hide(); 177 lblCity->hide();
178 178
179 // A timer to make sure the label gets hidden 179 // A timer to make sure the label gets hidden
180 tHide = new QTimer( this, "Label Timer" ); 180 tHide = new QTimer( this, "Label Timer" );
181 QObject::connect( tHide, SIGNAL( timeout() ), 181 QObject::connect( tHide, SIGNAL( timeout() ),
182 lblCity, SLOT( hide() ) ); 182 lblCity, SLOT( hide() ) );
183 QObject::connect( tHide, SIGNAL( timeout() ), 183 QObject::connect( tHide, SIGNAL( timeout() ),
184 this, SLOT( slotRedraw() ) ); 184 this, SLOT( slotRedraw() ) );
185 QTimer *tUpdate = new QTimer( this, "Update Timer" ); 185 QTimer *tUpdate = new QTimer( this, "Update Timer" );
186 QObject::connect( tUpdate, SIGNAL( timeout() ), 186 QObject::connect( tUpdate, SIGNAL( timeout() ),
187 this, SLOT( slotUpdate() ) ); 187 this, SLOT( slotUpdate() ) );
188 QObject::connect( qApp, SIGNAL( timeChanged() ), 188 QObject::connect( qApp, SIGNAL( timeChanged() ),
189 this, SLOT( slotUpdate() ) ); 189 this, SLOT( slotUpdate() ) );
190 QObject::connect( cmdZoom, SIGNAL( toggled( bool ) ), 190 QObject::connect( cmdZoom, SIGNAL( toggled(bool) ),
191 this, SLOT( slotZoom( bool ) ) ); 191 this, SLOT( slotZoom(bool) ) );
192 QObject::connect( &norm, SIGNAL( signalNewPoint( const QPoint& ) ), 192 QObject::connect( &norm, SIGNAL( signalNewPoint(const QPoint&) ),
193 this, SLOT( slotFindCity( const QPoint& ) ) ); 193 this, SLOT( slotFindCity(const QPoint&) ) );
194 QObject::connect( qApp, SIGNAL( clockChanged( bool ) ), 194 QObject::connect( qApp, SIGNAL( clockChanged(bool) ),
195 this, SLOT( changeClock( bool ) ) ); 195 this, SLOT( changeClock(bool) ) );
196 // update the sun's movement every 5 minutes 196 // update the sun's movement every 5 minutes
197 tUpdate->start( 5 * 60 * 1000 ); 197 tUpdate->start( 5 * 60 * 1000 );
198 // May as well read in the timezone information too... 198 // May as well read in the timezone information too...
199 readZones(); 199 readZones();
200} 200}
201 201
202ZoneMap::~ZoneMap() 202ZoneMap::~ZoneMap()
203{ 203{
204} 204}
205 205
206void ZoneMap::readZones( void ) 206void ZoneMap::readZones( void )
207{ 207{
208 QFile fZone( strZONEINFO ); 208 QFile fZone( strZONEINFO );
209 if ( !fZone.open( IO_ReadOnly ) ) { 209 if ( !fZone.open( IO_ReadOnly ) ) {
210 QMessageBox::warning (this, 210 QMessageBox::warning (this,
211 tr( "Unable to Find Timezone Info" ), 211 tr( "Unable to Find Timezone Info" ),
212 tr( "<p>Unable to find any timezone information in %1" ) 212 tr( "<p>Unable to find any timezone information in %1" )
213 .arg( strZONEINFO )); 213 .arg( strZONEINFO ));
214 exit(-1); 214 exit(-1);
215 } else { 215 } else {
216 QTextStream tZone( &fZone ); 216 QTextStream tZone( &fZone );
217 while ( !tZone.atEnd() ) { 217 while ( !tZone.atEnd() ) {
218 QString strLine = tZone.readLine(); 218 QString strLine = tZone.readLine();
219 // only pass on lines that aren't comments 219 // only pass on lines that aren't comments
@@ -445,85 +445,85 @@ void ZoneMap::resizeEvent( QResizeEvent *e )
445 resizeContents( drawableW, drawableH ); 445 resizeContents( drawableW, drawableH );
446 } 446 }
447} 447}
448 448
449void ZoneMap::showZones( void ) const 449void ZoneMap::showZones( void ) const
450{ 450{
451 // go through the zones in the list and just display the values... 451 // go through the zones in the list and just display the values...
452 QListIterator<ZoneField> itZone( zones ); 452 QListIterator<ZoneField> itZone( zones );
453 for ( itZone.toFirst(); itZone.current(); ++itZone ) { 453 for ( itZone.toFirst(); itZone.current(); ++itZone ) {
454 ZoneField *pZone = itZone.current(); 454 ZoneField *pZone = itZone.current();
455 pZone->showStructure(); 455 pZone->showStructure();
456 } 456 }
457} 457}
458 458
459 459
460QWidget* ZoneMap::selectionWidget( QWidget *parent) { 460QWidget* ZoneMap::selectionWidget( QWidget *parent) {
461 461
462 QWidget *returnWidget = new QWidget( parent ); 462 QWidget *returnWidget = new QWidget( parent );
463 463
464 QVBoxLayout *layout = new QVBoxLayout( returnWidget ); 464 QVBoxLayout *layout = new QVBoxLayout( returnWidget );
465 QHBox *hBox = new QHBox( returnWidget ); 465 QHBox *hBox = new QHBox( returnWidget );
466 QListView *continentView = new QListView( hBox ); 466 QListView *continentView = new QListView( hBox );
467 continentView->addColumn( tr("Continent") ); 467 continentView->addColumn( tr("Continent") );
468 QWhatsThis::add( continentView, tr("Select a continent/country here, then select a city") ); 468 QWhatsThis::add( continentView, tr("Select a continent/country here, then select a city") );
469 connect ( continentView, SIGNAL( clicked ( QListViewItem * ) ), this, SLOT( slotGetCities( QListViewItem * ) ) ); 469 connect ( continentView, SIGNAL( clicked(QListViewItem*) ), this, SLOT( slotGetCities(QListViewItem*) ) );
470 470
471 QStringList continentList; 471 QStringList continentList;
472 QListIterator<ZoneField> itZone( zones ); 472 QListIterator<ZoneField> itZone( zones );
473 for ( itZone.toFirst(); itZone.current(); ++itZone ) { 473 for ( itZone.toFirst(); itZone.current(); ++itZone ) {
474 ZoneField *pZone = itZone.current(); 474 ZoneField *pZone = itZone.current();
475 if ( continentList.contains( pZone->country() ) == 0 ) { 475 if ( continentList.contains( pZone->country() ) == 0 ) {
476 QString name; 476 QString name;
477 QListViewItem *item; 477 QListViewItem *item;
478 if ( !(pZone->country().length() > 24) ) { 478 if ( !(pZone->country().length() > 24) ) {
479 name = pZone->country().left(pZone->country().length()-1 ); 479 name = pZone->country().left(pZone->country().length()-1 );
480 } else { 480 } else {
481 name = pZone->country().left( 24 ); 481 name = pZone->country().left( 24 );
482 } 482 }
483 item = new QListViewItem( continentView, name, pZone->country() ); 483 item = new QListViewItem( continentView, name, pZone->country() );
484 continentList.append( pZone->country() ); 484 continentList.append( pZone->country() );
485 } 485 }
486 } 486 }
487 487
488 cityView = new QListView( hBox ); 488 cityView = new QListView( hBox );
489 cityView->addColumn( tr("City") ); 489 cityView->addColumn( tr("City") );
490 490
491 layout->addWidget( hBox ); 491 layout->addWidget( hBox );
492 return returnWidget; 492 return returnWidget;
493} 493}
494 494
495void ZoneMap::slotGetCities( QListViewItem * contItem) { 495void ZoneMap::slotGetCities( QListViewItem * contItem) {
496 496
497 cityView->clear(); 497 cityView->clear();
498 selectedCont = contItem->text( 1 ); 498 selectedCont = contItem->text( 1 );
499 QListIterator<ZoneField> itZone( zones ); 499 QListIterator<ZoneField> itZone( zones );
500 for ( itZone.toFirst(); itZone.current(); ++itZone ) { 500 for ( itZone.toFirst(); itZone.current(); ++itZone ) {
501 ZoneField *pZone = itZone.current(); 501 ZoneField *pZone = itZone.current();
502 if ( pZone->country() == contItem->text( 1 ) ) { 502 if ( pZone->country() == contItem->text( 1 ) ) {
503 QListViewItem *item; 503 QListViewItem *item;
504 item = new QListViewItem( cityView, pZone->city() ); 504 item = new QListViewItem( cityView, pZone->city() );
505 connect ( cityView, SIGNAL( clicked ( QListViewItem* ) ), this, SLOT( slotCitySelected( QListViewItem* ) ) ); 505 connect ( cityView, SIGNAL( clicked(QListViewItem*) ), this, SLOT( slotCitySelected(QListViewItem*) ) );
506 } 506 }
507 } 507 }
508} 508}
509 509
510void ZoneMap::slotCitySelected( QListViewItem *cityItem ) { 510void ZoneMap::slotCitySelected( QListViewItem *cityItem ) {
511 if ( cityItem ) { 511 if ( cityItem ) {
512 emit signalTz( selectedCont, cityItem->text( 0 ) ); 512 emit signalTz( selectedCont, cityItem->text( 0 ) );
513 } 513 }
514} 514}
515 515
516void ZoneMap::drawCities( QPainter *p ) 516void ZoneMap::drawCities( QPainter *p )
517{ 517{
518 int x, y, j; 518 int x, y, j;
519 // draw in the cities 519 // draw in the cities
520 // for testing only as when you put it 520 // for testing only as when you put it
521 // on the small screen it looks awful and not to mention useless 521 // on the small screen it looks awful and not to mention useless
522 p->setPen( red ); 522 p->setPen( red );
523 QListIterator<ZoneField> itZone( zones ); 523 QListIterator<ZoneField> itZone( zones );
524 for ( itZone.toFirst(), j = 0; itZone.current(); ++itZone, j++ ) { 524 for ( itZone.toFirst(), j = 0; itZone.current(); ++itZone, j++ ) {
525 ZoneField *pZone = itZone.current(); 525 ZoneField *pZone = itZone.current();
526 zoneToWin( pZone->x(), pZone->y(), x, y ); 526 zoneToWin( pZone->x(), pZone->y(), x, y );
527 if ( x > wImg ) 527 if ( x > wImg )
528 x = x - wImg; 528 x = x - wImg;
529 p->drawRect( x - iCITYOFFSET, y - iCITYOFFSET, iCITYSIZE, iCITYSIZE); 529 p->drawRect( x - iCITYOFFSET, y - iCITYOFFSET, iCITYSIZE, iCITYSIZE);
diff --git a/core/settings/launcher/menusettings.cpp b/core/settings/launcher/menusettings.cpp
index dc8e993..2b64c47 100644
--- a/core/settings/launcher/menusettings.cpp
+++ b/core/settings/launcher/menusettings.cpp
@@ -49,49 +49,49 @@ MenuSettings::MenuSettings ( QWidget *parent, const char *name )
49 : QWidget ( parent, name ) 49 : QWidget ( parent, name )
50{ 50{
51 m_applets_changed = false; 51 m_applets_changed = false;
52 52
53 QBoxLayout *lay = new QVBoxLayout ( this, 4, 4 ); 53 QBoxLayout *lay = new QVBoxLayout ( this, 4, 4 );
54 54
55 QLabel *l = new QLabel ( tr( "Load applets in O-Menu:" ), this ); 55 QLabel *l = new QLabel ( tr( "Load applets in O-Menu:" ), this );
56 lay-> addWidget ( l ); 56 lay-> addWidget ( l );
57 57
58 m_list = new QListView ( this ); 58 m_list = new QListView ( this );
59 m_list-> addColumn ( "foobar" ); 59 m_list-> addColumn ( "foobar" );
60 m_list-> header ( )-> hide ( ); 60 m_list-> header ( )-> hide ( );
61 61
62 lay-> addWidget ( m_list ); 62 lay-> addWidget ( m_list );
63 63
64 m_menutabs = new QCheckBox ( tr( "Show Launcher tabs in O-Menu" ), this ); 64 m_menutabs = new QCheckBox ( tr( "Show Launcher tabs in O-Menu" ), this );
65 lay-> addWidget ( m_menutabs ); 65 lay-> addWidget ( m_menutabs );
66 66
67 m_menusubpopup = new QCheckBox ( tr( "Show Applications in Subpopups" ), this ); 67 m_menusubpopup = new QCheckBox ( tr( "Show Applications in Subpopups" ), this );
68 lay-> addWidget ( m_menusubpopup ); 68 lay-> addWidget ( m_menusubpopup );
69 69
70 QWhatsThis::add ( m_list, tr( "Check the applets that you want to have included in the O-Menu." )); 70 QWhatsThis::add ( m_list, tr( "Check the applets that you want to have included in the O-Menu." ));
71 QWhatsThis::add ( m_menutabs, tr( "Adds the contents of the Launcher Tabs as menus in the O-Menu." )); 71 QWhatsThis::add ( m_menutabs, tr( "Adds the contents of the Launcher Tabs as menus in the O-Menu." ));
72 72
73 connect ( m_list, SIGNAL( clicked ( QListViewItem * )), this, SLOT( appletChanged ( ))); 73 connect ( m_list, SIGNAL( clicked(QListViewItem*)), this, SLOT( appletChanged()));
74 74
75 init ( ); 75 init ( );
76} 76}
77 77
78void MenuSettings::init ( ) 78void MenuSettings::init ( )
79{ 79{
80 Config cfg ( "StartMenu" ); 80 Config cfg ( "StartMenu" );
81 cfg. setGroup ( "Applets" ); 81 cfg. setGroup ( "Applets" );
82 QStringList exclude = cfg. readListEntry ( "ExcludeApplets", ',' ); 82 QStringList exclude = cfg. readListEntry ( "ExcludeApplets", ',' );
83 83
84 QString path = QPEApplication::qpeDir ( ) + "/plugins/applets"; 84 QString path = QPEApplication::qpeDir ( ) + "/plugins/applets";
85#ifdef Q_OS_MACX 85#ifdef Q_OS_MACX
86 QStringList list = QDir ( path, "lib*.dylib" ). entryList ( ); 86 QStringList list = QDir ( path, "lib*.dylib" ). entryList ( );
87#else 87#else
88 QStringList list = QDir ( path, "lib*.so" ). entryList ( ); 88 QStringList list = QDir ( path, "lib*.so" ). entryList ( );
89#endif /* Q_OS_MACX */ 89#endif /* Q_OS_MACX */
90 90
91 for ( QStringList::Iterator it = list. begin ( ); it != list. end ( ); ++it ) { 91 for ( QStringList::Iterator it = list. begin ( ); it != list. end ( ); ++it ) {
92 QString name; 92 QString name;
93 QPixmap icon; 93 QPixmap icon;
94 MenuAppletInterface *iface = 0; 94 MenuAppletInterface *iface = 0;
95 95
96 QLibrary *lib = new QLibrary ( path + "/" + *it ); 96 QLibrary *lib = new QLibrary ( path + "/" + *it );
97 lib-> queryInterface ( IID_MenuApplet, (QUnknownInterface**) &iface ); 97 lib-> queryInterface ( IID_MenuApplet, (QUnknownInterface**) &iface );
@@ -103,49 +103,49 @@ void MenuSettings::init ( )
103 if ( trans-> load ( tfn )) 103 if ( trans-> load ( tfn ))
104 qApp-> installTranslator ( trans ); 104 qApp-> installTranslator ( trans );
105 else 105 else
106 delete trans; 106 delete trans;
107 name = iface-> name ( ); 107 name = iface-> name ( );
108 icon = iface-> icon ( ). pixmap ( QIconSet::Small, QIconSet::Normal ); 108 icon = iface-> icon ( ). pixmap ( QIconSet::Small, QIconSet::Normal );
109 iface-> release ( ); 109 iface-> release ( );
110 lib-> unload ( ); 110 lib-> unload ( );
111 111
112 QCheckListItem *item; 112 QCheckListItem *item;
113 item = new QCheckListItem ( m_list, name, QCheckListItem::CheckBox ); 113 item = new QCheckListItem ( m_list, name, QCheckListItem::CheckBox );
114 if ( !icon. isNull ( )) 114 if ( !icon. isNull ( ))
115 item-> setPixmap ( 0, icon ); 115 item-> setPixmap ( 0, icon );
116 item-> setOn ( exclude. find ( *it ) == exclude. end ( )); 116 item-> setOn ( exclude. find ( *it ) == exclude. end ( ));
117 m_applets [*it] = item; 117 m_applets [*it] = item;
118 } else { 118 } else {
119 delete lib; 119 delete lib;
120 } 120 }
121 } 121 }
122 122
123 cfg. setGroup ( "Menu" ); 123 cfg. setGroup ( "Menu" );
124 m_menutabs->setChecked( cfg.readBoolEntry( "LauncherTabs", true ) ); 124 m_menutabs->setChecked( cfg.readBoolEntry( "LauncherTabs", true ) );
125 m_menusubpopup->setChecked( cfg.readBoolEntry( "LauncherSubPopup", true ) ); 125 m_menusubpopup->setChecked( cfg.readBoolEntry( "LauncherSubPopup", true ) );
126 m_menusubpopup->setEnabled( m_menutabs->isChecked() ); 126 m_menusubpopup->setEnabled( m_menutabs->isChecked() );
127 connect( m_menutabs, SIGNAL( stateChanged( int ) ), m_menusubpopup, SLOT( setEnabled( bool ) ) ); 127 connect( m_menutabs, SIGNAL( stateChanged(int) ), m_menusubpopup, SLOT( setEnabled(bool) ) );
128 128
129} 129}
130 130
131void MenuSettings::appletChanged() 131void MenuSettings::appletChanged()
132{ 132{
133 m_applets_changed = true; 133 m_applets_changed = true;
134} 134}
135 135
136void MenuSettings::accept ( ) 136void MenuSettings::accept ( )
137{ 137{
138 bool apps_changed = false; 138 bool apps_changed = false;
139 139
140 Config cfg ( "StartMenu" ); 140 Config cfg ( "StartMenu" );
141 cfg. setGroup ( "Applets" ); 141 cfg. setGroup ( "Applets" );
142 if ( m_applets_changed ) { 142 if ( m_applets_changed ) {
143 QStringList exclude; 143 QStringList exclude;
144 QMap <QString, QCheckListItem *>::Iterator it; 144 QMap <QString, QCheckListItem *>::Iterator it;
145 for ( it = m_applets. begin ( ); it != m_applets. end ( ); ++it ) { 145 for ( it = m_applets. begin ( ); it != m_applets. end ( ); ++it ) {
146 if ( !(*it)-> isOn ( )) 146 if ( !(*it)-> isOn ( ))
147 exclude << it. key ( ); 147 exclude << it. key ( );
148 } 148 }
149 cfg. writeEntry ( "ExcludeApplets", exclude, ',' ); 149 cfg. writeEntry ( "ExcludeApplets", exclude, ',' );
150 } 150 }
151 cfg. writeEntry ( "SafeMode", false ); 151 cfg. writeEntry ( "SafeMode", false );
diff --git a/core/settings/launcher/tabdialog.cpp b/core/settings/launcher/tabdialog.cpp
index f79ad40..c0d1cf2 100644
--- a/core/settings/launcher/tabdialog.cpp
+++ b/core/settings/launcher/tabdialog.cpp
@@ -298,150 +298,150 @@ TabDialog::TabDialog ( const QPixmap *tabicon, const QString &tabname, TabConfig
298 m_fontuse-> setChecked ( tc. m_font_use ); 298 m_fontuse-> setChecked ( tc. m_font_use );
299 m_fontselect-> setSelectedFont ( QFont ( tc. m_font_family, tc. m_font_size, tc. m_font_weight, tc. m_font_italic )); 299 m_fontselect-> setSelectedFont ( QFont ( tc. m_font_family, tc. m_font_size, tc. m_font_weight, tc. m_font_italic ));
300 m_fontselect-> setEnabled ( m_fontuse-> isChecked ( )); 300 m_fontselect-> setEnabled ( m_fontuse-> isChecked ( ));
301 fontClicked ( m_fontselect-> selectedFont ( )); 301 fontClicked ( m_fontselect-> selectedFont ( ));
302 302
303 QWhatsThis::add ( sample, tr( "This is a rough preview of what the currently selected Tab will look like." )); 303 QWhatsThis::add ( sample, tr( "This is a rough preview of what the currently selected Tab will look like." ));
304} 304}
305 305
306 306
307TabDialog::~TabDialog ( ) 307TabDialog::~TabDialog ( )
308{ 308{
309} 309}
310 310
311QWidget *TabDialog::createFontTab ( QWidget *parent ) 311QWidget *TabDialog::createFontTab ( QWidget *parent )
312{ 312{
313 QWidget *tab = new QWidget ( parent, "FontTab" ); 313 QWidget *tab = new QWidget ( parent, "FontTab" );
314 QVBoxLayout *vertLayout = new QVBoxLayout ( tab, 3, 3 ); 314 QVBoxLayout *vertLayout = new QVBoxLayout ( tab, 3, 3 );
315 315
316 m_fontuse = new QCheckBox ( tr( "Use a custom font" ), tab ); 316 m_fontuse = new QCheckBox ( tr( "Use a custom font" ), tab );
317 vertLayout-> addWidget ( m_fontuse ); 317 vertLayout-> addWidget ( m_fontuse );
318 318
319 m_fontselect = new OFontSelector ( false, tab, "fontsel" ); 319 m_fontselect = new OFontSelector ( false, tab, "fontsel" );
320 vertLayout-> addWidget ( m_fontselect ); 320 vertLayout-> addWidget ( m_fontselect );
321 321
322 connect ( m_fontuse, SIGNAL( toggled ( bool )), m_fontselect, SLOT( setEnabled ( bool ))); 322 connect ( m_fontuse, SIGNAL( toggled(bool)), m_fontselect, SLOT( setEnabled(bool)));
323 connect( m_fontselect, SIGNAL( fontSelected ( const QFont & )), 323 connect( m_fontselect, SIGNAL( fontSelected(const QFont&)),
324 this, SLOT( fontClicked ( const QFont & ))); 324 this, SLOT( fontClicked(const QFont&)));
325 325
326 return tab; 326 return tab;
327} 327}
328 328
329QWidget *TabDialog::createBgTab ( QWidget *parent ) 329QWidget *TabDialog::createBgTab ( QWidget *parent )
330{ 330{
331 QWidget *tab = new QWidget( parent, "BgTab" ); 331 QWidget *tab = new QWidget( parent, "BgTab" );
332 QVBoxLayout *vertLayout = new QVBoxLayout( tab, 3, 3 ); 332 QVBoxLayout *vertLayout = new QVBoxLayout( tab, 3, 3 );
333 333
334 QGridLayout* gridLayout = new QGridLayout ( vertLayout ); 334 QGridLayout* gridLayout = new QGridLayout ( vertLayout );
335 gridLayout-> setColStretch ( 1, 10 ); 335 gridLayout-> setColStretch ( 1, 10 );
336 336
337 QLabel* label = new QLabel( tr( "Type:" ), tab ); 337 QLabel* label = new QLabel( tr( "Type:" ), tab );
338 gridLayout-> addWidget ( label, 0, 0 ); 338 gridLayout-> addWidget ( label, 0, 0 );
339 m_bgtype = new QButtonGroup( tab, "buttongroup" ); 339 m_bgtype = new QButtonGroup( tab, "buttongroup" );
340 m_bgtype-> hide ( ); 340 m_bgtype-> hide ( );
341 m_bgtype-> setExclusive ( true ); 341 m_bgtype-> setExclusive ( true );
342 342
343 QRadioButton *rb; 343 QRadioButton *rb;
344 rb = new QRadioButton( tr( "Ruled" ), tab, "ruled" ); 344 rb = new QRadioButton( tr( "Ruled" ), tab, "ruled" );
345 m_bgtype-> insert ( rb, TabConfig::Ruled ); 345 m_bgtype-> insert ( rb, TabConfig::Ruled );
346 gridLayout-> addWidget( rb, 0, 1 ); 346 gridLayout-> addWidget( rb, 0, 1 );
347 347
348 QHBoxLayout *hb = new QHBoxLayout ( ); 348 QHBoxLayout *hb = new QHBoxLayout ( );
349 hb-> setSpacing ( 3 ); 349 hb-> setSpacing ( 3 );
350 350
351 rb = new QRadioButton( tr( "Solid color" ), tab, "solid" ); 351 rb = new QRadioButton( tr( "Solid color" ), tab, "solid" );
352 m_bgtype-> insert ( rb, TabConfig::SolidColor ); 352 m_bgtype-> insert ( rb, TabConfig::SolidColor );
353 hb-> addWidget ( rb ); 353 hb-> addWidget ( rb );
354 hb-> addSpacing ( 10 ); 354 hb-> addSpacing ( 10 );
355 355
356 m_solidcolor = new OColorButton ( tab, QColor ( m_tc. m_bg_color ) ); 356 m_solidcolor = new OColorButton ( tab, QColor ( m_tc. m_bg_color ) );
357 connect ( m_solidcolor, SIGNAL( colorSelected ( const QColor & )), this, SLOT( bgColorClicked ( const QColor & ))); 357 connect ( m_solidcolor, SIGNAL( colorSelected(const QColor&)), this, SLOT( bgColorClicked(const QColor&)));
358 hb-> addWidget ( m_solidcolor ); 358 hb-> addWidget ( m_solidcolor );
359 hb-> addStretch ( 10 ); 359 hb-> addStretch ( 10 );
360 360
361 gridLayout-> addLayout ( hb, 1, 1 ); 361 gridLayout-> addLayout ( hb, 1, 1 );
362 362
363 hb = new QHBoxLayout ( ); 363 hb = new QHBoxLayout ( );
364 hb-> setSpacing ( 3 ); 364 hb-> setSpacing ( 3 );
365 365
366 rb = new QRadioButton( tr( "Image" ), tab, "image" ); 366 rb = new QRadioButton( tr( "Image" ), tab, "image" );
367 m_bgtype-> insert ( rb, TabConfig::Image ); 367 m_bgtype-> insert ( rb, TabConfig::Image );
368 hb-> addWidget( rb ); 368 hb-> addWidget( rb );
369 hb-> addSpacing ( 10 ); 369 hb-> addSpacing ( 10 );
370 370
371 m_imagebrowse = new QPushButton ( tr( "Select..." ), tab ); 371 m_imagebrowse = new QPushButton ( tr( "Select..." ), tab );
372 connect ( m_imagebrowse, SIGNAL( clicked ( )), this, SLOT( bgImageClicked ( ))); 372 connect ( m_imagebrowse, SIGNAL( clicked()), this, SLOT( bgImageClicked()));
373 hb-> addWidget ( m_imagebrowse ); 373 hb-> addWidget ( m_imagebrowse );
374 hb-> addStretch ( 10 ); 374 hb-> addStretch ( 10 );
375 375
376 gridLayout-> addLayout ( hb, 2, 1 ); 376 gridLayout-> addLayout ( hb, 2, 1 );
377 377
378 QPushButton *p = new QPushButton ( tr( "Default" ), tab ); 378 QPushButton *p = new QPushButton ( tr( "Default" ), tab );
379 connect ( p, SIGNAL( clicked ( )), this, SLOT( bgDefaultClicked ( ))); 379 connect ( p, SIGNAL( clicked()), this, SLOT( bgDefaultClicked()));
380 gridLayout-> addWidget ( p, 3, 1 ); 380 gridLayout-> addWidget ( p, 3, 1 );
381 381
382 connect ( m_bgtype, SIGNAL( clicked ( int )), this, SLOT( bgTypeClicked ( int ))); 382 connect ( m_bgtype, SIGNAL( clicked(int)), this, SLOT( bgTypeClicked(int)));
383 383
384 vertLayout-> addStretch ( 10 ); 384 vertLayout-> addStretch ( 10 );
385 385
386 return tab; 386 return tab;
387} 387}
388 388
389QWidget *TabDialog::createIconTab ( QWidget *parent ) 389QWidget *TabDialog::createIconTab ( QWidget *parent )
390{ 390{
391 QWidget *tab = new QWidget( parent, "IconTab" ); 391 QWidget *tab = new QWidget( parent, "IconTab" );
392 QVBoxLayout *vertLayout = new QVBoxLayout( tab, 3, 3 ); 392 QVBoxLayout *vertLayout = new QVBoxLayout( tab, 3, 3 );
393 393
394 QGridLayout* gridLayout = new QGridLayout ( vertLayout ); 394 QGridLayout* gridLayout = new QGridLayout ( vertLayout );
395 gridLayout-> setColStretch ( 1, 10 ); 395 gridLayout-> setColStretch ( 1, 10 );
396 396
397 QLabel* label = new QLabel( tr( "Size:" ), tab ); 397 QLabel* label = new QLabel( tr( "Size:" ), tab );
398 gridLayout-> addWidget ( label, 0, 0 ); 398 gridLayout-> addWidget ( label, 0, 0 );
399 m_iconsize = new QButtonGroup( tab, "buttongroup" ); 399 m_iconsize = new QButtonGroup( tab, "buttongroup" );
400 m_iconsize-> hide ( ); 400 m_iconsize-> hide ( );
401 m_iconsize-> setExclusive ( true ); 401 m_iconsize-> setExclusive ( true );
402 402
403 QRadioButton *rb; 403 QRadioButton *rb;
404 rb = new QRadioButton( tr( "Small" ), tab, "iconsmall" ); 404 rb = new QRadioButton( tr( "Small" ), tab, "iconsmall" );
405 m_iconsize-> insert ( rb, TabConfig::List ); 405 m_iconsize-> insert ( rb, TabConfig::List );
406 gridLayout-> addWidget( rb, 0, 1 ); 406 gridLayout-> addWidget( rb, 0, 1 );
407 407
408 rb = new QRadioButton( tr( "Large" ), tab, "iconlarge" ); 408 rb = new QRadioButton( tr( "Large" ), tab, "iconlarge" );
409 m_iconsize-> insert ( rb, TabConfig::Icon ); 409 m_iconsize-> insert ( rb, TabConfig::Icon );
410 gridLayout-> addWidget( rb, 1, 1 ); 410 gridLayout-> addWidget( rb, 1, 1 );
411 411
412 connect ( m_iconsize, SIGNAL( clicked ( int )), this, SLOT( iconSizeClicked ( int ))); 412 connect ( m_iconsize, SIGNAL( clicked(int)), this, SLOT( iconSizeClicked(int)));
413 413
414 //vertLayout-> addSpacing ( 8 ); 414 //vertLayout-> addSpacing ( 8 );
415 415
416 //gridLayout = new QGridLayout ( vertLayout ); 416 //gridLayout = new QGridLayout ( vertLayout );
417 gridLayout-> addRowSpacing ( 2, 8 ); 417 gridLayout-> addRowSpacing ( 2, 8 );
418 418
419 label = new QLabel ( tr( "Color:" ), tab ); 419 label = new QLabel ( tr( "Color:" ), tab );
420 gridLayout-> addWidget ( label, 3, 0 ); 420 gridLayout-> addWidget ( label, 3, 0 );
421 421
422 m_iconcolor = new OColorButton ( tab, QColor ( m_tc. m_text_color ) ); 422 m_iconcolor = new OColorButton ( tab, QColor ( m_tc. m_text_color ) );
423 connect ( m_iconcolor, SIGNAL( colorSelected ( const QColor & )), this, SLOT( iconColorClicked ( const QColor & ))); 423 connect ( m_iconcolor, SIGNAL( colorSelected(const QColor&)), this, SLOT( iconColorClicked(const QColor&)));
424 gridLayout-> addWidget ( m_iconcolor, 3, 1, AlignLeft ); 424 gridLayout-> addWidget ( m_iconcolor, 3, 1, AlignLeft );
425 425
426 vertLayout-> addStretch ( 10 ); 426 vertLayout-> addStretch ( 10 );
427 427
428 return tab; 428 return tab;
429} 429}
430 430
431 431
432void TabDialog::iconSizeClicked ( int s ) 432void TabDialog::iconSizeClicked ( int s )
433{ 433{
434 m_sample-> setViewMode ((TabConfig::ViewMode) s ); 434 m_sample-> setViewMode ((TabConfig::ViewMode) s );
435} 435}
436 436
437void TabDialog::fontClicked ( const QFont &f ) 437void TabDialog::fontClicked ( const QFont &f )
438{ 438{
439 m_sample-> setViewFont ( f ); 439 m_sample-> setViewFont ( f );
440} 440}
441 441
442void TabDialog::bgTypeClicked ( int t ) 442void TabDialog::bgTypeClicked ( int t )
443{ 443{
444 QString s; 444 QString s;
445 445
446 if ( m_bgtype-> id ( m_bgtype-> selected ( )) != t ) 446 if ( m_bgtype-> id ( m_bgtype-> selected ( )) != t )
447 m_bgtype-> setButton ( t ); 447 m_bgtype-> setButton ( t );
diff --git a/core/settings/launcher/tabssettings.cpp b/core/settings/launcher/tabssettings.cpp
index 17a1609..e5a7087 100644
--- a/core/settings/launcher/tabssettings.cpp
+++ b/core/settings/launcher/tabssettings.cpp
@@ -45,57 +45,57 @@
45 45
46#include <stdlib.h> 46#include <stdlib.h>
47#include <qmessagebox.h> 47#include <qmessagebox.h>
48 48
49 49
50 #define GLOBALID ".global." 50 #define GLOBALID ".global."
51 51
52 52
53TabsSettings::TabsSettings ( QWidget *parent, const char *name ) 53TabsSettings::TabsSettings ( QWidget *parent, const char *name )
54 : QWidget ( parent, name ) 54 : QWidget ( parent, name )
55{ 55{
56 QGridLayout *lay = new QGridLayout ( this, 0, 0, 4, 4 ); 56 QGridLayout *lay = new QGridLayout ( this, 0, 0, 4, 4 );
57 57
58 QLabel *l = new QLabel ( tr( "Launcher Tabs:" ), this ); 58 QLabel *l = new QLabel ( tr( "Launcher Tabs:" ), this );
59 lay-> addMultiCellWidget ( l, 0, 0, 0, 1 ); 59 lay-> addMultiCellWidget ( l, 0, 0, 0, 1 );
60 60
61 m_list = new QListBox ( this ); 61 m_list = new QListBox ( this );
62 lay-> addMultiCellWidget ( m_list, 1, 4, 0, 0 ); 62 lay-> addMultiCellWidget ( m_list, 1, 4, 0, 0 );
63 63
64 QWhatsThis::add ( m_list, tr( "foobar" )); 64 QWhatsThis::add ( m_list, tr( "foobar" ));
65 65
66 QPushButton *p1, *p2, *p3; 66 QPushButton *p1, *p2, *p3;
67 p1 = new QPushButton ( tr( "New" ), this ); 67 p1 = new QPushButton ( tr( "New" ), this );
68 lay-> addWidget ( p1, 1, 1 ); 68 lay-> addWidget ( p1, 1, 1 );
69 connect ( p1, SIGNAL( clicked ( )), this, SLOT( newClicked ( ))); 69 connect ( p1, SIGNAL( clicked()), this, SLOT( newClicked()));
70 70
71 p2 = new QPushButton ( tr( "Edit" ), this ); 71 p2 = new QPushButton ( tr( "Edit" ), this );
72 lay-> addWidget ( p2, 2, 1 ); 72 lay-> addWidget ( p2, 2, 1 );
73 connect ( p2, SIGNAL( clicked ( )), this, SLOT( editClicked ( ))); 73 connect ( p2, SIGNAL( clicked()), this, SLOT( editClicked()));
74 74
75 p3 = new QPushButton ( tr( "Delete" ), this ); 75 p3 = new QPushButton ( tr( "Delete" ), this );
76 lay-> addWidget ( p3, 3, 1 ); 76 lay-> addWidget ( p3, 3, 1 );
77 connect ( p3, SIGNAL( clicked ( )), this, SLOT( deleteClicked ( ))); 77 connect ( p3, SIGNAL( clicked()), this, SLOT( deleteClicked()));
78 78
79 lay-> setRowStretch ( 4, 10 ); 79 lay-> setRowStretch ( 4, 10 );
80 80
81 m_bigbusy = new QCheckBox( tr( "Enable big busy indicator" ), this ); 81 m_bigbusy = new QCheckBox( tr( "Enable big busy indicator" ), this );
82 lay-> addMultiCellWidget ( m_bigbusy, 5, 5, 0, 1 ); 82 lay-> addMultiCellWidget ( m_bigbusy, 5, 5, 0, 1 );
83 83
84 m_busyani = new QCheckBox ( tr( "Enable animated busy indicator" ), this ); 84 m_busyani = new QCheckBox ( tr( "Enable animated busy indicator" ), this );
85 lay-> addMultiCellWidget ( m_busyani, 6, 6, 0, 1 ); 85 lay-> addMultiCellWidget ( m_busyani, 6, 6, 0, 1 );
86 86
87 p1-> setEnabled ( false ); 87 p1-> setEnabled ( false );
88 p3-> setEnabled ( false ); 88 p3-> setEnabled ( false );
89 89
90 init ( ); 90 init ( );
91 91
92 QWhatsThis::add ( m_list, tr( "Select the Launcher Tab you want to edit or delete." )); 92 QWhatsThis::add ( m_list, tr( "Select the Launcher Tab you want to edit or delete." ));
93 QWhatsThis::add ( p1, tr( "Adds a new Tab to the Launcher." ) + QString ( "<center><br><i>not yet implemented</i><br>Please use the tabmanager</center>." )); 93 QWhatsThis::add ( p1, tr( "Adds a new Tab to the Launcher." ) + QString ( "<center><br><i>not yet implemented</i><br>Please use the tabmanager</center>." ));
94 QWhatsThis::add ( p2, tr( "Opens a new dialog to customize the select Tab." )); 94 QWhatsThis::add ( p2, tr( "Opens a new dialog to customize the select Tab." ));
95 QWhatsThis::add ( p3, tr( "Deletes a Tab from the Launcher." ) + QString ( "<center><br><i>not yet implemented</i><br>Please use the tabmanager</center>." )); 95 QWhatsThis::add ( p3, tr( "Deletes a Tab from the Launcher." ) + QString ( "<center><br><i>not yet implemented</i><br>Please use the tabmanager</center>." ));
96 QWhatsThis::add ( m_bigbusy, tr( "Activate this, if you want a big busy indicator in the middle of the screen instead of the one in taskbar." )); 96 QWhatsThis::add ( m_bigbusy, tr( "Activate this, if you want a big busy indicator in the middle of the screen instead of the one in taskbar." ));
97 QWhatsThis::add ( m_busyani, tr( "Activate this, if you want an animatedbusy indicator for starting applications in the Launcher." )); 97 QWhatsThis::add ( m_busyani, tr( "Activate this, if you want an animatedbusy indicator for starting applications in the Launcher." ));
98} 98}
99 99
100void TabsSettings::init ( ) 100void TabsSettings::init ( )
101{ 101{
diff --git a/core/settings/launcher/taskbarsettings.cpp b/core/settings/launcher/taskbarsettings.cpp
index badb98f..43886c9 100644
--- a/core/settings/launcher/taskbarsettings.cpp
+++ b/core/settings/launcher/taskbarsettings.cpp
@@ -41,49 +41,49 @@
41#include <qlabel.h> 41#include <qlabel.h>
42#include <qwhatsthis.h> 42#include <qwhatsthis.h>
43 43
44#include <stdlib.h> 44#include <stdlib.h>
45 45
46 46
47TaskbarSettings::TaskbarSettings ( QWidget *parent, const char *name ) 47TaskbarSettings::TaskbarSettings ( QWidget *parent, const char *name )
48 : QWidget ( parent, name ) 48 : QWidget ( parent, name )
49{ 49{
50 m_applets_changed = false; 50 m_applets_changed = false;
51 51
52 QBoxLayout *lay = new QVBoxLayout ( this, 4, 4 ); 52 QBoxLayout *lay = new QVBoxLayout ( this, 4, 4 );
53 53
54 QLabel *l = new QLabel ( tr( "Load applets in Taskbar:" ), this ); 54 QLabel *l = new QLabel ( tr( "Load applets in Taskbar:" ), this );
55 lay-> addWidget ( l ); 55 lay-> addWidget ( l );
56 56
57 m_list = new QListView ( this ); 57 m_list = new QListView ( this );
58 m_list-> addColumn ( "foobar" ); 58 m_list-> addColumn ( "foobar" );
59 m_list-> header ( )-> hide ( ); 59 m_list-> header ( )-> hide ( );
60 60
61 lay-> addWidget ( m_list ); 61 lay-> addWidget ( m_list );
62 62
63 QWhatsThis::add ( m_list, tr( "Check the applets that you want displayed in the Taskbar." )); 63 QWhatsThis::add ( m_list, tr( "Check the applets that you want displayed in the Taskbar." ));
64 64
65 connect ( m_list, SIGNAL( clicked ( QListViewItem * )), this, SLOT( appletChanged ( ))); 65 connect ( m_list, SIGNAL( clicked(QListViewItem*)), this, SLOT( appletChanged()));
66 66
67 init ( ); 67 init ( );
68} 68}
69 69
70void TaskbarSettings::init ( ) 70void TaskbarSettings::init ( )
71{ 71{
72 Config cfg ( "Taskbar" ); 72 Config cfg ( "Taskbar" );
73 cfg. setGroup ( "Applets" ); 73 cfg. setGroup ( "Applets" );
74 QStringList exclude = cfg. readListEntry ( "ExcludeApplets", ',' ); 74 QStringList exclude = cfg. readListEntry ( "ExcludeApplets", ',' );
75 75
76 QString path = QPEApplication::qpeDir ( ) + "/plugins/applets"; 76 QString path = QPEApplication::qpeDir ( ) + "/plugins/applets";
77#ifdef Q_OS_MACX 77#ifdef Q_OS_MACX
78 QStringList list = QDir ( path, "lib*.dylib" ). entryList ( ); 78 QStringList list = QDir ( path, "lib*.dylib" ). entryList ( );
79#else 79#else
80 QStringList list = QDir ( path, "lib*.so" ). entryList ( ); 80 QStringList list = QDir ( path, "lib*.so" ). entryList ( );
81#endif /* Q_OS_MACX */ 81#endif /* Q_OS_MACX */
82 82
83 for ( QStringList::Iterator it = list. begin ( ); it != list. end ( ); ++it ) { 83 for ( QStringList::Iterator it = list. begin ( ); it != list. end ( ); ++it ) {
84 QString name; 84 QString name;
85 QPixmap icon; 85 QPixmap icon;
86 TaskbarNamedAppletInterface *iface = 0; 86 TaskbarNamedAppletInterface *iface = 0;
87 87
88 qWarning("Load applet: %s", (*it).latin1() ); 88 qWarning("Load applet: %s", (*it).latin1() );
89 QLibrary *lib = new QLibrary ( path + "/" + *it ); 89 QLibrary *lib = new QLibrary ( path + "/" + *it );
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 )
151 brightness_ac-> setTickInterval ( QMAX( 16, 256 / m_bres )); 151 brightness_ac-> setTickInterval ( QMAX( 16, 256 / m_bres ));
152 brightness_ac-> setLineStep ( QMAX( 1, 256 / m_bres )); 152 brightness_ac-> setLineStep ( QMAX( 1, 256 / m_bres ));
153 brightness_ac-> setPageStep ( QMAX( 1, 256 / m_bres )); 153 brightness_ac-> setPageStep ( QMAX( 1, 256 / m_bres ));
154 brightness_ac-> setValue ( bright ); 154 brightness_ac-> setValue ( bright );
155 155
156 if (m_cres) { 156 if (m_cres) {
157 contr = config. readNumEntry ( "Contrast", 127); 157 contr = config. readNumEntry ( "Contrast", 127);
158 contrast_ac-> setTickInterval ( QMAX( 16, 256 / m_cres )); 158 contrast_ac-> setTickInterval ( QMAX( 16, 256 / m_cres ));
159 contrast_ac-> setLineStep ( QMAX( 1, 256 / m_cres )); 159 contrast_ac-> setLineStep ( QMAX( 1, 256 / m_cres ));
160 contrast_ac-> setPageStep ( QMAX( 1, 256 / m_cres )); 160 contrast_ac-> setPageStep ( QMAX( 1, 256 / m_cres ));
161 contrast_ac-> setValue ( contr ); 161 contrast_ac-> setValue ( contr );
162 } 162 }
163 163
164 // light sensor 164 // light sensor
165 auto_brightness_ac-> setChecked ( config. readBoolEntry ( "LightSensor", false )); 165 auto_brightness_ac-> setChecked ( config. readBoolEntry ( "LightSensor", false ));
166 m_sensordata_ac = config. readListEntry ( "LightSensorData", ';' ); 166 m_sensordata_ac = config. readListEntry ( "LightSensorData", ';' );
167 167
168 // warnings 168 // warnings
169 config. setGroup ( "Warnings" ); 169 config. setGroup ( "Warnings" );
170 warnintervalBox-> setValue ( config. readNumEntry ( "checkinterval", 10000 ) / 1000 ); 170 warnintervalBox-> setValue ( config. readNumEntry ( "checkinterval", 10000 ) / 1000 );
171 lowSpinBox-> setValue ( config. readNumEntry ( "powerverylow", 10 ) ); 171 lowSpinBox-> setValue ( config. readNumEntry ( "powerverylow", 10 ) );
172 criticalSpinBox-> setValue ( config. readNumEntry ( "powercritical", 5 ) ); 172 criticalSpinBox-> setValue ( config. readNumEntry ( "powercritical", 5 ) );
173 173
174 m_resettimer = new QTimer ( this ); 174 m_resettimer = new QTimer ( this );
175 connect ( m_resettimer, SIGNAL( timeout ( )), this, SLOT( resetBacklight ( ))); 175 connect ( m_resettimer, SIGNAL( timeout()), this, SLOT( resetBacklight()));
176 176
177 if ( PowerStatusManager::readStatus ( ). acStatus ( ) != PowerStatus::Online ) { 177 if ( PowerStatusManager::readStatus ( ). acStatus ( ) != PowerStatus::Online ) {
178 tabs-> setCurrentPage ( 0 ); 178 tabs-> setCurrentPage ( 0 );
179 } 179 }
180 else { 180 else {
181 tabs-> setCurrentPage ( 1 ); 181 tabs-> setCurrentPage ( 1 );
182 } 182 }
183 183
184 connect ( brightness, SIGNAL( valueChanged ( int )), this, SLOT( setBacklight ( int ))); 184 connect ( brightness, SIGNAL( valueChanged(int)), this, SLOT( setBacklight(int)));
185 connect ( brightness_ac, SIGNAL( valueChanged ( int )), this, SLOT( setBacklight ( int ))); 185 connect ( brightness_ac, SIGNAL( valueChanged(int)), this, SLOT( setBacklight(int)));
186 if (m_cres) { 186 if (m_cres) {
187 connect ( contrast, SIGNAL( valueChanged ( int )), this, SLOT( setContrast ( int ))); 187 connect ( contrast, SIGNAL( valueChanged(int)), this, SLOT( setContrast(int)));
188 connect ( contrast_ac, SIGNAL( valueChanged ( int )), this, SLOT( setContrast ( int ))); 188 connect ( contrast_ac, SIGNAL( valueChanged(int)), this, SLOT( setContrast(int)));
189 } 189 }
190 connect( frequency, SIGNAL( activated(int) ), this, SLOT( setFrequency(int) ) ); 190 connect( frequency, SIGNAL( activated(int) ), this, SLOT( setFrequency(int) ) );
191 connect( frequency_ac, SIGNAL( activated(int) ), this, SLOT( setFrequency(int) ) ); 191 connect( frequency_ac, SIGNAL( activated(int) ), this, SLOT( setFrequency(int) ) );
192 connect( closeHingeAction, SIGNAL( activated(int) ), this, SLOT( setCloseHingeAction(int) ) ); 192 connect( closeHingeAction, SIGNAL( activated(int) ), this, SLOT( setCloseHingeAction(int) ) );
193 connect( closeHingeAction_ac, SIGNAL( activated(int) ), this, SLOT( setCloseHingeAction(int) ) ); 193 connect( closeHingeAction_ac, SIGNAL( activated(int) ), this, SLOT( setCloseHingeAction(int) ) );
194} 194}
195 195
196LightSettings::~LightSettings ( ) 196LightSettings::~LightSettings ( )
197{ 197{
198} 198}
199 199
200void LightSettings::calibrateSensor ( ) 200void LightSettings::calibrateSensor ( )
201{ 201{
202 Sensor *s = new Sensor ( m_sensordata, this ); 202 Sensor *s = new Sensor ( m_sensordata, this );
203 connect ( s, SIGNAL( viewBacklight ( int )), this, SLOT( setBacklight ( int ))); 203 connect ( s, SIGNAL( viewBacklight(int)), this, SLOT( setBacklight(int)));
204 QPEApplication::execDialog( s ); 204 QPEApplication::execDialog( s );
205 delete s; 205 delete s;
206} 206}
207 207
208void LightSettings::calibrateSensorAC ( ) 208void LightSettings::calibrateSensorAC ( )
209{ 209{
210 Sensor *s = new Sensor ( m_sensordata_ac, this ); 210 Sensor *s = new Sensor ( m_sensordata_ac, this );
211 connect ( s, SIGNAL( viewBacklight ( int )), this, SLOT( setBacklight ( int ))); 211 connect ( s, SIGNAL( viewBacklight(int)), this, SLOT( setBacklight(int)));
212 QPEApplication::execDialog ( s ); 212 QPEApplication::execDialog ( s );
213 delete s; 213 delete s;
214} 214}
215 215
216void LightSettings::setBacklight ( int bright ) 216void LightSettings::setBacklight ( int bright )
217{ 217{
218 QCopEnvelope e ( "QPE/System", "setBacklight(int)" ); 218 QCopEnvelope e ( "QPE/System", "setBacklight(int)" );
219 e << bright; 219 e << bright;
220 220
221 if ( bright != -1 ) { 221 if ( bright != -1 ) {
222 m_resettimer-> stop ( ); 222 m_resettimer-> stop ( );
223 m_resettimer-> start ( 4000, true ); 223 m_resettimer-> start ( 4000, true );
224 } 224 }
225} 225}
226 226
227void LightSettings::setContrast ( int contr ) 227void LightSettings::setContrast ( int contr )
228{ 228{
229 if (contr == -1) contr = m_oldcontrast; 229 if (contr == -1) contr = m_oldcontrast;
230 ODevice::inst ( )-> setDisplayContrast(contr); 230 ODevice::inst ( )-> setDisplayContrast(contr);
231} 231}
232 232
233void LightSettings::setFrequency ( int index ) 233void LightSettings::setFrequency ( int index )
234{ 234{
235 qWarning("LightSettings::setFrequency(%d)", index); 235 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 )
52 case 5: lmin = params [4]. toInt ( ); 52 case 5: lmin = params [4]. toInt ( );
53 case 4: smax = params [3]. toInt ( ); 53 case 4: smax = params [3]. toInt ( );
54 case 3: smin = params [2]. toInt ( ); 54 case 3: smin = params [2]. toInt ( );
55 case 2: steps = params [1]. toInt ( ); 55 case 2: steps = params [1]. toInt ( );
56 case 1: inter = params [0]. toInt ( ) / 1000; 56 case 1: inter = params [0]. toInt ( ) / 1000;
57 } 57 }
58 58
59 int xscale = ODevice::inst ( )-> lightSensorResolution ( ); 59 int xscale = ODevice::inst ( )-> lightSensorResolution ( );
60 int yscale = ODevice::inst ( )-> displayBrightnessResolution ( ); 60 int yscale = ODevice::inst ( )-> displayBrightnessResolution ( );
61 61
62 QVBoxLayout *lay = new QVBoxLayout ( frame ); 62 QVBoxLayout *lay = new QVBoxLayout ( frame );
63 lay-> setMargin ( 2 ); 63 lay-> setMargin ( 2 );
64 m_calib = new Calibration ( frame ); 64 m_calib = new Calibration ( frame );
65 lay-> add ( m_calib ); 65 lay-> add ( m_calib );
66 66
67 m_calib-> setScale ( QSize ( xscale, yscale )); 67 m_calib-> setScale ( QSize ( xscale, yscale ));
68 m_calib-> setLineSteps ( steps ); 68 m_calib-> setLineSteps ( steps );
69 m_calib-> setInterval ( inter ); 69 m_calib-> setInterval ( inter );
70 m_calib-> setStartPoint ( QPoint ( smin * xscale / 256, lmax * yscale / 256 )); 70 m_calib-> setStartPoint ( QPoint ( smin * xscale / 256, lmax * yscale / 256 ));
71 m_calib-> setEndPoint ( QPoint ( smax * xscale / 256, lmin * yscale / 256 )); 71 m_calib-> setEndPoint ( QPoint ( smax * xscale / 256, lmin * yscale / 256 ));
72 72
73 interval-> setValue ( inter ); 73 interval-> setValue ( inter );
74 linesteps-> setValue ( steps ); 74 linesteps-> setValue ( steps );
75 75
76 connect ( interval, SIGNAL( valueChanged ( int )), m_calib, SLOT( setInterval ( int ))); 76 connect ( interval, SIGNAL( valueChanged(int)), m_calib, SLOT( setInterval(int)));
77 connect ( linesteps, SIGNAL( valueChanged ( int )), m_calib, SLOT( setLineSteps ( int ))); 77 connect ( linesteps, SIGNAL( valueChanged(int)), m_calib, SLOT( setLineSteps(int)));
78 78
79 connect ( m_calib, SIGNAL( startPointChanged ( const QPoint & )), this, SLOT( pointDrag ( const QPoint & ))); 79 connect ( m_calib, SIGNAL( startPointChanged(const QPoint&)), this, SLOT( pointDrag(const QPoint&)));
80 connect ( m_calib, SIGNAL( endPointChanged ( const QPoint & )), this, SLOT( pointDrag ( const QPoint & ))); 80 connect ( m_calib, SIGNAL( endPointChanged(const QPoint&)), this, SLOT( pointDrag(const QPoint&)));
81} 81}
82 82
83void Sensor::accept ( ) 83void Sensor::accept ( )
84{ 84{
85 int xscale = ODevice::inst ( )-> lightSensorResolution ( ); 85 int xscale = ODevice::inst ( )-> lightSensorResolution ( );
86 int yscale = ODevice::inst ( )-> displayBrightnessResolution ( ); 86 int yscale = ODevice::inst ( )-> displayBrightnessResolution ( );
87 87
88 m_params. clear ( ); 88 m_params. clear ( );
89 m_params << QString::number ( m_calib-> interval ( ) * 1000 ) 89 m_params << QString::number ( m_calib-> interval ( ) * 1000 )
90 << QString::number ( m_calib-> lineSteps ( )) 90 << QString::number ( m_calib-> lineSteps ( ))
91 << QString::number ( m_calib-> startPoint ( ). x ( ) * 256 / xscale ) 91 << QString::number ( m_calib-> startPoint ( ). x ( ) * 256 / xscale )
92 << QString::number ( m_calib-> endPoint ( ). x ( ) * 256 / xscale ) 92 << QString::number ( m_calib-> endPoint ( ). x ( ) * 256 / xscale )
93 << QString::number ( m_calib-> endPoint ( ). y ( ) * 256 / yscale ) 93 << QString::number ( m_calib-> endPoint ( ). y ( ) * 256 / yscale )
94 << QString::number ( m_calib-> startPoint ( ). y ( ) * 256 / yscale ); 94 << QString::number ( m_calib-> startPoint ( ). y ( ) * 256 / yscale );
95 95
96 QDialog::accept ( ); 96 QDialog::accept ( );
97} 97}
98 98
99void Sensor::pointDrag ( const QPoint &p ) 99void Sensor::pointDrag ( const QPoint &p )
100{ 100{
101 emit viewBacklight ( p. y ( )); 101 emit viewBacklight ( p. y ( ));
102} 102}