author | chicken <chicken> | 2004-03-01 15:44:36 (UTC) |
---|---|---|
committer | chicken <chicken> | 2004-03-01 15:44:36 (UTC) |
commit | c50e4c32d34a0550f167480b6306aac632fb201c (patch) (side-by-side diff) | |
tree | a0795fa171d7410624717f120d1bd17f6c8f3224 /libopie | |
parent | 01abceaeb00bc35fa9bf5792eb51aa70b68f110d (diff) | |
download | opie-c50e4c32d34a0550f167480b6306aac632fb201c.zip opie-c50e4c32d34a0550f167480b6306aac632fb201c.tar.gz opie-c50e4c32d34a0550f167480b6306aac632fb201c.tar.bz2 |
fix includes
-rw-r--r-- | libopie/colordialog.cpp | 2 | ||||
-rw-r--r-- | libopie/colorpopupmenu.cpp | 1 | ||||
-rw-r--r-- | libopie/ocheckitem.cpp | 1 | ||||
-rw-r--r-- | libopie/ocolorbutton.cpp | 3 | ||||
-rw-r--r-- | libopie/odevice.cpp | 1 | ||||
-rw-r--r-- | libopie/odevicebutton.cpp | 2 | ||||
-rw-r--r-- | libopie/ofiledialog.cc | 3 | ||||
-rw-r--r-- | libopie/ofileselector.cpp | 5 | ||||
-rw-r--r-- | libopie/ofontselector.cpp | 1 | ||||
-rw-r--r-- | libopie/oprocctrl.cpp | 1 | ||||
-rw-r--r-- | libopie/oprocess.cpp | 1 | ||||
-rw-r--r-- | libopie/orecurrancewidget.cpp | 2 | ||||
-rw-r--r-- | libopie/oticker.cpp | 9 | ||||
-rw-r--r-- | libopie/otimepicker.cpp | 3 | ||||
-rw-r--r-- | libopie/owait.cpp | 2 | ||||
-rw-r--r-- | libopie/pim/ocontactaccessbackend_xml.cpp | 5 | ||||
-rw-r--r-- | libopie/pim/otodo.cpp | 3 |
17 files changed, 4 insertions, 41 deletions
diff --git a/libopie/colordialog.cpp b/libopie/colordialog.cpp index c7421ec..d46da41 100644 --- a/libopie/colordialog.cpp +++ b/libopie/colordialog.cpp @@ -1,99 +1,97 @@ /**************************************************************************** ** $Id$ ** ** Implementation of OColorDialog class ** ** Created : 990222 ** ** Copyright (C) 1999-2000 Trolltech AS. All rights reserved. ** ** This file is part of the dialogs module of the Qt GUI Toolkit. ** ** This file may be distributed under the terms of the Q Public License ** as defined by Trolltech AS of Norway and appearing in the file ** LICENSE.QPL included in the packaging of this file. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** Licensees holding valid Qt Enterprise Edition or Qt Professional Edition ** licenses may use this file in accordance with the Qt Commercial License ** Agreement provided with the Software. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for ** information about Qt Commercial License Agreements. ** See http://www.trolltech.com/qpl/ for QPL licensing information. ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include "colordialog.h" #include "qpainter.h" #include "qlayout.h" #include "qlabel.h" #include "qpushbutton.h" #include "qlineedit.h" #include "qimage.h" #include "qpixmap.h" #include "qdrawutil.h" #include "qvalidator.h" -#include "qdragobject.h" #include "qapplication.h" -#include "qdragobject.h" static inline void rgb2hsv( QRgb rgb, int&h, int&s, int&v ) { QColor c; c.setRgb( rgb ); c.getHsv(h,s,v); } /* * avoid clashes with the original Qt */ namespace { class QColorPicker : public QFrame { Q_OBJECT public: QColorPicker(QWidget* parent=0, const char* name=0); ~QColorPicker(); public slots: void setCol( int h, int s ); signals: void newCol( int h, int s ); protected: QSize sizeHint() const; QSizePolicy sizePolicy() const; void drawContents(QPainter* p); void mouseMoveEvent( QMouseEvent * ); void mousePressEvent( QMouseEvent * ); private: int hue; int sat; QPoint colPt(); int huePt( const QPoint &pt ); int satPt( const QPoint &pt ); void setCol( const QPoint &pt ); QPixmap *pix; }; static int pWidth = 200; static int pHeight = 200; diff --git a/libopie/colorpopupmenu.cpp b/libopie/colorpopupmenu.cpp index 5a8d77e..0d66fba 100644 --- a/libopie/colorpopupmenu.cpp +++ b/libopie/colorpopupmenu.cpp @@ -1,84 +1,83 @@ /* This file is part of the Opie Project Copyright (c) 2002 S. Prud'homme <prudhomme@laposte.net> Dan Williams <williamsdr@acm.org> =. .=l. .>+-= _;:, .> :=|. This program is free software; you can .> <`_, > . <= redistribute it and/or modify it under :`=1 )Y*s>-.-- : the terms of the GNU Library General Public .="- .-=="i, .._ License as published by the Free Software - . .-<_> .<> Foundation; either version 2 of the License, ._= =} : or (at your option) any later version. .%`+i> _;_. .i_,=:_. -<s. This program is distributed in the hope that + . -:. = it will be useful, but WITHOUT ANY WARRANTY; : .. .:, . . . without even the implied warranty of =_ + =;=|` MERCHANTABILITY or FITNESS FOR A _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU ..}^=.= = ; Library General Public License for more ++= -. .` .: details. : = ...= . :.=- -. .:....=;==+<; You should have received a copy of the GNU -_. . . )=. = Library General Public License along with -- :-=` this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "colorpopupmenu.h" #include "colordialog.h" -#include <qaction.h> #include <qlayout.h> #include <qpainter.h> OColorPanelButton::OColorPanelButton( const QColor& color, QWidget* parent, const char* name ) : QFrame( parent, name ) { m_color = color; setFixedSize( 16, 16 ); setActive( FALSE ); } OColorPanelButton::~OColorPanelButton() { } void OColorPanelButton::setActive( bool active ) { m_active = active; if ( m_active ) { setFrameStyle( Panel | Sunken ); } else { setFrameStyle( NoFrame ); } } void OColorPanelButton::enterEvent( QEvent* ) { if ( !m_active ) { setFrameStyle( Panel | Sunken ); } } void OColorPanelButton::leaveEvent( QEvent* ) { if ( !m_active ) { setFrameStyle( NoFrame ); } } void OColorPanelButton::paintEvent( QPaintEvent* e ) { QFrame::paintEvent( e ); QPainter painter; painter.begin( this ); painter.fillRect( 2, 2, 12, 12, m_color ); diff --git a/libopie/ocheckitem.cpp b/libopie/ocheckitem.cpp index 082d7a2..cd763c1 100644 --- a/libopie/ocheckitem.cpp +++ b/libopie/ocheckitem.cpp @@ -1,61 +1,60 @@ /********************************************************************** ** Copyright (C) 2002 Stefan Eilers (se, eilers.stefan@epost.de ** ** This file may be distributed and/or modified under the terms of the ** GNU Library General Public License version 2 as published by the ** Free Software Foundation and appearing in the file LICENSE.GPL ** included in the packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. **********************************************************************/ -#include <qpainter.h> #include "ocheckitem.h" /** * Constructs an CheckItem with a QTable as parent * and a sort key for. * The sort key will be used by QTable to sort the table later * @param t The parent QTable where the check item belongs * @param key A sort key */ OCheckItem::OCheckItem( QTable *t, const QString &key ) : QTableItem( t, Never, "" ), m_checked( FALSE ), m_sortKey( key ) { } /** * reimplemted for internal reasons * @return Returns the sort key of the Item * @see QTableItem */ QString OCheckItem::key() const { return m_sortKey; } /** * This method can check or uncheck the item. It will * call QTable to update the cell. * * @param b Whether to check or uncheck the item */ void OCheckItem::setChecked( bool b ) { m_checked = b; table()->updateCell( row(), col() ); } /** * This will toggle the item. If it is checked it'll get * unchecked by this method or vice versa. */ void OCheckItem::toggle() { m_checked = !m_checked; } /** * This will return the state of the item. diff --git a/libopie/ocolorbutton.cpp b/libopie/ocolorbutton.cpp index 113a77a..93fe5d0 100644 --- a/libopie/ocolorbutton.cpp +++ b/libopie/ocolorbutton.cpp @@ -1,81 +1,78 @@ /* =. This file is part of the OPIE Project .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> .>+-= _;:, .> :=|. This library is free software; you can .> <`_, > . <= redistribute it and/or modify it under :`=1 )Y*s>-.-- : the terms of the GNU Library General Public .="- .-=="i, .._ License as published by the Free Software - . .-<_> .<> Foundation; either version 2 of the License, ._= =} : or (at your option) any later version. .%`+i> _;_. .i_,=:_. -<s. This library is distributed in the hope that + . -:. = it will be useful, but WITHOUT ANY WARRANTY; : .. .:, . . . without even the implied warranty of =_ + =;=|` MERCHANTABILITY or FITNESS FOR A _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU ..}^=.= = ; Library General Public License for more ++= -. .` .: details. : = ...= . :.=- -. .:....=;==+<; You should have received a copy of the GNU -_. . . )=. = Library General Public License along with -- :-=` this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <opie/colorpopupmenu.h> #include <opie/ocolorbutton.h> -#include <qcolor.h> -#include <qpixmap.h> -#include <qimage.h> #include <qpe/resource.h> struct OColorButtonPrivate { QPopupMenu *m_menu; QColor m_color; }; /** * This concstructs a Color Button with @param color as the start color * It'll use a OColorPopupMenu internally * * @param parent The parent of the Color Button * @param color The color from where to start on * @param name @see QObject */ OColorButton::OColorButton ( QWidget *parent, const QColor &color, const char *name ) : QPushButton ( parent, name ) { d = new OColorButtonPrivate; d-> m_menu = new OColorPopupMenu ( color, 0, 0 ); setPopup ( d-> m_menu ); // setPopupDelay ( 0 ); connect ( d-> m_menu, SIGNAL( colorSelected ( const QColor & )), this, SLOT( updateColor ( const QColor & ))); updateColor ( color ); QSize s = sizeHint ( ) + QSize ( 12, 0 ); setMinimumSize ( s ); setMaximumSize ( s. width ( ) * 2, s. height ( )); } /** * This destructs the object */ OColorButton::~OColorButton ( ) { delete d; } /** * @return Returns the current color of the button */ QColor OColorButton::color ( ) const { return d-> m_color; diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp index c5342e1..c0b6efa 100644 --- a/libopie/odevice.cpp +++ b/libopie/odevice.cpp @@ -1,79 +1,78 @@ /* This file is part of the OPIE libraries Copyright (C) 2002 Robert Griebl (sandman@handhelds.org) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <stdlib.h> #include <unistd.h> #include <fcntl.h> #include <sys/ioctl.h> #include <signal.h> #include <sys/time.h> #ifndef QT_NO_SOUND #include <linux/soundcard.h> #endif #include <math.h> -#include <qapplication.h> #include <qfile.h> #include <qtextstream.h> #include <qpe/sound.h> #include <qpe/resource.h> #include <qpe/config.h> #include <qpe/qcopenvelope_qws.h> #include "odevice.h" #include <qwindowsystem_qws.h> #ifndef ARRAY_SIZE #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) #endif // _IO and friends are only defined in kernel headers ... #define OD_IOC(dir,type,number,size) (( dir << 30 ) | ( type << 8 ) | ( number ) | ( size << 16 )) #define OD_IO(type,number) OD_IOC(0,type,number,0) #define OD_IOW(type,number,size) OD_IOC(1,type,number,sizeof(size)) #define OD_IOR(type,number,size) OD_IOC(2,type,number,sizeof(size)) #define OD_IORW(type,number,size) OD_IOC(3,type,number,sizeof(size)) using namespace Opie; class ODeviceData { public: QString m_vendorstr; OVendor m_vendor; QString m_modelstr; OModel m_model; QString m_systemstr; OSystem m_system; QString m_sysverstr; Transformation m_rotation; ODirection m_direction; QValueList <ODeviceButton> *m_buttons; uint m_holdtime; QStrList *m_cpu_frequencies; }; diff --git a/libopie/odevicebutton.cpp b/libopie/odevicebutton.cpp index 314eb51..647ac4b 100644 --- a/libopie/odevicebutton.cpp +++ b/libopie/odevicebutton.cpp @@ -1,70 +1,68 @@ /********************************************************************** ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** ** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ -#include <qpixmap.h> -#include <qstring.h> #include <qpe/qcopenvelope_qws.h> #include <opie/odevicebutton.h> using namespace Opie; class OQCopMessageData { public: QCString m_channel; QCString m_message; QByteArray m_data; }; OQCopMessage::OQCopMessage ( ) : d ( 0 ) { init ( QCString ( ), QCString ( ), QByteArray ( )); } OQCopMessage::OQCopMessage ( const OQCopMessage © ) : d ( 0 ) { init ( copy. channel ( ), copy. message ( ), copy. data ( )); } OQCopMessage &OQCopMessage::operator = ( const OQCopMessage &assign ) { init ( assign. channel ( ), assign. message ( ), assign. data ( )); return *this; } OQCopMessage::OQCopMessage ( const QCString &ch, const QCString &m, const QByteArray &arg ) : d ( 0 ) { init ( ch, m, arg ); } void OQCopMessage::init ( const QCString &ch, const QCString &m, const QByteArray &arg ) { if ( !d ) d = new OQCopMessageData ( ); d-> m_channel = ch; d-> m_message = m; d-> m_data = arg; } diff --git a/libopie/ofiledialog.cc b/libopie/ofiledialog.cc index 5511b24..47306b6 100644 --- a/libopie/ofiledialog.cc +++ b/libopie/ofiledialog.cc @@ -1,83 +1,80 @@ /* =. This file is part of the OPIE Project .=l. Copyright (c) 2002,2003 <zecke@handhelds.org> .>+-= _;:, .> :=|. This library is free software; you can .> <`_, > . <= redistribute it and/or modify it under :`=1 )Y*s>-.-- : the terms of the GNU Library General Public .="- .-=="i, .._ License as published by the Free Software - . .-<_> .<> Foundation; either version 2 of the License, ._= =} : or (at your option) any later version. .%`+i> _;_. .i_,=:_. -<s. This library is distributed in the hope that + . -:. = it will be useful, but WITHOUT ANY WARRANTY; : .. .:, . . . without even the implied warranty of =_ + =;=|` MERCHANTABILITY or FITNESS FOR A _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU ..}^=.= = ; Library General Public License for more ++= -. .` .: details. : = ...= . :.=- -. .:....=;==+<; You should have received a copy of the GNU -_. . . )=. = Library General Public License along with -- :-=` this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <qpe/applnk.h> #include <qpe/config.h> #include <qpe/qpeapplication.h> #include <qfileinfo.h> -#include <qstring.h> -#include <qapplication.h> #include <qlayout.h> #include "ofiledialog.h" namespace { /* * helper functions to load the start dir * and to save it * helper to extract the dir out of a file name */ /** * This method will use Config( argv[0] ); * @param key The group key used */ QString lastUsedDir( const QString& key ) { if ( qApp->argc() < 1 ) return QString::null; Config cfg( QFileInfo(qApp->argv()[0]).fileName() ); // appname cfg.setGroup( key ); return cfg.readEntry("LastDir", QPEApplication::documentDir() ); } void saveLastDir( const QString& key, const QString& file ) { if ( qApp->argc() < 1 ) return; Config cfg( QFileInfo(qApp->argv()[0]).fileName() ); cfg.setGroup( key ); QFileInfo inf( file ); cfg.writeEntry("LastDir", inf.dirPath( true ) ); } }; /** * This constructs a modal dialog * * @param caption The caption of the dialog * @param wid The parent widget * @param mode The mode of the OFileSelector @see OFileSelector * @param selector The selector of the OFileSelector * @param dirName the dir or resource to start from * @param fileName a proposed or existing filename * @param mimetypes The mimeTypes */ OFileDialog::OFileDialog(const QString &caption, diff --git a/libopie/ofileselector.cpp b/libopie/ofileselector.cpp index 9ac2981..1ba94ae 100644 --- a/libopie/ofileselector.cpp +++ b/libopie/ofileselector.cpp @@ -1,60 +1,55 @@ #include <qcombobox.h> #include <qdir.h> -#include <qhbox.h> -#include <qheader.h> #include <qlabel.h> #include <qlayout.h> #include <qlineedit.h> -#include <qlistview.h> #include <qpopupmenu.h> #include <qwidgetstack.h> -#include <qregexp.h> -#include <qobjectlist.h> /* hacky but we need to get FileSelector::filter */ #define private public #include <qpe/fileselector.h> #undef private #include <qpe/qpeapplication.h> #include <qpe/mimetype.h> #include <qpe/resource.h> #include <qpe/storage.h> #include "ofileselector_p.h" #include "ofileselector.h" OFileViewInterface::OFileViewInterface( OFileSelector* selector ) : m_selector( selector ) { } OFileViewInterface::~OFileViewInterface() { } QString OFileViewInterface::name()const{ return m_name; } void OFileViewInterface::setName( const QString& name ) { m_name = name; } OFileSelector* OFileViewInterface::selector()const { return m_selector; } DocLnk OFileViewInterface::selectedDocument()const { return DocLnk( selectedName() ); } bool OFileViewInterface::showNew()const { return selector()->showNew(); } bool OFileViewInterface::showClose()const { return selector()->showClose(); } MimeTypes OFileViewInterface::mimeTypes()const { return selector()->mimeTypes(); } QStringList OFileViewInterface::currentMimeType()const { return selector()->currentMimeType(); } void OFileViewInterface::activate( const QString& ) { // not implemented here } diff --git a/libopie/ofontselector.cpp b/libopie/ofontselector.cpp index c8471cc..7e07008 100644 --- a/libopie/ofontselector.cpp +++ b/libopie/ofontselector.cpp @@ -1,81 +1,80 @@ /* =. This file is part of the OPIE Project .=l. Copyright (c) 2002 Robert Griebl <sandman@handhelds.org> .>+-= _;:, .> :=|. This library is free software; you can .> <`_, > . <= redistribute it and/or modify it under :`=1 )Y*s>-.-- : the terms of the GNU Library General Public .="- .-=="i, .._ License as published by the Free Software - . .-<_> .<> Foundation; either version 2 of the License, ._= =} : or (at your option) any later version. .%`+i> _;_. .i_,=:_. -<s. This library is distributed in the hope that + . -:. = it will be useful, but WITHOUT ANY WARRANTY; : .. .:, . . . without even the implied warranty of =_ + =;=|` MERCHANTABILITY or FITNESS FOR A _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU ..}^=.= = ; Library General Public License for more ++= -. .` .: details. : = ...= . :.=- -. .:....=;==+<; You should have received a copy of the GNU -_. . . )=. = Library General Public License along with -- :-=` this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <qlayout.h> #include <qlistbox.h> #include <qcombobox.h> #include <qlabel.h> -#include <qfont.h> #include <qmultilineedit.h> #include <qpe/fontdatabase.h> #include "ofontselector.h" class OFontSelectorPrivate { public: QListBox * m_font_family_list; QComboBox * m_font_style_list; QComboBox * m_font_size_list; QMultiLineEdit *m_preview; bool m_pointbug : 1; FontDatabase m_fdb; }; namespace { class FontListItem : public QListBoxText { public: FontListItem ( const QString &t, const QStringList &styles, const QValueList<int> &sizes ) : QListBoxText ( ) { m_name = t; m_styles = styles; m_sizes = sizes; QString str = t; str [0] = str [0]. upper ( ); setText ( str ); } QString family ( ) const { return m_name; } const QStringList &styles ( ) const { return m_styles; } const QValueList<int> &sizes ( ) const { return m_sizes; } diff --git a/libopie/oprocctrl.cpp b/libopie/oprocctrl.cpp index e7db622..df8da1e 100644 --- a/libopie/oprocctrl.cpp +++ b/libopie/oprocctrl.cpp @@ -1,90 +1,89 @@ /* This file is part of the KDE libraries Copyright (C) 1997 Christian Czezakte (e9025461@student.tuwien.ac.at) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // // KPROCESSCONTROLLER -- A helper class for KProcess // // version 0.3.1, Jan, 8th 1997 // // (C) Christian Czezatke // e9025461@student.tuwien.ac.at // Ported by Holger Freyther // //#include <config.h> #include <sys/types.h> #include <sys/socket.h> #include <errno.h> #include <fcntl.h> #include <stdio.h> #include <string.h> #include <unistd.h> #include <assert.h> #include <qsocketnotifier.h> -#include "oprocess.h" #include "oprocctrl.h" OProcessController *OProcessController::theOProcessController = 0; struct sigaction OProcessController::oldChildHandlerData; bool OProcessController::handlerSet = false; OProcessController::OProcessController() { assert( theOProcessController == 0 ); if (0 > pipe(fd)) printf(strerror(errno)); notifier = new QSocketNotifier(fd[0], QSocketNotifier::Read); notifier->setEnabled(true); QObject::connect(notifier, SIGNAL(activated(int)), this, SLOT(slotDoHousekeeping(int))); connect( &delayedChildrenCleanupTimer, SIGNAL( timeout()), SLOT( delayedChildrenCleanup())); theOProcessController = this; setupHandlers(); } void OProcessController::setupHandlers() { if( handlerSet ) return; struct sigaction act; act.sa_handler=theSigCHLDHandler; sigemptyset(&(act.sa_mask)); sigaddset(&(act.sa_mask), SIGCHLD); // Make sure we don't block this signal. gdb tends to do that :-( sigprocmask(SIG_UNBLOCK, &(act.sa_mask), 0); act.sa_flags = SA_NOCLDSTOP; // CC: take care of SunOS which automatically restarts interrupted system // calls (and thus does not have SA_RESTART) #ifdef SA_RESTART act.sa_flags |= SA_RESTART; #endif sigaction( SIGCHLD, &act, &oldChildHandlerData ); diff --git a/libopie/oprocess.cpp b/libopie/oprocess.cpp index 5db2b6c..c19881a 100644 --- a/libopie/oprocess.cpp +++ b/libopie/oprocess.cpp @@ -8,97 +8,96 @@ This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ // // KPROCESS -- A class for handling child processes in KDE without // having to take care of Un*x specific implementation details // // version 0.3.1, Jan 8th 1998 // // (C) Christian Czezatke // e9025461@student.tuwien.ac.at // // Changes: // // March 2nd, 1998: Changed parameter list for KShellProcess: // Arguments are now placed in a single string so that // <shell> -c <commandstring> is passed to the shell // to make the use of "operator<<" consistent with KProcess // // // Ported by Holger Freyther // <zekce> Harlekin: oprocess and say it was ported to Qt by the Opie developers an Qt 2 #include "oprocess.h" #define _MAY_INCLUDE_KPROCESSCONTROLLER_ #include "oprocctrl.h" //#include <config.h> #include <qfile.h> #include <qsocketnotifier.h> -#include <qregexp.h> #include <sys/time.h> #include <sys/types.h> #include <sys/stat.h> #include <sys/socket.h> #include <errno.h> #include <fcntl.h> #include <stdlib.h> #include <signal.h> #include <stdio.h> #include <string.h> #include <unistd.h> #ifdef HAVE_SYS_SELECT_H #include <sys/select.h> #endif #ifdef HAVE_INITGROUPS #include <grp.h> #endif #include <pwd.h> #include <qapplication.h> #include <qmap.h> //#include <kdebug.h> ///////////////////////////// // public member functions // ///////////////////////////// class OProcessPrivate { public: OProcessPrivate() : useShell(false) { } bool useShell; QMap<QString,QString> env; QString wd; QCString shell; }; OProcess::OProcess(QObject *parent, const char *name) : QObject(parent, name) { init ( ); } OProcess::OProcess(const QString &arg0, QObject *parent, const char *name) : QObject(parent, name) diff --git a/libopie/orecurrancewidget.cpp b/libopie/orecurrancewidget.cpp index be8ec30..d81851e 100644 --- a/libopie/orecurrancewidget.cpp +++ b/libopie/orecurrancewidget.cpp @@ -1,54 +1,52 @@ #include <qapplication.h> #include <qlabel.h> -#include <qpopupmenu.h> #include <qspinbox.h> -#include <qpe/timestring.h> #include "orecurrancewidget.h" // Global Templates for use in setting up the repeat label... // the problem is these strings get initialized before QPEApplication can install the translator -zecke namespace { QString strDayTemplate; QString strYearTemplate; QString strMonthDateTemplate; QString strMonthDayTemplate; QString strWeekTemplate; QString dayLabel[7]; } /* * static linkage to not polute the symbol table... * The problem is that const and static linkage are resolved prior to installing a translator * leading to that the above strings are translted but to the original we delay the init of these strings... * -zecke */ static void fillStrings() { strDayTemplate = QObject::tr("Every"); strYearTemplate = QObject::tr("%1 %2 every "); strMonthDateTemplate = QObject::tr("The %1 every "); strMonthDayTemplate = QObject::tr("The %1 %2 of every"); strWeekTemplate = QObject::tr("Every "); dayLabel[0] = QObject::tr("Monday"); dayLabel[1] = QObject::tr("Tuesday"); dayLabel[2] = QObject::tr("Wednesday"); dayLabel[3] = QObject::tr("Thursday"); dayLabel[4] = QObject::tr("Friday"); dayLabel[5] = QObject::tr("Saturday"); dayLabel[6] = QObject::tr("Sunday"); } static QString numberPlacing( int x ); // return the proper word format for // x (1st, 2nd, etc) static int week( const QDate &dt ); // what week in the month is dt? /** * Constructs the Widget * @param startOnMonday Does the week start on monday * @param newStart The start date of the recurrence * @param parent The parent widget * @param name the name of object * @param modal if the dialog should be modal * @param fl Additional window flags */ diff --git a/libopie/oticker.cpp b/libopie/oticker.cpp index 4fb5945..c05c2a8 100644 --- a/libopie/oticker.cpp +++ b/libopie/oticker.cpp @@ -1,89 +1,80 @@ /* This file is part of the Opie Project Copyright (c) 2002 L. Potter <ljp@llornkcor.com> =. .=l. .>+-= _;:, .> :=|. This program is free software; you can .> <`_, > . <= redistribute it and/or modify it under :`=1 )Y*s>-.-- : the terms of the GNU General Public .="- .-=="i, .._ License as published by the Free Software - . .-<_> .<> Foundation; either version 2 of the License, ._= =} : or (at your option) any later version. .%`+i> _;_. .i_,=:_. -<s. This program is distributed in the hope that + . -:. = it will be useful, but WITHOUT ANY WARRANTY; : .. .:, . . . without even the implied warranty of =_ + =;=|` MERCHANTABILITY or FITNESS FOR A _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU ..}^=.= = ; Library General Public License for more ++= -. .` .: details. : = ...= . :.=- -. .:....=;==+<; You should have received a copy of the GNU -_. . . )=. = Library General Public License along with -- :-=` this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <qpe/qpeapplication.h> -#include <qpe/resource.h> #include <qpe/config.h> -#include <qwidget.h> -#include <qpixmap.h> -#include <qbutton.h> -#include <qpainter.h> -#include <qframe.h> -#include <qlayout.h> -#include <qdir.h> #include <stdlib.h> #include <stdio.h> #include "oticker.h" OTicker::OTicker( QWidget* parent ) : QLabel( parent ) { // : QFrame( parent ) { setTextFormat(Qt::RichText); Config cfg("qpe"); cfg.setGroup("Appearance"); backgroundcolor = QColor( cfg.readEntry( "Background", "#E5E1D5" ) ); foregroundcolor= Qt::black; updateTimerTime = 50; scrollLength = 1; } OTicker::~OTicker() { } void OTicker::setBackgroundColor(const QColor& backcolor) { backgroundcolor = backcolor; update(); } void OTicker::setForegroundColor(const QColor& backcolor) { foregroundcolor = backcolor; update(); } void OTicker::setFrame(int frameStyle) { setFrameStyle( frameStyle/*WinPanel | Sunken */); update(); } void OTicker::setText( const QString& text ) { pos = 0; // reset it everytime the text is changed scrollText = text; qDebug(scrollText); int pixelLen = 0; bool bigger = false; int contWidth = contentsRect().width(); int contHeight = contentsRect().height(); int pixelTextLen = fontMetrics().width( text ); printf("<<<<<<<height %d, width %d, text width %d %d\n", contHeight, contWidth, pixelTextLen, scrollText.length()); if( pixelTextLen < contWidth) { diff --git a/libopie/otimepicker.cpp b/libopie/otimepicker.cpp index 115d39b..1eca7c5 100644 --- a/libopie/otimepicker.cpp +++ b/libopie/otimepicker.cpp @@ -1,54 +1,51 @@ #include "otimepicker.h" -#include <qbuttongroup.h> -#include <qtoolbutton.h> #include <qlayout.h> -#include <qstring.h> #include <stdio.h> #include <qlineedit.h> /** * Constructs the widget * @param parent The parent of the OTimePicker * @param name The name of the object * @param fl Window Flags */ OTimePicker::OTimePicker(QWidget* parent, const char* name, WFlags fl) : QWidget(parent,name,fl) { QVBoxLayout *vbox=new QVBoxLayout(this); OClickableLabel *r; QString s; // Hour Row QWidget *row=new QWidget(this); QHBoxLayout *l=new QHBoxLayout(row); vbox->addWidget(row); for (int i=0; i<24; i++) { r=new OClickableLabel(row); hourLst.append(r); s.sprintf("%.2d",i); r->setText(s); r->setToggleButton(true); r->setAlignment(AlignHCenter | AlignVCenter); l->addWidget(r); connect(r, SIGNAL(toggled(bool)), this, SLOT(slotHour(bool))); if (i==11) { // Second row row=new QWidget(this); l=new QHBoxLayout(row); vbox->addWidget(row); } } // Minute Row row=new QWidget(this); l=new QHBoxLayout(row); vbox->addWidget(row); diff --git a/libopie/owait.cpp b/libopie/owait.cpp index 0fdf08d..a0f3834 100644 --- a/libopie/owait.cpp +++ b/libopie/owait.cpp @@ -1,70 +1,68 @@ /* This file is part of the OPIE libraries Copyright (C) 2003 Maximilian Reiss (harlekin@handhelds.org) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <qlabel.h> #include <qlayout.h> -#include <qtimer.h> #include <qpe/qpeapplication.h> #include <qpainter.h> #include "owait.h" #include <qpe/resource.h> static int frame = 0; /** * This will construct a modal dialog. * * The default timer length is 10. * * @param parent The parent of the widget * @param msg The name of the object * @param dispIcon Display Icon? */ OWait::OWait(QWidget *parent, const char* msg, bool dispIcon ) :QDialog(parent, msg, TRUE,WStyle_Customize) { QHBoxLayout *hbox = new QHBoxLayout( this ); m_lb = new QLabel( this ); m_lb->setBackgroundMode ( NoBackground ); hbox->addWidget( m_lb ); hbox->activate(); m_pix = Resource::loadPixmap( "BigBusy" ); m_aniSize = m_pix.height(); resize( m_aniSize, m_aniSize ); m_timerLength = 10; m_waitTimer = new QTimer( this ); connect( m_waitTimer, SIGNAL( timeout() ), this, SLOT( hide() ) ); } void OWait::timerEvent( QTimerEvent * ) { frame = (++frame) % 4; repaint(); } void OWait::paintEvent( QPaintEvent * ) { QPainter p( m_lb ); p.drawPixmap( 0, 0, m_pix, m_aniSize * frame, 0, m_aniSize, m_aniSize ); diff --git a/libopie/pim/ocontactaccessbackend_xml.cpp b/libopie/pim/ocontactaccessbackend_xml.cpp index aae7fca..2373ad6 100644 --- a/libopie/pim/ocontactaccessbackend_xml.cpp +++ b/libopie/pim/ocontactaccessbackend_xml.cpp @@ -1,161 +1,162 @@ /* * XML Backend for the OPIE-Contact Database. * * Copyright (c) 2002 by Stefan Eilers (Eilers.Stefan@epost.de) * * ===================================================================== * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * ===================================================================== * * ===================================================================== * Version: $Id$ * ===================================================================== * History: * $Log$ + * Revision 1.10 2004/03/01 15:44:36 chicken + * fix includes + * * Revision 1.9 2003/09/22 14:31:16 eilers * Added first experimental incarnation of sql-backend for addressbook. * Some modifications to be able to compile the todo sql-backend. * A lot of changes fill follow... * * Revision 1.8 2003/08/30 15:28:26 eilers * Removed some unimportant debug output which causes slow down.. * * Revision 1.7 2003/08/01 12:30:16 eilers * Merging changes from BRANCH_1_0 to HEAD * * Revision 1.6 2003/07/07 16:19:47 eilers * Fixing serious bug in hasQuerySettings() * * Revision 1.5 2003/04/13 18:07:10 zecke * More API doc * QString -> const QString& * QString = 0l -> QString::null * * Revision 1.4 2003/03/21 14:32:54 mickeyl * g++ compliance fix: default arguments belong into the declaration, but not the definition * * Revision 1.3 2003/03/21 12:26:28 eilers * Fixing small bug: If we search a birthday from today to today, it returned * every contact .. * * Revision 1.2 2003/03/21 10:33:09 eilers * Merged speed optimized xml backend for contacts to main. * Added QDateTime to querybyexample. For instance, it is now possible to get * all Birthdays/Anniversaries between two dates. This should be used * to show all birthdays in the datebook.. * This change is sourcecode backward compatible but you have to upgrade * the binaries for today-addressbook. * * Revision 1.1.2.2 2003/02/11 12:17:28 eilers * Speed optimization. Removed the sequential search loops. * * Revision 1.1.2.1 2003/02/10 15:31:38 eilers * Writing offsets to debug output.. * * Revision 1.1 2003/02/09 15:05:01 eilers * Nothing happened.. Just some cleanup before I will start.. * * Revision 1.12 2003/01/03 16:58:03 eilers * Reenable debug output * * Revision 1.11 2003/01/03 12:31:28 eilers * Bugfix for calculating data diffs.. * * Revision 1.10 2003/01/02 14:27:12 eilers * Improved query by example: Search by date is possible.. First step * for a today plugin for birthdays.. * * Revision 1.9 2002/12/08 12:48:57 eilers * Moved journal-enum from ocontact into i the xml-backend.. * * Revision 1.8 2002/11/14 17:04:24 eilers * Sorting will now work if fullname is identical on some entries * * Revision 1.7 2002/11/13 15:02:46 eilers * Small Bug in sorted fixed * * Revision 1.6 2002/11/13 14:14:51 eilers * Added sorted for Contacts.. * * Revision 1.5 2002/11/01 15:10:42 eilers * Added regExp-search in database for all fields in a contact. * * Revision 1.4 2002/10/16 10:52:40 eilers * Added some docu to the interface and now using the cache infrastucture by zecke.. :) * * Revision 1.3 2002/10/14 16:21:54 eilers * Some minor interface updates * * Revision 1.2 2002/10/07 17:34:24 eilers * added OBackendFactory for advanced backend access * * Revision 1.1 2002/09/27 17:11:44 eilers * Added API for accessing the Contact-Database ! It is compiling, but * please do not expect that anything is working ! * I will debug that stuff in the next time .. * Please read README_COMPILE for compiling ! * * */ #include "ocontactaccessbackend_xml.h" #include <qasciidict.h> -#include <qdatetime.h> #include <qfile.h> #include <qfileinfo.h> #include <qregexp.h> #include <qarray.h> #include <qmap.h> -#include <qdatetime.h> #include <qpe/global.h> #include <opie/xmltree.h> #include "ocontactaccessbackend.h" #include "ocontactaccess.h" #include <stdlib.h> #include <errno.h> using namespace Opie; OContactAccessBackend_XML::OContactAccessBackend_XML ( const QString& appname, const QString& filename ): m_changed( false ) { // Just m_contactlist should call delete if an entry // is removed. m_contactList.setAutoDelete( true ); m_uidToContact.setAutoDelete( false ); m_appName = appname; /* Set journalfile name ... */ m_journalName = getenv("HOME"); m_journalName +="/.abjournal" + appname; /* Expecting to access the default filename if nothing else is set */ if ( filename.isEmpty() ){ m_fileName = Global::applicationFileName( "addressbook","addressbook.xml" ); } else m_fileName = filename; /* Load Database now */ load (); } bool OContactAccessBackend_XML::save() { if ( !m_changed ) return true; QString strNewFile = m_fileName + ".new"; QFile f( strNewFile ); if ( !f.open( IO_WriteOnly|IO_Raw ) ) return false; diff --git a/libopie/pim/otodo.cpp b/libopie/pim/otodo.cpp index 189bf94..b2c76f8 100644 --- a/libopie/pim/otodo.cpp +++ b/libopie/pim/otodo.cpp @@ -1,60 +1,59 @@ #include <qobject.h> #include <qshared.h> #include <qpe/palmtopuidgen.h> -#include <qpe/stringutil.h> #include <qpe/palmtoprecord.h> -#include <qpe/stringutil.h> #include <qpe/categories.h> #include <qpe/categoryselect.h> +#include <qpe/stringutil.h> #include "opimstate.h" #include "orecur.h" #include "opimmaintainer.h" #include "opimnotifymanager.h" #include "opimresolver.h" #include "otodo.h" struct OTodo::OTodoData : public QShared { OTodoData() : QShared() { recur = 0; state = 0; maintainer = 0; notifiers = 0; }; ~OTodoData() { delete recur; delete maintainer; delete notifiers; } QDate date; bool isCompleted:1; bool hasDate:1; int priority; QString desc; QString sum; QMap<QString, QString> extra; ushort prog; OPimState *state; ORecur *recur; OPimMaintainer *maintainer; QDate start; QDate completed; OPimNotifyManager *notifiers; }; OTodo::OTodo(const OTodo &event ) : OPimRecord( event ), data( event.data ) { data->ref(); // qWarning("ref up"); } OTodo::~OTodo() { |