summaryrefslogtreecommitdiff
path: root/core/settings/launcher
authorar <ar>2004-05-02 17:31:50 (UTC)
committer ar <ar>2004-05-02 17:31:50 (UTC)
commita210b9a597ba0c929d95c38ffbaf972916c7b8a7 (patch) (unidiff)
treece121d5017eb054222c86e0afb6057a28ea7bf8a /core/settings/launcher
parent18759e9156c96795831120408a9da0d3b4ec71a4 (diff)
downloadopie-a210b9a597ba0c929d95c38ffbaf972916c7b8a7.zip
opie-a210b9a597ba0c929d95c38ffbaf972916c7b8a7.tar.gz
opie-a210b9a597ba0c929d95c38ffbaf972916c7b8a7.tar.bz2
- convert qDebug to odebug
Diffstat (limited to 'core/settings/launcher') (more/less context) (show whitespace changes)
-rw-r--r--core/settings/launcher/doctabsettings.cpp6
-rw-r--r--core/settings/launcher/inputmethodsettings.cpp6
-rw-r--r--core/settings/launcher/tabdialog.cpp18
-rw-r--r--core/settings/launcher/taskbarsettings.cpp22
4 files changed, 33 insertions, 19 deletions
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
38DocTabSettings::DocTabSettings( QWidget *parent, const char *name ):QWidget( parent, name ) 42DocTabSettings::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
56void DocTabSettings::appletChanged() 60void DocTabSettings::appletChanged()
57{ 61{
58} 62}
59 63
60void DocTabSettings::accept() 64void 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
39InputMethodSettings::InputMethodSettings( QWidget *parent, const char *name ):QWidget( parent, name ) 43InputMethodSettings::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
70void InputMethodSettings::appletChanged() 74void InputMethodSettings::appletChanged()
71{ 75{
72} 76}
73 77
74void InputMethodSettings::accept() 78void 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
49using namespace Opie::Ui; 51using namespace Opie::Ui;
50class SampleItem : public QIconViewItem { 52class SampleItem : public QIconViewItem {
51public: 53public:
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
47TaskbarSettings::TaskbarSettings ( QWidget *parent, const char *name ) 51TaskbarSettings::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