summaryrefslogtreecommitdiff
authorchicken <chicken>2004-03-01 16:23:00 (UTC)
committer chicken <chicken>2004-03-01 16:23:00 (UTC)
commit032f2d909293fb29e6c7e3cf9cce1a12484c80f7 (patch) (unidiff)
tree368c696aff4d167727aaa564176b6ab1eb0df5cd
parent9bc70bb8a0bdd3a7bc0013f2cacce7c039b88b38 (diff)
downloadopie-032f2d909293fb29e6c7e3cf9cce1a12484c80f7.zip
opie-032f2d909293fb29e6c7e3cf9cce1a12484c80f7.tar.gz
opie-032f2d909293fb29e6c7e3cf9cce1a12484c80f7.tar.bz2
fix includes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--core/applets/rotateapplet/rotate.cpp4
-rw-r--r--core/applets/rotateapplet/rotate.h1
-rw-r--r--core/applets/screenshotapplet/inputDialog.cpp3
-rw-r--r--core/applets/screenshotapplet/screenshot.cpp1
-rw-r--r--core/applets/suspendapplet/suspend.cpp2
-rw-r--r--core/applets/volumeapplet/oledbox.cpp1
-rw-r--r--core/applets/volumeapplet/volume.cpp4
-rw-r--r--core/applets/volumeapplet/volumeappletimpl.cpp2
-rw-r--r--core/applets/vtapplet/vt.cpp3
-rw-r--r--core/apps/calibrate/main.cpp1
-rw-r--r--core/obex/obex.cc4
-rw-r--r--core/obex/obexhandler.cpp1
-rw-r--r--core/obex/obexsend.cpp4
-rw-r--r--core/obex/receiver.cpp4
14 files changed, 0 insertions, 35 deletions
diff --git a/core/applets/rotateapplet/rotate.cpp b/core/applets/rotateapplet/rotate.cpp
index cf3f28b..dcbf809 100644
--- a/core/applets/rotateapplet/rotate.cpp
+++ b/core/applets/rotateapplet/rotate.cpp
@@ -1,93 +1,89 @@
1/* 1/*
2 This file is part of the OPIE Project 2 This file is part of the OPIE Project
3 Copyright (C) 2003 Maximilian Reiss <harlekin@handhelds.org> 3 Copyright (C) 2003 Maximilian Reiss <harlekin@handhelds.org>
4 Copyright (C) 2003 Greg Gilbert <ggilbert@treke.net> 4 Copyright (C) 2003 Greg Gilbert <ggilbert@treke.net>
5               =. Copyright (C) 2004 Michael Lauer <mickey@Vanille.de> 5               =. Copyright (C) 2004 Michael Lauer <mickey@Vanille.de>
6             .=l. 6             .=l.
7           .>+-= 7           .>+-=
8 _;:,     .>    :=|. This library is free software; you can 8 _;:,     .>    :=|. This library is free software; you can
9.> <,   >  .   <= redistribute it and/or modify it under 9.> <,   >  .   <= redistribute it and/or modify it under
10:=1 )Y*s>-.--   : the terms of the GNU Library General Public 10:=1 )Y*s>-.--   : the terms of the GNU Library General Public
11.="- .-=="i,     .._ License as published by the Free Software 11.="- .-=="i,     .._ License as published by the Free Software
12 - .   .-<_>     .<> Foundation; either version 2 of the License, 12 - .   .-<_>     .<> Foundation; either version 2 of the License,
13     ._= =}       : or (at your option) any later version. 13     ._= =}       : or (at your option) any later version.
14    .%+i>       _;_. 14    .%+i>       _;_.
15    .i_,=:_.      -<s. This library is distributed in the hope that 15    .i_,=:_.      -<s. This library is distributed in the hope that
16     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 16     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
17    : ..    .:,     . . . without even the implied warranty of 17    : ..    .:,     . . . without even the implied warranty of
18    =_        +     =;=| MERCHANTABILITY or FITNESS FOR A 18    =_        +     =;=| MERCHANTABILITY or FITNESS FOR A
19  _.=:.       :    :=>: PARTICULAR PURPOSE. See the GNU 19  _.=:.       :    :=>: PARTICULAR PURPOSE. See the GNU
20..}^=.=       =       ; Library General Public License for more 20..}^=.=       =       ; Library General Public License for more
21++=   -.     .     .: details. 21++=   -.     .     .: details.
22 :     =  ...= . :.=- 22 :     =  ...= . :.=-
23 -.   .:....=;==+<; You should have received a copy of the GNU 23 -.   .:....=;==+<; You should have received a copy of the GNU
24  -_. . .   )=.  = Library General Public License along with 24  -_. . .   )=.  = Library General Public License along with
25    --        :-= this library; see the file COPYING.LIB. 25    --        :-= this library; see the file COPYING.LIB.
26 If not, write to the Free Software Foundation, 26 If not, write to the Free Software Foundation,
27 Inc., 59 Temple Place - Suite 330, 27 Inc., 59 Temple Place - Suite 330,
28 Boston, MA 02111-1307, USA. 28 Boston, MA 02111-1307, USA.
29*/ 29*/
30 30
31#include "rotate.h" 31#include "rotate.h"
32 32
33/* OPIE */ 33/* OPIE */
34#include <opie/odevice.h> 34#include <opie/odevice.h>
35#include <qpe/applnk.h>
36#include <qpe/config.h> 35#include <qpe/config.h>
37#include <qpe/power.h> 36#include <qpe/power.h>
38#include <qpe/qpeapplication.h>
39#include <qpe/qcopenvelope_qws.h> 37#include <qpe/qcopenvelope_qws.h>
40#include <qpe/resource.h> 38#include <qpe/resource.h>
41using namespace Opie; 39using namespace Opie;
42 40
43/* QT */ 41/* QT */
44#include <qiconset.h>
45#include <qpopupmenu.h>
46 42
47#include <time.h> 43#include <time.h>
48 44
49RotateApplet::RotateApplet() 45RotateApplet::RotateApplet()
50 :QObject( 0, "RotateApplet" ), m_flipped( false ) 46 :QObject( 0, "RotateApplet" ), m_flipped( false )
51{ 47{
52 48
53#if !defined(QT_NO_COP) 49#if !defined(QT_NO_COP)
54 QCopChannel *rotateChannel = new QCopChannel( "QPE/Rotation" , this ); 50 QCopChannel *rotateChannel = new QCopChannel( "QPE/Rotation" , this );
55 connect ( rotateChannel, SIGNAL( received( const QCString &, const QByteArray &) ), 51 connect ( rotateChannel, SIGNAL( received( const QCString &, const QByteArray &) ),
56 this, SLOT ( channelReceived( const QCString &, const QByteArray &) ) ); 52 this, SLOT ( channelReceived( const QCString &, const QByteArray &) ) );
57#endif 53#endif
58 54
59} 55}
60 56
61RotateApplet::~RotateApplet ( ) 57RotateApplet::~RotateApplet ( )
62{} 58{}
63 59
64/** 60/**
65 * Qcop receive method. 61 * Qcop receive method.
66 */ 62 */
67void RotateApplet::channelReceived( const QCString &msg, const QByteArray & data ) 63void RotateApplet::channelReceived( const QCString &msg, const QByteArray & data )
68{ 64{
69 qDebug( "RotateApplet::channelReceived( '%s' )", (const char*) msg ); 65 qDebug( "RotateApplet::channelReceived( '%s' )", (const char*) msg );
70 66
71 if ( ODevice::inst()->hasHingeSensor() ) 67 if ( ODevice::inst()->hasHingeSensor() )
72 { 68 {
73 struct timespec interval; 69 struct timespec interval;
74 struct timespec remain; 70 struct timespec remain;
75 interval.tv_sec = 0; 71 interval.tv_sec = 0;
76 interval.tv_nsec = 600000; 72 interval.tv_nsec = 600000;
77 ::nanosleep( &interval, &remain ); 73 ::nanosleep( &interval, &remain );
78 OHingeStatus status = ODevice::inst()->readHingeSensor(); 74 OHingeStatus status = ODevice::inst()->readHingeSensor();
79 qDebug( "RotateApplet::readHingeSensor = %d", (int) status ); 75 qDebug( "RotateApplet::readHingeSensor = %d", (int) status );
80 76
81 Config cfg( "apm" ); 77 Config cfg( "apm" );
82 cfg.setGroup( PowerStatusManager::readStatus().acStatus() == PowerStatus::Online ? "AC" : "Battery" ); 78 cfg.setGroup( PowerStatusManager::readStatus().acStatus() == PowerStatus::Online ? "AC" : "Battery" );
83 int action = cfg.readNumEntry( "CloseHingeAction", 0 ); 79 int action = cfg.readNumEntry( "CloseHingeAction", 0 );
84 80
85 if ( status == CASE_CLOSED ) 81 if ( status == CASE_CLOSED )
86 { 82 {
87 switch ( action ) 83 switch ( action )
88 { 84 {
89 case 1: /* DISPLAY OFF */ ODevice::inst()->setDisplayBrightness( 0 ); break; 85 case 1: /* DISPLAY OFF */ ODevice::inst()->setDisplayBrightness( 0 ); break;
90 case 2: /* SUSPEND */ ODevice::inst()->suspend(); break; 86 case 2: /* SUSPEND */ ODevice::inst()->suspend(); break;
91 default: /* IGNORE */ break; 87 default: /* IGNORE */ break;
92 } 88 }
93 } 89 }
diff --git a/core/applets/rotateapplet/rotate.h b/core/applets/rotateapplet/rotate.h
index 2396993..bdccea0 100644
--- a/core/applets/rotateapplet/rotate.h
+++ b/core/applets/rotateapplet/rotate.h
@@ -1,71 +1,70 @@
1/* 1/*
2               =. This file is part of the OPIE Project 2               =. This file is part of the OPIE Project
3             .=l. Copyright (c) 2003 Maximilian Reiss <harlekin@handhelds.org> 3             .=l. Copyright (c) 2003 Maximilian Reiss <harlekin@handhelds.org>
4           .>+-= 4           .>+-=
5 _;:,     .>    :=|. This library is free software; you can 5 _;:,     .>    :=|. This library is free software; you can
6.> <_,   >  .   <= redistribute it and/or modify it under 6.> <_,   >  .   <= redistribute it and/or modify it under
7:=1 )Y*s>-.--   : the terms of the GNU Library General Public 7:=1 )Y*s>-.--   : the terms of the GNU Library General Public
8.="- .-=="i,     .._ License as published by the Free Software 8.="- .-=="i,     .._ License as published by the Free Software
9 - .   .-<_>     .<> Foundation; either version 2 of the License, 9 - .   .-<_>     .<> Foundation; either version 2 of the License,
10     ._= =}       : or (at your option) any later version. 10     ._= =}       : or (at your option) any later version.
11    .%+i>       _;_. 11    .%+i>       _;_.
12    .i_,=:_.      -<s. This library is distributed in the hope that 12    .i_,=:_.      -<s. This library is distributed in the hope that
13     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 13     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
14    : ..    .:,     . . . without even the implied warranty of 14    : ..    .:,     . . . without even the implied warranty of
15    =_        +     =;=| MERCHANTABILITY or FITNESS FOR A 15    =_        +     =;=| MERCHANTABILITY or FITNESS FOR A
16  _.=:.       :    :=>: PARTICULAR PURPOSE. See the GNU 16  _.=:.       :    :=>: PARTICULAR PURPOSE. See the GNU
17..}^=.=       =       ; Library General Public License for more 17..}^=.=       =       ; Library General Public License for more
18++=   -.     .     .: details. 18++=   -.     .     .: details.
19 :     =  ...= . :.=- 19 :     =  ...= . :.=-
20 -.   .:....=;==+<; You should have received a copy of the GNU 20 -.   .:....=;==+<; You should have received a copy of the GNU
21  -_. . .   )=.  = Library General Public License along with 21  -_. . .   )=.  = Library General Public License along with
22    --        :-= this library; see the file COPYING.LIB. 22    --        :-= this library; see the file COPYING.LIB.
23 If not, write to the Free Software Foundation, 23 If not, write to the Free Software Foundation,
24 Inc., 59 Temple Place - Suite 330, 24 Inc., 59 Temple Place - Suite 330,
25 Boston, MA 02111-1307, USA. 25 Boston, MA 02111-1307, USA.
26 26
27*/ 27*/
28 28
29 29
30 30
31#ifndef __OPIE_ROTATE_APPLET_H__ 31#ifndef __OPIE_ROTATE_APPLET_H__
32#define __OPIE_ROTATE_APPLET_H__ 32#define __OPIE_ROTATE_APPLET_H__
33 33
34#include <qpe/menuappletinterface.h> 34#include <qpe/menuappletinterface.h>
35#include <qobject.h> 35#include <qobject.h>
36 36
37#include <qobject.h>
38 37
39class RotateApplet : public QObject, public MenuAppletInterface 38class RotateApplet : public QObject, public MenuAppletInterface
40{ 39{
41 40
42 Q_OBJECT 41 Q_OBJECT
43 42
44public: 43public:
45 RotateApplet ( ); 44 RotateApplet ( );
46 virtual ~RotateApplet ( ); 45 virtual ~RotateApplet ( );
47 46
48 QRESULT queryInterface( const QUuid&, QUnknownInterface** ); 47 QRESULT queryInterface( const QUuid&, QUnknownInterface** );
49 Q_REFCOUNT 48 Q_REFCOUNT
50 49
51 virtual int position() const; 50 virtual int position() const;
52 51
53 virtual QString name ( ) const; 52 virtual QString name ( ) const;
54 virtual QIconSet icon ( ) const; 53 virtual QIconSet icon ( ) const;
55 virtual QString text ( ) const; 54 virtual QString text ( ) const;
56 /* virtual QString tr( const char* ) const; 55 /* virtual QString tr( const char* ) const;
57 virtual QString tr( const char*, const char* ) const; 56 virtual QString tr( const char*, const char* ) const;
58 */ 57 */
59 virtual QPopupMenu *popup ( QWidget *parent ) const; 58 virtual QPopupMenu *popup ( QWidget *parent ) const;
60 virtual void activated ( ); 59 virtual void activated ( );
61 virtual void rotateDefault ( ); 60 virtual void rotateDefault ( );
62 61
63private slots: 62private slots:
64 void channelReceived( const QCString &msg, const QByteArray & data ); 63 void channelReceived( const QCString &msg, const QByteArray & data );
65 64
66private: 65private:
67 bool m_flipped : 1; 66 bool m_flipped : 1;
68 67
69}; 68};
70 69
71#endif 70#endif
diff --git a/core/applets/screenshotapplet/inputDialog.cpp b/core/applets/screenshotapplet/inputDialog.cpp
index f506dfd..73ec773 100644
--- a/core/applets/screenshotapplet/inputDialog.cpp
+++ b/core/applets/screenshotapplet/inputDialog.cpp
@@ -1,67 +1,64 @@
1/**************************************************************************** 1/****************************************************************************
2** Form implementation generated from reading ui file 'inputDialog.ui' 2** Form implementation generated from reading ui file 'inputDialog.ui'
3** 3**
4** Created: Sat Mar 2 07:55:03 2002 4** Created: Sat Mar 2 07:55:03 2002
5** by: The User Interface Compiler (uic) 5** by: The User Interface Compiler (uic)
6** 6**
7** WARNING! All changes made in this file will be lost! 7** WARNING! All changes made in this file will be lost!
8****************************************************************************/ 8****************************************************************************/
9#include "inputDialog.h" 9#include "inputDialog.h"
10 10
11#include <qpe/resource.h> 11#include <qpe/resource.h>
12 12
13#include <opie2/ofiledialog.h> 13#include <opie2/ofiledialog.h>
14 14
15#include <qlineedit.h> 15#include <qlineedit.h>
16#include <qlayout.h>
17#include <qvariant.h>
18#include <qpushbutton.h> 16#include <qpushbutton.h>
19#include <qwhatsthis.h>
20 17
21InputDialog::InputDialog( QWidget* parent, const char* name, bool modal, WFlags fl ) 18InputDialog::InputDialog( QWidget* parent, const char* name, bool modal, WFlags fl )
22 : QDialog( parent, name, modal, fl ) 19 : QDialog( parent, name, modal, fl )
23{ 20{
24 if ( !name ) 21 if ( !name )
25 setName( "InputDialog" ); 22 setName( "InputDialog" );
26 resize( 234, 115); 23 resize( 234, 115);
27 setMaximumSize( QSize( 240, 40)); 24 setMaximumSize( QSize( 240, 40));
28 setCaption( tr(name ) ); 25 setCaption( tr(name ) );
29 26
30 QPushButton *browserButton; 27 QPushButton *browserButton;
31 browserButton = new QPushButton( Resource::loadIconSet("fileopen"),"",this,"BrowseButton"); 28 browserButton = new QPushButton( Resource::loadIconSet("fileopen"),"",this,"BrowseButton");
32 browserButton->setGeometry( QRect( 205, 10, 22, 22)); 29 browserButton->setGeometry( QRect( 205, 10, 22, 22));
33 connect( browserButton, SIGNAL(released()),this,SLOT(browse())); 30 connect( browserButton, SIGNAL(released()),this,SLOT(browse()));
34 LineEdit1 = new QLineEdit( this, "LineEdit1" ); 31 LineEdit1 = new QLineEdit( this, "LineEdit1" );
35 LineEdit1->setGeometry( QRect( 4, 10, 190, 22 ) ); 32 LineEdit1->setGeometry( QRect( 4, 10, 190, 22 ) );
36} 33}
37 34
38/* 35/*
39 * Destroys the object and frees any allocated resources 36 * Destroys the object and frees any allocated resources
40 */ 37 */
41InputDialog::~InputDialog() 38InputDialog::~InputDialog()
42{ 39{
43 inputText= LineEdit1->text(); 40 inputText= LineEdit1->text();
44 41
45} 42}
46 43
47void InputDialog::browse() { 44void InputDialog::browse() {
48 45
49 MimeTypes types; 46 MimeTypes types;
50 QStringList audio, video, all; 47 QStringList audio, video, all;
51 audio << "audio/*"; 48 audio << "audio/*";
52 audio << "playlist/plain"; 49 audio << "playlist/plain";
53 audio << "audio/x-mpegurl"; 50 audio << "audio/x-mpegurl";
54 51
55 video << "video/*"; 52 video << "video/*";
56 video << "playlist/plain"; 53 video << "playlist/plain";
57 54
58 all += audio; 55 all += audio;
59 all += video; 56 all += video;
60 types.insert("All Media Files", all ); 57 types.insert("All Media Files", all );
61 types.insert("Audio", audio ); 58 types.insert("Audio", audio );
62 types.insert("Video", video ); 59 types.insert("Video", video );
63 60
64 QString str = Opie::OFileDialog::getOpenFileName( 1,"/","", types, 0 ); 61 QString str = Opie::OFileDialog::getOpenFileName( 1,"/","", types, 0 );
65 LineEdit1->setText(str); 62 LineEdit1->setText(str);
66} 63}
67 64
diff --git a/core/applets/screenshotapplet/screenshot.cpp b/core/applets/screenshotapplet/screenshot.cpp
index 5f83539..56a031c 100644
--- a/core/applets/screenshotapplet/screenshot.cpp
+++ b/core/applets/screenshotapplet/screenshot.cpp
@@ -1,84 +1,83 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2002 L.J. Potter ljp@llornkcor.com 2** Copyright (C) 2002 L.J. Potter ljp@llornkcor.com
3** All rights reserved. 3** All rights reserved.
4** 4**
5** This file may be distributed and/or modified under the terms of the 5** This file may be distributed and/or modified under the terms of the
6** GNU General Public License version 2 as published by the Free Software 6** GNU General Public License version 2 as published by the Free Software
7** Foundation and appearing in the file LICENSE.GPL included in the 7** Foundation and appearing in the file LICENSE.GPL included in the
8** packaging of this file. 8** packaging of this file.
9** 9**
10** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 10** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
11** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 11** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
12** 12**
13**********************************************************************/ 13**********************************************************************/
14 14
15#include "screenshot.h" 15#include "screenshot.h"
16#include "inputDialog.h" 16#include "inputDialog.h"
17 17
18#include <stdlib.h> 18#include <stdlib.h>
19#include <sys/socket.h> 19#include <sys/socket.h>
20#include <netinet/in.h> 20#include <netinet/in.h>
21#include <netdb.h> 21#include <netdb.h>
22#include <unistd.h> 22#include <unistd.h>
23 23
24#include <qpe/qpeapplication.h> 24#include <qpe/qpeapplication.h>
25#include <qpe/applnk.h> 25#include <qpe/applnk.h>
26 26
27#include <qlineedit.h> 27#include <qlineedit.h>
28#include <qdir.h> 28#include <qdir.h>
29#include <qlabel.h> 29#include <qlabel.h>
30#include <qpushbutton.h> 30#include <qpushbutton.h>
31#include <qpainter.h> 31#include <qpainter.h>
32#include <qspinbox.h> 32#include <qspinbox.h>
33#include <qlayout.h> 33#include <qlayout.h>
34#include <qcheckbox.h> 34#include <qcheckbox.h>
35#include <qmessagebox.h> 35#include <qmessagebox.h>
36#include <qimage.h>
37 36
38 37
39/* XPM */ 38/* XPM */
40static char * snapshot_xpm[] = { 39static char * snapshot_xpm[] = {
41"32 32 177 2", 40"32 32 177 2",
42 " c None", 41 " c None",
43 ". c #042045", 42 ". c #042045",
44 "+ c #0D2B47", 43 "+ c #0D2B47",
45 "@ c #0E325E", 44 "@ c #0E325E",
46 "# c #0D2E50", 45 "# c #0D2E50",
47 "$ c #0A1C32", 46 "$ c #0A1C32",
48 "% c #0F3A69", 47 "% c #0F3A69",
49 "& c #164680", 48 "& c #164680",
50 "* c #165EAE", 49 "* c #165EAE",
51 "= c #134D89", 50 "= c #134D89",
52 "- c #0A3A6E", 51 "- c #0A3A6E",
53 "; c #031024", 52 "; c #031024",
54 "> c #031B36", 53 "> c #031B36",
55 ", c #1A5EA3", 54 ", c #1A5EA3",
56 "' c #1862B1", 55 "' c #1862B1",
57 ") c #1866B9", 56 ") c #1866B9",
58 "! c #0F5AAC", 57 "! c #0F5AAC",
59 "~ c #0F56A8", 58 "~ c #0F56A8",
60 "{ c #0C4C96", 59 "{ c #0C4C96",
61 "] c #030918", 60 "] c #030918",
62 "^ c #060206", 61 "^ c #060206",
63 "/ c #20242C", 62 "/ c #20242C",
64 "( c #3E3B3B", 63 "( c #3E3B3B",
65 "_ c #186ABD", 64 "_ c #186ABD",
66 ": c #115EB3", 65 ": c #115EB3",
67 "< c #082644", 66 "< c #082644",
68 "[ c #222C38", 67 "[ c #222C38",
69 "} c #5A5859", 68 "} c #5A5859",
70 "| c #091921", 69 "| c #091921",
71 "1 c #1E7EDE", 70 "1 c #1E7EDE",
72 "2 c #1A7ADA", 71 "2 c #1A7ADA",
73 "3 c #1970CD", 72 "3 c #1970CD",
74 "4 c #1758A1", 73 "4 c #1758A1",
75 "5 c #0E529A", 74 "5 c #0E529A",
76 "6 c #094388", 75 "6 c #094388",
77 "7 c #22364E", 76 "7 c #22364E",
78 "8 c #384454", 77 "8 c #384454",
79 "9 c #04162C", 78 "9 c #04162C",
80 "0 c #123451", 79 "0 c #123451",
81 "a c #3296B4", 80 "a c #3296B4",
82 "b c #298AB1", 81 "b c #298AB1",
83 "c c #2484AC", 82 "c c #2484AC",
84 "d c #033D86", 83 "d c #033D86",
diff --git a/core/applets/suspendapplet/suspend.cpp b/core/applets/suspendapplet/suspend.cpp
index e17142b..0eb94cb 100644
--- a/core/applets/suspendapplet/suspend.cpp
+++ b/core/applets/suspendapplet/suspend.cpp
@@ -1,54 +1,52 @@
1#include <qpe/resource.h> 1#include <qpe/resource.h>
2#include <qpe/qcopenvelope_qws.h> 2#include <qpe/qcopenvelope_qws.h>
3 3
4#include <qapplication.h> 4#include <qapplication.h>
5#include <qiconset.h>
6#include <qpopupmenu.h>
7 5
8#include "suspend.h" 6#include "suspend.h"
9 7
10 8
11SuspendApplet::SuspendApplet ( ) 9SuspendApplet::SuspendApplet ( )
12 : QObject ( 0, "SuspendApplet" ) 10 : QObject ( 0, "SuspendApplet" )
13{ 11{
14} 12}
15 13
16SuspendApplet::~SuspendApplet ( ) 14SuspendApplet::~SuspendApplet ( )
17{ 15{
18} 16}
19 17
20int SuspendApplet::position ( ) const 18int SuspendApplet::position ( ) const
21{ 19{
22 return 2; 20 return 2;
23} 21}
24 22
25QString SuspendApplet::name ( ) const 23QString SuspendApplet::name ( ) const
26{ 24{
27 return tr( "Suspend shortcut" ); 25 return tr( "Suspend shortcut" );
28} 26}
29 27
30QString SuspendApplet::text ( ) const 28QString SuspendApplet::text ( ) const
31{ 29{
32 return tr( "Suspend" ); 30 return tr( "Suspend" );
33} 31}
34 32
35QString SuspendApplet::tr( const char* s ) const 33QString SuspendApplet::tr( const char* s ) const
36{ 34{
37 return qApp->translate( "SuspendApplet", s, 0 ); 35 return qApp->translate( "SuspendApplet", s, 0 );
38} 36}
39 37
40QString SuspendApplet::tr( const char* s, const char* p ) const 38QString SuspendApplet::tr( const char* s, const char* p ) const
41{ 39{
42 return qApp->translate( "SuspendApplet", s, p ); 40 return qApp->translate( "SuspendApplet", s, p );
43} 41}
44 42
45QIconSet SuspendApplet::icon ( ) const 43QIconSet SuspendApplet::icon ( ) const
46{ 44{
47 QPixmap pix; 45 QPixmap pix;
48 QImage img = Resource::loadImage ( "suspend" ); 46 QImage img = Resource::loadImage ( "suspend" );
49 47
50 if ( !img. isNull ( )) 48 if ( !img. isNull ( ))
51 pix. convertFromImage ( img. smoothScale ( 14, 14 )); 49 pix. convertFromImage ( img. smoothScale ( 14, 14 ));
52 return pix; 50 return pix;
53} 51}
54 52
diff --git a/core/applets/volumeapplet/oledbox.cpp b/core/applets/volumeapplet/oledbox.cpp
index 7547287..bf275a9 100644
--- a/core/applets/volumeapplet/oledbox.cpp
+++ b/core/applets/volumeapplet/oledbox.cpp
@@ -1,50 +1,49 @@
1 1
2#include <qpixmap.h>
3#include <qbitmap.h> 2#include <qbitmap.h>
4#include <qpainter.h> 3#include <qpainter.h>
5 4
6#include "oledbox.h" 5#include "oledbox.h"
7 6
8 7
9#ifdef _QTE_IS_TOO_DUMB_TO_DRAW_AN_ARC 8#ifdef _QTE_IS_TOO_DUMB_TO_DRAW_AN_ARC
10 9
11/* XPM */ 10/* XPM */
12static const char * ledborder_xpm[] = { 11static const char * ledborder_xpm[] = {
13"16 16 11 1", 12"16 16 11 1",
14 " c None", 13 " c None",
15 ".c #626562", 14 ".c #626562",
16 "+c #7B7D7B", 15 "+c #7B7D7B",
17 "@c #949594", 16 "@c #949594",
18 "#c #ACAEAC", 17 "#c #ACAEAC",
19 "$c #CDCACD", 18 "$c #CDCACD",
20 "%c #CDCECD", 19 "%c #CDCECD",
21 ";c #E6E6E6", 20 ";c #E6E6E6",
22 ">c #FFFFFF", 21 ">c #FFFFFF",
23 ",c #E6E2E6", 22 ",c #E6E2E6",
24 "'c #FFFAFF", 23 "'c #FFFAFF",
25" .++@@# ", 24" .++@@# ",
26" ...++@@##$ ", 25" ...++@@##$ ",
27" .....+@##$$% ", 26" .....+@##$$% ",
28" ..... #$%%% ", 27" ..... #$%%% ",
29" ... %%; ", 28" ... %%; ",
30".... ;;;;", 29".... ;;;;",
31"++. ;>>", 30"++. ;>>",
32"+++ >>>", 31"+++ >>>",
33"@@@ >>>", 32"@@@ >>>",
34"@@# >>>", 33"@@# >>>",
35"#### >>>>", 34"#### >>>>",
36" #$$ >>> ", 35" #$$ >>> ",
37" $$,,' >>>>> ", 36" $$,,' >>>>> ",
38" ,,,''>>>>>>> ", 37" ,,,''>>>>>>> ",
39" ,''>>>>>>> ", 38" ,''>>>>>>> ",
40" '>>>>> "}; 39" '>>>>> "};
41 40
42 41
43QPixmap *OLedBox::s_border_pix = 0; 42QPixmap *OLedBox::s_border_pix = 0;
44 43
45#endif 44#endif
46 45
47 46
48OLedBox::OLedBox ( const QColor &col, QWidget *parent, const char *name ) : QWidget ( parent, name ) 47OLedBox::OLedBox ( const QColor &col, QWidget *parent, const char *name ) : QWidget ( parent, name )
49{ 48{
50 m_color = col; 49 m_color = col;
diff --git a/core/applets/volumeapplet/volume.cpp b/core/applets/volumeapplet/volume.cpp
index 38f827e..c736437 100644
--- a/core/applets/volumeapplet/volume.cpp
+++ b/core/applets/volumeapplet/volume.cpp
@@ -1,90 +1,86 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
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 20
21#include <stdio.h> 21#include <stdio.h>
22 22
23#include "volume.h" 23#include "volume.h"
24 24
25#include <qpe/resource.h> 25#include <qpe/resource.h>
26#include <qpe/qpeapplication.h>
27#include <qpe/applnk.h> 26#include <qpe/applnk.h>
28#include <qpe/config.h> 27#include <qpe/config.h>
29#if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP) 28#if ( defined Q_WS_QWS || defined(_WS_QWS_) ) && !defined(QT_NO_COP)
30#include <qpe/qcopenvelope_qws.h> 29#include <qpe/qcopenvelope_qws.h>
31#endif 30#endif
32 31
33#include <qpainter.h> 32#include <qpainter.h>
34#include <qcheckbox.h> 33#include <qcheckbox.h>
35#include <qslider.h> 34#include <qslider.h>
36#include <qlayout.h> 35#include <qlayout.h>
37#include <qframe.h>
38#include <qpixmap.h>
39#include <qvbox.h> 36#include <qvbox.h>
40#include <qlabel.h> 37#include <qlabel.h>
41 38
42#include <qtoolbutton.h>
43#include <qpushbutton.h> 39#include <qpushbutton.h>
44#include <qtimer.h> 40#include <qtimer.h>
45 41
46#include <opie/odevice.h> 42#include <opie/odevice.h>
47 43
48#include "oledbox.h" 44#include "oledbox.h"
49 45
50using namespace Opie; 46using namespace Opie;
51 47
52#define RATE_TIMER_INTERVAL 100 48#define RATE_TIMER_INTERVAL 100
53// Ten times per second is fine (RATE_TIMER_INTERVAL 100). A shorter time 49// Ten times per second is fine (RATE_TIMER_INTERVAL 100). A shorter time
54// results in "hanging" buttons on the iPAQ due to quite high CPU consumption. 50// results in "hanging" buttons on the iPAQ due to quite high CPU consumption.
55 51
56 52
57/* XPM */ 53/* XPM */
58static const char * vol_xpm[] = { 54static const char * vol_xpm[] = {
59"20 20 3 1", 55"20 20 3 1",
60" c None", 56" c None",
61". c #0000FF", 57". c #0000FF",
62"+ c #000000", 58"+ c #000000",
63" ", 59" ",
64" . ", 60" . ",
65" . . . . ", 61" . . . . ",
66" . . . . . . ", 62" . . . . . . ",
67" . . . . . . . ", 63" . . . . . . . ",
68" . . ..... . . ", 64" . . ..... . . ",
69" . ... ..... ... ", 65" . ... ..... ... ",
70" ........... .... ", 66" ........... .... ",
71" ................. ", 67" ................. ",
72"++++++++++++++++++++", 68"++++++++++++++++++++",
73" .................. ", 69" .................. ",
74" . ............. . ", 70" . ............. . ",
75" . ..... ....... ", 71" . ..... ....... ",
76" . ... ..... . ", 72" . ... ..... . ",
77" . ... ..... . ", 73" . ... ..... . ",
78" . ... ..... ", 74" . ... ..... ",
79" . . . . . ", 75" . . . . . ",
80" . . . ", 76" . . . ",
81" . . . ", 77" . . . ",
82" "}; 78" "};
83/* XPM */ 79/* XPM */
84static const char * mic_xpm[] = { 80static const char * mic_xpm[] = {
85"20 20 21 1", 81"20 20 21 1",
86" c None", 82" c None",
87". c #000000", 83". c #000000",
88"+ c #EEEEEE", 84"+ c #EEEEEE",
89"@ c #B4B6B4", 85"@ c #B4B6B4",
90"# c #8B8D8B", 86"# c #8B8D8B",
diff --git a/core/applets/volumeapplet/volumeappletimpl.cpp b/core/applets/volumeapplet/volumeappletimpl.cpp
index 4cbab31..9c7dea3 100644
--- a/core/applets/volumeapplet/volumeappletimpl.cpp
+++ b/core/applets/volumeapplet/volumeappletimpl.cpp
@@ -1,67 +1,65 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
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 "volume.h" 20#include "volume.h"
21#include "volumeappletimpl.h" 21#include "volumeappletimpl.h"
22#include <qpe/qcopenvelope_qws.h>
23#include <qpe/config.h>
24 22
25VolumeAppletImpl::VolumeAppletImpl() 23VolumeAppletImpl::VolumeAppletImpl()
26 : volume(0) 24 : volume(0)
27{ 25{
28} 26}
29 27
30VolumeAppletImpl::~VolumeAppletImpl() 28VolumeAppletImpl::~VolumeAppletImpl()
31{ 29{
32 delete volume; 30 delete volume;
33} 31}
34 32
35QWidget *VolumeAppletImpl::applet( QWidget *parent ) 33QWidget *VolumeAppletImpl::applet( QWidget *parent )
36{ 34{
37 if ( !volume ) 35 if ( !volume )
38 volume = new VolumeApplet( parent ); 36 volume = new VolumeApplet( parent );
39 return volume; 37 return volume;
40} 38}
41 39
42int VolumeAppletImpl::position() const 40int VolumeAppletImpl::position() const
43{ 41{
44 return 6; 42 return 6;
45} 43}
46 44
47QRESULT VolumeAppletImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 45QRESULT VolumeAppletImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
48{ 46{
49 *iface = 0; 47 *iface = 0;
50 if ( uuid == IID_QUnknown ) 48 if ( uuid == IID_QUnknown )
51 *iface = this; 49 *iface = this;
52 else if ( uuid == IID_TaskbarApplet ) 50 else if ( uuid == IID_TaskbarApplet )
53 *iface = this; 51 *iface = this;
54 else 52 else
55 return QS_FALSE; 53 return QS_FALSE;
56 54
57 if ( *iface ) 55 if ( *iface )
58 (*iface)->addRef(); 56 (*iface)->addRef();
59 return QS_OK; 57 return QS_OK;
60} 58}
61 59
62Q_EXPORT_INTERFACE() 60Q_EXPORT_INTERFACE()
63{ 61{
64 Q_CREATE_INSTANCE( VolumeAppletImpl ) 62 Q_CREATE_INSTANCE( VolumeAppletImpl )
65} 63}
66 64
67 65
diff --git a/core/applets/vtapplet/vt.cpp b/core/applets/vtapplet/vt.cpp
index 881eb41..bd39093 100644
--- a/core/applets/vtapplet/vt.cpp
+++ b/core/applets/vtapplet/vt.cpp
@@ -1,68 +1,65 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2003 Michael 'Mickey' Lauer. All rights reserved. 2** Copyright (C) 2003 Michael 'Mickey' Lauer. All rights reserved.
3** 3**
4** Contact me @ mickeyl@handhelds.org 4** Contact me @ mickeyl@handhelds.org
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
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**********************************************************************/ 14**********************************************************************/
15 15
16#include <qpe/resource.h> 16#include <qpe/resource.h>
17#include <qpe/qcopenvelope_qws.h>
18 17
19#include <qapplication.h>
20#include <qiconset.h>
21#include <qpopupmenu.h> 18#include <qpopupmenu.h>
22 19
23#include <fcntl.h> 20#include <fcntl.h>
24#include <unistd.h> 21#include <unistd.h>
25#include <sys/types.h> 22#include <sys/types.h>
26#include <sys/stat.h> 23#include <sys/stat.h>
27#include <sys/ioctl.h> 24#include <sys/ioctl.h>
28#include <linux/vt.h> 25#include <linux/vt.h>
29 26
30#include "vt.h" 27#include "vt.h"
31 28
32VTApplet::VTApplet ( ) 29VTApplet::VTApplet ( )
33 : QObject ( 0, "VTApplet" ) 30 : QObject ( 0, "VTApplet" )
34{ 31{
35} 32}
36 33
37VTApplet::~VTApplet ( ) 34VTApplet::~VTApplet ( )
38{ 35{
39} 36}
40 37
41int VTApplet::position ( ) const 38int VTApplet::position ( ) const
42{ 39{
43 return 2; 40 return 2;
44} 41}
45 42
46QString VTApplet::name ( ) const 43QString VTApplet::name ( ) const
47{ 44{
48 return tr( "VT shortcut" ); 45 return tr( "VT shortcut" );
49} 46}
50 47
51QString VTApplet::text ( ) const 48QString VTApplet::text ( ) const
52{ 49{
53 return tr( "Terminal" ); 50 return tr( "Terminal" );
54} 51}
55 52
56/* 53/*
57QString VTApplet::tr( const char* s ) const 54QString VTApplet::tr( const char* s ) const
58{ 55{
59 return qApp->translate( "VTApplet", s, 0 ); 56 return qApp->translate( "VTApplet", s, 0 );
60} 57}
61 58
62QString VTApplet::tr( const char* s, const char* p ) const 59QString VTApplet::tr( const char* s, const char* p ) const
63{ 60{
64 return qApp->translate( "VTApplet", s, p ); 61 return qApp->translate( "VTApplet", s, p );
65} 62}
66*/ 63*/
67 64
68QIconSet VTApplet::icon ( ) const 65QIconSet VTApplet::icon ( ) const
diff --git a/core/apps/calibrate/main.cpp b/core/apps/calibrate/main.cpp
index ec9b5ec..0da0fe0 100644
--- a/core/apps/calibrate/main.cpp
+++ b/core/apps/calibrate/main.cpp
@@ -1,47 +1,46 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2000 Trolltech AS. All rights reserved. 2** Copyright (C) 2000 Trolltech AS. All rights reserved.
3** 3**
4** This file is part of Qtopia Environment. 4** This file is part of Qtopia Environment.
5** 5**
6** This file may be distributed and/or modified under the terms of the 6** This file may be distributed and/or modified under the terms of the
7** GNU General Public License version 2 as published by the Free Software 7** GNU General Public License version 2 as published by the Free Software
8** Foundation and appearing in the file LICENSE.GPL included in the 8** Foundation and appearing in the file LICENSE.GPL included in the
9** packaging of this file. 9** packaging of this file.
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 20
21#include "calibrate.h" 21#include "calibrate.h"
22 22
23#include <qfile.h>
24#include <qpe/qpeapplication.h> 23#include <qpe/qpeapplication.h>
25 24
26#ifdef QWS 25#ifdef QWS
27#include <qwindowsystem_qws.h> 26#include <qwindowsystem_qws.h>
28#endif 27#endif
29 28
30int main( int argc, char ** argv ) 29int main( int argc, char ** argv )
31{ 30{
32 QPEApplication a( argc, argv ); 31 QPEApplication a( argc, argv );
33 int retval = 0; 32 int retval = 0;
34 33
35#ifdef QWS 34#ifdef QWS
36 if ( QWSServer::mouseHandler() && 35 if ( QWSServer::mouseHandler() &&
37 QWSServer::mouseHandler() ->inherits("QCalibratedMouseHandler") ) { 36 QWSServer::mouseHandler() ->inherits("QCalibratedMouseHandler") ) {
38#endif 37#endif
39 // Make sure calibration widget starts on top. 38 // Make sure calibration widget starts on top.
40 Calibrate cal; 39 Calibrate cal;
41 a.setMainWidget(&cal); 40 a.setMainWidget(&cal);
42 a.showMainWidget(&cal); 41 a.showMainWidget(&cal);
43 return a.exec(); 42 return a.exec();
44#ifdef QWS 43#ifdef QWS
45 } 44 }
46#endif 45#endif
47} 46}
diff --git a/core/obex/obex.cc b/core/obex/obex.cc
index 2a306de..50e5201 100644
--- a/core/obex/obex.cc
+++ b/core/obex/obex.cc
@@ -1,55 +1,51 @@
1 1
2#include <qapplication.h>
3#include <qfile.h>
4#include <qfileinfo.h> 2#include <qfileinfo.h>
5#include <qtextcodec.h>
6 3
7#include <qpe/qcopenvelope_qws.h>
8 4
9#include <opie/oprocess.h> 5#include <opie/oprocess.h>
10#include "obex.h" 6#include "obex.h"
11 7
12using namespace OpieObex; 8using namespace OpieObex;
13 9
14/* TRANSLATOR OpieObex::Obex */ 10/* TRANSLATOR OpieObex::Obex */
15 11
16Obex::Obex( QObject *parent, const char* name ) 12Obex::Obex( QObject *parent, const char* name )
17 : QObject(parent, name ) 13 : QObject(parent, name )
18{ 14{
19 m_rec = 0; 15 m_rec = 0;
20 m_send=0; 16 m_send=0;
21 m_count = 0; 17 m_count = 0;
22 m_receive = false; 18 m_receive = false;
23 connect( this, SIGNAL(error(int) ), // for recovering to receive 19 connect( this, SIGNAL(error(int) ), // for recovering to receive
24 SLOT(slotError() ) ); 20 SLOT(slotError() ) );
25 connect( this, SIGNAL(sent(bool) ), 21 connect( this, SIGNAL(sent(bool) ),
26 SLOT(slotError() ) ); 22 SLOT(slotError() ) );
27}; 23};
28Obex::~Obex() { 24Obex::~Obex() {
29 delete m_rec; 25 delete m_rec;
30 delete m_send; 26 delete m_send;
31} 27}
32void Obex::receive() { 28void Obex::receive() {
33 m_receive = true; 29 m_receive = true;
34 m_outp = QString::null; 30 m_outp = QString::null;
35 qWarning("Receive" ); 31 qWarning("Receive" );
36 m_rec = new OProcess(); 32 m_rec = new OProcess();
37 *m_rec << "irobex_palm3"; 33 *m_rec << "irobex_palm3";
38 // connect to the necessary slots 34 // connect to the necessary slots
39 connect(m_rec, SIGNAL(processExited(OProcess*) ), 35 connect(m_rec, SIGNAL(processExited(OProcess*) ),
40 this, SLOT(slotExited(OProcess*) ) ); 36 this, SLOT(slotExited(OProcess*) ) );
41 37
42 connect(m_rec, SIGNAL(receivedStdout(OProcess*, char*, int ) ), 38 connect(m_rec, SIGNAL(receivedStdout(OProcess*, char*, int ) ),
43 this, SLOT(slotStdOut(OProcess*, char*, int) ) ); 39 this, SLOT(slotStdOut(OProcess*, char*, int) ) );
44 40
45 if(!m_rec->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) { 41 if(!m_rec->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) {
46 qWarning("could not start :("); 42 qWarning("could not start :(");
47 emit done( false ); 43 emit done( false );
48 delete m_rec; 44 delete m_rec;
49 m_rec = 0; 45 m_rec = 0;
50 } 46 }
51// emit currentTry(m_count ); 47// emit currentTry(m_count );
52 48
53} 49}
54void Obex::send( const QString& fileName) { // if currently receiving stop it send receive 50void Obex::send( const QString& fileName) { // if currently receiving stop it send receive
55 m_count = 0; 51 m_count = 0;
diff --git a/core/obex/obexhandler.cpp b/core/obex/obexhandler.cpp
index c237555..4034560 100644
--- a/core/obex/obexhandler.cpp
+++ b/core/obex/obexhandler.cpp
@@ -1,49 +1,48 @@
1#include <qcopchannel_qws.h>
2 1
3#include <qpe/qcopenvelope_qws.h> 2#include <qpe/qcopenvelope_qws.h>
4#include <qpe/qpeapplication.h> 3#include <qpe/qpeapplication.h>
5 4
6#include "obexsend.h" 5#include "obexsend.h"
7#include "receiver.h" 6#include "receiver.h"
8#include "obexhandler.h" 7#include "obexhandler.h"
9 8
10using namespace OpieObex; 9using namespace OpieObex;
11 10
12/* TRANSLATOR OpieObex::ObexHandler */ 11/* TRANSLATOR OpieObex::ObexHandler */
13 12
14ObexHandler::ObexHandler() { 13ObexHandler::ObexHandler() {
15 m_wasRec = false; 14 m_wasRec = false;
16 m_sender = 0l; 15 m_sender = 0l;
17 m_receiver = 0l; 16 m_receiver = 0l;
18 QCopChannel* chan = new QCopChannel("QPE/Obex"); 17 QCopChannel* chan = new QCopChannel("QPE/Obex");
19 connect(chan, SIGNAL(received(const QCString&, const QByteArray& ) ), 18 connect(chan, SIGNAL(received(const QCString&, const QByteArray& ) ),
20 this, SLOT(irdaMessage(const QCString&, const QByteArray& ) ) ); 19 this, SLOT(irdaMessage(const QCString&, const QByteArray& ) ) );
21} 20}
22ObexHandler::~ObexHandler() { 21ObexHandler::~ObexHandler() {
23 delete m_sender; 22 delete m_sender;
24 delete m_receiver; 23 delete m_receiver;
25} 24}
26void ObexHandler::doSend(const QString& str, const QString& desc) { 25void ObexHandler::doSend(const QString& str, const QString& desc) {
27 delete m_sender; 26 delete m_sender;
28 m_sender = new SendWidget; 27 m_sender = new SendWidget;
29 m_sender->raise(); 28 m_sender->raise();
30 QPEApplication::showWidget( m_sender ); 29 QPEApplication::showWidget( m_sender );
31 connect(m_sender, SIGNAL(done() ), 30 connect(m_sender, SIGNAL(done() ),
32 this, SLOT(slotSent() ) ); 31 this, SLOT(slotSent() ) );
33 m_sender->send( str, desc ); 32 m_sender->send( str, desc );
34} 33}
35void ObexHandler::doReceive(bool b) { 34void ObexHandler::doReceive(bool b) {
36 if (m_receiver && b ) return; // we should enable receiver and it is on 35 if (m_receiver && b ) return; // we should enable receiver and it is on
37 else if (!m_receiver && !b ) return; // we should disbale receiver and it is off 36 else if (!m_receiver && !b ) return; // we should disbale receiver and it is off
38 else if (m_receiver && !b ) { 37 else if (m_receiver && !b ) {
39 delete m_receiver; 38 delete m_receiver;
40 m_receiver=0; 39 m_receiver=0;
41 }else if (!m_receiver && b ) { 40 }else if (!m_receiver && b ) {
42 m_receiver= new Receiver; 41 m_receiver= new Receiver;
43 } 42 }
44} 43}
45void ObexHandler::slotSent() { 44void ObexHandler::slotSent() {
46 QString file = m_sender->file(); 45 QString file = m_sender->file();
47 delete m_sender; 46 delete m_sender;
48 m_sender = 0; 47 m_sender = 0;
49 QCopEnvelope e ("QPE/Obex", "done(QString)" ); 48 QCopEnvelope e ("QPE/Obex", "done(QString)" );
diff --git a/core/obex/obexsend.cpp b/core/obex/obexsend.cpp
index cf5d958..6b8d467 100644
--- a/core/obex/obexsend.cpp
+++ b/core/obex/obexsend.cpp
@@ -1,58 +1,54 @@
1#include <qpushbutton.h> 1#include <qpushbutton.h>
2#include <qlabel.h> 2#include <qlabel.h>
3#include <qhbox.h>
4#include <qlayout.h> 3#include <qlayout.h>
5#include <qtimer.h> 4#include <qtimer.h>
6#include <qtl.h>
7 5
8#include <qcopchannel_qws.h>
9 6
10#include <qpe/resource.h>
11#include <qpe/qcopenvelope_qws.h> 7#include <qpe/qcopenvelope_qws.h>
12 8
13#include "obex.h" 9#include "obex.h"
14#include "obexsend.h" 10#include "obexsend.h"
15 11
16using namespace OpieObex; 12using namespace OpieObex;
17 13
18/* TRANSLATOR OpieObex::SendWidget */ 14/* TRANSLATOR OpieObex::SendWidget */
19 15
20 16
21SendWidget::SendWidget( QWidget* parent, const char* name ) 17SendWidget::SendWidget( QWidget* parent, const char* name )
22 : QWidget( parent, name ) { 18 : QWidget( parent, name ) {
23 initUI(); 19 initUI();
24} 20}
25SendWidget::~SendWidget() { 21SendWidget::~SendWidget() {
26} 22}
27void SendWidget::initUI() { 23void SendWidget::initUI() {
28 m_obex = new Obex(this, "obex"); 24 m_obex = new Obex(this, "obex");
29 connect(m_obex, SIGNAL(error(int) ), 25 connect(m_obex, SIGNAL(error(int) ),
30 this, SLOT(slotIrError(int) ) ); 26 this, SLOT(slotIrError(int) ) );
31 connect(m_obex, SIGNAL(sent(bool) ), 27 connect(m_obex, SIGNAL(sent(bool) ),
32 this, SLOT(slotIrSent(bool) ) ); 28 this, SLOT(slotIrSent(bool) ) );
33 connect(m_obex, SIGNAL(currentTry(unsigned int ) ), 29 connect(m_obex, SIGNAL(currentTry(unsigned int ) ),
34 this, SLOT(slotIrTry(unsigned int ) ) ); 30 this, SLOT(slotIrTry(unsigned int ) ) );
35 31
36 QCopChannel* chan = new QCopChannel("QPE/IrDaAppletBack", this ); 32 QCopChannel* chan = new QCopChannel("QPE/IrDaAppletBack", this );
37 connect(chan, SIGNAL(received(const QCString&, const QByteArray& ) ), 33 connect(chan, SIGNAL(received(const QCString&, const QByteArray& ) ),
38 this, SLOT(dispatchIrda(const QCString&, const QByteArray& ) ) ); 34 this, SLOT(dispatchIrda(const QCString&, const QByteArray& ) ) );
39 35
40 chan = new QCopChannel("QPE/BluetoothBack", this ); 36 chan = new QCopChannel("QPE/BluetoothBack", this );
41 connect(chan, SIGNAL(received(const QCString&, const QByteArray& ) ), 37 connect(chan, SIGNAL(received(const QCString&, const QByteArray& ) ),
42 this, SLOT(dispatchBt(const QCString&, const QByteArray& ) ) ); 38 this, SLOT(dispatchBt(const QCString&, const QByteArray& ) ) );
43 39
44 QVBoxLayout* lay = new QVBoxLayout(this); 40 QVBoxLayout* lay = new QVBoxLayout(this);
45 41
46 QHBox* nameBox = new QHBox(this); 42 QHBox* nameBox = new QHBox(this);
47 QLabel* name = new QLabel(nameBox); 43 QLabel* name = new QLabel(nameBox);
48 name->setText( tr("<qt><h1>Sending:</h1></qt>") ); 44 name->setText( tr("<qt><h1>Sending:</h1></qt>") );
49 name->setAlignment( AlignLeft | AlignTop ); 45 name->setAlignment( AlignLeft | AlignTop );
50 m_lblFile = new QLabel(nameBox); 46 m_lblFile = new QLabel(nameBox);
51 lay->addWidget(nameBox, 0); 47 lay->addWidget(nameBox, 0);
52 48
53 QFrame* frame = new QFrame(this); 49 QFrame* frame = new QFrame(this);
54 frame->setFrameShape( QFrame::HLine ); 50 frame->setFrameShape( QFrame::HLine );
55 frame->setFrameShadow( QFrame::Sunken ); 51 frame->setFrameShadow( QFrame::Sunken );
56 lay->addWidget(frame, 10); 52 lay->addWidget(frame, 10);
57 53
58 QLabel* devices = new QLabel(this); 54 QLabel* devices = new QLabel(this);
diff --git a/core/obex/receiver.cpp b/core/obex/receiver.cpp
index bf9e30c..7d9f7ec 100644
--- a/core/obex/receiver.cpp
+++ b/core/obex/receiver.cpp
@@ -1,68 +1,64 @@
1#include <sys/types.h> 1#include <sys/types.h>
2#include <sys/stat.h> 2#include <sys/stat.h>
3#include <sys/mman.h> 3#include <sys/mman.h>
4#include <stdlib.h> // int system 4#include <stdlib.h> // int system
5#include <unistd.h> 5#include <unistd.h>
6 6
7#include <fcntl.h> 7#include <fcntl.h>
8 8
9#include <qfile.h>
10#include <qfileinfo.h> 9#include <qfileinfo.h>
11#include <qlabel.h> 10#include <qlabel.h>
12#include <qhbox.h>
13#include <qregexp.h>
14#include <qtextview.h> 11#include <qtextview.h>
15#include <qpushbutton.h> 12#include <qpushbutton.h>
16 13
17#include <qpe/applnk.h> 14#include <qpe/applnk.h>
18#include <qpe/qpeapplication.h> 15#include <qpe/qpeapplication.h>
19#include <qpe/qcopenvelope_qws.h> 16#include <qpe/qcopenvelope_qws.h>
20#include <qpe/global.h>
21 17
22#include "obex.h" 18#include "obex.h"
23#include "receiver.h" 19#include "receiver.h"
24 20
25using namespace OpieObex; 21using namespace OpieObex;
26 22
27/* TRANSLATOR OpieObex::Receiver */ 23/* TRANSLATOR OpieObex::Receiver */
28 24
29Receiver::Receiver() { 25Receiver::Receiver() {
30 m_obex = new Obex(this, "Receiver"); 26 m_obex = new Obex(this, "Receiver");
31 connect(m_obex, SIGNAL(receivedFile(const QString& ) ), 27 connect(m_obex, SIGNAL(receivedFile(const QString& ) ),
32 this, SLOT(slotReceived(const QString& ) ) ); 28 this, SLOT(slotReceived(const QString& ) ) );
33 m_obex->receive(); 29 m_obex->receive();
34} 30}
35Receiver::~Receiver() { 31Receiver::~Receiver() {
36 m_obex->setReceiveEnabled( false ); 32 m_obex->setReceiveEnabled( false );
37 delete m_obex; 33 delete m_obex;
38} 34}
39void Receiver::slotReceived( const QString& _file ) { 35void Receiver::slotReceived( const QString& _file ) {
40 QString file = _file; 36 QString file = _file;
41 int check = checkFile(file); 37 int check = checkFile(file);
42 if ( check == AddressBook ) 38 if ( check == AddressBook )
43 handleAddr( file ); 39 handleAddr( file );
44 else if ( check == Datebook ) 40 else if ( check == Datebook )
45 handleDateTodo( file ); 41 handleDateTodo( file );
46 else 42 else
47 handleOther( file ); 43 handleOther( file );
48} 44}
49void Receiver::handleAddr( const QString& str ) { 45void Receiver::handleAddr( const QString& str ) {
50 QCopEnvelope e("QPE/Application/addressbook", "setDocument(QString)" ); 46 QCopEnvelope e("QPE/Application/addressbook", "setDocument(QString)" );
51 e << str; 47 e << str;
52} 48}
53/* we can not say for sure if it's a VEevent ot VTodo */ 49/* we can not say for sure if it's a VEevent ot VTodo */
54void Receiver::handleDateTodo( const QString& str ) { 50void Receiver::handleDateTodo( const QString& str ) {
55 QCopEnvelope e0("QPE/Application/todolist", "setDocument(QString)"); 51 QCopEnvelope e0("QPE/Application/todolist", "setDocument(QString)");
56 e0 << str; 52 e0 << str;
57 QCopEnvelope e1("QPE/Application/datebook", "setDocument(QString)" ); 53 QCopEnvelope e1("QPE/Application/datebook", "setDocument(QString)" );
58 e1 << str; 54 e1 << str;
59} 55}
60/* 56/*
61 * Handle other asks if it should accept the 57 * Handle other asks if it should accept the
62 * beamed object and creates a DocLnk 58 * beamed object and creates a DocLnk
63 */ 59 */
64void Receiver::handleOther( const QString& other ) { 60void Receiver::handleOther( const QString& other ) {
65 OtherHandler* hand = new OtherHandler(); 61 OtherHandler* hand = new OtherHandler();
66 hand->handle( other ); 62 hand->handle( other );
67} 63}
68void Receiver::tidyUp( QString& _file, const QString& ending) { 64void Receiver::tidyUp( QString& _file, const QString& ending) {