author | ar <ar> | 2004-05-02 17:31:50 (UTC) |
---|---|---|
committer | ar <ar> | 2004-05-02 17:31:50 (UTC) |
commit | a210b9a597ba0c929d95c38ffbaf972916c7b8a7 (patch) (unidiff) | |
tree | ce121d5017eb054222c86e0afb6057a28ea7bf8a /core/settings | |
parent | 18759e9156c96795831120408a9da0d3b4ec71a4 (diff) | |
download | opie-a210b9a597ba0c929d95c38ffbaf972916c7b8a7.zip opie-a210b9a597ba0c929d95c38ffbaf972916c7b8a7.tar.gz opie-a210b9a597ba0c929d95c38ffbaf972916c7b8a7.tar.bz2 |
- convert qDebug to odebug
-rw-r--r-- | core/settings/button/remapdlg.cpp | 16 | ||||
-rw-r--r-- | core/settings/citytime/citytime.cpp | 6 | ||||
-rw-r--r-- | core/settings/citytime/citytimebase.cpp | 10 | ||||
-rw-r--r-- | core/settings/citytime/zonemap.cpp | 12 | ||||
-rw-r--r-- | core/settings/launcher/doctabsettings.cpp | 6 | ||||
-rw-r--r-- | core/settings/launcher/inputmethodsettings.cpp | 6 | ||||
-rw-r--r-- | core/settings/launcher/tabdialog.cpp | 18 | ||||
-rw-r--r-- | core/settings/launcher/taskbarsettings.cpp | 22 | ||||
-rw-r--r-- | core/settings/light-and-power/light.cpp | 7 | ||||
-rw-r--r-- | core/settings/security/security.cpp | 8 | ||||
-rw-r--r-- | core/settings/security/security.pro | 2 |
11 files changed, 77 insertions, 36 deletions
diff --git a/core/settings/button/remapdlg.cpp b/core/settings/button/remapdlg.cpp index 4effebc..cadb955 100644 --- a/core/settings/button/remapdlg.cpp +++ b/core/settings/button/remapdlg.cpp | |||
@@ -1,18 +1,24 @@ | |||
1 | |||
2 | #include "remapdlg.h" | ||
3 | #include "buttonutils.h" | ||
4 | |||
5 | /* OPIE */ | ||
6 | #include <opie2/odebug.h> | ||
7 | |||
8 | /* QT */ | ||
1 | #include <qlistview.h> | 9 | #include <qlistview.h> |
2 | #include <qcombobox.h> | 10 | #include <qcombobox.h> |
3 | #include <qtimer.h> | 11 | #include <qtimer.h> |
4 | 12 | ||
5 | #include "remapdlg.h" | ||
6 | #include "buttonutils.h" | ||
7 | 13 | ||
8 | 14 | ||
9 | using namespace Opie::Core; | 15 | using namespace Opie::Core; |
10 | class NoSortItem : public QListViewItem { | 16 | class NoSortItem : public QListViewItem { |
11 | public: | 17 | public: |
12 | NoSortItem ( QListView *lv, uint pos, const QString &str, const QCString &s1 = 0, const QCString &s2 = 0 ) | 18 | NoSortItem ( QListView *lv, uint pos, const QString &str, const QCString &s1 = 0, const QCString &s2 = 0 ) |
13 | : QListViewItem ( lv, str, s1, s2 ) | 19 | : QListViewItem ( lv, str, s1, s2 ) |
14 | { | 20 | { |
15 | m_key = QString ( QChar ( 'a' + pos )); | 21 | m_key = QString ( QChar ( 'a' + pos )); |
16 | m_def = false; | 22 | m_def = false; |
17 | } | 23 | } |
18 | 24 | ||
@@ -99,34 +105,34 @@ void RemapDlg::delayedInit ( ) | |||
99 | } | 105 | } |
100 | 106 | ||
101 | void RemapDlg::itemChanged ( QListViewItem *it ) | 107 | void RemapDlg::itemChanged ( QListViewItem *it ) |
102 | { | 108 | { |
103 | bool enabled = false; | 109 | bool enabled = false; |
104 | OQCopMessage m; | 110 | OQCopMessage m; |
105 | 111 | ||
106 | m_current = it; | 112 | m_current = it; |
107 | 113 | ||
108 | if ( it == m_map_none ) | 114 | if ( it == m_map_none ) |
109 | { | 115 | { |
110 | m_msg = m = OQCopMessage ( "ignore", 0 ); | 116 | m_msg = m = OQCopMessage ( "ignore", 0 ); |
111 | qDebug ("***ignoring"); | 117 | odebug << "***ignoring" << oendl; |
112 | } | 118 | } |
113 | else if ( it == m_map_preset ) | 119 | else if ( it == m_map_preset ) |
114 | { | 120 | { |
115 | m_msg = m = m_msg_preset; | 121 | m_msg = m = m_msg_preset; |
116 | qDebug ("***Preset"); | 122 | odebug << "***Preset" << oendl; |
117 | } | 123 | } |
118 | else if ( it && !it-> childCount ( ) ) | 124 | else if ( it && !it-> childCount ( ) ) |
119 | { | 125 | { |
120 | qDebug ("***Custom: %s %s ",it-> text ( 1 ). latin1 ( ), it-> text ( 2 ). latin1 ( )); | 126 | odebug << "***Custom: " << it-> text ( 1 ). latin1 ( ) << " " << it-> text ( 2 ). latin1 ( ) << oendl; |
121 | enabled = ( it == m_map_custom ); | 127 | enabled = ( it == m_map_custom ); |
122 | m_msg = m = OQCopMessage ( it-> text ( 1 ). latin1 ( ), it-> text ( 2 ). latin1 ( )); | 128 | m_msg = m = OQCopMessage ( it-> text ( 1 ). latin1 ( ), it-> text ( 2 ). latin1 ( )); |
123 | } | 129 | } |
124 | 130 | ||
125 | w_channel-> setEnabled ( enabled ); | 131 | w_channel-> setEnabled ( enabled ); |
126 | w_message-> setEnabled ( enabled ); | 132 | w_message-> setEnabled ( enabled ); |
127 | 133 | ||
128 | w_channel-> setEditText ( m. channel ( )); | 134 | w_channel-> setEditText ( m. channel ( )); |
129 | //hack for if user has typed in a message, such as 'suspend()' | 135 | //hack for if user has typed in a message, such as 'suspend()' |
130 | //so raise() is always present | 136 | //so raise() is always present |
131 | if(m. message ( ) != "raise()") | 137 | if(m. message ( ) != "raise()") |
132 | w_message->insertItem("raise()"); | 138 | w_message->insertItem("raise()"); |
diff --git a/core/settings/citytime/citytime.cpp b/core/settings/citytime/citytime.cpp index 721285d..d73bda1 100644 --- a/core/settings/citytime/citytime.cpp +++ b/core/settings/citytime/citytime.cpp | |||
@@ -14,48 +14,52 @@ | |||
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | // changes by Maximilian Reiss <harlekin@handhelds.org> | 21 | // changes by Maximilian Reiss <harlekin@handhelds.org> |
22 | 22 | ||
23 | #include "zonemap.h" | 23 | #include "zonemap.h" |
24 | #include "citytime.h" | 24 | #include "citytime.h" |
25 | 25 | ||
26 | /* OPIE */ | ||
26 | #include <qpe/qpeapplication.h> | 27 | #include <qpe/qpeapplication.h> |
27 | #include <qpe/config.h> | 28 | #include <qpe/config.h> |
28 | #include <qpe/tzselect.h> | 29 | #include <qpe/tzselect.h> |
29 | #if !defined(QT_NO_COP) | 30 | #if !defined(QT_NO_COP) |
30 | #include <qpe/qcopenvelope_qws.h> | 31 | #include <qpe/qcopenvelope_qws.h> |
31 | #endif | 32 | #endif |
33 | #include <opie2/odebug.h> | ||
32 | 34 | ||
35 | /* QT */ | ||
33 | #include <qlabel.h> | 36 | #include <qlabel.h> |
34 | #include <qmessagebox.h> | 37 | #include <qmessagebox.h> |
35 | #include <qtoolbutton.h> | 38 | #include <qtoolbutton.h> |
36 | #include <qlayout.h> | 39 | #include <qlayout.h> |
37 | 40 | ||
41 | /* STD */ | ||
38 | #include <stdlib.h> | 42 | #include <stdlib.h> |
39 | 43 | ||
40 | CityTime::CityTime( QWidget *parent, const char* name, | 44 | CityTime::CityTime( QWidget *parent, const char* name, |
41 | WFlags fl ) | 45 | WFlags fl ) |
42 | : CityTimeBase( parent, name, fl ), | 46 | : CityTimeBase( parent, name, fl ), |
43 | strRealTz(0), | 47 | strRealTz(0), |
44 | bAdded(false) | 48 | bAdded(false) |
45 | { | 49 | { |
46 | Config config( "qpe" ); | 50 | Config config( "qpe" ); |
47 | config.setGroup( "Time" ); | 51 | config.setGroup( "Time" ); |
48 | bWhichClock = config.readBoolEntry( "AMPM", TRUE ); | 52 | bWhichClock = config.readBoolEntry( "AMPM", TRUE ); |
49 | qDebug( QString("%1").arg(bWhichClock) ); | 53 | odebug << QString("%1").arg(bWhichClock) << oendl; |
50 | frmMap->changeClock( bWhichClock ); | 54 | frmMap->changeClock( bWhichClock ); |
51 | 55 | ||
52 | char *pEnv; | 56 | char *pEnv; |
53 | pEnv = NULL; | 57 | pEnv = NULL; |
54 | pEnv = getenv("TZ"); | 58 | pEnv = getenv("TZ"); |
55 | if ( pEnv ) | 59 | if ( pEnv ) |
56 | strRealTz = pEnv; | 60 | strRealTz = pEnv; |
57 | pEnv = NULL; | 61 | pEnv = NULL; |
58 | pEnv = getenv("HOME"); | 62 | pEnv = getenv("HOME"); |
59 | if ( pEnv ) | 63 | if ( pEnv ) |
60 | strHome = pEnv; | 64 | strHome = pEnv; |
61 | // append the labels to their respective lists... | 65 | // append the labels to their respective lists... |
diff --git a/core/settings/citytime/citytimebase.cpp b/core/settings/citytime/citytimebase.cpp index 323929b..77cb91d 100644 --- a/core/settings/citytime/citytimebase.cpp +++ b/core/settings/citytime/citytimebase.cpp | |||
@@ -1,21 +1,25 @@ | |||
1 | 1 | ||
2 | 2 | ||
3 | // changes by Maximilian Reiss <harlekin@handhelds.org> | 3 | // changes by Maximilian Reiss <harlekin@handhelds.org> |
4 | 4 | ||
5 | #include "citytimebase.h" | 5 | #include "citytimebase.h" |
6 | #include "zonemap.h" | ||
7 | |||
8 | /* OPIE */ | ||
9 | #include <opie2/odebug.h> | ||
6 | 10 | ||
11 | /* QT */ | ||
7 | #include <qlabel.h> | 12 | #include <qlabel.h> |
8 | #include <qtoolbutton.h> | 13 | #include <qtoolbutton.h> |
9 | #include "zonemap.h" | ||
10 | #include <qlayout.h> | 14 | #include <qlayout.h> |
11 | #include <qwhatsthis.h> | 15 | #include <qwhatsthis.h> |
12 | 16 | ||
13 | 17 | ||
14 | /* | 18 | /* |
15 | * Constructs a CityTimeBase which is a child of 'parent', with the | 19 | * Constructs a CityTimeBase which is a child of 'parent', with the |
16 | * name 'name' and widget flags set to 'f' | 20 | * name 'name' and widget flags set to 'f' |
17 | */ | 21 | */ |
18 | CityTimeBase::CityTimeBase( QWidget* parent, const char* name, WFlags ) | 22 | CityTimeBase::CityTimeBase( QWidget* parent, const char* name, WFlags ) |
19 | : QWidget( parent, name, WStyle_ContextHelp ) | 23 | : QWidget( parent, name, WStyle_ContextHelp ) |
20 | { | 24 | { |
21 | if ( !name ) | 25 | if ( !name ) |
@@ -392,20 +396,20 @@ bool CityTimeBase::event( QEvent* ev ) | |||
392 | QFont lblCTime3_font( lblCTime3->font() ); | 396 | QFont lblCTime3_font( lblCTime3->font() ); |
393 | lblCTime3_font.setPointSize( 10 ); | 397 | lblCTime3_font.setPointSize( 10 ); |
394 | lblCTime3->setFont( lblCTime3_font ); | 398 | lblCTime3->setFont( lblCTime3_font ); |
395 | QFont cmdCity9_font( cmdCity9->font() ); | 399 | QFont cmdCity9_font( cmdCity9->font() ); |
396 | cmdCity9_font.setBold( TRUE ); | 400 | cmdCity9_font.setBold( TRUE ); |
397 | cmdCity9->setFont( cmdCity9_font ); | 401 | cmdCity9->setFont( cmdCity9_font ); |
398 | } | 402 | } |
399 | return ret; | 403 | return ret; |
400 | } | 404 | } |
401 | 405 | ||
402 | void CityTimeBase::beginNewTz() | 406 | void CityTimeBase::beginNewTz() |
403 | { | 407 | { |
404 | qWarning( "CityTimeBase::beginNewTz(): Not implemented yet!" ); | 408 | owarn << "CityTimeBase::beginNewTz(): Not implemented yet!" << oendl; |
405 | } | 409 | } |
406 | 410 | ||
407 | void CityTimeBase::slotNewTz(const QString &, const QString &) | 411 | void CityTimeBase::slotNewTz(const QString &, const QString &) |
408 | { | 412 | { |
409 | qWarning( "CityTimeBase::slotNewTz(const QString &, const QString &): Not implemented yet!" ); | 413 | owarn << "CityTimeBase::slotNewTz(const QString &, const QString &): Not implemented yet!" << oendl; |
410 | } | 414 | } |
411 | 415 | ||
diff --git a/core/settings/citytime/zonemap.cpp b/core/settings/citytime/zonemap.cpp index b6843d2..e4a25ef 100644 --- a/core/settings/citytime/zonemap.cpp +++ b/core/settings/citytime/zonemap.cpp | |||
@@ -14,38 +14,42 @@ | |||
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | 20 | ||
21 | // changes by Maximilian Reiss <harlekin@handhelds.org> | 21 | // changes by Maximilian Reiss <harlekin@handhelds.org> |
22 | 22 | ||
23 | #include "sun.h" | 23 | #include "sun.h" |
24 | #include "zonemap.h" | 24 | #include "zonemap.h" |
25 | 25 | ||
26 | /* OPIE */ | ||
26 | #include <qpe/resource.h> | 27 | #include <qpe/resource.h> |
27 | #include <qpe/qpeapplication.h> | 28 | #include <qpe/qpeapplication.h> |
29 | #include <opie2/odebug.h> | ||
28 | 30 | ||
31 | /* QT */ | ||
29 | #include <qfile.h> | 32 | #include <qfile.h> |
30 | #include <qlabel.h> | 33 | #include <qlabel.h> |
31 | #include <qmessagebox.h> | 34 | #include <qmessagebox.h> |
32 | #include <qtextstream.h> | 35 | #include <qtextstream.h> |
33 | #include <qtimer.h> | 36 | #include <qtimer.h> |
34 | #include <qtoolbutton.h> | 37 | #include <qtoolbutton.h> |
35 | #include <qlayout.h> | 38 | #include <qlayout.h> |
36 | #include <qhbox.h> | 39 | #include <qhbox.h> |
37 | #include <qlistview.h> | 40 | #include <qlistview.h> |
38 | #include <qwhatsthis.h> | 41 | #include <qwhatsthis.h> |
39 | 42 | ||
43 | /* STD */ | ||
40 | #include <limits.h> | 44 | #include <limits.h> |
41 | 45 | ||
42 | // the map file... | 46 | // the map file... |
43 | static const char strZONEINFO[] = "/usr/share/zoneinfo/zone.tab"; | 47 | static const char strZONEINFO[] = "/usr/share/zoneinfo/zone.tab"; |
44 | static const char strMAP[] = "citytime/simple_grid_400"; | 48 | static const char strMAP[] = "citytime/simple_grid_400"; |
45 | 49 | ||
46 | // the maximum distance we'll allow the pointer to be away from a city | 50 | // the maximum distance we'll allow the pointer to be away from a city |
47 | // and still show the city's time | 51 | // and still show the city's time |
48 | static const int iTHRESHOLD = 50000; | 52 | static const int iTHRESHOLD = 50000; |
49 | 53 | ||
50 | // The label offset (how far away from pointer) | 54 | // The label offset (how far away from pointer) |
51 | static const int iLABELOFFSET = 8; | 55 | static const int iLABELOFFSET = 8; |
@@ -121,28 +125,28 @@ ZoneField::ZoneField( const QString& strLine ) | |||
121 | iLen = (iStop - iStart) + 1; | 125 | iLen = (iStop - iStart) + 1; |
122 | strCountry = strLine.mid( iStart, iLen ); | 126 | strCountry = strLine.mid( iStart, iLen ); |
123 | } | 127 | } |
124 | // now match the city... | 128 | // now match the city... |
125 | iStart = regCity.match( strLine, iStart + iLen, &iLen ); | 129 | iStart = regCity.match( strLine, iStart + iLen, &iLen ); |
126 | if ( iStart >= 0 ) { | 130 | if ( iStart >= 0 ) { |
127 | strCity = strLine.mid( iStart, iLen ); | 131 | strCity = strLine.mid( iStart, iLen ); |
128 | } | 132 | } |
129 | } | 133 | } |
130 | 134 | ||
131 | void ZoneField::showStructure( void ) const | 135 | void ZoneField::showStructure( void ) const |
132 | { | 136 | { |
133 | qDebug( "Country: %s", strCountry.latin1() ); | 137 | odebug << "Country: " << strCountry << "" << oendl; |
134 | qDebug( "City: %s", strCity.latin1() ); | 138 | odebug << "City: " << strCity << "" << oendl; |
135 | qDebug( "x: %d", _x ); | 139 | odebug << "x: " << _x << "" << oendl; |
136 | qDebug( "y: %d\n", _y ); | 140 | odebug << "y: " << _y << "\n" << oendl; |
137 | } | 141 | } |
138 | 142 | ||
139 | ZoneMap::ZoneMap( QWidget *parent, const char* name ) | 143 | ZoneMap::ZoneMap( QWidget *parent, const char* name ) |
140 | : QScrollView( parent, name ), | 144 | : QScrollView( parent, name ), |
141 | pLast( 0 ), | 145 | pLast( 0 ), |
142 | pRepaint( 0 ), | 146 | pRepaint( 0 ), |
143 | ox( 0 ), | 147 | ox( 0 ), |
144 | oy( 0 ), | 148 | oy( 0 ), |
145 | drawableW( -1 ), | 149 | drawableW( -1 ), |
146 | drawableH( -1 ), | 150 | drawableH( -1 ), |
147 | bZoom( FALSE ), | 151 | bZoom( FALSE ), |
148 | bIllum( TRUE ), | 152 | bIllum( TRUE ), |
diff --git a/core/settings/launcher/doctabsettings.cpp b/core/settings/launcher/doctabsettings.cpp index 179a7f9..dfdc9be 100644 --- a/core/settings/launcher/doctabsettings.cpp +++ b/core/settings/launcher/doctabsettings.cpp | |||
@@ -19,50 +19,54 @@ | |||
19 | ++= -. .` .: | 19 | ++= -. .` .: |
20 | : = ...= . :.=- You should have received a copy of the GNU | 20 | : = ...= . :.=- You should have received a copy of the GNU |
21 | -. .:....=;==+<; General Public License along with this file; | 21 | -. .:....=;==+<; General Public License along with this file; |
22 | -_. . . )=. = see the file COPYING. If not, write to the | 22 | -_. . . )=. = see the file COPYING. If not, write to the |
23 | -- :-=` Free Software Foundation, Inc., | 23 | -- :-=` Free Software Foundation, Inc., |
24 | 59 Temple Place - Suite 330, | 24 | 59 Temple Place - Suite 330, |
25 | Boston, MA 02111-1307, USA. | 25 | Boston, MA 02111-1307, USA. |
26 | 26 | ||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include "doctabsettings.h" | 29 | #include "doctabsettings.h" |
30 | 30 | ||
31 | /* OPIE */ | ||
31 | #include <qpe/config.h> | 32 | #include <qpe/config.h> |
33 | #include <opie2/odebug.h> | ||
32 | 34 | ||
35 | /* QT */ | ||
33 | #include <qcheckbox.h> | 36 | #include <qcheckbox.h> |
34 | #include <qlayout.h> | 37 | #include <qlayout.h> |
35 | #include <qlabel.h> | 38 | #include <qlabel.h> |
36 | #include <qwhatsthis.h> | 39 | #include <qwhatsthis.h> |
37 | 40 | ||
41 | |||
38 | DocTabSettings::DocTabSettings( QWidget *parent, const char *name ):QWidget( parent, name ) | 42 | DocTabSettings::DocTabSettings( QWidget *parent, const char *name ):QWidget( parent, name ) |
39 | { | 43 | { |
40 | QBoxLayout *lay = new QVBoxLayout( this, 4, 4 ); | 44 | QBoxLayout *lay = new QVBoxLayout( this, 4, 4 ); |
41 | 45 | ||
42 | _enable = new QCheckBox( tr( "Enable the Documents Tab" ), this ); | 46 | _enable = new QCheckBox( tr( "Enable the Documents Tab" ), this ); |
43 | 47 | ||
44 | Config cfg( "Launcher" ); | 48 | Config cfg( "Launcher" ); |
45 | cfg.setGroup( "DocTab" ); | 49 | cfg.setGroup( "DocTab" ); |
46 | _enable->setChecked( cfg.readBoolEntry( "Enable", true ) ); | 50 | _enable->setChecked( cfg.readBoolEntry( "Enable", true ) ); |
47 | 51 | ||
48 | lay->addWidget( _enable ); | 52 | lay->addWidget( _enable ); |
49 | lay->addWidget( new QLabel( tr( "<b>Note:</b> Changing these settings may need restarting Opie to become effective." ), this ) ); | 53 | lay->addWidget( new QLabel( tr( "<b>Note:</b> Changing these settings may need restarting Opie to become effective." ), this ) ); |
50 | 54 | ||
51 | lay->addStretch(); | 55 | lay->addStretch(); |
52 | 56 | ||
53 | QWhatsThis::add( _enable, tr( "Check, if you want the Documents Tab to be visible." ) ); | 57 | QWhatsThis::add( _enable, tr( "Check, if you want the Documents Tab to be visible." ) ); |
54 | } | 58 | } |
55 | 59 | ||
56 | void DocTabSettings::appletChanged() | 60 | void DocTabSettings::appletChanged() |
57 | { | 61 | { |
58 | } | 62 | } |
59 | 63 | ||
60 | void DocTabSettings::accept() | 64 | void DocTabSettings::accept() |
61 | { | 65 | { |
62 | qDebug( "DocTabSettings::accept()" ); | 66 | odebug << "DocTabSettings::accept()" << oendl; |
63 | Config cfg( "Launcher" ); | 67 | Config cfg( "Launcher" ); |
64 | cfg.setGroup( "DocTab" ); | 68 | cfg.setGroup( "DocTab" ); |
65 | cfg.writeEntry( "Enable", _enable->isChecked() ); | 69 | cfg.writeEntry( "Enable", _enable->isChecked() ); |
66 | cfg.write(); | 70 | cfg.write(); |
67 | } | 71 | } |
68 | 72 | ||
diff --git a/core/settings/launcher/inputmethodsettings.cpp b/core/settings/launcher/inputmethodsettings.cpp index e342c09..0422075 100644 --- a/core/settings/launcher/inputmethodsettings.cpp +++ b/core/settings/launcher/inputmethodsettings.cpp | |||
@@ -19,32 +19,36 @@ | |||
19 | ++= -. .` .: | 19 | ++= -. .` .: |
20 | : = ...= . :.=- You should have received a copy of the GNU | 20 | : = ...= . :.=- You should have received a copy of the GNU |
21 | -. .:....=;==+<; General Public License along with this file; | 21 | -. .:....=;==+<; General Public License along with this file; |
22 | -_. . . )=. = see the file COPYING. If not, write to the | 22 | -_. . . )=. = see the file COPYING. If not, write to the |
23 | -- :-=` Free Software Foundation, Inc., | 23 | -- :-=` Free Software Foundation, Inc., |
24 | 59 Temple Place - Suite 330, | 24 | 59 Temple Place - Suite 330, |
25 | Boston, MA 02111-1307, USA. | 25 | Boston, MA 02111-1307, USA. |
26 | 26 | ||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include "inputmethodsettings.h" | 29 | #include "inputmethodsettings.h" |
30 | 30 | ||
31 | /* OPIE */ | ||
31 | #include <qpe/config.h> | 32 | #include <qpe/config.h> |
33 | #include <opie2/odebug.h> | ||
32 | 34 | ||
35 | /* QT */ | ||
33 | #include <qspinbox.h> | 36 | #include <qspinbox.h> |
34 | #include <qcheckbox.h> | 37 | #include <qcheckbox.h> |
35 | #include <qlayout.h> | 38 | #include <qlayout.h> |
36 | #include <qlabel.h> | 39 | #include <qlabel.h> |
37 | #include <qwhatsthis.h> | 40 | #include <qwhatsthis.h> |
38 | 41 | ||
42 | |||
39 | InputMethodSettings::InputMethodSettings( QWidget *parent, const char *name ):QWidget( parent, name ) | 43 | InputMethodSettings::InputMethodSettings( QWidget *parent, const char *name ):QWidget( parent, name ) |
40 | { | 44 | { |
41 | QBoxLayout *lay = new QVBoxLayout( this, 4, 4 ); | 45 | QBoxLayout *lay = new QVBoxLayout( this, 4, 4 ); |
42 | 46 | ||
43 | _resize = new QCheckBox( tr( "Resize application on Popup" ), this ); | 47 | _resize = new QCheckBox( tr( "Resize application on Popup" ), this ); |
44 | _float = new QCheckBox( tr( "Enable floating and resizing" ), this ); | 48 | _float = new QCheckBox( tr( "Enable floating and resizing" ), this ); |
45 | 49 | ||
46 | QHBoxLayout* hbox = new QHBoxLayout( lay, 4 ); | 50 | QHBoxLayout* hbox = new QHBoxLayout( lay, 4 ); |
47 | hbox->addWidget( new QLabel( "Initial Width:", this ) ); | 51 | hbox->addWidget( new QLabel( "Initial Width:", this ) ); |
48 | _size = new QSpinBox( 10, 100, 10, this ); | 52 | _size = new QSpinBox( 10, 100, 10, this ); |
49 | _size->setSuffix( "%" ); | 53 | _size->setSuffix( "%" ); |
50 | hbox->addWidget( _size ); | 54 | hbox->addWidget( _size ); |
@@ -64,21 +68,21 @@ InputMethodSettings::InputMethodSettings( QWidget *parent, const char *name ):QW | |||
64 | 68 | ||
65 | QWhatsThis::add( _resize, tr( "Check, if you want the application to be automatically resized if the input method pops up." ) ); | 69 | QWhatsThis::add( _resize, tr( "Check, if you want the application to be automatically resized if the input method pops up." ) ); |
66 | QWhatsThis::add( _float, tr( "Check, if you want to move and/or resize input methods" ) ); | 70 | QWhatsThis::add( _float, tr( "Check, if you want to move and/or resize input methods" ) ); |
67 | QWhatsThis::add( _size, tr( "Specify the percentage of the screen width for the input method" ) ); | 71 | QWhatsThis::add( _size, tr( "Specify the percentage of the screen width for the input method" ) ); |
68 | } | 72 | } |
69 | 73 | ||
70 | void InputMethodSettings::appletChanged() | 74 | void InputMethodSettings::appletChanged() |
71 | { | 75 | { |
72 | } | 76 | } |
73 | 77 | ||
74 | void InputMethodSettings::accept() | 78 | void InputMethodSettings::accept() |
75 | { | 79 | { |
76 | qDebug( "InputMethodSettings::accept()" ); | 80 | odebug << "InputMethodSettings::accept()" << oendl; |
77 | Config cfg( "Launcher" ); | 81 | Config cfg( "Launcher" ); |
78 | cfg.setGroup( "InputMethods" ); | 82 | cfg.setGroup( "InputMethods" ); |
79 | cfg.writeEntry( "Resize", _resize->isChecked() ); | 83 | cfg.writeEntry( "Resize", _resize->isChecked() ); |
80 | cfg.writeEntry( "Float", _float->isChecked() ); | 84 | cfg.writeEntry( "Float", _float->isChecked() ); |
81 | cfg.writeEntry( "Width", _size->value() ); | 85 | cfg.writeEntry( "Width", _size->value() ); |
82 | cfg.write(); | 86 | cfg.write(); |
83 | } | 87 | } |
84 | 88 | ||
diff --git a/core/settings/launcher/tabdialog.cpp b/core/settings/launcher/tabdialog.cpp index 763b360..546e229 100644 --- a/core/settings/launcher/tabdialog.cpp +++ b/core/settings/launcher/tabdialog.cpp | |||
@@ -16,44 +16,46 @@ | |||
16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General | 16 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General |
17 | ..}^=.= = ; Public License for more details. | 17 | ..}^=.= = ; Public License for more details. |
18 | ++= -. .` .: | 18 | ++= -. .` .: |
19 | : = ...= . :.=- You should have received a copy of the GNU | 19 | : = ...= . :.=- You should have received a copy of the GNU |
20 | -. .:....=;==+<; General Public License along with this file; | 20 | -. .:....=;==+<; General Public License along with this file; |
21 | -_. . . )=. = see the file COPYING. If not, write to the | 21 | -_. . . )=. = see the file COPYING. If not, write to the |
22 | -- :-=` Free Software Foundation, Inc., | 22 | -- :-=` Free Software Foundation, Inc., |
23 | 59 Temple Place - Suite 330, | 23 | 59 Temple Place - Suite 330, |
24 | Boston, MA 02111-1307, USA. | 24 | Boston, MA 02111-1307, USA. |
25 | 25 | ||
26 | */ | 26 | */ |
27 | 27 | ||
28 | #include "tabdialog.h" | ||
29 | |||
30 | /* OPIE */ | ||
28 | #include <qpe/resource.h> | 31 | #include <qpe/resource.h> |
32 | #include <opie2/ofontselector.h> | ||
33 | #include <opie2/otabwidget.h> | ||
34 | #include <opie2/ocolorbutton.h> | ||
35 | #include <opie2/ofiledialog.h> | ||
36 | #include <opie2/odebug.h> | ||
29 | 37 | ||
38 | /* QT */ | ||
30 | #include <qlayout.h> | 39 | #include <qlayout.h> |
31 | #include <qvbox.h> | 40 | #include <qvbox.h> |
32 | #include <qtabbar.h> | 41 | #include <qtabbar.h> |
33 | #include <qiconview.h> | 42 | #include <qiconview.h> |
34 | #include <qapplication.h> | 43 | #include <qapplication.h> |
35 | #include <qlabel.h> | 44 | #include <qlabel.h> |
36 | #include <qradiobutton.h> | 45 | #include <qradiobutton.h> |
37 | #include <qbuttongroup.h> | 46 | #include <qbuttongroup.h> |
38 | #include <qwhatsthis.h> | 47 | #include <qwhatsthis.h> |
39 | #include <qcheckbox.h> | 48 | #include <qcheckbox.h> |
40 | 49 | ||
41 | #include <opie2/ofontselector.h> | ||
42 | #include <opie2/otabwidget.h> | ||
43 | #include <opie2/ocolorbutton.h> | ||
44 | #include <opie2/ofiledialog.h> | ||
45 | |||
46 | #include "tabdialog.h" | ||
47 | |||
48 | 50 | ||
49 | using namespace Opie::Ui; | 51 | using namespace Opie::Ui; |
50 | class SampleItem : public QIconViewItem { | 52 | class SampleItem : public QIconViewItem { |
51 | public: | 53 | public: |
52 | SampleItem ( QIconView *v, const QString &text, const QPixmap &pix ) : QIconViewItem ( v, text ) | 54 | SampleItem ( QIconView *v, const QString &text, const QPixmap &pix ) : QIconViewItem ( v, text ) |
53 | { | 55 | { |
54 | m_large = pix; | 56 | m_large = pix; |
55 | m_small. convertFromImage ( pix. convertToImage ( ). smoothScale ( pix. width ( ) / 2, pix. height ( ) / 2 )); | 57 | m_small. convertFromImage ( pix. convertToImage ( ). smoothScale ( pix. width ( ) / 2, pix. height ( ) / 2 )); |
56 | } | 58 | } |
57 | 59 | ||
58 | void sizeChange ( ) | 60 | void sizeChange ( ) |
59 | { | 61 | { |
@@ -139,25 +141,25 @@ public: | |||
139 | } | 141 | } |
140 | 142 | ||
141 | case TabConfig::SolidColor: { | 143 | case TabConfig::SolidColor: { |
142 | setBackgroundPixmap ( QPixmap ( )); | 144 | setBackgroundPixmap ( QPixmap ( )); |
143 | if ( val. isEmpty ( )) | 145 | if ( val. isEmpty ( )) |
144 | setBackgroundColor ( colorGroup ( ). base ( )); | 146 | setBackgroundColor ( colorGroup ( ). base ( )); |
145 | else | 147 | else |
146 | setBackgroundColor ( val ); | 148 | setBackgroundColor ( val ); |
147 | break; | 149 | break; |
148 | } | 150 | } |
149 | 151 | ||
150 | case TabConfig::Image: { | 152 | case TabConfig::Image: { |
151 | qDebug( "Loading image: %s", val.latin1() ); | 153 | odebug << "Loading image: " << val << "" << oendl; |
152 | QPixmap bg ( Resource::loadPixmap ( "wallpaper/" + val )); | 154 | QPixmap bg ( Resource::loadPixmap ( "wallpaper/" + val )); |
153 | if ( bg. isNull ( )) { | 155 | if ( bg. isNull ( )) { |
154 | QImageIO imgio; | 156 | QImageIO imgio; |
155 | imgio. setFileName ( val ); | 157 | imgio. setFileName ( val ); |
156 | QSize ds = qApp-> desktop ( )-> size ( ); | 158 | QSize ds = qApp-> desktop ( )-> size ( ); |
157 | QString param ( "Scale( %1, %2, ScaleMin )" ); // No tr | 159 | QString param ( "Scale( %1, %2, ScaleMin )" ); // No tr |
158 | imgio. setParameters ( param. arg ( ds. width ( )). arg ( ds. height ( )). latin1 ( )); | 160 | imgio. setParameters ( param. arg ( ds. width ( )). arg ( ds. height ( )). latin1 ( )); |
159 | imgio. read ( ); | 161 | imgio. read ( ); |
160 | bg = imgio. image ( ); | 162 | bg = imgio. image ( ); |
161 | } | 163 | } |
162 | setBackgroundPixmap ( bg ); | 164 | setBackgroundPixmap ( bg ); |
163 | break; | 165 | break; |
diff --git a/core/settings/launcher/taskbarsettings.cpp b/core/settings/launcher/taskbarsettings.cpp index 43886c9..8dd9e97 100644 --- a/core/settings/launcher/taskbarsettings.cpp +++ b/core/settings/launcher/taskbarsettings.cpp | |||
@@ -19,37 +19,41 @@ | |||
19 | ++= -. .` .: | 19 | ++= -. .` .: |
20 | : = ...= . :.=- You should have received a copy of the GNU | 20 | : = ...= . :.=- You should have received a copy of the GNU |
21 | -. .:....=;==+<; General Public License along with this file; | 21 | -. .:....=;==+<; General Public License along with this file; |
22 | -_. . . )=. = see the file COPYING. If not, write to the | 22 | -_. . . )=. = see the file COPYING. If not, write to the |
23 | -- :-=` Free Software Foundation, Inc., | 23 | -- :-=` Free Software Foundation, Inc., |
24 | 59 Temple Place - Suite 330, | 24 | 59 Temple Place - Suite 330, |
25 | Boston, MA 02111-1307, USA. | 25 | Boston, MA 02111-1307, USA. |
26 | 26 | ||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include "taskbarsettings.h" | 29 | #include "taskbarsettings.h" |
30 | 30 | ||
31 | /* OPIE */ | ||
31 | #include <qpe/config.h> | 32 | #include <qpe/config.h> |
32 | #include <qpe/qlibrary.h> | 33 | #include <qpe/qlibrary.h> |
33 | #include <qpe/qpeapplication.h> | 34 | #include <qpe/qpeapplication.h> |
34 | #include <qpe/taskbarappletinterface.h> | 35 | #include <qpe/taskbarappletinterface.h> |
35 | #include <qpe/qcopenvelope_qws.h> | 36 | #include <qpe/qcopenvelope_qws.h> |
37 | #include <opie2/odebug.h> | ||
36 | 38 | ||
39 | /* QT */ | ||
37 | #include <qdir.h> | 40 | #include <qdir.h> |
38 | #include <qlistview.h> | 41 | #include <qlistview.h> |
39 | #include <qheader.h> | 42 | #include <qheader.h> |
40 | #include <qlayout.h> | 43 | #include <qlayout.h> |
41 | #include <qlabel.h> | 44 | #include <qlabel.h> |
42 | #include <qwhatsthis.h> | 45 | #include <qwhatsthis.h> |
43 | 46 | ||
47 | /* STD */ | ||
44 | #include <stdlib.h> | 48 | #include <stdlib.h> |
45 | 49 | ||
46 | 50 | ||
47 | TaskbarSettings::TaskbarSettings ( QWidget *parent, const char *name ) | 51 | TaskbarSettings::TaskbarSettings ( QWidget *parent, const char *name ) |
48 | : QWidget ( parent, name ) | 52 | : QWidget ( parent, name ) |
49 | { | 53 | { |
50 | m_applets_changed = false; | 54 | m_applets_changed = false; |
51 | 55 | ||
52 | QBoxLayout *lay = new QVBoxLayout ( this, 4, 4 ); | 56 | QBoxLayout *lay = new QVBoxLayout ( this, 4, 4 ); |
53 | 57 | ||
54 | QLabel *l = new QLabel ( tr( "Load applets in Taskbar:" ), this ); | 58 | QLabel *l = new QLabel ( tr( "Load applets in Taskbar:" ), this ); |
55 | lay-> addWidget ( l ); | 59 | lay-> addWidget ( l ); |
@@ -76,69 +80,69 @@ void TaskbarSettings::init ( ) | |||
76 | QString path = QPEApplication::qpeDir ( ) + "/plugins/applets"; | 80 | QString path = QPEApplication::qpeDir ( ) + "/plugins/applets"; |
77 | #ifdef Q_OS_MACX | 81 | #ifdef Q_OS_MACX |
78 | QStringList list = QDir ( path, "lib*.dylib" ). entryList ( ); | 82 | QStringList list = QDir ( path, "lib*.dylib" ). entryList ( ); |
79 | #else | 83 | #else |
80 | QStringList list = QDir ( path, "lib*.so" ). entryList ( ); | 84 | QStringList list = QDir ( path, "lib*.so" ). entryList ( ); |
81 | #endif /* Q_OS_MACX */ | 85 | #endif /* Q_OS_MACX */ |
82 | 86 | ||
83 | for ( QStringList::Iterator it = list. begin ( ); it != list. end ( ); ++it ) { | 87 | for ( QStringList::Iterator it = list. begin ( ); it != list. end ( ); ++it ) { |
84 | QString name; | 88 | QString name; |
85 | QPixmap icon; | 89 | QPixmap icon; |
86 | TaskbarNamedAppletInterface *iface = 0; | 90 | TaskbarNamedAppletInterface *iface = 0; |
87 | 91 | ||
88 | qWarning("Load applet: %s", (*it).latin1() ); | 92 | owarn << "Load applet: " << (*it) << "" << oendl; |
89 | QLibrary *lib = new QLibrary ( path + "/" + *it ); | 93 | QLibrary *lib = new QLibrary ( path + "/" + *it ); |
90 | lib-> queryInterface ( IID_TaskbarNamedApplet, (QUnknownInterface**) &iface ); | 94 | lib-> queryInterface ( IID_TaskbarNamedApplet, (QUnknownInterface**) &iface ); |
91 | qWarning("<1>"); | 95 | owarn << "<1>" << oendl; |
92 | if ( iface ) { | 96 | if ( iface ) { |
93 | qWarning("<2>"); | 97 | owarn << "<2>" << oendl; |
94 | QString lang = getenv( "LANG" ); | 98 | QString lang = getenv( "LANG" ); |
95 | QTranslator *trans = new QTranslator ( qApp ); | 99 | QTranslator *trans = new QTranslator ( qApp ); |
96 | QString type = (*it). left ((*it). find (".")); | 100 | QString type = (*it). left ((*it). find (".")); |
97 | QString tfn = QPEApplication::qpeDir ( ) + "/i18n/" + lang + "/" + type + ".qm"; | 101 | QString tfn = QPEApplication::qpeDir ( ) + "/i18n/" + lang + "/" + type + ".qm"; |
98 | if ( trans-> load ( tfn )) | 102 | if ( trans-> load ( tfn )) |
99 | qApp-> installTranslator ( trans ); | 103 | qApp-> installTranslator ( trans ); |
100 | else | 104 | else |
101 | delete trans; | 105 | delete trans; |
102 | name = iface-> name ( ); | 106 | name = iface-> name ( ); |
103 | icon = iface-> icon ( ); | 107 | icon = iface-> icon ( ); |
104 | iface-> release ( ); | 108 | iface-> release ( ); |
105 | } | 109 | } |
106 | qWarning("<3>"); | 110 | owarn << "<3>" << oendl; |
107 | if ( !iface ) { | 111 | if ( !iface ) { |
108 | qWarning("<4>"); | 112 | owarn << "<4>" << oendl; |
109 | lib-> queryInterface ( IID_TaskbarApplet, (QUnknownInterface**) &iface ); | 113 | lib-> queryInterface ( IID_TaskbarApplet, (QUnknownInterface**) &iface ); |
110 | 114 | ||
111 | if ( iface ) { | 115 | if ( iface ) { |
112 | qWarning("<5>"); | 116 | owarn << "<5>" << oendl; |
113 | name = (*it). mid ( 3 ); | 117 | name = (*it). mid ( 3 ); |
114 | qWarning("Found applet: %s", name.latin1() ); | 118 | owarn << "Found applet: " << name << "" << oendl; |
115 | #ifdef Q_OS_MACX | 119 | #ifdef Q_OS_MACX |
116 | int sep = name. find( ".dylib" ); | 120 | int sep = name. find( ".dylib" ); |
117 | #else | 121 | #else |
118 | int sep = name. find( ".so" ); | 122 | int sep = name. find( ".so" ); |
119 | #endif /* Q_OS_MACX */ | 123 | #endif /* Q_OS_MACX */ |
120 | if ( sep > 0 ) | 124 | if ( sep > 0 ) |
121 | name. truncate ( sep ); | 125 | name. truncate ( sep ); |
122 | sep = name. find ( "applet" ); | 126 | sep = name. find ( "applet" ); |
123 | if ( sep == (int) name.length ( ) - 6 ) | 127 | if ( sep == (int) name.length ( ) - 6 ) |
124 | name. truncate ( sep ); | 128 | name. truncate ( sep ); |
125 | name[0] = name[0]. upper ( ); | 129 | name[0] = name[0]. upper ( ); |
126 | iface-> release ( ); | 130 | iface-> release ( ); |
127 | } | 131 | } |
128 | } | 132 | } |
129 | qWarning("<6>"); | 133 | owarn << "<6>" << oendl; |
130 | 134 | ||
131 | if ( iface ) { | 135 | if ( iface ) { |
132 | qWarning("<7>"); | 136 | owarn << "<7>" << oendl; |
133 | QCheckListItem *item; | 137 | QCheckListItem *item; |
134 | item = new QCheckListItem ( m_list, name, QCheckListItem::CheckBox ); | 138 | item = new QCheckListItem ( m_list, name, QCheckListItem::CheckBox ); |
135 | if ( !icon. isNull ( )) | 139 | if ( !icon. isNull ( )) |
136 | item-> setPixmap ( 0, icon ); | 140 | item-> setPixmap ( 0, icon ); |
137 | item-> setOn ( exclude. find ( *it ) == exclude. end ( )); | 141 | item-> setOn ( exclude. find ( *it ) == exclude. end ( )); |
138 | m_applets [*it] = item; | 142 | m_applets [*it] = item; |
139 | } | 143 | } |
140 | lib-> unload ( ); | 144 | lib-> unload ( ); |
141 | delete lib; | 145 | delete lib; |
142 | } | 146 | } |
143 | } | 147 | } |
144 | 148 | ||
diff --git a/core/settings/light-and-power/light.cpp b/core/settings/light-and-power/light.cpp index d64a063..424a64c 100644 --- a/core/settings/light-and-power/light.cpp +++ b/core/settings/light-and-power/light.cpp | |||
@@ -20,32 +20,35 @@ | |||
20 | : = ...= . :.=- You should have received a copy of the GNU | 20 | : = ...= . :.=- You should have received a copy of the GNU |
21 | -. .:....=;==+<; General Public License along with this file; | 21 | -. .:....=;==+<; General Public License along with this file; |
22 | -_. . . )=. = see the file COPYING. If not, write to the | 22 | -_. . . )=. = see the file COPYING. If not, write to the |
23 | -- :-=` Free Software Foundation, Inc., | 23 | -- :-=` Free Software Foundation, Inc., |
24 | 59 Temple Place - Suite 330, | 24 | 59 Temple Place - Suite 330, |
25 | Boston, MA 02111-1307, USA. | 25 | Boston, MA 02111-1307, USA. |
26 | 26 | ||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include "light.h" | 29 | #include "light.h" |
30 | #include "sensor.h" | 30 | #include "sensor.h" |
31 | 31 | ||
32 | /* OPIE */ | ||
32 | #include <opie2/odevice.h> | 33 | #include <opie2/odevice.h> |
34 | #include <opie2/odebug.h> | ||
33 | 35 | ||
34 | #include <qpe/config.h> | 36 | #include <qpe/config.h> |
35 | #include <qpe/power.h> | 37 | #include <qpe/power.h> |
36 | #if defined(Q_WS_QWS) && !defined(QT_NO_COP) | 38 | #if defined(Q_WS_QWS) && !defined(QT_NO_COP) |
37 | #include <qpe/qcopenvelope_qws.h> | 39 | #include <qpe/qcopenvelope_qws.h> |
38 | #endif | 40 | #endif |
39 | 41 | ||
42 | /* QT */ | ||
40 | #include <qlabel.h> | 43 | #include <qlabel.h> |
41 | #include <qcheckbox.h> | 44 | #include <qcheckbox.h> |
42 | #include <qtabwidget.h> | 45 | #include <qtabwidget.h> |
43 | #include <qslider.h> | 46 | #include <qslider.h> |
44 | #include <qspinbox.h> | 47 | #include <qspinbox.h> |
45 | #include <qpushbutton.h> | 48 | #include <qpushbutton.h> |
46 | #include <qgroupbox.h> | 49 | #include <qgroupbox.h> |
47 | #include <qcombobox.h> | 50 | #include <qcombobox.h> |
48 | 51 | ||
49 | 52 | ||
50 | 53 | ||
51 | using namespace Opie::Core; | 54 | using namespace Opie::Core; |
@@ -224,37 +227,37 @@ void LightSettings::setBacklight ( int bright ) | |||
224 | m_resettimer-> start ( 4000, true ); | 227 | m_resettimer-> start ( 4000, true ); |
225 | } | 228 | } |
226 | } | 229 | } |
227 | 230 | ||
228 | void LightSettings::setContrast ( int contr ) | 231 | void LightSettings::setContrast ( int contr ) |
229 | { | 232 | { |
230 | if (contr == -1) contr = m_oldcontrast; | 233 | if (contr == -1) contr = m_oldcontrast; |
231 | ODevice::inst ( )-> setDisplayContrast(contr); | 234 | ODevice::inst ( )-> setDisplayContrast(contr); |
232 | } | 235 | } |
233 | 236 | ||
234 | void LightSettings::setFrequency ( int index ) | 237 | void LightSettings::setFrequency ( int index ) |
235 | { | 238 | { |
236 | qWarning("LightSettings::setFrequency(%d)", index); | 239 | owarn << "LightSettings::setFrequency(" << index << ")" << oendl; |
237 | ODevice::inst ( )-> setCurrentCpuFrequency(index); | 240 | ODevice::inst ( )-> setCurrentCpuFrequency(index); |
238 | } | 241 | } |
239 | 242 | ||
240 | void LightSettings::resetBacklight ( ) | 243 | void LightSettings::resetBacklight ( ) |
241 | { | 244 | { |
242 | setBacklight ( -1 ); | 245 | setBacklight ( -1 ); |
243 | setContrast ( -1 ); | 246 | setContrast ( -1 ); |
244 | } | 247 | } |
245 | 248 | ||
246 | void LightSettings::setCloseHingeAction ( int index ) | 249 | void LightSettings::setCloseHingeAction ( int index ) |
247 | { | 250 | { |
248 | qWarning("LightSettings::setCloseHingeStatus(%d)", index); | 251 | owarn << "LightSettings::setCloseHingeStatus(" << index << ")" << oendl; |
249 | } | 252 | } |
250 | 253 | ||
251 | void LightSettings::accept ( ) | 254 | void LightSettings::accept ( ) |
252 | { | 255 | { |
253 | Config config ( "apm" ); | 256 | Config config ( "apm" ); |
254 | 257 | ||
255 | // bat | 258 | // bat |
256 | config. setGroup ( "Battery" ); | 259 | config. setGroup ( "Battery" ); |
257 | config. writeEntry ( "LcdOffOnly", LcdOffOnly-> isChecked ( )); | 260 | config. writeEntry ( "LcdOffOnly", LcdOffOnly-> isChecked ( )); |
258 | config. writeEntry ( "Dim", interval_dim-> value ( )); | 261 | config. writeEntry ( "Dim", interval_dim-> value ( )); |
259 | config. writeEntry ( "LightOff", interval_lightoff-> value ( )); | 262 | config. writeEntry ( "LightOff", interval_lightoff-> value ( )); |
260 | config. writeEntry ( "Suspend", interval_suspend-> value ( )); | 263 | config. writeEntry ( "Suspend", interval_suspend-> value ( )); |
diff --git a/core/settings/security/security.cpp b/core/settings/security/security.cpp index 4eddb55..b917aea 100644 --- a/core/settings/security/security.cpp +++ b/core/settings/security/security.cpp | |||
@@ -10,37 +10,43 @@ | |||
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
15 | ** | 15 | ** |
16 | ** Contact info@trolltech.com if any conditions of this licensing are | 16 | ** Contact info@trolltech.com if any conditions of this licensing are |
17 | ** not clear to you. | 17 | ** not clear to you. |
18 | ** | 18 | ** |
19 | **********************************************************************/ | 19 | **********************************************************************/ |
20 | #include "security.h" | 20 | #include "security.h" |
21 | 21 | ||
22 | /* OPIE */ | ||
22 | #include <qpe/qpeapplication.h> | 23 | #include <qpe/qpeapplication.h> |
23 | #include <qpe/config.h> | 24 | #include <qpe/config.h> |
24 | #include <qpe/password.h> | 25 | #include <qpe/password.h> |
25 | #include <qpe/qpedialog.h> | 26 | #include <qpe/qpedialog.h> |
26 | #include <qpe/qcopenvelope_qws.h> | 27 | #include <qpe/qcopenvelope_qws.h> |
28 | #include <opie2/odebug.h> | ||
27 | 29 | ||
30 | /* QT */ | ||
28 | #include <qcheckbox.h> | 31 | #include <qcheckbox.h> |
29 | #include <qpushbutton.h> | 32 | #include <qpushbutton.h> |
30 | #include <qcombobox.h> | 33 | #include <qcombobox.h> |
31 | #include <qmessagebox.h> | 34 | #include <qmessagebox.h> |
32 | #include <qfile.h> | 35 | #include <qfile.h> |
33 | #include <qtextstream.h> | 36 | #include <qtextstream.h> |
34 | 37 | ||
38 | |||
39 | using namespace Opie::Core; | ||
40 | |||
35 | Security::Security( QWidget* parent, const char* name, WFlags fl ) | 41 | Security::Security( QWidget* parent, const char* name, WFlags fl ) |
36 | : SecurityBase( parent, name, TRUE, WStyle_ContextHelp ) | 42 | : SecurityBase( parent, name, TRUE, WStyle_ContextHelp ) |
37 | { | 43 | { |
38 | valid=FALSE; | 44 | valid=FALSE; |
39 | Config cfg("Security"); | 45 | Config cfg("Security"); |
40 | cfg.setGroup("Passcode"); | 46 | cfg.setGroup("Passcode"); |
41 | passcode = cfg.readEntry("passcode"); | 47 | passcode = cfg.readEntry("passcode"); |
42 | passcode_poweron->setChecked(cfg.readBoolEntry("passcode_poweron",FALSE)); | 48 | passcode_poweron->setChecked(cfg.readBoolEntry("passcode_poweron",FALSE)); |
43 | cfg.setGroup("Sync"); | 49 | cfg.setGroup("Sync"); |
44 | int auth_peer = cfg.readNumEntry("auth_peer",0xc0a88100);//new default 192.168.129.0/24 | 50 | int auth_peer = cfg.readNumEntry("auth_peer",0xc0a88100);//new default 192.168.129.0/24 |
45 | int auth_peer_bits = cfg.readNumEntry("auth_peer_bits",24); | 51 | int auth_peer_bits = cfg.readNumEntry("auth_peer_bits",24); |
46 | selectNet(auth_peer,auth_peer_bits,TRUE); | 52 | selectNet(auth_peer,auth_peer_bits,TRUE); |
@@ -248,25 +254,25 @@ void Security::selectNet(int auth_peer,int auth_peer_bits, bool update) | |||
248 | } | 254 | } |
249 | } | 255 | } |
250 | } | 256 | } |
251 | } | 257 | } |
252 | } | 258 | } |
253 | 259 | ||
254 | for (int i=0; i<syncnet->count(); i++) { | 260 | for (int i=0; i<syncnet->count(); i++) { |
255 | if ( syncnet->text(i).left(sn.length()) == sn ) { | 261 | if ( syncnet->text(i).left(sn.length()) == sn ) { |
256 | syncnet->setCurrentItem(i); | 262 | syncnet->setCurrentItem(i); |
257 | return; | 263 | return; |
258 | } | 264 | } |
259 | } | 265 | } |
260 | qDebug("No match for \"%s\"",sn.latin1()); | 266 | odebug << "No match for \"" << sn << "\"" << oendl; |
261 | } | 267 | } |
262 | 268 | ||
263 | void Security::parseNet(const QString& sn,int& auth_peer,int& auth_peer_bits) | 269 | void Security::parseNet(const QString& sn,int& auth_peer,int& auth_peer_bits) |
264 | { | 270 | { |
265 | auth_peer=0; | 271 | auth_peer=0; |
266 | if ( sn == tr("Any") ) { | 272 | if ( sn == tr("Any") ) { |
267 | auth_peer = 0; | 273 | auth_peer = 0; |
268 | auth_peer_bits = 0; | 274 | auth_peer_bits = 0; |
269 | } else if ( sn == tr("None") ) { | 275 | } else if ( sn == tr("None") ) { |
270 | auth_peer = 0; | 276 | auth_peer = 0; |
271 | auth_peer_bits = 32; | 277 | auth_peer_bits = 32; |
272 | } else { | 278 | } else { |
diff --git a/core/settings/security/security.pro b/core/settings/security/security.pro index 4a29ee2..4c1e68b 100644 --- a/core/settings/security/security.pro +++ b/core/settings/security/security.pro | |||
@@ -1,10 +1,10 @@ | |||
1 | CONFIG += qt warn_on quick-app | 1 | CONFIG += qt warn_on quick-app |
2 | HEADERS = security.h | 2 | HEADERS = security.h |
3 | SOURCES = security.cpp main.cpp | 3 | SOURCES = security.cpp main.cpp |
4 | INTERFACES= securitybase.ui | 4 | INTERFACES= securitybase.ui |
5 | INCLUDEPATH += $(OPIEDIR)/include | 5 | INCLUDEPATH += $(OPIEDIR)/include |
6 | DEPENDPATH+= ../$(OPIEDIR)/include | 6 | DEPENDPATH+= ../$(OPIEDIR)/include |
7 | LIBS += -lqpe | 7 | LIBS += -lqpe -lopiecore2 |
8 | TARGET = security | 8 | TARGET = security |
9 | 9 | ||
10 | include ( $(OPIEDIR)/include.pro ) | 10 | include ( $(OPIEDIR)/include.pro ) |