113 files changed, 536 insertions, 531 deletions
diff --git a/core/applets/cardmon/cardmon.cpp b/core/applets/cardmon/cardmon.cpp index 7625545..e8072c6 100644 --- a/core/applets/cardmon/cardmon.cpp +++ b/core/applets/cardmon/cardmon.cpp @@ -31,55 +31,55 @@ #include <qtextstream.h> #include <qsound.h> #include <qtimer.h> /* STD */ #include <stdio.h> #include <unistd.h> #include <stdlib.h> #include <string.h> #include <fcntl.h> #if defined(_OS_LINUX_) || defined(Q_OS_LINUX) #include <sys/vfs.h> #include <mntent.h> #endif using namespace Opie; CardMonitor::CardMonitor( QWidget * parent ) : QWidget( parent ), pm( Resource::loadPixmap( "cardmon/pcmcia" ) ) { QCopChannel * pcmciaChannel = new QCopChannel( "QPE/Card", this ); connect( pcmciaChannel, - SIGNAL( received( const QCString &, const QByteArray & ) ), this, - SLOT( cardMessage( const QCString &, const QByteArray & ) ) ); + SIGNAL( received(const QCString&,const QByteArray&) ), this, + SLOT( cardMessage(const QCString&,const QByteArray&) ) ); QCopChannel *sdChannel = new QCopChannel( "QPE/Card", this ); connect( sdChannel, - SIGNAL( received( const QCString &, const QByteArray & ) ), this, - SLOT( cardMessage( const QCString &, const QByteArray & ) ) ); + SIGNAL( received(const QCString&,const QByteArray&) ), this, + SLOT( cardMessage(const QCString&,const QByteArray&) ) ); cardInPcmcia0 = FALSE; cardInPcmcia1 = FALSE; cardInSd = FALSE; setFocusPolicy( NoFocus ); setFixedWidth ( AppLnk::smallIconSize() ); setFixedHeight ( AppLnk::smallIconSize() ); getStatusPcmcia( TRUE ); getStatusSd( TRUE ); repaint( FALSE ); popupMenu = 0; } CardMonitor::~CardMonitor() { if ( popupMenu ) { delete popupMenu; } } diff --git a/core/applets/clipboardapplet/clipboard.cpp b/core/applets/clipboardapplet/clipboard.cpp index 34d151e..4fc8076 100644 --- a/core/applets/clipboardapplet/clipboard.cpp +++ b/core/applets/clipboardapplet/clipboard.cpp @@ -25,51 +25,51 @@ #include <qpe/applnk.h> #include <qpainter.h> #include <qpopupmenu.h> #include <qwindowsystem_qws.h> #include <qapplication.h> #include <qclipboard.h> #include <qtimer.h> //=========================================================================== ClipboardApplet::ClipboardApplet( QWidget *parent, const char *name ) : QWidget( parent, name ) { setFixedWidth ( AppLnk::smallIconSize() ); setFixedHeight ( AppLnk::smallIconSize() ); QImage img = Resource::loadImage( "paste"); img = img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ); m_clipboardPixmap.convertFromImage( img ); m_timer = new QTimer ( this ); - connect ( QApplication::clipboard ( ), SIGNAL( dataChanged ( )), this, SLOT( newData ( ))); - connect ( m_timer, SIGNAL( timeout ( )), this, SLOT( newData ( ))); - connect ( qApp, SIGNAL( aboutToQuit ( )), this, SLOT( shutdown ( ))); + connect ( QApplication::clipboard ( ), SIGNAL( dataChanged()), this, SLOT( newData())); + connect ( m_timer, SIGNAL( timeout()), this, SLOT( newData())); + connect ( qApp, SIGNAL( aboutToQuit()), this, SLOT( shutdown())); m_menu = 0; m_dirty = true; m_lasttext = QString::null; m_timer-> start ( 0, true ); } ClipboardApplet::~ClipboardApplet ( ) { } int ClipboardApplet::position() { return 6; } void ClipboardApplet::shutdown ( ) { // the timer has to be stopped, or Qt/E will hang on quit() // see launcher/desktop.cpp m_timer-> stop ( ); } @@ -78,49 +78,49 @@ void ClipboardApplet::mousePressEvent ( QMouseEvent *) { if ( m_dirty ) { delete m_menu; m_menu = new QPopupMenu ( this ); m_menu-> setCheckable ( true ); if ( m_history. count ( )) { for ( unsigned int i = 0; i < m_history. count ( ); i++ ) { QString str = m_history [i]; if ( str. length ( ) > 20 ) str = str. left ( 20 ) + "..."; m_menu-> insertItem ( QString ( "%1: %2" ). arg ( i + 1 ). arg ( str ), i ); m_menu-> setItemChecked ( i, false ); } m_menu-> setItemChecked ( m_history. count ( ) - 1, true ); m_menu-> insertSeparator ( ); } m_menu-> insertItem ( QIconSet ( Resource::loadPixmap ( "cut" )), tr( "Cut" ), 100 ); m_menu-> insertItem ( QIconSet ( Resource::loadPixmap ( "copy" )), tr( "Copy" ), 101 ); m_menu-> insertItem ( QIconSet ( Resource::loadPixmap ( "paste" )), tr( "Paste" ), 102 ); - connect ( m_menu, SIGNAL( activated ( int )), this, SLOT( action ( int ))); + connect ( m_menu, SIGNAL( activated(int)), this, SLOT( action(int))); m_dirty = false; } QPoint p = mapToGlobal ( QPoint ( 0, 0 )); QSize s = m_menu-> sizeHint ( ); m_menu-> popup ( QPoint ( p. x ( ) + ( width ( ) / 2 ) - ( s. width ( ) / 2 ), p. y ( ) - s. height ( ))); } void ClipboardApplet::action(int id) { ushort unicode = 0; int scan = 0; switch ( id ) { case 100: unicode = 'X' - '@'; scan = Key_X; // Cut break; case 101: unicode = 'C' - '@'; scan = Key_C; // Copy break; case 102: diff --git a/core/applets/clockapplet/clock.cpp b/core/applets/clockapplet/clock.cpp index 9fead03..120a019 100644 --- a/core/applets/clockapplet/clock.cpp +++ b/core/applets/clockapplet/clock.cpp @@ -9,51 +9,51 @@ ** 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 "clock.h" #include <opie2/otaskbarapplet.h> #include <qpe/qpeapplication.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/config.h> LauncherClock::LauncherClock( QWidget *parent ) : QLabel( parent ) { // If you want a sunken border around the clock do this: // setFrameStyle( QFrame::Panel | QFrame::Sunken ); //setFont( QFont( "Helvetica", , QFont::Normal ) ); - connect( qApp, SIGNAL( timeChanged() ), this, SLOT( updateTime( ) ) ); - connect( qApp, SIGNAL( clockChanged( bool ) ), - this, SLOT( slotClockChanged( bool ) ) ); + connect( qApp, SIGNAL( timeChanged() ), this, SLOT( updateTime() ) ); + connect( qApp, SIGNAL( clockChanged(bool) ), + this, SLOT( slotClockChanged(bool) ) ); readConfig(); timerId = 0; timerEvent( 0 ); show(); } int LauncherClock::position() { return 10; } void LauncherClock::readConfig() { Config config( "qpe" ); config.setGroup( "Time" ); ampmFormat = config.readBoolEntry( "AMPM", TRUE ); config.setGroup( "Date" ); format = config.readNumEntry("ClockApplet",0); } void LauncherClock::mouseReleaseEvent( QMouseEvent * ) { QCString setTimeApp; setTimeApp="systemtime"; QCopEnvelope e("QPE/Application/"+setTimeApp, "raise()"); diff --git a/core/applets/irdaapplet/irda.cpp b/core/applets/irdaapplet/irda.cpp index afc0592..dde8050 100644 --- a/core/applets/irdaapplet/irda.cpp +++ b/core/applets/irdaapplet/irda.cpp @@ -39,86 +39,86 @@ IrdaApplet::IrdaApplet ( QWidget *parent, const char *name ) : QWidget ( parent, name ) { setFixedHeight ( 18 ); setFixedWidth ( 14 ); m_sockfd = ::socket ( PF_INET, SOCK_DGRAM, IPPROTO_IP ); m_irdaOnPixmap = Resource::loadPixmap( "irdaapplet/irdaon" ); m_irdaOffPixmap = Resource::loadPixmap( "irdaapplet/irdaoff" ); m_irdaDiscoveryOnPixmap = Resource::loadPixmap( "irdaapplet/magglass" ); m_receiveActivePixmap = Resource::loadPixmap( "irdaapplet/receive" ); m_irda_active = false; m_irda_discovery_active = false; m_receive_active = false; m_receive_state_changed = false; m_popup = 0; m_wasOn = false; m_wasDiscover = false; QCopChannel* chan = new QCopChannel("QPE/IrDaApplet", this ); connect(chan, SIGNAL(received(const QCString&,const QByteArray&) ), - this, SLOT(slotMessage(const QCString&, const QByteArray& ) ) ); + this, SLOT(slotMessage(const QCString&,const QByteArray&) ) ); } int IrdaApplet::position() { return 6; } void IrdaApplet::show() { QWidget::show ( ); startTimer ( 2000 ); } IrdaApplet::~IrdaApplet() { if ( m_sockfd >= 0 ) ::close ( m_sockfd ); } void IrdaApplet::popup ( QString message, QString icon ) { if ( !m_popup ) m_popup = new QPopupMenu ( this ); m_popup-> clear ( ); if ( icon. isEmpty ( )) m_popup-> insertItem ( message, 0 ); else m_popup-> insertItem ( QIconSet ( Resource::loadPixmap ( icon )), message, 0 ); QPoint p = mapToGlobal ( QPoint ( 0, 0 )); QSize s = m_popup-> sizeHint ( ); m_popup-> popup ( QPoint ( p. x ( ) + ( width ( ) / 2 ) - ( s. width ( ) / 2 ), p. y ( ) - s. height ( ))); - QTimer::singleShot ( 2000, this, SLOT( popupTimeout ( ))); + QTimer::singleShot ( 2000, this, SLOT( popupTimeout())); } void IrdaApplet::popupTimeout ( ) { m_popup-> hide ( ); } bool IrdaApplet::checkIrdaStatus ( ) { struct ifreq ifr; strcpy ( ifr. ifr_name, "irda0" ); if ( ::ioctl ( m_sockfd, SIOCGIFFLAGS, &ifr ) < 0 ) return false; return ( ifr. ifr_flags & IFF_UP ); } bool IrdaApplet::setIrdaStatus ( bool b ) { struct ifreq ifr; strcpy ( ifr. ifr_name, "irda0" ); if ( ::ioctl ( m_sockfd, SIOCGIFFLAGS, &ifr ) < 0 ) diff --git a/core/applets/multikeyapplet/multikey.cpp b/core/applets/multikeyapplet/multikey.cpp index b17498d..fc5f093 100644 --- a/core/applets/multikeyapplet/multikey.cpp +++ b/core/applets/multikeyapplet/multikey.cpp @@ -3,50 +3,50 @@ ** All rights reserved. ** ** 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. ** **********************************************************************/ #include "multikey.h" /* OPIE */ #include <opie2/otaskbarapplet.h> #include <qpe/qcopenvelope_qws.h> /* QT */ #include <qdir.h> Multikey::Multikey(QWidget *parent) : QLabel(parent), popupMenu(this), current("EN") { QCopChannel* swChannel = new QCopChannel("MultiKey/Switcher", this); - connect( swChannel, SIGNAL(received(const QCString &, const QByteArray &)), - this, SLOT(message(const QCString &, const QByteArray &))); + connect( swChannel, SIGNAL(received(const QCString&,const QByteArray&)), + this, SLOT(message(const QCString&,const QByteArray&))); setFont( QFont( "Helvetica", 10, QFont::Normal ) ); QPEApplication::setStylusOperation(this, QPEApplication::RightOnHold); lang = 0; QCopEnvelope e("MultiKey/Keyboard", "getmultikey()"); setText("EN"); popupMenu.insertItem("EN", 0); show(); } void Multikey::mousePressEvent(QMouseEvent *ev) { if (!sw_maps.count()) return; if (ev->button() == RightButton) { QPoint p = mapToGlobal(QPoint(0, 0)); QSize s = popupMenu.sizeHint(); int opt = popupMenu.exec(QPoint(p.x() + (width() / 2) - (s.width() / 2), p.y() - s.height()), 0); if (opt == -1) return; diff --git a/core/applets/rotateapplet/rotate.cpp b/core/applets/rotateapplet/rotate.cpp index dcbf809..0488c36 100644 --- a/core/applets/rotateapplet/rotate.cpp +++ b/core/applets/rotateapplet/rotate.cpp @@ -27,50 +27,50 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "rotate.h" /* OPIE */ #include <opie/odevice.h> #include <qpe/config.h> #include <qpe/power.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/resource.h> using namespace Opie; /* QT */ #include <time.h> RotateApplet::RotateApplet() :QObject( 0, "RotateApplet" ), m_flipped( false ) { #if !defined(QT_NO_COP) QCopChannel *rotateChannel = new QCopChannel( "QPE/Rotation" , this ); - connect ( rotateChannel, SIGNAL( received( const QCString &, const QByteArray &) ), - this, SLOT ( channelReceived( const QCString &, const QByteArray &) ) ); + connect ( rotateChannel, SIGNAL( received(const QCString&,const QByteArray&) ), + this, SLOT ( channelReceived(const QCString&,const QByteArray&) ) ); #endif } RotateApplet::~RotateApplet ( ) {} /** * Qcop receive method. */ void RotateApplet::channelReceived( const QCString &msg, const QByteArray & data ) { qDebug( "RotateApplet::channelReceived( '%s' )", (const char*) msg ); if ( ODevice::inst()->hasHingeSensor() ) { struct timespec interval; struct timespec remain; interval.tv_sec = 0; interval.tv_nsec = 600000; ::nanosleep( &interval, &remain ); OHingeStatus status = ODevice::inst()->readHingeSensor(); qDebug( "RotateApplet::readHingeSensor = %d", (int) status ); diff --git a/core/applets/screenshotapplet/screenshot.cpp b/core/applets/screenshotapplet/screenshot.cpp index 5d6bce4..20e1c9b 100644 --- a/core/applets/screenshotapplet/screenshot.cpp +++ b/core/applets/screenshotapplet/screenshot.cpp @@ -278,51 +278,51 @@ ScreenshotControl::ScreenshotControl( QWidget *parent, const char *name ) saveNamedCheck-> setFocusPolicy ( QWidget::NoFocus ); vbox->addWidget( saveNamedCheck); vbox-> addSpacing ( 3 ); l = new QLabel ( tr( "Save screenshot as..." ), this ); vbox-> addWidget ( l, AlignCenter ); hbox = new QHBoxLayout ( vbox ); grabItButton = new QPushButton( tr( "File" ), this, "GrabButton" ); grabItButton ->setFocusPolicy( QWidget::TabFocus ); hbox-> addWidget ( grabItButton ); scapButton = new QPushButton( tr( "Scap" ), this, "ScapButton" ); scapButton ->setFocusPolicy( QWidget::TabFocus ); hbox-> addWidget ( scapButton ); setFixedSize ( sizeHint ( )); setFocusPolicy ( QWidget::NoFocus ); grabTimer = new QTimer ( this, "grab timer"); - connect ( grabTimer, SIGNAL( timeout ( )), this, SLOT( performGrab ( ))); - connect ( grabItButton, SIGNAL( clicked ( )), SLOT( slotGrab ( ))); - connect ( scapButton, SIGNAL( clicked ( )), SLOT( slotScap ( ))); + connect ( grabTimer, SIGNAL( timeout()), this, SLOT( performGrab())); + connect ( grabItButton, SIGNAL( clicked()), SLOT( slotGrab())); + connect ( scapButton, SIGNAL( clicked()), SLOT( slotScap())); } void ScreenshotControl::slotGrab() { buttonPushed = 1; hide(); setFileName = FALSE; if ( saveNamedCheck->isChecked()) { setFileName = TRUE; InputDialog *fileDlg; fileDlg = new InputDialog( 0 , tr("Name of screenshot "), TRUE, 0); fileDlg->exec(); fileDlg->raise(); QString fileName, list; if ( fileDlg->result() == 1 ) { fileName = fileDlg->LineEdit1->text(); if (fileName.find("/", 0, TRUE) == -1) FileNamePath = QDir::homeDirPath() + "/Documents/image/png/" + fileName; else FileNamePath = fileName; diff --git a/core/applets/vmemo/vmemo.cpp b/core/applets/vmemo/vmemo.cpp index 563d110..27f6015 100644 --- a/core/applets/vmemo/vmemo.cpp +++ b/core/applets/vmemo/vmemo.cpp @@ -192,50 +192,50 @@ static char * vmemo_xpm[] = { " *.B =. ", " n n n n n n n n n "}; VMemo::VMemo( QWidget *parent, const char *_name ) : QWidget( parent, _name ) { setFixedHeight( 18 ); setFixedWidth( 14 ); t_timer = new QTimer( this ); connect( t_timer, SIGNAL( timeout() ), SLOT( timerBreak() ) ); Config vmCfg("Vmemo"); vmCfg.setGroup("Defaults"); int toggleKey = setToggleButton(vmCfg.readNumEntry("toggleKey", -1)); useADPCM = vmCfg.readBoolEntry("use_ADPCM", 0); qDebug("toggleKey %d", toggleKey); if ( QFile::exists ( "/dev/sharp_buz" ) || QFile::exists ( "/dev/sharp_led" )) systemZaurus=TRUE; else systemZaurus=FALSE; myChannel = new QCopChannel( "QPE/VMemo", this ); - connect( myChannel, SIGNAL(received(const QCString&, const QByteArray&)), - this, SLOT(receive(const QCString&, const QByteArray&)) ); + connect( myChannel, SIGNAL(received(const QCString&,const QByteArray&)), + this, SLOT(receive(const QCString&,const QByteArray&)) ); if( toggleKey != -1 ) { // keyRegister(key, channel, message) QCopEnvelope e("QPE/Launcher", "keyRegister(int,QCString,QCString)"); // e << 4096; // Key_Escape // e << Key_F5; //4148 e << toggleKey; e << QString("QPE/VMemo"); e << QString("toggleRecord()"); } if(toggleKey == 1) usingIcon=TRUE; else usingIcon=FALSE; if( vmCfg.readNumEntry("hideIcon",0) == 1) hide(); recording = FALSE; // } } VMemo::~VMemo() { } int VMemo::position() diff --git a/core/applets/volumeapplet/volume.cpp b/core/applets/volumeapplet/volume.cpp index 8fd88f6..942cebb 100644 --- a/core/applets/volumeapplet/volume.cpp +++ b/core/applets/volumeapplet/volume.cpp @@ -387,69 +387,69 @@ VolumeControl::VolumeControl ( VolumeApplet *icon, bool /*showMic*/, QWidget *pa tapBox-> setFocusPolicy ( QWidget::NoFocus ); vbox-> addWidget ( tapBox, AlignVCenter | AlignLeft ); keyBox = new QCheckBox ( tr( "Key Clicks" ), this ); keyBox-> setFocusPolicy ( QWidget::NoFocus ); vbox-> addWidget ( keyBox, AlignVCenter | AlignLeft ); alarmBox = new QCheckBox ( tr( "Alarm Sound" ), this ); alarmBox-> setFocusPolicy ( QWidget::NoFocus ); vbox-> addWidget ( alarmBox, AlignVCenter | AlignLeft ); if ( has_wav_alarm ) { alarmBox-> hide ( ); } vbox-> addStretch ( 100 ); setFixedSize ( sizeHint ( )); setFocusPolicy ( QWidget::NoFocus ); rateTimer = new QTimer( this ); - connect ( rateTimer, SIGNAL( timeout ( )), this, SLOT( rateTimerDone ( ))); + connect ( rateTimer, SIGNAL( timeout()), this, SLOT( rateTimerDone())); - connect ( upButton, SIGNAL( pressed ( )), this, SLOT( buttonChanged ( ))); - connect ( upButton, SIGNAL( released ( )), this, SLOT( buttonChanged ( ))); - connect ( downButton, SIGNAL( pressed ( )), this, SLOT( buttonChanged ( ))); - connect ( downButton, SIGNAL( released ( )), this, SLOT( buttonChanged ( ))); + connect ( upButton, SIGNAL( pressed()), this, SLOT( buttonChanged())); + connect ( upButton, SIGNAL( released()), this, SLOT( buttonChanged())); + connect ( downButton, SIGNAL( pressed()), this, SLOT( buttonChanged())); + connect ( downButton, SIGNAL( released()), this, SLOT( buttonChanged())); - connect ( micSlider, SIGNAL( valueChanged ( int )), this, SLOT( micMoved( int ))); - connect ( volSlider, SIGNAL( valueChanged ( int )), this, SLOT( volMoved( int ))); - connect ( alarmSlider, SIGNAL( valueChanged ( int )), this, SLOT( alarmMoved( int ))); - connect ( bassSlider, SIGNAL( valueChanged ( int )), this, SLOT( bassMoved( int ))); - connect ( trebleSlider, SIGNAL( valueChanged ( int )), this, SLOT( trebleMoved( int ))); + connect ( micSlider, SIGNAL( valueChanged(int)), this, SLOT( micMoved(int))); + connect ( volSlider, SIGNAL( valueChanged(int)), this, SLOT( volMoved(int))); + connect ( alarmSlider, SIGNAL( valueChanged(int)), this, SLOT( alarmMoved(int))); + connect ( bassSlider, SIGNAL( valueChanged(int)), this, SLOT( bassMoved(int))); + connect ( trebleSlider, SIGNAL( valueChanged(int)), this, SLOT( trebleMoved(int))); - connect ( volLed, SIGNAL( toggled ( bool )), this, SLOT( volMuteToggled ( bool ))); - connect ( micLed, SIGNAL( toggled ( bool )), this, SLOT( micMuteToggled ( bool ))); - connect ( alarmLed, SIGNAL( toggled ( bool )), this, SLOT( alarmSoundToggled ( bool ))); + connect ( volLed, SIGNAL( toggled(bool)), this, SLOT( volMuteToggled(bool))); + connect ( micLed, SIGNAL( toggled(bool)), this, SLOT( micMuteToggled(bool))); + connect ( alarmLed, SIGNAL( toggled(bool)), this, SLOT( alarmSoundToggled(bool))); - connect ( alarmBox, SIGNAL( toggled ( bool )), this, SLOT( alarmSoundToggled ( bool ))); - connect ( keyBox, SIGNAL( toggled ( bool )), this, SLOT( keyClickToggled ( bool ))); - connect ( tapBox, SIGNAL( toggled ( bool )), this, SLOT( screenTapToggled ( bool ))); + connect ( alarmBox, SIGNAL( toggled(bool)), this, SLOT( alarmSoundToggled(bool))); + connect ( keyBox, SIGNAL( toggled(bool)), this, SLOT( keyClickToggled(bool))); + connect ( tapBox, SIGNAL( toggled(bool)), this, SLOT( screenTapToggled(bool))); // initialize variables readConfig ( true ); // initialize the config file, in case some entries are missing writeConfigEntry ( "VolumePercent", m_vol_percent, UPD_None ); writeConfigEntry ( "BassPercent", m_vol_percent, UPD_None ); writeConfigEntry ( "TreblePercent", m_vol_percent, UPD_None ); writeConfigEntry ( "Mute", m_vol_muted, UPD_None ); writeConfigEntry ( "AlarmPercent", m_alarm_percent, UPD_None ); writeConfigEntry ( "TouchSound", m_snd_touch, UPD_None ); writeConfigEntry ( "KeySound", m_snd_key, UPD_None ); writeConfigEntry ( "AlarmSound", m_snd_alarm, UPD_Vol ); writeConfigEntry ( "Mic", m_mic_percent, UPD_None ); writeConfigEntry ( "MicMute", m_mic_muted, UPD_Mic ); } bool VolumeControl::volMuted ( ) const { return m_vol_muted; } @@ -703,50 +703,50 @@ void VolumeControl::writeConfigEntry ( const char *entry, int val, eUpdate upd ) break; } case UPD_Treble: { QCopEnvelope ( "QPE/System", "trebleChange(bool)" ) << true; break; } case UPD_None: break; } #endif } //=========================================================================== VolumeApplet::VolumeApplet( QWidget *parent, const char *name ) : QWidget( parent, name ) { setFixedWidth ( AppLnk::smallIconSize() ); setFixedHeight ( AppLnk::smallIconSize()+4 ); m_pixmap = new QPixmap ( Resource::loadPixmap ( "volume" )); m_dialog = new VolumeControl ( this, true, this, "volumecontrol" ); - connect ( qApp, SIGNAL( volumeChanged ( bool )), m_dialog, SLOT( volumeChanged( bool ))); - connect ( qApp, SIGNAL( micChanged ( bool )), m_dialog, SLOT ( micChanged( bool ))); + connect ( qApp, SIGNAL( volumeChanged(bool)), m_dialog, SLOT( volumeChanged(bool))); + connect ( qApp, SIGNAL( micChanged(bool)), m_dialog, SLOT ( micChanged(bool))); } VolumeApplet::~VolumeApplet() { delete m_pixmap; } int VolumeApplet::position() { return 6; } void VolumeApplet::mousePressEvent ( QMouseEvent * ) { if ( m_dialog-> isVisible ( )) m_dialog-> hide ( ); else m_dialog-> show ( true ); } void VolumeApplet::redraw ( bool all ) { if ( all ) repaint ( true ); diff --git a/core/apps/embeddedkonsole/commandeditdialog.cpp b/core/apps/embeddedkonsole/commandeditdialog.cpp index c0066d8..6587b26 100644 --- a/core/apps/embeddedkonsole/commandeditdialog.cpp +++ b/core/apps/embeddedkonsole/commandeditdialog.cpp @@ -30,49 +30,49 @@ CommandEditDialog::CommandEditDialog(QWidget *parent, const char* name, WFlags f item = new QListViewItem( m_SuggestedCommandList,"date "); item = new QListViewItem( m_SuggestedCommandList,"dd "); item = new QListViewItem( m_SuggestedCommandList,"dmesg "); item = new QListViewItem( m_SuggestedCommandList,"fuser "); item = new QListViewItem( m_SuggestedCommandList,"hostname "); item = new QListViewItem( m_SuggestedCommandList,"kill "); item = new QListViewItem( m_SuggestedCommandList,"killall "); item = new QListViewItem( m_SuggestedCommandList,"ln "); item = new QListViewItem( m_SuggestedCommandList,"ln -s "); item = new QListViewItem( m_SuggestedCommandList,"lsmod"); item = new QListViewItem( m_SuggestedCommandList,"depmod -a"); item = new QListViewItem( m_SuggestedCommandList,"modprobe "); item = new QListViewItem( m_SuggestedCommandList,"mount "); item = new QListViewItem( m_SuggestedCommandList,"more "); item = new QListViewItem( m_SuggestedCommandList,"sort "); item = new QListViewItem( m_SuggestedCommandList,"touch "); item = new QListViewItem( m_SuggestedCommandList,"umount "); item = new QListViewItem( m_SuggestedCommandList,"mknod "); item = new QListViewItem( m_SuggestedCommandList,"netstat "); item = new QListViewItem( m_SuggestedCommandList,"route "); item = new QListViewItem( m_SuggestedCommandList,"cardctl eject "); m_SuggestedCommandList->setSelected(m_SuggestedCommandList->firstChild(),TRUE); m_SuggestedCommandList->sort(); - connect( m_SuggestedCommandList, SIGNAL( clicked( QListViewItem * ) ), m_PlayListSelection, SLOT( addToSelection( QListViewItem *) ) ); + connect( m_SuggestedCommandList, SIGNAL( clicked(QListViewItem*) ), m_PlayListSelection, SLOT( addToSelection(QListViewItem*) ) ); ToolButton1->setTextLabel("new"); ToolButton1->setPixmap(Resource::loadPixmap("new")); ToolButton1->setAutoRaise(TRUE); ToolButton1->setFocusPolicy(QWidget::NoFocus); connect(ToolButton1,SIGNAL(clicked()),this,SLOT(showAddDialog())); ToolButton2->setTextLabel("edit"); ToolButton2->setPixmap(Resource::loadPixmap("edit")); ToolButton2->setAutoRaise(TRUE); ToolButton2->setFocusPolicy(QWidget::NoFocus); connect(ToolButton2,SIGNAL(clicked()),this,SLOT(showEditDialog())); ToolButton3->setTextLabel("delete"); ToolButton3->setPixmap(Resource::loadPixmap("editdelete")); ToolButton3->setAutoRaise(TRUE); ToolButton3->setFocusPolicy(QWidget::NoFocus); connect(ToolButton3,SIGNAL(clicked()),m_PlayListSelection,SLOT(removeSelected())); ToolButton4->setTextLabel("up"); ToolButton4->setPixmap(Resource::loadPixmap("up")); ToolButton4->setAutoRaise(TRUE); diff --git a/core/apps/embeddedkonsole/session.cpp b/core/apps/embeddedkonsole/session.cpp index 043b8db..a94712a 100644 --- a/core/apps/embeddedkonsole/session.cpp +++ b/core/apps/embeddedkonsole/session.cpp @@ -30,71 +30,71 @@ TESession::TESession(QMainWindow* main, TEWidget* _te, const char* _pgm, QStrLis // sh = new TEPty(); sh = new MyPty(); em = new TEmuVt102(te); sh->setSize(te->Lines(),te->Columns()); // not absolutely nessesary QObject::connect( sh,SIGNAL(block_in(const char*,int)), em,SLOT(onRcvBlock(const char*,int)) ); QObject::connect( em,SIGNAL(ImageSizeChanged(int,int)), sh,SLOT(setSize(int,int))); // 'main' should do those connects itself, somehow. // These aren't KTMW's slots, but konsole's.(David) /* QObject::connect( em,SIGNAL(ImageSizeChanged(int,int)), main,SLOT(notifySize(int,int))); */ QObject::connect( em,SIGNAL(sndBlock(const char*,int)), sh,SLOT(send_bytes(const char*,int)) ); QObject::connect( em,SIGNAL(changeColumns(int)), main,SLOT(changeColumns(int)) ); - QObject::connect( em,SIGNAL(changeTitle(int, const QString&)), - this,SLOT(changeTitle(int, const QString&)) ); + QObject::connect( em,SIGNAL(changeTitle(int,const QString&)), + this,SLOT(changeTitle(int,const QString&)) ); QObject::connect( sh,SIGNAL(done(int)), this,SLOT(done(int)) ); } void TESession::run() { //kdDebug() << "Running the session!" << pgm << "\n"; sh->run(pgm,args,term.data(),FALSE); } void TESession::kill(int ) // signal) { // sh->kill(signal); } TESession::~TESession() { - QObject::disconnect( sh, SIGNAL( done( int ) ), - this, SLOT( done( int ) ) ); + QObject::disconnect( sh, SIGNAL( done(int) ), + this, SLOT( done(int) ) ); delete em; delete sh; } void TESession::setConnect(bool c) { em->setConnect(c); } void TESession::done(int status) { emit done(te,status); } void TESession::terminate() { delete this; } TEmulation* TESession::getEmulation() { return em; } diff --git a/core/apps/helpbrowser/helpbrowser.cpp b/core/apps/helpbrowser/helpbrowser.cpp index 8fb0161..336d9fb 100644 --- a/core/apps/helpbrowser/helpbrowser.cpp +++ b/core/apps/helpbrowser/helpbrowser.cpp @@ -49,91 +49,91 @@ void HelpBrowser::init( const QString& _home ) setIcon( Resource::loadPixmap( "HelpBrowser" ) ); setBackgroundMode( PaletteButton ); browser = new MagicTextBrowser( this ); browser->setFrameStyle( QFrame::Panel | QFrame::Sunken ); connect( browser, SIGNAL( textChanged() ), this, SLOT( textChanged() ) ); setCentralWidget( browser ); setToolBarsMovable( FALSE ); if ( !_home.isEmpty() ) browser->setSource( _home ); QToolBar* toolbar = new QToolBar( this ); toolbar->setHorizontalStretchable( TRUE ); QMenuBar *menu = new QMenuBar( toolbar ); toolbar = new QToolBar( this ); // addToolBar( toolbar, "Toolbar"); QPopupMenu* go = new QPopupMenu( this ); backAction = new QAction( tr( "Backward" ), Resource::loadIconSet( "back" ), QString::null, 0, this, 0 ); connect( backAction, SIGNAL( activated() ), browser, SLOT( backward() ) ); - connect( browser, SIGNAL( backwardAvailable( bool ) ), - backAction, SLOT( setEnabled( bool ) ) ); + connect( browser, SIGNAL( backwardAvailable(bool) ), + backAction, SLOT( setEnabled(bool) ) ); backAction->addTo( go ); backAction->addTo( toolbar ); backAction->setEnabled( FALSE ); forwardAction = new QAction( tr( "Forward" ), Resource::loadIconSet( "forward" ), QString::null, 0, this, 0 ); connect( forwardAction, SIGNAL( activated() ), browser, SLOT( forward() ) ); - connect( browser, SIGNAL( forwardAvailable( bool ) ), - forwardAction, SLOT( setEnabled( bool ) ) ); + connect( browser, SIGNAL( forwardAvailable(bool) ), + forwardAction, SLOT( setEnabled(bool) ) ); forwardAction->addTo( go ); forwardAction->addTo( toolbar ); forwardAction->setEnabled( FALSE ); QAction *a = new QAction( tr( "Home" ), Resource::loadIconSet( "home" ), QString::null, 0, this, 0 ); connect( a, SIGNAL( activated() ), browser, SLOT( home() ) ); a->addTo( go ); a->addTo( toolbar ); bookm = new QPopupMenu( this ); bookm->insertItem( tr( "Add Bookmark" ), this, SLOT( addBookmark() ) ); bookm->insertItem( tr( "Remove from Bookmarks" ), this, SLOT( removeBookmark() ) ); bookm->insertSeparator(); - connect( bookm, SIGNAL( activated( int ) ), - this, SLOT( bookmChosen( int ) ) ); + connect( bookm, SIGNAL( activated(int) ), + this, SLOT( bookmChosen(int) ) ); readBookmarks(); menu->insertItem( tr("Go"), go ); menu->insertItem( tr( "Bookmarks" ), bookm ); resize( 240, 300 ); browser->setFocus(); browser->setFrameStyle( QFrame::NoFrame ); #if !defined(QT_NO_COP) QCopChannel *addressChannel = new QCopChannel("QPE/HelpBrowser" , this ); - connect (addressChannel, SIGNAL( received(const QCString &, const QByteArray &)), - this, SLOT ( appMessage(const QCString &, const QByteArray &) ) ); + connect (addressChannel, SIGNAL( received(const QCString&,const QByteArray&)), + this, SLOT ( appMessage(const QCString&,const QByteArray&) ) ); #endif - connect( qApp, SIGNAL(appMessage(const QCString&, const QByteArray&)), - this, SLOT(appMessage(const QCString&, const QByteArray&)) ); + connect( qApp, SIGNAL(appMessage(const QCString&,const QByteArray&)), + this, SLOT(appMessage(const QCString&,const QByteArray&)) ); } void HelpBrowser::appMessage(const QCString& msg, const QByteArray& data) { qDebug("reached appMessage"); if ( msg == "showFile(QString)" ) { QDataStream ds(data,IO_ReadOnly); QString fn; ds >> fn; setDocument( fn ); QPEApplication::setKeepRunning(); showMaximized(); setActiveWindow(); raise(); } } void HelpBrowser::setDocument( const QString &doc ) { if ( !doc.isEmpty() ) browser->setSource( doc ); raise(); diff --git a/core/apps/textedit/textedit.cpp b/core/apps/textedit/textedit.cpp index 55725cc..b54da34 100644 --- a/core/apps/textedit/textedit.cpp +++ b/core/apps/textedit/textedit.cpp @@ -142,50 +142,50 @@ void QpeEditor::find ( const QString &txt, bool caseSensitive, } #else #error "Must make a QpeEditor that inherits QTextEdit" #endif static const int nfontsizes = 6; static const int fontsize[nfontsizes] = {8,10,12,14,18,24}; TextEdit::TextEdit( QWidget *parent, const char *name, WFlags f ) : QMainWindow( parent, name, f ), bFromDocView( false ) { doc = 0; edited=false; fromSetDocument=false; setToolBarsMovable( false ); connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); channel = new QCopChannel( "QPE/Application/textedit", this ); - connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), - this, SLOT(receive(const QCString&, const QByteArray&)) ); + connect( channel, SIGNAL(received(const QCString&,const QByteArray&)), + this, SLOT(receive(const QCString&,const QByteArray&)) ); setIcon( Resource::loadPixmap( "TextEditor" ) ); QToolBar *bar = new QToolBar( this ); bar->setHorizontalStretchable( true ); menu = bar; QMenuBar *mb = new QMenuBar( bar ); QPopupMenu *file = new QPopupMenu( this ); QPopupMenu *edit = new QPopupMenu( this ); QPopupMenu *advancedMenu = new QPopupMenu(this); font = new QPopupMenu( this ); bar = new QToolBar( this ); editBar = bar; QAction *a = new QAction( tr( "New" ), Resource::loadPixmap( "new" ), QString::null, 0, this, 0 ); connect( a, SIGNAL( activated() ), this, SLOT( fileNew() ) ); // a->addTo( bar ); a->addTo( file ); a = new QAction( tr( "Open" ), Resource::loadPixmap( "fileopen" ), @@ -304,49 +304,49 @@ TextEdit::TextEdit( QWidget *parent, const char *name, WFlags f ) nAutoSave = new QAction( tr("Auto Save 5 min."), QString::null, 0, this, 0 ); connect( nAutoSave, SIGNAL( toggled(bool) ), this, SLOT( doTimer(bool) ) ); nAutoSave->setToggleAction(true); nAutoSave->addTo( advancedMenu); //font->insertSeparator(); //font->insertItem(tr("About"), this, SLOT( doAbout()) ); mb->insertItem( tr( "File" ), file ); mb->insertItem( tr( "Edit" ), edit ); mb->insertItem( tr( "View" ), font ); searchBar = new QToolBar(this); addToolBar( searchBar, "Search", QMainWindow::Top, true ); searchBar->setHorizontalStretchable( true ); searchEdit = new QLineEdit( searchBar, "searchEdit" ); searchBar->setStretchableWidget( searchEdit ); - connect( searchEdit, SIGNAL( textChanged( const QString & ) ), + connect( searchEdit, SIGNAL( textChanged(const QString&) ), this, SLOT( search() ) ); a = new QAction( tr( "Find Next" ), Resource::loadPixmap( "next" ), QString::null, 0, this, 0 ); connect( a, SIGNAL( activated() ), this, SLOT( findNext() ) ); a->addTo( searchBar ); a->addTo( edit ); a = new QAction( tr( "Close Find" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); connect( a, SIGNAL( activated() ), this, SLOT( findClose() ) ); a->addTo( searchBar ); edit->insertSeparator(); a = new QAction( tr( "Delete" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); connect( a, SIGNAL( activated() ), this, SLOT( editDelete() ) ); a->addTo( edit ); searchBar->hide(); editor = new QpeEditor( this ); setCentralWidget( editor ); editor->setFrameStyle( QFrame::Panel | QFrame::Sunken ); @@ -562,50 +562,50 @@ void TextEdit::fileOpen() { map.insert(tr("Text"), text ); text << "*"; map.insert(tr("All"), text ); QString str = OFileDialog::getOpenFileName( 2, QString::null , QString::null, map); if( !str.isEmpty() && QFile(str).exists() && !QFileInfo(str).isDir() ) { openFile( str ); } else updateCaption(); } void TextEdit::doSearchBar() { if(!useSearchBar) searchBar->hide(); else searchBar->show(); } #if 0 void TextEdit::slotFind() { FindDialog frmFind( tr("Text Editor"), this ); - connect( &frmFind, SIGNAL(signalFindClicked(const QString &, bool, bool, int)), - editor, SLOT(slotDoFind( const QString&,bool,bool))); + connect( &frmFind, SIGNAL(signalFindClicked(const QString&,bool,bool,int)), + editor, SLOT(slotDoFind(const QString&,bool,bool))); //case sensitive, backwards, [category] connect( editor, SIGNAL(notFound()), &frmFind, SLOT(slotNotFound()) ); connect( editor, SIGNAL(searchWrapped()), &frmFind, SLOT(slotWrapAround()) ); frmFind.exec(); } #endif void TextEdit::fileRevert() { clear(); fileOpen(); } void TextEdit::editCut() { #ifndef QT_NO_CLIPBOARD editor->cut(); #endif } diff --git a/core/launcher/appicons.cpp b/core/launcher/appicons.cpp index c51ee5a..4d48b24 100644 --- a/core/launcher/appicons.cpp +++ b/core/launcher/appicons.cpp @@ -1,95 +1,97 @@ /********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** -** This file is part of Qtopia Environment. +** 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 "appicons.h" -#include <qpe/qcopenvelope_qws.h> +#ifdef QWS +#include <qtopia/qcopenvelope_qws.h> +#endif #include <qtooltip.h> #include <qpixmap.h> AppIcons::AppIcons( QWidget *parent ) : QHBox(parent) { buttons.setAutoDelete(TRUE); #ifndef QT_NO_COP QCopChannel* channel = new QCopChannel("Qt/Tray", this); - connect(channel, SIGNAL(received(const QCString&, const QByteArray&)), - this, SLOT(receive(const QCString&, const QByteArray&))); + connect(channel, SIGNAL(received(const QCString&,const QByteArray&)), + this, SLOT(receive(const QCString&,const QByteArray&))); #endif } void AppIcons::setIcon(int id, const QPixmap& pm) { button(id)->setPixmap(pm); } class FlatButton : public QLabel { Q_OBJECT public: FlatButton(QWidget* parent) : QLabel(parent) { } void mouseDoubleClickEvent(QMouseEvent* e) { emit clicked(e->pos(),e->button(),TRUE); } void mouseReleaseEvent(QMouseEvent* e) { if ( rect().contains(e->pos()) ) emit clicked(e->pos(),e->button(),FALSE); } signals: void clicked(const QPoint&, int, bool); }; QLabel* AppIcons::button(int id) { QLabel* f = buttons.find(id); if ( !f ) { buttons.insert(id,f=new FlatButton(this)); - connect(f,SIGNAL(clicked(const QPoint&, int, bool)),this,SLOT(clicked(const QPoint&, int, bool))); + connect(f,SIGNAL(clicked(const QPoint&,int,bool)),this,SLOT(clicked(const QPoint&,int,bool))); f->show(); } return f; } int AppIcons::findId(QLabel* b) { QIntDictIterator<QLabel> it(buttons); for ( ; ; ++it ) if ( it.current() == b ) return it.currentKey(); } void AppIcons::clicked(const QPoint& relpos, int button, bool dbl) { #ifndef QT_NO_COP QLabel* s = (QLabel*)sender(); if ( button == RightButton ) { QCopEnvelope("Qt/Tray","popup(int,QPoint)") << findId(s) << s->mapToGlobal(QPoint(0,0)); } else { QCopEnvelope("Qt/Tray", dbl ? "doubleClicked(int,QPoint)" : "clicked(int,QPoint)") << findId(s) << relpos; } diff --git a/core/launcher/applauncher.cpp b/core/launcher/applauncher.cpp index 7d3c032..08a3cb4 100644 --- a/core/launcher/applauncher.cpp +++ b/core/launcher/applauncher.cpp @@ -65,54 +65,54 @@ const int AppLauncher::RAISE_TIMEOUT_MS = 5000; static AppLauncher* appLauncherPtr; const int appStopEventID = 1290; class AppStoppedEvent : public QCustomEvent { public: AppStoppedEvent(int pid, int status) : QCustomEvent( appStopEventID ), mPid(pid), mStatus(status) { } int pid() { return mPid; } int status() { return mStatus; } private: int mPid, mStatus; }; AppLauncher::AppLauncher(QObject *parent, const char *name) : QObject(parent, name), qlPid(0), qlReady(FALSE), appKillerBox(0) { connect(qwsServer, SIGNAL(newChannel(const QString&)), this, SLOT(newQcopChannel(const QString&))); connect(qwsServer, SIGNAL(removedChannel(const QString&)), this, SLOT(removedQcopChannel(const QString&))); QCopChannel* channel = new QCopChannel( "QPE/System", this ); - connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), - this, SLOT(received(const QCString&, const QByteArray&)) ); + connect( channel, SIGNAL(received(const QCString&,const QByteArray&)), + this, SLOT(received(const QCString&,const QByteArray&)) ); channel = new QCopChannel( "QPE/Server", this ); - connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), - this, SLOT(received(const QCString&, const QByteArray&)) ); + connect( channel, SIGNAL(received(const QCString&,const QByteArray&)), + this, SLOT(received(const QCString&,const QByteArray&)) ); #ifndef Q_OS_WIN32 signal(SIGCHLD, signalHandler); #else runningAppsProc.setAutoDelete( TRUE ); #endif QString tmp = qApp->argv()[0]; int pos = tmp.findRev('/'); if ( pos > -1 ) tmp = tmp.mid(++pos); runningApps[::getpid()] = tmp; appLauncherPtr = this; QTimer::singleShot( 1000, this, SLOT(createQuickLauncher()) ); } AppLauncher::~AppLauncher() { appLauncherPtr = 0; #ifndef Q_OS_WIN32 signal(SIGCHLD, SIG_DFL); #endif if ( qlPid ) { diff --git a/core/launcher/firstuse.cpp b/core/launcher/firstuse.cpp index 50ae6c2..4316648 100644 --- a/core/launcher/firstuse.cpp +++ b/core/launcher/firstuse.cpp @@ -77,50 +77,50 @@ settingsTable [] = QT_TR_NOOP("Time and Date") }, #endif { FALSE, "addressbook", "editPersonalAndClose()", "accept()", // No tr QT_TR_NOOP("Personal Information") }, { FALSE, 0, 0, 0, 0 } }; FirstUse::FirstUse(QWidget* parent, const char * name, WFlags wf) : QDialog( parent, name, TRUE, wf), transApp(0), transLib(0), needCalibrate(FALSE), currApp(-1), waitForExit(-1), waitingForLaunch(FALSE), needRestart(FALSE) { ServerApplication::allowRestart = FALSE; // we force our height beyound the maximum (which we set anyway) QRect desk = qApp->desktop()->geometry(); setGeometry( 0, 0, desk.width(), desk.height() ); connect(qwsServer, SIGNAL(newChannel(const QString&)), this, SLOT(newQcopChannel(const QString&))); // Create a DocumentList so appLauncher has appLnkSet to search docList = new DocumentList( 0, FALSE ); appLauncher = new AppLauncher( this ); - connect( appLauncher, SIGNAL(terminated(int, const QString&)), - this, SLOT(terminated(int, const QString&)) ); + connect( appLauncher, SIGNAL(terminated(int,const QString&)), + this, SLOT(terminated(int,const QString&)) ); // more hackery // I will be run as either the main server or as part of the main server QWSServer::setScreenSaverIntervals(0); loadPixmaps(); //check if there is a language program #ifndef Q_OS_WIN32 QString exeSuffix; #else QString exeSuffix(".exe"); #endif for ( int i = 0; settingsTable[i].app; i++ ) { QString file = QPEApplication::qpeDir() + "bin/"; file += settingsTable[i].app; file += exeSuffix; if ( QFile::exists(file) ) settingsTable[i].enabled = TRUE; } setFocusPolicy(NoFocus); taskBar = new QWidget(0, 0, WStyle_Tool | WStyle_Customize | WStyle_StaysOnTop | WGroupLeader); @@ -136,50 +136,50 @@ FirstUse::FirstUse(QWidget* parent, const char * name, WFlags wf) : next = new QPushButton(tr("Next >>"), taskBar); next->setFocusPolicy(NoFocus); connect(next, SIGNAL(clicked()), this, SLOT(nextDialog()) ); // need to set the geom to lower corner QSize sz = inputMethods->sizeHint(); int buttonWidth = (width() - sz.width()) / 2; int x = 0; controlHeight = back->sizeHint().height(); inputMethods->setGeometry(0,0, sz.width(), controlHeight ); x += sz.width(); back->setGeometry(x, 0, buttonWidth, controlHeight); x += buttonWidth; next->setGeometry(x, 0, buttonWidth, controlHeight); taskBar->setGeometry( 0, height() - controlHeight, desk.width(), controlHeight); taskBar->hide(); #if defined(Q_WS_QWS) && !defined(QT_NO_COP) qDebug("Setting up QCop to QPE/System"); QCopChannel* sysChannel = new QCopChannel( "QPE/System", this ); - connect(sysChannel, SIGNAL(received(const QCString &, const QByteArray &)), - this, SLOT(message(const QCString &, const QByteArray &)) ); + connect(sysChannel, SIGNAL(received(const QCString&,const QByteArray&)), + this, SLOT(message(const QCString&,const QByteArray&)) ); #endif calcMaxWindowRect(); m_calHandler = ( QWSServer::mouseHandler() && QWSServer::mouseHandler()->inherits("QCalibratedMouseHandler") ) ? true : false; if ( m_calHandler) { if ( !QFile::exists("/etc/pointercal") ) { needCalibrate = TRUE; grabMouse(); } } Config config("locale"); config.setGroup( "Language"); lang = config.readEntry( "Language", "en"); defaultFont = font(); //###language/font hack; should look it up somewhere #ifdef Q_WS_QWS if ( lang == "ja" || lang == "zh_CN" || lang == "zh_TW" || lang == "ko" ) { QFont fn = FontManager::unicodeFont( FontManager::Proportional ); qApp->setFont( fn, TRUE ); } diff --git a/core/launcher/inputmethods.cpp b/core/launcher/inputmethods.cpp index 683f1e2..19e799a 100644 --- a/core/launcher/inputmethods.cpp +++ b/core/launcher/inputmethods.cpp @@ -124,50 +124,50 @@ InputMethods::InputMethods( QWidget *parent ) : connect( (QPEApplication*)qApp, SIGNAL(clientMoused()), this, SLOT(resetStates()) ); imButton = new QWidgetStack( this ); // later a widget stack imButton->setFocusPolicy(NoFocus); if (parent->sizeHint().height() > 0) imButton->setFixedHeight( parent->sizeHint().height() ); hbox->addWidget(imButton); imChoice = new QToolButton( this ); imChoice->setFocusPolicy(NoFocus); imChoice->setPixmap( QPixmap( (const char **)tri_xpm ) ); if (parent->sizeHint().height() > 0) imChoice->setFixedHeight( parent->sizeHint().height() ); imChoice->setFixedWidth( 13 ); imChoice->setAutoRaise( TRUE ); hbox->addWidget( imChoice ); connect( imChoice, SIGNAL(clicked()), this, SLOT(chooseIm()) ); loadInputMethods(); QCopChannel *channel = new QCopChannel( "QPE/IME", this ); - connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), - this, SLOT(qcopReceive(const QCString&, const QByteArray&)) ); + connect( channel, SIGNAL(received(const QCString&,const QByteArray&)), + this, SLOT(qcopReceive(const QCString&,const QByteArray&)) ); } InputMethods::~InputMethods() { Config cfg("qpe"); cfg.setGroup("InputMethod"); if (imethod) cfg.writeEntry("im", imethod->name() ); if (mkeyboard) cfg.writeEntry("current", mkeyboard->name() ); unloadInputMethods(); } void InputMethods::hideInputMethod() { kbdButton->setOn( FALSE ); } void InputMethods::showInputMethod() { kbdButton->setOn( TRUE ); } diff --git a/core/launcher/launcher.cpp b/core/launcher/launcher.cpp index 54efb0b..5d0c778 100644 --- a/core/launcher/launcher.cpp +++ b/core/launcher/launcher.cpp @@ -77,52 +77,52 @@ static bool isVisibleWindow( int ); //=========================================================================== LauncherTabWidget::LauncherTabWidget( Launcher* parent ) : QVBox( parent ), docview( 0 ) { docLoadingWidgetEnabled = false; docLoadingWidget = 0; docLoadingWidgetProgress = 0; launcher = parent; categoryBar = new LauncherTabBar( this ); QPalette pal = categoryBar->palette(); pal.setColor( QColorGroup::Light, pal.color(QPalette::Active,QColorGroup::Shadow) ); pal.setColor( QColorGroup::Background, pal.active().background().light(110) ); categoryBar->setPalette( pal ); stack = new QWidgetStack(this); connect( categoryBar, SIGNAL(selected(int)), this, SLOT(raiseTabWidget()) ); categoryBar->show(); stack->show(); #if defined(Q_WS_QWS) && !defined(QT_NO_COP) QCopChannel *channel = new QCopChannel( "QPE/Launcher", this ); - connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), - this, SLOT(launcherMessage(const QCString&, const QByteArray&)) ); - connect( qApp, SIGNAL(appMessage(const QCString&, const QByteArray&)), - this, SLOT(appMessage(const QCString&, const QByteArray&))); + connect( channel, SIGNAL(received(const QCString&,const QByteArray&)), + this, SLOT(launcherMessage(const QCString&,const QByteArray&)) ); + connect( qApp, SIGNAL(appMessage(const QCString&,const QByteArray&)), + this, SLOT(appMessage(const QCString&,const QByteArray&))); #endif createDocLoadingWidget(); } void LauncherTabWidget::createDocLoadingWidget() { // Construct the 'doc loading widget' shown when finding documents // ### LauncherView class needs changing to be more generic so // this widget can change its background similar to the iconviews // so the background for this matches docLoadingWidget = new LauncherView( stack ); docLoadingWidget->hideIcons(); QVBox *docLoadingVBox = new QVBox( docLoadingWidget ); docLoadingVBox->setSpacing( 20 ); docLoadingVBox->setMargin( 10 ); QWidget *space1 = new QWidget( docLoadingVBox ); docLoadingVBox->setStretchFactor( space1, 1 ); QLabel *waitPixmap = new QLabel( docLoadingVBox ); waitPixmap->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)5, waitPixmap->sizePolicy().hasHeightForWidth() ) ); @@ -456,50 +456,50 @@ void Launcher::createGUI() tabs = new LauncherTabWidget( this ); setCentralWidget( tabs ); ServerInterface::dockWidget( tb, ServerInterface::Bottom ); tb->show(); qApp->installEventFilter( this ); connect( qApp, SIGNAL(symbol()), this, SLOT(toggleSymbolInput()) ); connect( qApp, SIGNAL(numLockStateToggle()), this, SLOT(toggleNumLockState()) ); connect( qApp, SIGNAL(capsLockStateToggle()), this, SLOT(toggleCapsLockState()) ); connect( tb, SIGNAL(tabSelected(const QString&)), this, SLOT(showTab(const QString&)) ); connect( tabs, SIGNAL(selected(const QString&)), this, SLOT(viewSelected(const QString&)) ); connect( tabs, SIGNAL(clicked(const AppLnk*)), this, SLOT(select(const AppLnk*))); connect( tabs, SIGNAL(rightPressed(AppLnk*)), this, SLOT(properties(AppLnk*))); #if defined(Q_WS_QWS) && !defined(QT_NO_COP) QCopChannel* sysChannel = new QCopChannel( "QPE/System", this ); - connect( sysChannel, SIGNAL(received(const QCString &, const QByteArray &)), - this, SLOT(systemMessage( const QCString &, const QByteArray &)) ); + connect( sysChannel, SIGNAL(received(const QCString&,const QByteArray&)), + this, SLOT(systemMessage(const QCString&,const QByteArray&)) ); #endif // all documents QImage img( Resource::loadImage( "DocsIcon" ) ); QPixmap pm; pm = img.smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ); // It could add this itself if it handles docs tabs->newView("Documents", pm, tr("Documents") )->setToolsEnabled( TRUE ); QTimer::singleShot( 0, tabs, SLOT( initLayout() ) ); qApp->setMainWidget( this ); QTimer::singleShot( 500, this, SLOT( makeVisible() ) ); } Launcher::~Launcher() { if ( tb ) destroyGUI(); } bool Launcher::requiresDocuments() const { Config cfg( "Launcher" ); diff --git a/core/launcher/launcherview.cpp b/core/launcher/launcherview.cpp index 513b1bd..6c7d487 100644 --- a/core/launcher/launcherview.cpp +++ b/core/launcher/launcherview.cpp @@ -594,56 +594,56 @@ bool LauncherIconView::removeLink(const QString& linkfile) return did; } //=========================================================================== LauncherView::LauncherView( QWidget* parent, const char* name, WFlags fl ) : QVBox( parent, name, fl ) { catmb = 0; icons = new LauncherIconView( this ); setFocusProxy(icons); QPEApplication::setStylusOperation( icons->viewport(), QPEApplication::RightOnHold ); icons->setItemsMovable( FALSE ); icons->setAutoArrange( TRUE ); icons->setSorting( TRUE ); icons->setFrameStyle( QFrame::NoFrame ); icons->setMargin( 0 ); icons->setSelectionMode( QIconView::NoSelection ); icons->setBackgroundMode( PaletteBase ); icons->setResizeMode( QIconView::Fixed ); vmode = (ViewMode)-1; setViewMode( Icon ); - connect( icons, SIGNAL(mouseButtonClicked(int, QIconViewItem *, const QPoint&)), - SLOT(itemClicked(int, QIconViewItem *)) ); + connect( icons, SIGNAL(mouseButtonClicked(int,QIconViewItem*,const QPoint&)), + SLOT(itemClicked(int,QIconViewItem*)) ); connect( icons, SIGNAL(selectionChanged()), SLOT(selectionChanged()) ); - connect( icons, SIGNAL(returnPressed(QIconViewItem *)), - SLOT(returnPressed(QIconViewItem *)) ); - connect( icons, SIGNAL(mouseButtonPressed(int, QIconViewItem *, const QPoint&)), - SLOT(itemPressed(int, QIconViewItem *)) ); + connect( icons, SIGNAL(returnPressed(QIconViewItem*)), + SLOT(returnPressed(QIconViewItem*)) ); + connect( icons, SIGNAL(mouseButtonPressed(int,QIconViewItem*,const QPoint&)), + SLOT(itemPressed(int,QIconViewItem*)) ); tools = 0; setBackgroundType( Ruled, QString::null ); } LauncherView::~LauncherView() { if ( bgCache && bgCache->contains( bgName ) ) (*bgCache)[bgName]->ref--; } void LauncherView::hideIcons() { icons->hide(); } void LauncherView::setToolsEnabled(bool y) { if ( !y != !tools ) { if ( y ) { tools = new QHBox(this); // Type filter typemb = new QComboBox(tools); diff --git a/core/launcher/packageslave.cpp b/core/launcher/packageslave.cpp index 321b5dd..7e61b0e 100644 --- a/core/launcher/packageslave.cpp +++ b/core/launcher/packageslave.cpp @@ -31,50 +31,50 @@ #include <qtextstream.h> #include <stdlib.h> #include <sys/stat.h> // mkdir() #if defined(_OS_LINUX_) || defined(Q_OS_LINUX) #include <unistd.h> #include <sys/vfs.h> #include <mntent.h> #elif defined(Q_OS_WIN32) #include <windows.h> #include <winbase.h> #elif defined(Q_OS_MACX) #include <unistd.h> #endif PackageHandler::PackageHandler( QObject *parent, char* name ) : QObject( parent, name ), packageChannel( 0 ), currentProcess( 0 ), mNoSpaceLeft( FALSE ) { // setup qcop channel #ifndef QT_NO_COP packageChannel = new QCopChannel( "QPE/Package", this ); - connect( packageChannel, SIGNAL( received(const QCString &, const QByteArray &) ), - this, SLOT( qcopMessage( const QCString &, const QByteArray &) ) ); + connect( packageChannel, SIGNAL( received(const QCString&,const QByteArray&) ), + this, SLOT( qcopMessage(const QCString&,const QByteArray&) ) ); #endif } void PackageHandler::qcopMessage( const QCString &msg, const QByteArray &data ) { QDataStream stream( data, IO_ReadOnly ); if ( msg == "installPackage(QString)" ) { QString file; stream >> file; installPackage( file ); } else if ( msg == "removePackage(QString)" ) { QString file; stream >> file; removePackage( file ); } else if ( msg == "addPackageFiles(QString,QString)" ) { QString location, listfile; stream >> location >> listfile; addPackageFiles( location, listfile); } else if ( msg == "addPackages(QString)" ) { QString location; stream >> location; addPackages( location ); } else if ( msg == "cleanupPackageFiles(QString)" ) { diff --git a/core/launcher/qcopbridge.cpp b/core/launcher/qcopbridge.cpp index 24f471d..53efba4 100644 --- a/core/launcher/qcopbridge.cpp +++ b/core/launcher/qcopbridge.cpp @@ -44,87 +44,87 @@ #include <unistd.h> #include <sys/types.h> #endif #if defined(_OS_LINUX_) #include <shadow.h> #endif //#define INSECURE const int block_size = 51200; QCopBridge::QCopBridge( Q_UINT16 port, QObject *parent, const char* name ) : QServerSocket( port, 1, parent, name ), desktopChannel( 0 ), cardChannel( 0 ) { if ( !ok() ) qWarning( "Failed to bind to port %d", port ); else { #ifndef QT_NO_COP desktopChannel = new QCopChannel( "QPE/Desktop", this ); - connect( desktopChannel, SIGNAL(received(const QCString &, const QByteArray &)), - this, SLOT(desktopMessage( const QCString &, const QByteArray &)) ); + connect( desktopChannel, SIGNAL(received(const QCString&,const QByteArray&)), + this, SLOT(desktopMessage(const QCString&,const QByteArray&)) ); cardChannel = new QCopChannel( "QPE/Card", this ); - connect( cardChannel, SIGNAL(received(const QCString &, const QByteArray &)), - this, SLOT(desktopMessage( const QCString &, const QByteArray &)) ); + connect( cardChannel, SIGNAL(received(const QCString&,const QByteArray&)), + this, SLOT(desktopMessage(const QCString&,const QByteArray&)) ); #endif } sendSync = FALSE; openConnections.setAutoDelete( TRUE ); authorizeConnections(); } QCopBridge::~QCopBridge() { #ifndef QT_NO_COP delete desktopChannel; #endif } void QCopBridge::authorizeConnections() { Config cfg("Security"); cfg.setGroup("SyncMode"); m_mode = Mode(cfg.readNumEntry("Mode", Sharp )); QListIterator<QCopBridgePI> it(openConnections); while ( it.current() ) { if ( !it.current()->verifyAuthorised() ) { - disconnect ( it.current(), SIGNAL( connectionClosed( QCopBridgePI *) ), this, SLOT( closed( QCopBridgePI *) ) ); + disconnect ( it.current(), SIGNAL( connectionClosed(QCopBridgePI*) ), this, SLOT( closed(QCopBridgePI*) ) ); openConnections.removeRef( it.current() ); } else ++it; } } void QCopBridge::newConnection( int socket ) { QCopBridgePI *pi = new QCopBridgePI( socket, this ); openConnections.append( pi ); - connect ( pi, SIGNAL( connectionClosed( QCopBridgePI *) ), this, SLOT( closed( QCopBridgePI *) ) ); + connect ( pi, SIGNAL( connectionClosed(QCopBridgePI*) ), this, SLOT( closed(QCopBridgePI*) ) ); /* ### libqtopia merge FIXME */ #if 0 QPEApplication::setTempScreenSaverMode( QPEApplication::DisableSuspend ); #endif #ifndef QT_NO_COP QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::DisableSuspend; #endif if ( sendSync ) { pi ->startSync(); sendSync = FALSE; } } void QCopBridge::closed( QCopBridgePI *pi ) { emit connectionClosed( pi->peerAddress() ); openConnections.removeRef( pi ); if ( openConnections.count() == 0 ) { /* ### FIXME libqtopia merge */ #if 0 QPEApplication::setTempScreenSaverMode( QPEApplication::Enable ); #endif diff --git a/core/launcher/runningappbar.cpp b/core/launcher/runningappbar.cpp index 11d10dc..2e9d2a9 100644 --- a/core/launcher/runningappbar.cpp +++ b/core/launcher/runningappbar.cpp @@ -13,50 +13,50 @@ ** ** 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. ** ***********************************************************************/ #define QTOPIA_INTERNAL_PRELOADACCESS #include <stdlib.h> #include <qpainter.h> #include <qtopia/qcopenvelope_qws.h> #include "runningappbar.h" #include "serverinterface.h" RunningAppBar::RunningAppBar(QWidget* parent) : QFrame(parent), selectedAppIndex(-1) { QCopChannel* channel = new QCopChannel( "QPE/System", this ); - connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), - this, SLOT(received(const QCString&, const QByteArray&)) ); + connect( channel, SIGNAL(received(const QCString&,const QByteArray&)), + this, SLOT(received(const QCString&,const QByteArray&)) ); spacing = AppLnk::smallIconSize()+3; } RunningAppBar::~RunningAppBar() { } void RunningAppBar::received(const QCString& msg, const QByteArray& data) { // Since fast apps appear and disappear without disconnecting from their // channel we need to watch for the showing/hiding events and update according. QDataStream stream( data, IO_ReadOnly ); if ( msg == "fastAppShowing(QString)") { QString appName; stream >> appName; // qDebug("fastAppShowing %s", appName.data() ); const AppLnk* f = ServerInterface::appLnks().findExec(appName); if ( f ) addTask(*f); } else if ( msg == "fastAppHiding(QString)") { QString appName; stream >> appName; const AppLnk* f = ServerInterface::appLnks().findExec(appName); if ( f ) removeTask(*f); } diff --git a/core/launcher/server.cpp b/core/launcher/server.cpp index 068d716..ea0b792 100644 --- a/core/launcher/server.cpp +++ b/core/launcher/server.cpp @@ -126,72 +126,72 @@ static Global::Command builtins[] = { Server::Server() : QWidget( 0, 0, WStyle_Tool | WStyle_Customize ), qcopBridge( 0 ), transferServer( 0 ), packageHandler( 0 ), syncDialog( 0 ) { Global::setBuiltinCommands(builtins); tid_xfer = 0; /* ### FIXME ### */ /* tid_today = startTimer(3600*2*1000);*/ last_today_show = QDate::currentDate(); #if 0 tsmMonitor = new TempScreenSaverMode(); connect( tsmMonitor, SIGNAL(forceSuspend()), qApp, SIGNAL(power()) ); #endif serverGui = new Launcher; serverGui->createGUI(); docList = new DocumentList( serverGui ); appLauncher = new AppLauncher(this); - connect(appLauncher, SIGNAL(launched(int, const QString &)), this, SLOT(applicationLaunched(int, const QString &)) ); - connect(appLauncher, SIGNAL(terminated(int, const QString &)), this, SLOT(applicationTerminated(int, const QString &)) ); - connect(appLauncher, SIGNAL(connected(const QString &)), this, SLOT(applicationConnected(const QString &)) ); + connect(appLauncher, SIGNAL(launched(int,const QString&)), this, SLOT(applicationLaunched(int,const QString&)) ); + connect(appLauncher, SIGNAL(terminated(int,const QString&)), this, SLOT(applicationTerminated(int,const QString&)) ); + connect(appLauncher, SIGNAL(connected(const QString&)), this, SLOT(applicationConnected(const QString&)) ); storage = new StorageInfo( this ); connect( storage, SIGNAL(disksChanged()), this, SLOT(storageChanged()) ); // start services startTransferServer(); (void) new IrServer( this ); packageHandler = new PackageHandler( this ); connect(qApp, SIGNAL(activate(const Opie::ODeviceButton*,bool)), this,SLOT(activate(const Opie::ODeviceButton*,bool))); setGeometry( -10, -10, 9, 9 ); QCopChannel *channel = new QCopChannel("QPE/System", this); - connect(channel, SIGNAL(received(const QCString &, const QByteArray &)), - this, SLOT(systemMsg(const QCString &, const QByteArray &)) ); + connect(channel, SIGNAL(received(const QCString&,const QByteArray&)), + this, SLOT(systemMsg(const QCString&,const QByteArray&)) ); QCopChannel *tbChannel = new QCopChannel( "QPE/TaskBar", this ); - connect( tbChannel, SIGNAL(received(const QCString&, const QByteArray&)), - this, SLOT(receiveTaskBar(const QCString&, const QByteArray&)) ); + connect( tbChannel, SIGNAL(received(const QCString&,const QByteArray&)), + this, SLOT(receiveTaskBar(const QCString&,const QByteArray&)) ); connect( qApp, SIGNAL(prepareForRestart()), this, SLOT(terminateServers()) ); connect( qApp, SIGNAL(timeChanged()), this, SLOT(pokeTimeMonitors()) ); preloadApps(); } void Server::show() { ServerApplication::login(TRUE); QWidget::show(); } Server::~Server() { serverGui->destroyGUI(); delete docList; delete qcopBridge; delete transferServer; delete serverGui; #if 0 delete tsmMonitor; #endif } @@ -592,50 +592,50 @@ bool Server::mkdir(const QString &localPath) //qDebug("mkdir making dir %s", checkedPath.latin1()); if (!checkDir.mkdir(checkedPath)) { qDebug("Unable to make directory %s", checkedPath.latin1()); return FALSE; } } } return TRUE; } void Server::styleChange( QStyle &s ) { QWidget::styleChange( s ); } void Server::startTransferServer() { if ( !qcopBridge ) { // start qcop bridge server qcopBridge = new QCopBridge( 4243 ); if ( qcopBridge->ok() ) { // ... OK - connect( qcopBridge, SIGNAL(connectionClosed(const QHostAddress &)), - this, SLOT(syncConnectionClosed(const QHostAddress &)) ); + connect( qcopBridge, SIGNAL(connectionClosed(const QHostAddress&)), + this, SLOT(syncConnectionClosed(const QHostAddress&)) ); } else { delete qcopBridge; qcopBridge = 0; } } if ( !transferServer ) { // start transfer server transferServer = new TransferServer( 4242 ); if ( transferServer->ok() ) { // ... OK } else { delete transferServer; transferServer = 0; } } if ( !transferServer || !qcopBridge ) tid_xfer = startTimer( 2000 ); } void Server::timerEvent( QTimerEvent *e ) { if ( e->timerId() == tid_xfer ) { killTimer( tid_xfer ); tid_xfer = 0; diff --git a/core/launcher/serverapp.cpp b/core/launcher/serverapp.cpp index f7c2341..d38dd97 100644 --- a/core/launcher/serverapp.cpp +++ b/core/launcher/serverapp.cpp @@ -280,60 +280,60 @@ void ServerApplication::switchLCD( bool on ) { dapp-> m_screensaver-> setDisplayState ( false ); } ServerApplication::ServerApplication( int& argc, char **argv, Type t ) : QPEApplication( argc, argv, t ) { ms_is_starting = true; // We know we'll have lots of cached pixmaps due to App/DocLnks QPixmapCache::setCacheLimit(512); m_ps = new PowerStatus; m_ps_last = new PowerStatus; pa = new DesktopPowerAlerter( 0 ); m_apm_timer = new QTimer( this ); connect(m_apm_timer, SIGNAL( timeout() ), this, SLOT( apmTimeout() ) ); reloadPowerWarnSettings(); QCopChannel *channel = new QCopChannel( "QPE/System", this ); - connect(channel, SIGNAL(received( const QCString&, const QByteArray& ) ), - this, SLOT(systemMessage(const QCString&, const QByteArray& ) ) ); + connect(channel, SIGNAL(received(const QCString&,const QByteArray&) ), + this, SLOT(systemMessage(const QCString&,const QByteArray&) ) ); channel = new QCopChannel("QPE/Launcher", this ); - connect(channel, SIGNAL(received( const QCString&, const QByteArray& ) ), - this, SLOT(launcherMessage( const QCString&, const QByteArray& ) ) ); + connect(channel, SIGNAL(received(const QCString&,const QByteArray&) ), + this, SLOT(launcherMessage(const QCString&,const QByteArray&) ) ); m_screensaver = new OpieScreenSaver(); m_screensaver->setInterval( -1 ); QWSServer::setScreenSaver( m_screensaver ); - connect( qApp, SIGNAL( volumeChanged( bool ) ), + connect( qApp, SIGNAL( volumeChanged(bool) ), this, SLOT( rereadVolumes() ) ); /* ### PluginLoader libqtopia SafeMode */ #if 0 if ( PluginLoader::inSafeMode() ) QTimer::singleShot(500, this, SLOT(showSafeMode()) ); QTimer::singleShot(20*1000, this, SLOT(clearSafeMode()) ); #endif kf = new KeyFilter(this); connect( kf, SIGNAL(launch()), this, SIGNAL(launch()) ); connect( kf, SIGNAL(power()), this, SIGNAL(power()) ); connect( kf, SIGNAL(backlight()), this, SIGNAL(backlight()) ); connect( kf, SIGNAL(symbol()), this, SIGNAL(symbol())); connect( kf, SIGNAL(numLockStateToggle()), this,SIGNAL(numLockStateToggle())); connect( kf, SIGNAL(capsLockStateToggle()), this,SIGNAL(capsLockStateToggle())); connect( kf, SIGNAL(activate(const Opie::ODeviceButton*,bool)), this,SIGNAL(activate(const Opie::ODeviceButton*,bool))); connect( kf, SIGNAL(backlight()), this, SLOT(toggleLight()) ); diff --git a/core/launcher/shutdownimpl.cpp b/core/launcher/shutdownimpl.cpp index f43a2a3..2731568 100644 --- a/core/launcher/shutdownimpl.cpp +++ b/core/launcher/shutdownimpl.cpp @@ -85,52 +85,52 @@ ShutdownImpl::ShutdownImpl( QWidget* parent, const char *name, WFlags fl ) grid-> addWidget ( shutdown, 0, 0 ); vbox-> addWidget ( btngrp ); m_info = new QLabel ( this, "info" ); m_info-> setText( tr( "<p>\n" "These termination options are provided primarily for use while developing and testing the Opie system. In a normal environment, these concepts are unnecessary." ) ); vbox-> addWidget ( m_info ); m_progress = new QProgressBar ( this, "progressBar" ); m_progress-> setFrameShape ( QProgressBar::Panel ); m_progress-> setFrameShadow ( QProgressBar::Sunken ); m_progress-> setTotalSteps ( 20 ); m_progress-> setIndicatorFollowsStyle ( false ); vbox-> addWidget ( m_progress ); vbox-> addItem ( new QSpacerItem ( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding ) ); QPushButton *cancel = new QPushButton ( tr( "Cancel" ), this, "cancel" ); changeButtonColor ( cancel, QColor( 181, 222, 178 ) ); cancel-> setDefault ( true ); cancel-> setSizePolicy ( QSizePolicy ( QSizePolicy::Minimum, QSizePolicy::Expanding, cancel-> sizePolicy ( ). hasHeightForWidth ( ) ) ); vbox-> addWidget ( cancel ); m_timer = new QTimer ( this ); - connect ( m_timer, SIGNAL( timeout ( ) ), this, SLOT( timeout ( ) ) ); + connect ( m_timer, SIGNAL( timeout() ), this, SLOT( timeout() ) ); - connect ( btngrp, SIGNAL( clicked ( int ) ), this, SLOT( buttonClicked ( int ) ) ); - connect ( cancel, SIGNAL( clicked ( ) ), this, SLOT( cancelClicked ( ) ) ); + connect ( btngrp, SIGNAL( clicked(int) ), this, SLOT( buttonClicked(int) ) ); + connect ( cancel, SIGNAL( clicked() ), this, SLOT( cancelClicked() ) ); m_progress-> hide ( ); Global::hideInputMethod ( ); } void ShutdownImpl::buttonClicked ( int b ) { m_counter = 0; switch ( b ) { case 1: m_operation = ShutdownSystem; break; case 2: m_operation = RebootSystem; break; case 3: m_operation = RestartDesktop; break; case 4: m_operation = TerminateDesktop; break; } m_info-> hide ( ); diff --git a/core/launcher/taskbar.cpp b/core/launcher/taskbar.cpp index 491a8a3..91e2f20 100644 --- a/core/launcher/taskbar.cpp +++ b/core/launcher/taskbar.cpp @@ -192,50 +192,50 @@ TaskBar::TaskBar() : QHBox(0, 0, WStyle_Customize | WStyle_Tool | WStyle_StaysOn runningAppBar = new RunningAppBar(stack); stack->raiseWidget(runningAppBar); waitIcon = new Wait( this ); (void) new AppIcons( this ); sysTray = new SysTray( this ); /* ### FIXME plugin loader and safe mode */ #if 0 if (PluginLoader::inSafeMode()) (void)new SafeMode( this ); #endif // ## make customizable in some way? #ifdef QT_QWS_CUSTOM lockState = new LockKeyState( this ); #else lockState = 0; #endif #if defined(Q_WS_QWS) #if !defined(QT_NO_COP) QCopChannel *channel = new QCopChannel( "QPE/TaskBar", this ); - connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), - this, SLOT(receive(const QCString&, const QByteArray&)) ); + connect( channel, SIGNAL(received(const QCString&,const QByteArray&)), + this, SLOT(receive(const QCString&,const QByteArray&)) ); #endif #endif waitTimer = new QTimer( this ); connect( waitTimer, SIGNAL( timeout() ), this, SLOT( stopWait() ) ); clearer = new QTimer( this ); QObject::connect(clearer, SIGNAL(timeout()), SLOT(clearStatusBar())); connect( qApp, SIGNAL(symbol()), this, SLOT(toggleSymbolInput()) ); connect( qApp, SIGNAL(numLockStateToggle()), this, SLOT(toggleNumLockState()) ); connect( qApp, SIGNAL(capsLockStateToggle()), this, SLOT(toggleCapsLockState()) ); } void TaskBar::setStatusMessage( const QString &text ) { if ( !text.isEmpty() ) { label->setText( text ); stack->raiseWidget( label ); if ( sysTray && ( label->fontMetrics().width( text ) > label->width() ) ) sysTray->hide(); clearer->start( 3000, TRUE ); } else { clearStatusBar(); } } diff --git a/core/launcher/transferserver.cpp b/core/launcher/transferserver.cpp index b998e95..a5e20b2 100644 --- a/core/launcher/transferserver.cpp +++ b/core/launcher/transferserver.cpp @@ -52,68 +52,68 @@ #ifdef Q_WS_QWS #include <qtopia/qcopenvelope_qws.h> #endif #include "transferserver.h" #include <qtopia/qprocess.h> const int block_size = 51200; TransferServer::TransferServer( Q_UINT16 port, QObject *parent, const char* name) : QServerSocket( port, 1, parent, name ) { connections.setAutoDelete( TRUE ); if ( !ok() ) qWarning( "Failed to bind to port %d", port ); } void TransferServer::authorizeConnections() { QListIterator<ServerPI> it(connections); while ( it.current() ) { if ( !it.current()->verifyAuthorised() ) { - disconnect( it.current(), SIGNAL(connectionClosed(ServerPI *)), this, SLOT( closed(ServerPI *)) ); + disconnect( it.current(), SIGNAL(connectionClosed(ServerPI*)), this, SLOT( closed(ServerPI*)) ); connections.removeRef( it.current() ); } else ++it; } } void TransferServer::closed(ServerPI *item) { connections.removeRef(item); } TransferServer::~TransferServer() { } void TransferServer::newConnection( int socket ) { ServerPI *ptr = new ServerPI( socket, this ); - connect( ptr, SIGNAL(connectionClosed(ServerPI *)), this, SLOT( closed(ServerPI *)) ); + connect( ptr, SIGNAL(connectionClosed(ServerPI*)), this, SLOT( closed(ServerPI*)) ); connections.append( ptr ); } QString SyncAuthentication::serverId() { Config cfg("Security"); cfg.setGroup("Sync"); QString r = cfg.readEntry("serverid"); if ( r.isEmpty() ) { r = OGlobal::generateUuid(); cfg.writeEntry("serverid", r ); } return r; } QString SyncAuthentication::ownerName() { QString vfilename = Global::applicationFileName("addressbook", "businesscard.vcf"); if (QFile::exists(vfilename)) { Contact c; c = Contact::readVCard( vfilename )[0]; return c.fullName(); @@ -312,61 +312,61 @@ ServerPI::ServerPI( int socket, QObject *parent, const char* name ) peerport = peerPort(); peeraddress = peerAddress(); #ifndef INSECURE if ( !SyncAuthentication::isAuthorized(peeraddress) ) { state = Forbidden; startTimer( 0 ); } else #endif { connect( this, SIGNAL( readyRead() ), SLOT( read() ) ); connect( this, SIGNAL( connectionClosed() ), SLOT( connectionClosed() ) ); passiv = FALSE; for( int i = 0; i < 4; i++ ) wait[i] = FALSE; send( "220 Qtopia " QPE_VERSION " FTP Server" ); // No tr state = Wait_USER; dtp = new ServerDTP( this ); connect( dtp, SIGNAL( completed() ), SLOT( dtpCompleted() ) ); connect( dtp, SIGNAL( failed() ), SLOT( dtpFailed() ) ); - connect( dtp, SIGNAL( error( int ) ), SLOT( dtpError( int ) ) ); + connect( dtp, SIGNAL( error(int) ), SLOT( dtpError(int) ) ); directory = QDir::currentDirPath(); static int p = 1024; while ( !serversocket || !serversocket->ok() ) { delete serversocket; serversocket = new ServerSocket( ++p, this ); } - connect( serversocket, SIGNAL( newIncomming( int ) ), - SLOT( newConnection( int ) ) ); + connect( serversocket, SIGNAL( newIncomming(int) ), + SLOT( newConnection(int) ) ); } } ServerPI::~ServerPI() { close(); if ( dtp ) dtp->close(); delete dtp; delete serversocket; } bool ServerPI::verifyAuthorised() { if ( !SyncAuthentication::isAuthorized(peerAddress()) ) { state = Forbidden; return FALSE; } return TRUE; } void ServerPI::connectionClosed() { @@ -1065,49 +1065,49 @@ QString ServerPI::absFilePath( const QString& file ) { if ( file.isEmpty() ) return file; QString filepath( file ); if ( file[0] != "/" ) filepath = directory.path() + "/" + file; return filepath; } void ServerPI::timerEvent( QTimerEvent * ) { connectionClosed(); } ServerDTP::ServerDTP( QObject *parent, const char* name) : QSocket( parent, name ), mode( Idle ), createTargzProc( 0 ), retrieveTargzProc( 0 ) { connect( this, SIGNAL( connected() ), SLOT( connected() ) ); connect( this, SIGNAL( connectionClosed() ), SLOT( connectionClosed() ) ); - connect( this, SIGNAL( bytesWritten( int ) ), SLOT( bytesWritten( int ) ) ); + connect( this, SIGNAL( bytesWritten(int) ), SLOT( bytesWritten(int) ) ); connect( this, SIGNAL( readyRead() ), SLOT( readyRead() ) ); createTargzProc = new QProcess( QString("tar"), this, "createTargzProc"); // No tr createTargzProc->setCommunication( QProcess::Stdout ); createTargzProc->setWorkingDirectory( QDir::rootDirPath() ); connect( createTargzProc, SIGNAL( processExited() ), SLOT( targzDone() ) ); retrieveTargzProc = new QProcess( this, "retrieveTargzProc" ); retrieveTargzProc->setCommunication( QProcess::Stdin ); retrieveTargzProc->setWorkingDirectory( QDir::rootDirPath() ); connect( retrieveTargzProc, SIGNAL( processExited() ), SIGNAL( completed() ) ); connect( retrieveTargzProc, SIGNAL( processExited() ), SLOT( extractTarDone() ) ); } ServerDTP::~ServerDTP() { buf.close(); if ( RetrieveFile == mode && file.isOpen() ) { // We're being shutdown before the client closed. file.close(); if ( recvFileSize >= 0 && (int)file.size() != recvFileSize ) { qDebug( "STOR incomplete" ); diff --git a/core/multimedia/opieplayer/loopcontrol.cpp b/core/multimedia/opieplayer/loopcontrol.cpp index 82242a3..4ed5921 100644 --- a/core/multimedia/opieplayer/loopcontrol.cpp +++ b/core/multimedia/opieplayer/loopcontrol.cpp @@ -420,50 +420,50 @@ bool LoopControl::init( const QString& filename ) { } if ( hasVideoChannel ) { total_video_frames = mediaPlayerState->curDecoder()->videoFrames( stream ); mediaPlayerState->setLength( total_video_frames ); framerate = mediaPlayerState->curDecoder()->videoFrameRate( stream ); DecodeLoopDebug(( "Frame rate %g total %ld", framerate, total_video_frames )); if ( framerate <= 1.0 ) { DecodeLoopDebug(( "Crazy frame rate, resetting to sensible" )); framerate = 25; } if ( total_video_frames == 1 ) { DecodeLoopDebug(( "Cannot seek to frame" )); } } current_frame = 0; prev_frame = -1; - connect( mediaPlayerState, SIGNAL( positionChanged( long ) ), this, SLOT( setPosition( long ) ) ); - connect( mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( setPaused( bool ) ) ); + connect( mediaPlayerState, SIGNAL( positionChanged(long) ), this, SLOT( setPosition(long) ) ); + connect( mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( setPaused(bool) ) ); audioMutex->unlock(); return TRUE; } void LoopControl::play() { // qDebug("LC- play"); mediaPlayerState->setPosition( 0); //uglyhack #if defined(Q_WS_QWS) && !defined(QT_NO_COP) if ( !disabledSuspendScreenSaver || previousSuspendMode != hasVideoChannel ) { disabledSuspendScreenSaver = TRUE; previousSuspendMode = hasVideoChannel; // Stop the screen from blanking and power saving state QCopEnvelope("QPE/System", "setScreenSaverMode(int)" ) << ( hasVideoChannel ? QPEApplication::Disable : QPEApplication::DisableSuspend ); } #endif playtime.start(); startTimers(); } diff --git a/core/multimedia/opieplayer/loopcontrol_threaded.cpp b/core/multimedia/opieplayer/loopcontrol_threaded.cpp index 3796549..0a1fc17 100644 --- a/core/multimedia/opieplayer/loopcontrol_threaded.cpp +++ b/core/multimedia/opieplayer/loopcontrol_threaded.cpp @@ -560,50 +560,50 @@ bool LoopControl::init( const QString& filename ) { if ( hasVideoChannel ) { total_video_frames = mediaPlayerState->curDecoder()->videoFrames( stream ); mediaPlayerState->setLength( total_video_frames ); framerate = mediaPlayerState->curDecoder()->videoFrameRate( stream ); DecodeLoopDebug(( "Frame rate %g total %ld", framerate, total_video_frames )); if ( framerate <= 1.0 ) { DecodeLoopDebug(( "Crazy frame rate, resetting to sensible" )); framerate = 25; } if ( total_video_frames == 1 ) { DecodeLoopDebug(( "Cannot seek to frame" )); } } videoMutex->lock(); current_frame = 0; prev_frame = -1; videoMutex->unlock(); - connect( mediaPlayerState, SIGNAL( positionChanged( long ) ), this, SLOT( setPosition( long ) ) ); - connect( mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( setPaused( bool ) ) ); + connect( mediaPlayerState, SIGNAL( positionChanged(long) ), this, SLOT( setPosition(long) ) ); + connect( mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( setPaused(bool) ) ); //setBackgroundColor( black ); return TRUE; } void LoopControl::play() { #if defined(Q_WS_QWS) && !defined(QT_NO_COP) if ( !disabledSuspendScreenSaver ) { disabledSuspendScreenSaver = TRUE; // Stop the screen from blanking and power saving state QCopEnvelope("QPE/System", "setScreenSaverMode(int)" ) << ( hasVideoChannel ? QPEApplication::Disable : QPEApplication::DisableSuspend ); } #endif //begin = clock(); playtime.start(); startTimers(); //updateGeometry(); } diff --git a/core/multimedia/opieplayer/mediaplayer.cpp b/core/multimedia/opieplayer/mediaplayer.cpp index b77708c..6c743ec 100644 --- a/core/multimedia/opieplayer/mediaplayer.cpp +++ b/core/multimedia/opieplayer/mediaplayer.cpp @@ -21,50 +21,50 @@ #include <qmessagebox.h> #include "mediaplayer.h" #include "playlistwidget.h" #include "audiowidget.h" #include "loopcontrol.h" #include "audiodevice.h" #include "mediaplayerstate.h" extern AudioWidget *audioUI; extern PlayListWidget *playList; extern LoopControl *loopControl; extern MediaPlayerState *mediaPlayerState; MediaPlayer::MediaPlayer( QObject *parent, const char *name ) : QObject( parent, name ), volumeDirection( 0 ), currentFile( NULL ) { // QPEApplication::grabKeyboard(); connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); - connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( setPlaying( bool ) ) ); - connect( mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( pauseCheck( bool ) ) ); + connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) ); + connect( mediaPlayerState, SIGNAL( pausedToggled(bool) ), this, SLOT( pauseCheck(bool) ) ); connect( mediaPlayerState, SIGNAL( next() ), this, SLOT( next() ) ); connect( mediaPlayerState, SIGNAL( prev() ), this, SLOT( prev() ) ); connect( audioUI, SIGNAL( moreClicked() ), this, SLOT( startIncreasingVolume() ) ); connect( audioUI, SIGNAL( lessClicked() ), this, SLOT( startDecreasingVolume() ) ); connect( audioUI, SIGNAL( moreReleased() ), this, SLOT( stopChangingVolume() ) ); connect( audioUI, SIGNAL( lessReleased() ), this, SLOT( stopChangingVolume() ) ); } MediaPlayer::~MediaPlayer() { } void MediaPlayer::pauseCheck( bool b ) { // Only pause if playing if ( b && !mediaPlayerState->playing() ) mediaPlayerState->setPaused( FALSE ); } void MediaPlayer::play() { mediaPlayerState->setPlaying( FALSE ); diff --git a/core/multimedia/opieplayer/playlistwidget.cpp b/core/multimedia/opieplayer/playlistwidget.cpp index a359843..efb5df3 100644 --- a/core/multimedia/opieplayer/playlistwidget.cpp +++ b/core/multimedia/opieplayer/playlistwidget.cpp @@ -98,115 +98,115 @@ public: class MenuItem : public QAction { public: MenuItem( QWidget *parent, const QString& text, QObject *handler, const QString& slot ) : QAction( text, QString::null, 0, 0 ) { connect( this, SIGNAL( activated() ), handler, slot ); addTo( parent ); } }; PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) : QMainWindow( parent, name, fl ) { d = new PlayListWidgetPrivate; d->setDocumentUsed = FALSE; d->current = NULL; fromSetDocument = FALSE; insanityBool=FALSE; audioScan = FALSE; videoScan = FALSE; // menuTimer = new QTimer( this ,"menu timer"), // connect( menuTimer, SIGNAL( timeout() ), SLOT( addSelected() ) ); channel = new QCopChannel( "QPE/Application/opieplayer", this ); - connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), - this, SLOT( qcopReceive(const QCString&, const QByteArray&)) ); + connect( channel, SIGNAL(received(const QCString&,const QByteArray&)), + this, SLOT( qcopReceive(const QCString&,const QByteArray&)) ); setBackgroundMode( PaletteButton ); setCaption( tr("OpiePlayer") ); setIcon( Resource::loadPixmap( "opieplayer/MPEGPlayer" ) ); setToolBarsMovable( FALSE ); // Create Toolbar QToolBar *toolbar = new QToolBar( this ); toolbar->setHorizontalStretchable( TRUE ); // Create Menubar QMenuBar *menu = new QMenuBar( toolbar ); menu->setMargin( 0 ); QToolBar *bar = new QToolBar( this ); bar->setLabel( tr( "Play Operations" ) ); // d->tbPlayCurList = new ToolButton( bar, tr( "play List" ), "opieplayer/play_current_list", // this , SLOT( addSelected()) ); tbDeletePlaylist = new QPushButton( Resource::loadIconSet("trash"),"",bar,"close"); tbDeletePlaylist->setFlat(TRUE); tbDeletePlaylist->setFixedSize(20,20); d->tbAddToList = new ToolButton( bar, tr( "Add to Playlist" ), "opieplayer/add_to_playlist", this , SLOT(addSelected()) ); d->tbRemoveFromList = new ToolButton( bar, tr( "Remove from Playlist" ), "opieplayer/remove_from_playlist", this , SLOT(removeSelected()) ); -// d->tbPlay = new ToolButton( bar, tr( "Play" ), "opieplayer/play", /*this */mediaPlayerState , SLOT(setPlaying(bool) /* btnPlay() */), TRUE ); +// d->tbPlay = new ToolButton( bar, tr( "Play" ), "opieplayer/play", /*this */mediaPlayerState , SLOT(setPlaying(bool)/*btnPlay()*/), TRUE ); d->tbPlay = new ToolButton( bar, tr( "Play" ), "opieplayer/play", this , SLOT( btnPlay(bool) ), TRUE ); d->tbShuffle = new ToolButton( bar, tr( "Randomize" ),"opieplayer/shuffle", mediaPlayerState, SLOT(setShuffled(bool)), TRUE ); d->tbLoop = new ToolButton( bar, tr( "Loop" ),"opieplayer/loop", mediaPlayerState, SLOT(setLooping(bool)), TRUE ); tbDeletePlaylist->hide(); QPopupMenu *pmPlayList = new QPopupMenu( this ); menu->insertItem( tr( "File" ), pmPlayList ); new MenuItem( pmPlayList, tr( "Clear List" ), this, SLOT( clearList() ) ); new MenuItem( pmPlayList, tr( "Add all audio files" ), this, SLOT( addAllMusicToList() ) ); new MenuItem( pmPlayList, tr( "Add all video files" ), this, SLOT( addAllVideoToList() ) ); new MenuItem( pmPlayList, tr( "Add all files" ), this, SLOT( addAllToList() ) ); pmPlayList->insertSeparator(-1); new MenuItem( pmPlayList, tr( "Save PlayList" ), this, SLOT( saveList() ) ); new MenuItem( pmPlayList, tr( "Open File or URL" ), this,SLOT( openFile() ) ); pmPlayList->insertSeparator(-1); new MenuItem( pmPlayList, tr( "Rescan for Audio Files" ), this,SLOT( scanForAudio() ) ); new MenuItem( pmPlayList, tr( "Rescan for Video Files" ), this,SLOT( scanForVideo() ) ); QPopupMenu *pmView = new QPopupMenu( this ); menu->insertItem( tr( "View" ), pmView ); fullScreenButton = new QAction(tr("Full Screen"), Resource::loadPixmap("fullscreen"), QString::null, 0, this, 0); fullScreenButton->addTo(pmView); scaleButton = new QAction(tr("Scale"), Resource::loadPixmap("opieplayer/scale"), QString::null, 0, this, 0); scaleButton->addTo(pmView); skinsMenu = new QPopupMenu( this ); menu->insertItem( tr( "Skins" ), skinsMenu ); skinsMenu->isCheckable(); - connect( skinsMenu, SIGNAL( activated( int ) ) , - this, SLOT( skinsMenuActivated( int ) ) ); + connect( skinsMenu, SIGNAL( activated(int) ) , + this, SLOT( skinsMenuActivated(int) ) ); populateSkinsMenu(); QVBox *vbox5 = new QVBox( this ); vbox5->setBackgroundMode( PaletteButton ); QVBox *vbox4 = new QVBox( vbox5 ); vbox4->setBackgroundMode( PaletteButton ); QHBox *hbox6 = new QHBox( vbox4 ); hbox6->setBackgroundMode( PaletteButton ); tabWidget = new QTabWidget( hbox6, "tabWidget" ); // tabWidget->setTabShape(QTabWidget::Triangular); QWidget *pTab; pTab = new QWidget( tabWidget, "pTab" ); // playlistView = new QListView( pTab, "playlistview" ); // playlistView->setMinimumSize(236,260); tabWidget->insertTab( pTab,"Playlist"); // Add the playlist area QVBox *vbox3 = new QVBox( pTab ); vbox3->setBackgroundMode( PaletteButton ); d->playListFrame = vbox3; QGridLayout *layoutF = new QGridLayout( pTab ); layoutF->setSpacing( 2); @@ -275,80 +275,80 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) videoView->setColumnAlignment(2, Qt::AlignRight); videoView->setAllColumnsShowFocus(TRUE); videoView->setMultiSelection( TRUE ); videoView->setSelectionMode( QListView::Extended); QPEApplication::setStylusOperation( videoView->viewport(),QPEApplication::RightOnHold); tabWidget->insertTab( vTab,tr("Video")); QWidget *LTab; LTab = new QWidget( tabWidget, "LTab" ); playLists = new FileSelector( "playlist/plain;audio/x-mpegurl", LTab, "fileselector" , FALSE, FALSE); QGridLayout *layoutL = new QGridLayout( LTab ); layoutL->setSpacing( 2); layoutL->setMargin( 2); layoutL->addMultiCellWidget( playLists, 0, 0, 0, 1 ); tabWidget->insertTab(LTab,tr("Lists")); connect(tbDeletePlaylist,(SIGNAL(released())),SLOT( deletePlaylist())); connect( fullScreenButton, SIGNAL(activated()), mediaPlayerState, SLOT(toggleFullscreen()) ); connect( scaleButton, SIGNAL(activated()), mediaPlayerState, SLOT(toggleScaled()) ); - connect( d->selectedFiles, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), - this,SLOT( playlistViewPressed(int, QListViewItem *, const QPoint&, int)) ); + connect( d->selectedFiles, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int)), + this,SLOT( playlistViewPressed(int,QListViewItem*,const QPoint&,int)) ); ///audioView - connect( audioView, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), - this,SLOT( viewPressed(int, QListViewItem *, const QPoint&, int)) ); + connect( audioView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int)), + this,SLOT( viewPressed(int,QListViewItem*,const QPoint&,int)) ); - connect( audioView, SIGNAL( returnPressed( QListViewItem *)), - this,SLOT( playIt( QListViewItem *)) ); - connect( audioView, SIGNAL( doubleClicked( QListViewItem *) ), this, SLOT( addToSelection( QListViewItem *) ) ); + connect( audioView, SIGNAL( returnPressed(QListViewItem*)), + this,SLOT( playIt(QListViewItem*)) ); + connect( audioView, SIGNAL( doubleClicked(QListViewItem*) ), this, SLOT( addToSelection(QListViewItem*) ) ); //videoView - connect( videoView, SIGNAL( mouseButtonPressed( int, QListViewItem *, const QPoint&, int)), - this,SLOT( viewPressed(int, QListViewItem *, const QPoint&, int)) ); - connect( videoView, SIGNAL( returnPressed( QListViewItem *)), - this,SLOT( playIt( QListViewItem *)) ); - connect( videoView, SIGNAL( doubleClicked( QListViewItem *) ), this, SLOT( addToSelection( QListViewItem *) ) ); + connect( videoView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int)), + this,SLOT( viewPressed(int,QListViewItem*,const QPoint&,int)) ); + connect( videoView, SIGNAL( returnPressed(QListViewItem*)), + this,SLOT( playIt(QListViewItem*)) ); + connect( videoView, SIGNAL( doubleClicked(QListViewItem*) ), this, SLOT( addToSelection(QListViewItem*) ) ); //playlists - connect( playLists, SIGNAL( fileSelected( const DocLnk &) ), this, SLOT( loadList( const DocLnk & ) ) ); + connect( playLists, SIGNAL( fileSelected(const DocLnk&) ), this, SLOT( loadList(const DocLnk&) ) ); connect( tabWidget, SIGNAL (currentChanged(QWidget*)),this,SLOT(tabChanged(QWidget*))); - connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), d->tbPlay, SLOT( setOn( bool ) ) ); + connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), d->tbPlay, SLOT( setOn(bool) ) ); - connect( mediaPlayerState, SIGNAL( loopingToggled( bool ) ), d->tbLoop, SLOT( setOn( bool ) ) ); - connect( mediaPlayerState, SIGNAL( shuffledToggled( bool ) ), d->tbShuffle, SLOT( setOn( bool ) ) ); - connect( mediaPlayerState, SIGNAL( playlistToggled( bool ) ), this, SLOT( setPlaylist( bool ) ) ); + connect( mediaPlayerState, SIGNAL( loopingToggled(bool) ), d->tbLoop, SLOT( setOn(bool) ) ); + connect( mediaPlayerState, SIGNAL( shuffledToggled(bool) ), d->tbShuffle, SLOT( setOn(bool) ) ); + connect( mediaPlayerState, SIGNAL( playlistToggled(bool) ), this, SLOT( setPlaylist(bool) ) ); - connect( d->selectedFiles, SIGNAL( doubleClicked( QListViewItem *) ), this, SLOT( playIt( QListViewItem *) ) ); + connect( d->selectedFiles, SIGNAL( doubleClicked(QListViewItem*) ), this, SLOT( playIt(QListViewItem*) ) ); setCentralWidget( vbox5 ); Config cfg( "OpiePlayer" ); readConfig( cfg ); currentPlayList = cfg.readEntry("CurrentPlaylist","default"); loadList(DocLnk( currentPlayList)); setCaption(tr("OpiePlayer: ")+ fullBaseName ( QFileInfo(currentPlayList))); initializeStates(); } PlayListWidget::~PlayListWidget() { Config cfg( "OpiePlayer" ); writeConfig( cfg ); if ( d->current ) delete d->current; if(d) delete d; } @@ -919,49 +919,49 @@ void PlayListWidget::listDelete() { break; case 1: { file = audioView->currentItem()->text(0); QListIterator<DocLnk> Pdit( files.children() ); for ( ; Pdit.current(); ++Pdit ) { if( Pdit.current()->name() == file) { LnkProperties prop( Pdit.current() ); QPEApplication::execDialog( &prop ); } } populateAudioView(); } break; case 2: { // file = videoView->selectedItem()->text(0); // for ( int i = 0; i < noOfFiles; i++ ) { // QString entryName; // entryName.sprintf( "File%i", i + 1 ); // QString linkFile = cfg.readEntry( entryName ); // AppLnk lnk( AppLnk(linkFile)); // if( lnk.name() == file ) { // LnkProperties prop( &lnk); - // // connect(&prop, SIGNAL(select(const AppLnk *)), this, SLOT(externalSelected(const AppLnk *))); + // // connect(&prop, SIGNAL(select(const AppLnk*)), this, SLOT(externalSelected(const AppLnk*))); // prop.showMaximized(); // prop.exec(); // } // } } break; }; } void PlayListWidget::scanForAudio() { // qDebug("scan for audio"); files.detachChildren(); QListIterator<DocLnk> sdit( files.children() ); for ( ; sdit.current(); ++sdit ) { delete sdit.current(); } Global::findDocuments( &files, audioMimes); audioScan = true; } void PlayListWidget::scanForVideo() { // qDebug("scan for video"); vFiles.detachChildren(); QListIterator<DocLnk> sdit( vFiles.children() ); for ( ; sdit.current(); ++sdit ) { diff --git a/core/obex/obexhandler.cpp b/core/obex/obexhandler.cpp index 4034560..28f9b5b 100644 --- a/core/obex/obexhandler.cpp +++ b/core/obex/obexhandler.cpp @@ -1,43 +1,43 @@ #include <qpe/qcopenvelope_qws.h> #include <qpe/qpeapplication.h> #include "obexsend.h" #include "receiver.h" #include "obexhandler.h" using namespace OpieObex; /* TRANSLATOR OpieObex::ObexHandler */ ObexHandler::ObexHandler() { m_wasRec = false; m_sender = 0l; m_receiver = 0l; QCopChannel* chan = new QCopChannel("QPE/Obex"); - connect(chan, SIGNAL(received(const QCString&, const QByteArray& ) ), - this, SLOT(irdaMessage(const QCString&, const QByteArray& ) ) ); + connect(chan, SIGNAL(received(const QCString&,const QByteArray&) ), + this, SLOT(irdaMessage(const QCString&,const QByteArray&) ) ); } ObexHandler::~ObexHandler() { delete m_sender; delete m_receiver; } void ObexHandler::doSend(const QString& str, const QString& desc) { delete m_sender; m_sender = new SendWidget; m_sender->raise(); QPEApplication::showWidget( m_sender ); connect(m_sender, SIGNAL(done() ), this, SLOT(slotSent() ) ); m_sender->send( str, desc ); } void ObexHandler::doReceive(bool b) { if (m_receiver && b ) return; // we should enable receiver and it is on else if (!m_receiver && !b ) return; // we should disbale receiver and it is off else if (m_receiver && !b ) { delete m_receiver; m_receiver=0; }else if (!m_receiver && b ) { m_receiver= new Receiver; } } diff --git a/core/obex/obexsend.cpp b/core/obex/obexsend.cpp index 6b8d467..cd8d58e 100644 --- a/core/obex/obexsend.cpp +++ b/core/obex/obexsend.cpp @@ -5,82 +5,82 @@ #include <qpe/qcopenvelope_qws.h> #include "obex.h" #include "obexsend.h" using namespace OpieObex; /* TRANSLATOR OpieObex::SendWidget */ SendWidget::SendWidget( QWidget* parent, const char* name ) : QWidget( parent, name ) { initUI(); } SendWidget::~SendWidget() { } void SendWidget::initUI() { m_obex = new Obex(this, "obex"); connect(m_obex, SIGNAL(error(int) ), this, SLOT(slotIrError(int) ) ); connect(m_obex, SIGNAL(sent(bool) ), this, SLOT(slotIrSent(bool) ) ); - connect(m_obex, SIGNAL(currentTry(unsigned int ) ), - this, SLOT(slotIrTry(unsigned int ) ) ); + connect(m_obex, SIGNAL(currentTry(unsigned int) ), + this, SLOT(slotIrTry(unsigned int) ) ); QCopChannel* chan = new QCopChannel("QPE/IrDaAppletBack", this ); - connect(chan, SIGNAL(received(const QCString&, const QByteArray& ) ), - this, SLOT(dispatchIrda(const QCString&, const QByteArray& ) ) ); + connect(chan, SIGNAL(received(const QCString&,const QByteArray&) ), + this, SLOT(dispatchIrda(const QCString&,const QByteArray&) ) ); chan = new QCopChannel("QPE/BluetoothBack", this ); - connect(chan, SIGNAL(received(const QCString&, const QByteArray& ) ), - this, SLOT(dispatchBt(const QCString&, const QByteArray& ) ) ); + connect(chan, SIGNAL(received(const QCString&,const QByteArray&) ), + this, SLOT(dispatchBt(const QCString&,const QByteArray&) ) ); QVBoxLayout* lay = new QVBoxLayout(this); QHBox* nameBox = new QHBox(this); QLabel* name = new QLabel(nameBox); name->setText( tr("<qt><h1>Sending:</h1></qt>") ); name->setAlignment( AlignLeft | AlignTop ); m_lblFile = new QLabel(nameBox); lay->addWidget(nameBox, 0); QFrame* frame = new QFrame(this); frame->setFrameShape( QFrame::HLine ); frame->setFrameShadow( QFrame::Sunken ); lay->addWidget(frame, 10); QLabel* devices = new QLabel(this); devices->setText("<qt><b>Devices:</b></qt>"); devices->setAlignment( AlignLeft | AlignTop ); lay->addWidget( devices,10 ); m_devBox = new DeviceBox(this); lay->addWidget( m_devBox, 50 ); - connect(m_devBox, SIGNAL(selectedDevice(int, int ) ), - this, SLOT(slotSelectedDevice(int, int) ) ); + connect(m_devBox, SIGNAL(selectedDevice(int,int) ), + this, SLOT(slotSelectedDevice(int,int) ) ); QPushButton *but = new QPushButton(this); but->setText(tr("Done") ); connect(but, SIGNAL(clicked() ), this, SLOT(slotDone() ) ); lay->addWidget( but ); m_lay = lay; // QT does not like if you add items to an layout which already exits.... // and was layouted invalidate() does not help too // so we use RichText.... } /* * in send we'll first set everything up * and then wait for a list of devices. */ void SendWidget::send( const QString& file, const QString& desc ) { m_file = file; m_irDa.clear(); m_start = 0; m_lblFile->setText(desc.isEmpty() ? file : desc ); diff --git a/core/obex/receiver.cpp b/core/obex/receiver.cpp index 7d9f7ec..ee2668b 100644 --- a/core/obex/receiver.cpp +++ b/core/obex/receiver.cpp @@ -3,50 +3,50 @@ #include <sys/mman.h> #include <stdlib.h> // int system #include <unistd.h> #include <fcntl.h> #include <qfileinfo.h> #include <qlabel.h> #include <qtextview.h> #include <qpushbutton.h> #include <qpe/applnk.h> #include <qpe/qpeapplication.h> #include <qpe/qcopenvelope_qws.h> #include "obex.h" #include "receiver.h" using namespace OpieObex; /* TRANSLATOR OpieObex::Receiver */ Receiver::Receiver() { m_obex = new Obex(this, "Receiver"); - connect(m_obex, SIGNAL(receivedFile(const QString& ) ), - this, SLOT(slotReceived(const QString& ) ) ); + connect(m_obex, SIGNAL(receivedFile(const QString&) ), + this, SLOT(slotReceived(const QString&) ) ); m_obex->receive(); } Receiver::~Receiver() { m_obex->setReceiveEnabled( false ); delete m_obex; } void Receiver::slotReceived( const QString& _file ) { QString file = _file; int check = checkFile(file); if ( check == AddressBook ) handleAddr( file ); else if ( check == Datebook ) handleDateTodo( file ); else handleOther( file ); } void Receiver::handleAddr( const QString& str ) { QCopEnvelope e("QPE/Application/addressbook", "setDocument(QString)" ); e << str; } /* we can not say for sure if it's a VEevent ot VTodo */ void Receiver::handleDateTodo( const QString& str ) { QCopEnvelope e0("QPE/Application/todolist", "setDocument(QString)"); e0 << str; diff --git a/core/opie-login/loginwindowimpl.cpp b/core/opie-login/loginwindowimpl.cpp index 3037ba3..e1b9360 100644 --- a/core/opie-login/loginwindowimpl.cpp +++ b/core/opie-login/loginwindowimpl.cpp @@ -36,69 +36,69 @@ #if QT_VERSION < 300 #include <qgfx_qws.h> #endif #include <qwindowsystem_qws.h> #include <qpe/resource.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/config.h> #include <opie/odevice.h> #include <stdio.h> #include <stdlib.h> #include "loginwindowimpl.h" #include "loginapplication.h" #include "inputmethods.h" using namespace Opie; LoginWindowImpl::LoginWindowImpl ( ) : LoginWindow ( 0, "LOGIN-WINDOW", WStyle_Customize | WStyle_NoBorder | WDestructiveClose ) { QPopupMenu *pop = new QPopupMenu ( this ); - pop-> insertItem ( tr( "Restart" ), this, SLOT( restart ( ))); - pop-> insertItem ( tr( "Quit" ), this, SLOT( quit ( ))); + pop-> insertItem ( tr( "Restart" ), this, SLOT( restart())); + pop-> insertItem ( tr( "Quit" ), this, SLOT( quit())); m_menu-> setPopup ( pop ); QCopChannel *channel = new QCopChannel ( "QPE/TaskBar", this ); - connect ( channel, SIGNAL( received ( const QCString &, const QByteArray & )), this, SLOT( receive ( const QCString &, const QByteArray & ))); + connect ( channel, SIGNAL( received(const QCString&,const QByteArray&)), this, SLOT( receive(const QCString&,const QByteArray&))); QHBoxLayout *lay = new QHBoxLayout ( m_taskbar, 4, 4 ); m_input = new InputMethods ( m_taskbar ); - connect ( m_input, SIGNAL( inputToggled ( bool )), this, SLOT( calcMaxWindowRect ( ))); + connect ( m_input, SIGNAL( inputToggled(bool)), this, SLOT( calcMaxWindowRect())); lay-> addWidget ( m_input ); lay-> addStretch ( 10 ); setActiveWindow ( ); m_password-> setFocus ( ); m_user-> insertStringList ( lApp-> allUsers ( )); //there is no point in displaying the IM for a zaurus if (ODevice::inst ( )-> series ( ) != Model_Zaurus){ - QTimer::singleShot ( 0, this, SLOT( showIM ( ))); + QTimer::singleShot ( 0, this, SLOT( showIM())); } QString opiedir = ::getenv ( "OPIEDIR" ); QPixmap bgpix ( opiedir + "/pics/launcher/opie-background.jpg" ); if ( !bgpix. isNull ( )) { setBackgroundPixmap ( bgpix ); m_caption-> setBackgroundPixmap ( bgpix); TextLabel1-> setBackgroundPixmap ( bgpix); TextLabel2-> setBackgroundPixmap ( bgpix); } m_caption-> setText ( tr("<center>Welcome to OPIE %1</center><center>& %2 %3</center>"). arg(QPE_VERSION). arg ( ODevice::inst ( )-> systemString ( )). arg ( ODevice::inst ( )-> systemVersionString ( ))); Config cfg ( "opie-login" ); cfg. setGroup ( "General" ); QString last = cfg. readEntry ( "LastLogin" ); if ( !last. isEmpty ( )) m_user-> setEditText ( last ); calcMaxWindowRect ( ); } diff --git a/core/opie-login/main.cpp b/core/opie-login/main.cpp index 7d5792e..8d0976f 100644 --- a/core/opie-login/main.cpp +++ b/core/opie-login/main.cpp @@ -150,49 +150,49 @@ int main ( int argc, char **argv ) break; default : killedbysig = WTERMSIG( status ); break; } } if ( killedbysig ) { // qpe was killed by an uncaught signal qApp = 0; ::syslog ( LOG_ERR, "Opie was killed by a signal #%d", killedbysig ); QWSServer::setDesktopBackground ( QImage ( )); QApplication *app = new QApplication ( argc, argv, QApplication::GuiServer ); app-> setFont ( QFont ( "Helvetica", 10 )); app-> setStyle ( new QPEStyle ( )); const char *sig = ::strsignal ( killedbysig ); QLabel *l = new QLabel ( 0, "sig", Qt::WStyle_Customize | Qt::WStyle_NoBorder | Qt::WStyle_Tool ); l-> setText ( LoginWindowImpl::tr( "Opie was terminated\nby an uncaught signal\n(%1)\n" ). arg ( sig )); l-> setAlignment ( Qt::AlignCenter ); l-> move ( 0, 0 ); l-> resize ( app-> desktop ( )-> width ( ), app-> desktop ( )-> height ( )); l-> show ( ); - QTimer::singleShot ( 3000, app, SLOT( quit ( ))); + QTimer::singleShot ( 3000, app, SLOT( quit())); app-> exec ( ); delete app; qApp = 0; } } else { if ( !autolog ) { QString confFile=QPEApplication::qpeDir() + "/etc/opie-login.conf"; Config cfg ( confFile, Config::File ); cfg. setGroup ( "General" ); QString user = cfg. readEntry ( "AutoLogin" ); if ( !user. isEmpty ( )) autolog = ::strdup ( user. latin1 ( )); } if ( autolog && !userExited ) { QWSServer::setDesktopBackground( QImage() ); ODevice::inst ( )-> setDisplayStatus ( true ); ODevice::inst ( )-> setSoftSuspend ( false ); LoginApplication *app = new LoginApplication ( argc, argv, ppid ); LoginApplication::setLoginAs ( autolog ); diff --git a/core/pim/addressbook/abtable.cpp b/core/pim/addressbook/abtable.cpp index f7bff58..29f4383 100644 --- a/core/pim/addressbook/abtable.cpp +++ b/core/pim/addressbook/abtable.cpp @@ -106,49 +106,49 @@ void AbPickItem::setContentFromEditor( QWidget *w ) } #endif /*! \class AbTable abtable.h \brief QTable based class for showing a list of entries */ AbTable::AbTable( const QValueList<int> order, QWidget *parent, const char *name ) : QTable( parent, name ), lastSortCol( -1 ), asc( TRUE ), intFields( order ), enablePainting( true ), columnVisible( true ), countNested( 0 ) { // qWarning("C'tor start"); setSelectionMode( NoSelection ); init(); setSorting( TRUE ); - connect( this, SIGNAL(clicked(int,int,int,const QPoint &)), + connect( this, SIGNAL(clicked(int,int,int,const QPoint&)), this, SLOT(itemClicked(int,int)) ); // contactList.clear(); // qWarning("C'tor end"); } AbTable::~AbTable() { } void AbTable::init() { // :SX showChar = '\0'; setNumRows( 0 ); setNumCols( 2 ); horizontalHeader()->setLabel( 0, tr( "Full Name" )); horizontalHeader()->setLabel( 1, tr( "Contact" )); setLeftMargin( 0 ); verticalHeader()->hide(); columnVisible = true; } void AbTable::setContacts( const OContactAccess::List& viewList ) diff --git a/core/pim/addressbook/abview.cpp b/core/pim/addressbook/abview.cpp index 670cdb0..8d61582 100644 --- a/core/pim/addressbook/abview.cpp +++ b/core/pim/addressbook/abview.cpp @@ -56,52 +56,52 @@ AbView::AbView ( QWidget* parent, const QValueList<int>& ordered ): m_contactdb = new OContactAccess ( "addressbook", 0l, 0l, false ); m_contactdb -> setReadAhead( 16 ); // Use ReadAhead-Cache if available mCat.load( categoryFileName() ); // Create Layout and put WidgetStack into it. QVBoxLayout *vb = new QVBoxLayout( this ); m_viewStack = new QWidgetStack( this ); vb->addWidget( m_viewStack ); // Creat TableView QVBox* tableBox = new QVBox( m_viewStack ); m_abTable = new AbTable( m_orderedFields, tableBox, "table" ); m_abTable->setCurrentCell( 0, 0 ); m_abTable->setFocus(); // Add TableView to WidgetStack and raise it m_viewStack -> addWidget( tableBox , TableView ); // Create CardView and add it to WidgetStack QVBox* cardBox = new QVBox( m_viewStack ); m_ablabel = new AbLabel( cardBox, "CardView"); m_viewStack -> addWidget( cardBox , CardView ); // Connect views to me - connect ( m_abTable, SIGNAL( signalSwitch( void ) ), - this, SLOT( slotSwitch( void ) ) ); - connect ( m_ablabel, SIGNAL( signalOkPressed( void ) ), - this, SLOT( slotSwitch( void ) ) ); + connect ( m_abTable, SIGNAL( signalSwitch(void) ), + this, SLOT( slotSwitch(void) ) ); + connect ( m_ablabel, SIGNAL( signalOkPressed(void) ), + this, SLOT( slotSwitch(void) ) ); load(); } AbView::~AbView() { m_contactdb -> save(); delete m_contactdb; if ( m_storedDB ){ m_storedDB -> save(); delete m_storedDB; } } void AbView::setView( Views view ) { qWarning("AbView::setView( Views view )"); m_curr_View = view; load(); } void AbView::addEntry( const OContact &newContact ) diff --git a/core/pim/addressbook/addressbook.cpp b/core/pim/addressbook/addressbook.cpp index 9cf55b3..8a5f9d5 100644 --- a/core/pim/addressbook/addressbook.cpp +++ b/core/pim/addressbook/addressbook.cpp @@ -114,71 +114,71 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name, actionNew = a; connect( a, SIGNAL( activated() ), this, SLOT( slotListNew() ) ); a->addTo( edit ); a->addTo( listTools ); a = new QAction( tr( "Edit" ), Resource::loadPixmap( "edit" ), QString::null, 0, this, 0 ); actionEdit = a; connect( a, SIGNAL( activated() ), this, SLOT( slotViewEdit() ) ); a->addTo( edit ); a->addTo( listTools ); a = new QAction( tr( "Delete" ), Resource::loadPixmap( "trash" ), QString::null, 0, this, 0 ); actionTrash = a; connect( a, SIGNAL( activated() ), this, SLOT( slotListDelete() ) ); a->addTo( edit ); a->addTo( listTools ); // make it possible to go directly to businesscard via qcop call //#if defined(Q_WS_QWS) // Why this ? (se) #if !defined(QT_NO_COP) QCopChannel *addressChannel = new QCopChannel("QPE/Addressbook" , this ); - connect (addressChannel, SIGNAL( received(const QCString &, const QByteArray &)), - this, SLOT ( appMessage(const QCString &, const QByteArray &) ) ); + connect (addressChannel, SIGNAL( received(const QCString&,const QByteArray&)), + this, SLOT ( appMessage(const QCString&,const QByteArray&) ) ); #endif // #endif a = new QAction( tr( "Find" ), Resource::loadPixmap( "mag" ), QString::null, 0, this, 0 ); actionFind = a; connect( a, SIGNAL(activated()), this, SLOT( slotFindOpen()) ); a->addTo( edit ); a->addTo( listTools ); // Much better search widget, taken from QTReader.. (se) searchBar = new OFloatBar( "Search", this, QMainWindow::Top, TRUE ); searchBar->setHorizontalStretchable( TRUE ); searchBar->hide(); searchEdit = new QLineEdit( searchBar, "searchEdit" ); // QFont f("unifont", 16 /*, QFont::Bold*/); // searchEdit->setFont( f ); searchBar->setStretchableWidget( searchEdit ); - connect( searchEdit, SIGNAL( returnPressed( ) ), - this, SLOT( slotFind( ) ) ); + connect( searchEdit, SIGNAL( returnPressed() ), + this, SLOT( slotFind() ) ); a = new QAction( tr( "Start Search" ), Resource::loadPixmap( "enter" ), QString::null, 0, this, 0 ); connect( a, SIGNAL( activated() ), this, SLOT( slotFind() ) ); a->addTo( searchBar ); a = new QAction( tr( "Close Find" ), Resource::loadPixmap( "close" ), QString::null, 0, this, 0 ); connect( a, SIGNAL( activated() ), this, SLOT( slotFindClose() ) ); a->addTo( searchBar ); a = new QAction( tr( "Write Mail To" ), Resource::loadPixmap( "addressbook/sendmail" ), QString::null, 0, this, 0 ); //a->setEnabled( FALSE ); we got support for it now :) zecke actionMail = a; connect( a, SIGNAL( activated() ), this, SLOT( writeMail() ) ); a->addTo( edit ); a->addTo( listTools ); if ( Ir::supported() ) { a = new QAction( tr ("Beam Entry" ), Resource::loadPixmap( "beam" ), QString::null, 0, this, 0 ); actionBeam = a; connect( a, SIGNAL( activated() ), this, SLOT( slotBeam() ) ); a->addTo( edit ); a->addTo( listTools ); @@ -205,78 +205,78 @@ AddressbookWindow::AddressbookWindow( QWidget *parent, const char *name, actionPersonal = a; connect( a, SIGNAL( activated() ), this, SLOT( slotPersonalView() ) ); a->addTo( edit ); #ifdef __DEBUG_RELEASE // Remove this function for public Release ! This is only // for debug purposes .. a = new QAction( tr( "Save all Data"), QString::null, 0, 0 ); connect( a, SIGNAL( activated() ), this , SLOT( slotSave() ) ); a->addTo( edit ); #endif a = new QAction( tr( "Config" ), Resource::loadPixmap( "SettingsIcon" ), QString::null, 0, this, 0 ); connect( a, SIGNAL( activated() ), this, SLOT( slotConfig() ) ); a->addTo( edit ); // Create Views listContainer = new QWidget( this ); QVBoxLayout *vb = new QVBoxLayout( listContainer ); m_abView = new AbView( listContainer, m_config.orderList() ); vb->addWidget( m_abView ); // abList->setHScrollBarMode( QScrollView::AlwaysOff ); - connect( m_abView, SIGNAL( signalViewSwitched ( int ) ), - this, SLOT( slotViewSwitched( int ) ) ); + connect( m_abView, SIGNAL( signalViewSwitched(int) ), + this, SLOT( slotViewSwitched(int) ) ); QObject::connect( m_abView, SIGNAL(signalNotFound()), this, SLOT(slotNotFound()) ); // m_abView->load(); // Already done by c'tor . // Letter Picker pLabel = new LetterPicker( listContainer ); connect(pLabel, SIGNAL(letterClicked(char)), this, SLOT(slotSetLetter(char))); connect(m_abView, SIGNAL( signalClearLetterPicker() ), pLabel, SLOT( clear() ) ); vb->addWidget( pLabel ); // All Categories into view-menu.. populateCategories(); // Fontsize defaultFont = new QFont( m_abView->font() ); slotSetFont(m_config.fontSize()); m_curFontSize = m_config.fontSize(); setCentralWidget(listContainer); // qDebug("adressbook contrsuction: t=%d", t.elapsed() ); connect( qApp, SIGNAL( flush() ), this, SLOT( flush() ) ); connect( qApp, SIGNAL( reload() ), this, SLOT( reload() ) ); - connect( qApp, SIGNAL( appMessage(const QCString &, const QByteArray &) ), - this, SLOT( appMessage(const QCString &, const QByteArray &) ) ); + connect( qApp, SIGNAL( appMessage(const QCString&,const QByteArray&) ), + this, SLOT( appMessage(const QCString&,const QByteArray&) ) ); isLoading = false; } void AddressbookWindow::slotConfig() { ConfigDlg* dlg = new ConfigDlg( this, "Config" ); dlg -> setConfig( m_config ); if ( QPEApplication::execDialog( dlg ) ) { qWarning ("Config Dialog accepted!"); m_config = dlg -> getConfig(); if ( m_curFontSize != m_config.fontSize() ){ qWarning("Font was changed!"); m_curFontSize = m_config.fontSize(); emit slotSetFont( m_curFontSize ); } m_abView -> setListOrder( m_config.orderList() ); } delete dlg; } @@ -574,49 +574,49 @@ void AddressbookWindow::slotBeam() beamFilename ); OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true ); OContactAccess::List allList = access->allRecords(); OContactAccess::List::Iterator it = allList.begin(); // Just take first c = *it; delete access; } else { unlink( beamfile ); // delete if exists mkdir("/tmp/obex/", 0755); c = m_abView -> currentEntry(); OContactAccessBackend* vcard_backend = new OContactAccessBackend_VCard( QString::null, beamfile ); OContactAccess* access = new OContactAccess ( "addressbook", QString::null , vcard_backend, true ); access->add( c ); access->save(); delete access; beamFilename = beamfile; } qWarning("Beaming: %s", beamFilename.latin1() ); Ir *ir = new Ir( this ); - connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); + connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) ); QString description = c.fullName(); ir->send( beamFilename, description, "text/x-vCard" ); } void AddressbookWindow::beamDone( Ir *ir ) { delete ir; unlink( beamfile ); } static void parseName( const QString& name, QString *first, QString *middle, QString * last ) { int comma = name.find ( "," ); QString rest; if ( comma > 0 ) { *last = name.left( comma ); comma++; while ( comma < int(name.length()) && name[comma] == ' ' ) comma++; rest = name.mid( comma ); @@ -652,49 +652,49 @@ void AddressbookWindow::appMessage(const QCString &msg, const QByteArray &data) QString name, email; stream >> name >> email; OContact cnt; QString fn, mn, ln; parseName( name, &fn, &mn, &ln ); // qDebug( " %s - %s - %s", fn.latin1(), mn.latin1(), ln.latin1() ); cnt.setFirstName( fn ); cnt.setMiddleName( mn ); cnt.setLastName( ln ); cnt.insertEmails( email ); cnt.setDefaultEmail( email ); cnt.setFileAs(); m_abView -> addEntry( cnt ); // :SXm_abView()->init( cnt ); editEntry( EditEntry ); } else if ( msg == "beamBusinessCard()" ) { QString beamFilename = addressbookPersonalVCardName(); if ( !QFile::exists( beamFilename ) ) return; // can't beam a non-existent file Ir *ir = new Ir( this ); - connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); + connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) ); QString description = "mycard.vcf"; ir->send( beamFilename, description, "text/x-vCard" ); } else if ( msg == "show(int)" ) { raise(); QDataStream stream(data,IO_ReadOnly); int uid; stream >> uid; qWarning( "Showing uid: %d" , uid ); // Deactivate Personal View.. if ( actionPersonal->isOn() ){ actionPersonal->setOn( false ); slotPersonalView(); } // Reset category and show as card.. m_abView -> setShowByCategory( QString::null ); m_abView -> setCurrentUid( uid ); slotViewSwitched ( AbView::CardView ); needShow = true; diff --git a/core/pim/addressbook/contacteditor.cpp b/core/pim/addressbook/contacteditor.cpp index b1eb042..8acf570 100644 --- a/core/pim/addressbook/contacteditor.cpp +++ b/core/pim/addressbook/contacteditor.cpp @@ -514,74 +514,74 @@ void ContactEditor::init() { gl = new QGridLayout( container, 1, 2, 2, 4 ); int counter = 0; // Birthday QHBox* hBox = new QHBox( container ); l = new QLabel( tr("Birthday"), container ); gl->addWidget( l, counter, 0 ); QPopupMenu* m1 = new QPopupMenu( container ); birthdayPicker = new DateBookMonth( m1, 0, TRUE ); m1->insertItem( birthdayPicker ); birthdayButton= new QToolButton( hBox, "buttonStart" ); birthdayButton->setPopup( m1 ); birthdayButton->setPopupDelay(0); QPushButton* deleteButton = new QPushButton( QIconSet( Resource::loadPixmap( "trash" ) ), tr( "Delete" ), hBox, 0 ); gl->addWidget( hBox, counter , 1 ); - connect( birthdayPicker, SIGNAL( dateClicked( int, int, int ) ), - this, SLOT( slotBirthdayDateChanged( int, int, int ) ) ); + connect( birthdayPicker, SIGNAL( dateClicked(int,int,int) ), + this, SLOT( slotBirthdayDateChanged(int,int,int) ) ); connect( deleteButton, SIGNAL( clicked() ), this, SLOT( slotRemoveBirthday() ) ); ++counter; // Anniversary hBox = new QHBox( container ); l = new QLabel( tr("Anniversary"), container ); gl->addWidget( l, counter, 0 ); m1 = new QPopupMenu( container ); anniversaryPicker = new DateBookMonth( m1, 0, TRUE ); m1->insertItem( anniversaryPicker ); anniversaryButton= new QToolButton( hBox, "buttonStart" ); anniversaryButton->setPopup( m1 ); anniversaryButton->setPopupDelay(0); deleteButton = new QPushButton( QIconSet( Resource::loadPixmap( "trash" ) ), tr( "Delete" ), hBox, 0 ); gl->addWidget( hBox, counter , 1 ); - connect( anniversaryPicker, SIGNAL( dateClicked( int, int, int ) ), - this, SLOT( slotAnniversaryDateChanged( int, int, int ) ) ); + connect( anniversaryPicker, SIGNAL( dateClicked(int,int,int) ), + this, SLOT( slotAnniversaryDateChanged(int,int,int) ) ); connect( deleteButton, SIGNAL( clicked() ), this, SLOT( slotRemoveAnniversary() ) ); ++counter; // Gender l = new QLabel( tr("Gender"), container ); gl->addWidget( l, counter, 0 ); cmbGender = new QComboBox( container ); cmbGender->insertItem( "", 0 ); cmbGender->insertItem( tr("Male"), 1); cmbGender->insertItem( tr("Female"), 2); gl->addWidget( cmbGender, counter, 1 ); ++counter; // Create Labels and lineedit fields for every dynamic entry QStringList::ConstIterator it = slDynamicEntries.begin(); QMap<QString, int> mapStrToID = OContactFields::untrFieldsToId(); QMap<int, QString> mapIdToStr = OContactFields::idToTrFields(); for (i = counter; it != slDynamicEntries.end(); i++, ++it ) { if (((*it) == "Anniversary") || ((*it) == "Birthday")|| ((*it) == "Gender")) continue; @@ -623,74 +623,74 @@ void ContactEditor::init() { gl->addWidget( l, 2, 0 ); txtLastName = new QLineEdit( dlgName ); gl->addWidget( txtLastName, 2, 1 ); // l = new QLabel( tr("Suffix"), dlgName ); // gl->addWidget( l, 3, 0 ); // txtSuffix = new QLineEdit( dlgName ); // gl->addWidget( txtSuffix, 3, 1 ); space = new QSpacerItem(1,1, QSizePolicy::Maximum, QSizePolicy::MinimumExpanding ); gl->addItem( space, 4, 0 ); cmbChooserField1->insertStringList( trlChooserNames ); cmbChooserField2->insertStringList( trlChooserNames ); cmbChooserField3->insertStringList( trlChooserNames ); cmbChooserField4->insertStringList( trlChooserNames ); cmbChooserField1->setCurrentItem( 0 ); cmbChooserField2->setCurrentItem( 1 ); cmbChooserField3->setCurrentItem( 2 ); connect( btnFullName, SIGNAL(clicked()), this, SLOT(slotName()) ); - connect( txtFullName, SIGNAL(textChanged(const QString &)), - this, SLOT(slotFullNameChange(const QString &)) ); - connect( txtSuffix, SIGNAL(textChanged(const QString &)), - this, SLOT(slotSuffixChange(const QString &)) ); - connect( txtOrganization, SIGNAL(textChanged(const QString &)), - this, SLOT(slotOrganizationChange(const QString &)) ); - connect( txtChooserField1, SIGNAL(textChanged(const QString &)), - this, SLOT(slotChooser1Change(const QString &)) ); - connect( txtChooserField2, SIGNAL(textChanged(const QString &)), - this, SLOT(slotChooser2Change(const QString &)) ); - connect( txtChooserField3, SIGNAL(textChanged(const QString &)), - this, SLOT(slotChooser3Change(const QString &)) ); - connect( txtChooserField4, SIGNAL(textChanged(const QString &)), - this, SLOT(slotChooser4Change(const QString &)) ); - connect( txtAddress, SIGNAL(textChanged(const QString &)), - this, SLOT(slotAddressChange(const QString &)) ); - connect( txtCity, SIGNAL(textChanged(const QString &)), - this, SLOT(slotCityChange(const QString &)) ); - connect( txtState, SIGNAL(textChanged(const QString &)), - this, SLOT(slotStateChange(const QString &)) ); - connect( txtZip, SIGNAL(textChanged(const QString &)), - this, SLOT(slotZipChange(const QString &)) ); - connect( cmbCountry, SIGNAL(textChanged(const QString &)), - this, SLOT(slotCountryChange(const QString &)) ); - connect( cmbCountry, SIGNAL(activated(const QString &)), - this, SLOT(slotCountryChange(const QString &)) ); + connect( txtFullName, SIGNAL(textChanged(const QString&)), + this, SLOT(slotFullNameChange(const QString&)) ); + connect( txtSuffix, SIGNAL(textChanged(const QString&)), + this, SLOT(slotSuffixChange(const QString&)) ); + connect( txtOrganization, SIGNAL(textChanged(const QString&)), + this, SLOT(slotOrganizationChange(const QString&)) ); + connect( txtChooserField1, SIGNAL(textChanged(const QString&)), + this, SLOT(slotChooser1Change(const QString&)) ); + connect( txtChooserField2, SIGNAL(textChanged(const QString&)), + this, SLOT(slotChooser2Change(const QString&)) ); + connect( txtChooserField3, SIGNAL(textChanged(const QString&)), + this, SLOT(slotChooser3Change(const QString&)) ); + connect( txtChooserField4, SIGNAL(textChanged(const QString&)), + this, SLOT(slotChooser4Change(const QString&)) ); + connect( txtAddress, SIGNAL(textChanged(const QString&)), + this, SLOT(slotAddressChange(const QString&)) ); + connect( txtCity, SIGNAL(textChanged(const QString&)), + this, SLOT(slotCityChange(const QString&)) ); + connect( txtState, SIGNAL(textChanged(const QString&)), + this, SLOT(slotStateChange(const QString&)) ); + connect( txtZip, SIGNAL(textChanged(const QString&)), + this, SLOT(slotZipChange(const QString&)) ); + connect( cmbCountry, SIGNAL(textChanged(const QString&)), + this, SLOT(slotCountryChange(const QString&)) ); + connect( cmbCountry, SIGNAL(activated(const QString&)), + this, SLOT(slotCountryChange(const QString&)) ); connect( cmbChooserField1, SIGNAL(activated(int)), this, SLOT(slotCmbChooser1Change(int)) ); connect( cmbChooserField2, SIGNAL(activated(int)), this, SLOT(slotCmbChooser2Change(int)) ); connect( cmbChooserField3, SIGNAL(activated(int)), this, SLOT(slotCmbChooser3Change(int)) ); connect( cmbChooserField4, SIGNAL(activated(int)), this, SLOT(slotCmbChooser4Change(int)) ); connect( cmbAddress, SIGNAL(activated(int)), this, SLOT(slotAddressTypeChange(int)) ); new QPEDialogListener(this); setPersonalView ( m_personalView ); qWarning("init() END"); } void ContactEditor::defaultEmailChanged(int i){ qDebug("defaultEmailChanged"); // was sollte das ? (se) // int index = cmbChooserField1->currentItem(); // slChooserValues[index] = cmbDefaultEmail->text(i); diff --git a/core/pim/datebook/datebook.cpp b/core/pim/datebook/datebook.cpp index af26302..3934411 100644 --- a/core/pim/datebook/datebook.cpp +++ b/core/pim/datebook/datebook.cpp @@ -140,58 +140,58 @@ DateBook::DateBook( QWidget *parent, const char *, WFlags f ) a->addTo( sub_bar ); // a->addTo( view ); a->setToggleAction( TRUE ); monthAction = a; sub_bar->addSeparator(); a = new QAction( tr( "Find" ), Resource::loadPixmap( "mag" ), QString::null, 0, this, 0 ); connect( a, SIGNAL(activated()), this, SLOT(slotFind()) ); a->addTo( sub_bar ); a = new QAction( tr( "Edit..." ), Resource::loadPixmap("SettingsIcon"), QString::null, 0, this, 0 ); connect( a, SIGNAL( activated() ), this, SLOT( slotSettings() ) ); a->addTo( sub_bar ); if(defaultView==DAY) viewDay(); if(defaultView==WEEK) needEvilHack=true; // viewWeek(); if(defaultView==WEEKLST) viewWeekLst(); if(defaultView==MONTH) viewMonth(); connect( qApp, SIGNAL(clockChanged(bool)), this, SLOT(changeClock(bool)) ); connect( qApp, SIGNAL(weekChanged(bool)), this, SLOT(changeWeek(bool)) ); #if defined(Q_WS_QWS) && !defined(QT_NO_COP) - connect( qApp, SIGNAL(appMessage(const QCString&, const QByteArray&)), this, SLOT(appMessage(const QCString&, const QByteArray&)) ); + connect( qApp, SIGNAL(appMessage(const QCString&,const QByteArray&)), this, SLOT(appMessage(const QCString&,const QByteArray&)) ); #endif // listen on QPE/System #if defined(Q_WS_QWS) #if !defined(QT_NO_COP) QCopChannel *channel = new QCopChannel( "QPE/System", this ); - connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), this, SLOT(receive(const QCString&, const QByteArray&)) ); + connect( channel, SIGNAL(received(const QCString&,const QByteArray&)), this, SLOT(receive(const QCString&,const QByteArray&)) ); channel = new QCopChannel( "QPE/Datebook", this ); - connect( channel, SIGNAL(received(const QCString&, const QByteArray&)), this, SLOT(receive(const QCString&, const QByteArray&)) ); + connect( channel, SIGNAL(received(const QCString&,const QByteArray&)), this, SLOT(receive(const QCString&,const QByteArray&)) ); #endif #endif qDebug("done t=%d", t.elapsed() ); connect( qApp, SIGNAL( flush() ), this, SLOT( flush() ) ); connect( qApp, SIGNAL( reload()), this, SLOT( reload() ) ); /* * Here is a problem description: * When Weekview is the default view * a DateBookWeekView get's created * redraw() get's called. So what? * Remember that we're still in the c'tor * and no final layout has happened? Ok * now all Events get arranged. Their x * position get's determined by a QHeader * position. But the QHeader isn't layouted or * at the right position. redraw() is a slot * so we'll call it then via a singleShot * from view() */ if( needEvilHack ){ QTimer::singleShot( 500, this, SLOT(viewWeek()) ); } @@ -496,102 +496,102 @@ void DateBook::removeEvent( const Event &e ) void DateBook::addEvent( const Event &e ) { QDate d = e.start().date(); initDay(); dayView->setDate( d ); } void DateBook::showDay( int year, int month, int day ) { QDate d(year, month, day); view(DAY,d); } void DateBook::initDay() { if ( !dayView ) { dayView = new DateBookDay( ampm, onMonday, db, views, "day view" ); views->addWidget( dayView, DAY ); dayView->setJumpToCurTime( bJumpToCurTime ); dayView->setStartViewTime( startTime ); dayView->setRowStyle( rowStyle ); connect( this, SIGNAL( newEvent() ), dayView, SLOT( redraw() ) ); connect( dayView, SIGNAL( newEvent() ), this, SLOT( fileNew() ) ); - connect( dayView, SIGNAL( removeEvent( const Event & ) ), this, SLOT( removeEvent( const Event & ) ) ); - connect( dayView, SIGNAL( editEvent( const Event & ) ), this, SLOT( editEvent( const Event & ) ) ); - connect( dayView, SIGNAL( duplicateEvent( const Event & ) ), this, SLOT( duplicateEvent( const Event & ) ) ); - connect( dayView, SIGNAL( beamEvent( const Event & ) ), this, SLOT( beamEvent( const Event & ) ) ); - connect( dayView, SIGNAL(sigNewEvent(const QString &)), this, SLOT(slotNewEventFromKey(const QString &)) ); + connect( dayView, SIGNAL( removeEvent(const Event&) ), this, SLOT( removeEvent(const Event&) ) ); + connect( dayView, SIGNAL( editEvent(const Event&) ), this, SLOT( editEvent(const Event&) ) ); + connect( dayView, SIGNAL( duplicateEvent(const Event&) ), this, SLOT( duplicateEvent(const Event&) ) ); + connect( dayView, SIGNAL( beamEvent(const Event&) ), this, SLOT( beamEvent(const Event&) ) ); + connect( dayView, SIGNAL(sigNewEvent(const QString&)), this, SLOT(slotNewEventFromKey(const QString&)) ); } } void DateBook::initWeek() { if ( !weekView ) { weekView = new DateBookWeek( ampm, onMonday, db, views, "week view" ); weekView->setStartViewTime( startTime ); views->addWidget( weekView, WEEK ); - connect( weekView, SIGNAL( showDate( int, int, int ) ), this, SLOT( showDay( int, int, int ) ) ); + connect( weekView, SIGNAL( showDate(int,int,int) ), this, SLOT( showDay(int,int,int) ) ); connect( this, SIGNAL( newEvent() ), weekView, SLOT( redraw() ) ); } //But also get it right: the year that we display can be different //from the year of the current date. So, first find the year //number of the current week. int yearNumber, totWeeks; calcWeek( currentDate(), totWeeks, yearNumber, onMonday ); QDate d = QDate( yearNumber, 12, 31 ); calcWeek( d, totWeeks, yearNumber, onMonday ); while ( totWeeks == 1 ) { d = d.addDays( -1 ); calcWeek( d, totWeeks, yearNumber, onMonday ); } } void DateBook::initWeekLst() { if ( !weekLstView ) { weekLstView = new DateBookWeekLst( ampm, onMonday, db, views, "weeklst view" ); views->addWidget( weekLstView, WEEKLST ); //weekLstView->setStartViewTime( startTime ); - connect( weekLstView, SIGNAL( showDate( int, int, int ) ), this, SLOT( showDay( int, int, int ) ) ); - connect( weekLstView, SIGNAL( addEvent( const QDateTime &, const QDateTime &, const QString & , const QString &) ), - this, SLOT( slotNewEntry( const QDateTime &, const QDateTime &, const QString & , const QString &) ) ); + connect( weekLstView, SIGNAL( showDate(int,int,int) ), this, SLOT( showDay(int,int,int) ) ); + connect( weekLstView, SIGNAL( addEvent(const QDateTime&,const QDateTime&,const QString&, const QString&) ), + this, SLOT( slotNewEntry(const QDateTime&,const QDateTime&,const QString&, const QString&) ) ); connect( this, SIGNAL( newEvent() ), weekLstView, SLOT( redraw() ) ); - connect( weekLstView, SIGNAL( editEvent( const Event & ) ), this, SLOT( editEvent( const Event & ) ) ); + connect( weekLstView, SIGNAL( editEvent(const Event&) ), this, SLOT( editEvent(const Event&) ) ); } } void DateBook::initMonth() { if ( !monthView ) { monthView = new DateBookMonth( views, "month view", FALSE, db ); views->addWidget( monthView, MONTH ); - connect( monthView, SIGNAL( dateClicked( int, int, int ) ), this, SLOT( showDay( int, int, int ) ) ); + connect( monthView, SIGNAL( dateClicked(int,int,int) ), this, SLOT( showDay(int,int,int) ) ); connect( this, SIGNAL( newEvent() ), monthView, SLOT( redraw() ) ); qApp->processEvents(); } } void DateBook::loadSettings() { Config qpeconfig( "qpe" ); qpeconfig.setGroup("Time"); ampm = qpeconfig.readBoolEntry( "AMPM", TRUE ); onMonday = qpeconfig.readBoolEntry( "MONDAY" ); Config config("DateBook"); config.setGroup("Main"); startTime = config.readNumEntry("startviewtime", 8); aPreset = config.readBoolEntry("alarmpreset"); presetTime = config.readNumEntry("presettime"); bJumpToCurTime = config.readBoolEntry("jumptocurtime"); rowStyle = config.readNumEntry("rowstyle"); defaultView = config.readNumEntry("defaultview",DAY); weeklistviewconfig = config.readNumEntry("weeklistviewconfig",NORMAL); defaultLocation=config.readEntry("defaultLocation"); QString tmpString=config.readEntry("defaultCategories"); @@ -884,72 +884,70 @@ void DateBook::slotNewEntry(const QDateTime &start, const QDateTime &end, const emit newEvent(); break; } } void DateBook::setDocument( const QString &filename ) { if ( filename.find(".vcs") != int(filename.length()) - 4 ) return; QValueList<Event> tl = Event::readVCalendar( filename ); for( QValueList<Event>::Iterator it = tl.begin(); it != tl.end(); ++it ) { db->addEvent( *it ); } } static const char * beamfile = "/tmp/obex/event.vcs"; void DateBook::beamEvent( const Event &e ) { qDebug("trying to beamn"); unlink( beamfile ); // delete if exists mkdir("/tmp/obex/", 0755); Event::writeVCalendar( beamfile, e ); Ir *ir = new Ir( this ); - connect( ir, SIGNAL( done( Ir * ) ), this, SLOT( beamDone( Ir * ) ) ); + connect( ir, SIGNAL( done(Ir*) ), this, SLOT( beamDone(Ir*) ) ); QString description = e.description(); ir->send( beamfile, description, "text/x-vCalendar" ); } void DateBook::beamDone( Ir *ir ) { delete ir; unlink( beamfile ); } void DateBook::slotFind() { // move it to the day view... viewDay(); FindDialog frmFind( "Calendar", this ); // no tr needed frmFind.setUseDate( true ); frmFind.setDate( currentDate() ); QObject::connect( &frmFind, - SIGNAL(signalFindClicked(const QString&, const QDate&, - bool, bool, int)), + SIGNAL(signalFindClicked(const QString&,const QDate&,bool,bool,int)), this, - SLOT(slotDoFind(const QString&, const QDate&, - bool, bool, int)) ); + SLOT(slotDoFind(const QString&,const QDate&,bool,bool,int)) ); QObject::connect( this, SIGNAL(signalNotFound()), &frmFind, SLOT(slotNotFound()) ); QObject::connect( this, SIGNAL(signalWrapAround()), &frmFind, SLOT(slotWrapAround()) ); frmFind.move(0,0); frmFind.exec(); inSearch = false; } bool catComp( QArray<int> cats, int category ) { bool returnMe; int i, count; count = int(cats.count()); returnMe = false; if ( (category == -1 && count == 0) || category == -2 ) returnMe = true; else { diff --git a/core/pim/datebook/datebookday.cpp b/core/pim/datebook/datebookday.cpp index 751a1da..ca63dc5 100644 --- a/core/pim/datebook/datebookday.cpp +++ b/core/pim/datebook/datebookday.cpp @@ -187,83 +187,83 @@ void DateBookDayView::contentsMouseReleaseEvent( QMouseEvent* /* e */ ) eh=9; } quickLineEdit=new DateBookDayViewQuickLineEdit(QDateTime(currDate,QTime(sh,0,0,0)),QDateTime(currDate,QTime(eh,0,0,0)),this->viewport(),"quickedit"); quickLineEdit->setGeometry(0,0,this->columnWidth(0)-1,this->rowHeight(0)); this->moveChild(quickLineEdit,0,sh*this->rowHeight(0)); quickLineEdit->setFocus(); quickLineEdit->show(); } //=========================================================================== DateBookDayViewQuickLineEdit::DateBookDayViewQuickLineEdit(const QDateTime &start, const QDateTime &end,QWidget * parent, const char *name) : QLineEdit(parent,name) { active=1; quickEvent.setStart(start); quickEvent.setEnd(end); connect(this,SIGNAL(returnPressed()),this,SLOT(slotReturnPressed())); } void DateBookDayViewQuickLineEdit::slotReturnPressed() { if(active && (!this->text().isEmpty())) { // Fix to avoid having this event beeing added multiple times. quickEvent.setDescription(this->text()); - connect(this,SIGNAL(insertEvent(const Event &)),this->topLevelWidget(),SLOT(insertEvent(const Event &))); + connect(this,SIGNAL(insertEvent(const Event&)),this->topLevelWidget(),SLOT(insertEvent(const Event&))); emit(insertEvent(quickEvent)); active=0; } /* we need to return to this object.. */ QTimer::singleShot(500, this, SLOT(finallyCallClose()) ); // Close and also delete this widget } void DateBookDayViewQuickLineEdit::finallyCallClose() { close(true); // also deletes this widget... } void DateBookDayViewQuickLineEdit::focusOutEvent ( QFocusEvent* /* e */) { slotReturnPressed(); // Reuse code to add event and close this widget. } //=========================================================================== DateBookDay::DateBookDay( bool ampm, bool startOnMonday, DateBookDB *newDb, QWidget *parent, const char *name ) : QVBox( parent, name ), currDate( QDate::currentDate() ), db( newDb ), startTime( 0 ) { widgetList.setAutoDelete( true ); header = new DateBookDayHeader( startOnMonday, this, "day header" ); header->setDate( currDate.year(), currDate.month(), currDate.day() ); m_allDays = new DatebookdayAllday(newDb, this, "all day event list" ); m_allDays->hide(); view = new DateBookDayView( ampm, this, "day view" ); - connect( header, SIGNAL( dateChanged( int, int, int ) ), this, SLOT( dateChanged( int, int, int ) ) ); - connect( header, SIGNAL( dateChanged( int, int, int ) ), view, SLOT( slotDateChanged( int, int, int ) ) ); + connect( header, SIGNAL( dateChanged(int,int,int) ), this, SLOT( dateChanged(int,int,int) ) ); + connect( header, SIGNAL( dateChanged(int,int,int) ), view, SLOT( slotDateChanged(int,int,int) ) ); connect( view, SIGNAL( sigColWidthChanged() ), this, SLOT( slotColWidthChanged() ) ); connect( qApp, SIGNAL(weekChanged(bool)), this, SLOT(slotWeekChanged(bool)) ); - connect( view, SIGNAL(sigCapturedKey(const QString &)), this, SIGNAL(sigNewEvent(const QString&)) ); + connect( view, SIGNAL(sigCapturedKey(const QString&)), this, SIGNAL(sigNewEvent(const QString&)) ); QTimer *timer = new QTimer( this ); connect( timer, SIGNAL(timeout()), this, SLOT(updateView()) ); //connect timer for updating timeMarker & daywidgetcolors timer->start( 1000*60*5, FALSE ); //update every 5min selectedWidget = 0; timeMarker = new DateBookDayTimeMarker( this ); timeMarker->setTime( QTime::currentTime() ); rowStyle = -1; // initialize with bogus values jumpToCurTime = false; } void DateBookDay::setJumpToCurTime( bool bJump ) { jumpToCurTime = bJump; } void DateBookDay::setRowStyle( int style ) { if (rowStyle != style) view->setRowStyle( style ); rowStyle = style; } @@ -352,52 +352,52 @@ void DateBookDay::redraw() void DateBookDay::getEvents() { widgetList.clear(); /* clear the AllDay List */ m_allDays->hide(); // just in case m_allDays->removeAllEvents(); QValueList<EffectiveEvent> eventList = db->getEffectiveEvents( currDate, currDate ); QValueListIterator<EffectiveEvent> it; QObject* object = 0; for ( it = eventList.begin(); it != eventList.end(); ++it ) { EffectiveEvent ev=*it; if(!((ev.end().hour()==0) && (ev.end().minute()==0) && (ev.startDate()!=ev.date()))) { // Skip events ending at 00:00 starting at another day. if (ev.event().type() == Event::AllDay ) { object = m_allDays->addEvent( ev ); if (!object) continue; }else { DateBookDayWidget* w = new DateBookDayWidget( *it, this ); widgetList.append( w ); object = w; } - connect( object, SIGNAL( deleteMe( const Event & ) ), this, SIGNAL( removeEvent( const Event & ) ) ); - connect( object, SIGNAL( duplicateMe( const Event & ) ), this, SIGNAL( duplicateEvent( const Event & ) ) ); - connect( object, SIGNAL( editMe( const Event & ) ), this, SIGNAL( editEvent( const Event & ) ) ); - connect( object, SIGNAL( beamMe( const Event & ) ), this, SIGNAL( beamEvent( const Event & ) ) ); + connect( object, SIGNAL( deleteMe(const Event&) ), this, SIGNAL( removeEvent(const Event&) ) ); + connect( object, SIGNAL( duplicateMe(const Event&) ), this, SIGNAL( duplicateEvent(const Event&) ) ); + connect( object, SIGNAL( editMe(const Event&) ), this, SIGNAL( editEvent(const Event&) ) ); + connect( object, SIGNAL( beamMe(const Event&) ), this, SIGNAL( beamEvent(const Event&) ) ); } } } static int place( const DateBookDayWidget *item, bool *used, int maxn ) { int place = 0; int start = item->event().start().hour(); QTime e = item->event().end(); int end = e.hour(); if ( e.minute() < 5 ) end--; if ( end < start ) end = start; while ( place < maxn ) { bool free = TRUE; int s = start; while( s <= end ) { if ( used[10*s+place] ) { free = FALSE; break; } s++; diff --git a/core/pim/datebook/datebookdayallday.cpp b/core/pim/datebook/datebookdayallday.cpp index d43d31a..a0aefd3 100644 --- a/core/pim/datebook/datebookdayallday.cpp +++ b/core/pim/datebook/datebookdayallday.cpp @@ -39,49 +39,49 @@ DatebookdayAllday::DatebookdayAllday(DateBookDB* db, QWidget* parent, const cha datebookdayalldayLayout->setMargin( 0 ); lblDesc = new DatebookEventDesc(parent->parentWidget(),""); lblDesc->setBackgroundColor(Qt::yellow); lblDesc->hide(); subWidgets.setAutoDelete(true); } /* * Destroys the object and frees any allocated resources */ DatebookdayAllday::~DatebookdayAllday() { // no need to delete child widgets, Qt does it all for us } DatebookAlldayDisp* DatebookdayAllday::addEvent(const EffectiveEvent&ev) { DatebookAlldayDisp * lb; lb = new DatebookAlldayDisp(dateBook,ev,m_MainFrame,NULL); lb->show(); datebookdayalldayLayout->addWidget(lb); subWidgets.append(lb); - connect(lb,SIGNAL(displayMe(const Event &)),lblDesc,SLOT(disp_event(const Event&))); + connect(lb,SIGNAL(displayMe(const Event&)),lblDesc,SLOT(disp_event(const Event&))); ++item_count; return lb; } void DatebookdayAllday::removeAllEvents() { subWidgets.clear(); item_count = 0; } DatebookAlldayDisp::DatebookAlldayDisp(DateBookDB *db,const EffectiveEvent& ev, QWidget* parent,const char* name,WFlags f) : QLabel(parent,name,f),m_Ev(ev),dateBook(db) { QString strDesc = m_Ev.description(); strDesc = strDesc.replace(QRegExp("<"),"<"); setBackgroundColor(yellow); setText(strDesc); setFrameStyle(QFrame::Raised|QFrame::Panel); int s = QFontMetrics(font()).height()+4; setMaximumHeight( s ); setMinimumSize( QSize( 0, s ) ); diff --git a/core/pim/datebook/datebookdayheaderimpl.cpp b/core/pim/datebook/datebookdayheaderimpl.cpp index 213c843..51b78ca 100644 --- a/core/pim/datebook/datebookdayheaderimpl.cpp +++ b/core/pim/datebook/datebookdayheaderimpl.cpp @@ -75,50 +75,50 @@ void DateBookDayHeader::setupNames() cmdDay4->setText( DateBookDayHeaderBase::tr("Thursday").left(1) ); cmdDay5->setText( DateBookDayHeaderBase::tr("Friday").left(1) ); cmdDay6->setText( DateBookDayHeaderBase::tr("Saturday").left(1) ); cmdDay7->setText( DateBookDayHeaderBase::tr("Sunday").left(1) ); } else { cmdDay1->setText( DateBookDayHeaderBase::tr("Sunday").left(1) ); cmdDay2->setText( DateBookDayHeaderBase::tr("Monday").left(1) ); cmdDay3->setText( DateBookDayHeaderBase::tr("Tuesday").left(1) ); cmdDay4->setText( DateBookDayHeaderBase::tr("Wednesday").left(1) ); cmdDay5->setText( DateBookDayHeaderBase::tr("Thursday").left(1) ); cmdDay6->setText( DateBookDayHeaderBase::tr("Friday").left(1) ); cmdDay7->setText( DateBookDayHeaderBase::tr("Saturday").left(1) ); } } void DateBookDayHeader::pickDate() { static QPopupMenu *m1 = 0; static DateBookMonth *picker = 0; if ( !m1 ) { m1 = new QPopupMenu( this ); picker = new DateBookMonth( m1, 0, TRUE ); m1->insertItem( picker ); - connect( picker, SIGNAL( dateClicked( int, int, int ) ), - this, SLOT( setDate( int, int, int ) ) ); + connect( picker, SIGNAL( dateClicked(int,int,int) ), + this, SLOT( setDate(int,int,int) ) ); connect( m1, SIGNAL( aboutToHide() ), this, SLOT( gotHide() ) ); } picker->setDate( currDate.year(), currDate.month(), currDate.day() ); m1->popup(mapToGlobal(date->pos()+QPoint(0,date->height()))); picker->setFocus(); } void DateBookDayHeader::gotHide() { // we have to redo the button... date->setDown( false ); } /* * public slot */ void DateBookDayHeader::goBack() { currDate = currDate.addDays( -1 ); setDate( currDate.year(), currDate.month(), currDate.day() ); } /* * public slot diff --git a/core/pim/datebook/datebooksettings.cpp b/core/pim/datebook/datebooksettings.cpp index a6d04ba..cb4b73b 100644 --- a/core/pim/datebook/datebooksettings.cpp +++ b/core/pim/datebook/datebooksettings.cpp @@ -10,49 +10,49 @@ ** ** 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 "datebooksettings.h" #include <qpe/qpeapplication.h> #include <qspinbox.h> #include <qcheckbox.h> DateBookSettings::DateBookSettings( bool whichClock, QWidget *parent, const char *name, bool modal, WFlags fl ) : DateBookSettingsBase( parent, name, modal, fl ), ampm( whichClock ) { init(); - QObject::connect( qApp, SIGNAL( clockChanged( bool ) ), this, SLOT( slotChangeClock( bool ) ) ); + QObject::connect( qApp, SIGNAL( clockChanged(bool) ), this, SLOT( slotChangeClock(bool) ) ); QArray<int> categories; comboCategory->setCategories( categories, "Calendar", tr("Calendar") ); } DateBookSettings::~DateBookSettings() { } void DateBookSettings::setStartTime( int newStartViewTime ) { if ( ampm ) { if ( newStartViewTime >= 12 ) { newStartViewTime %= 12; if ( newStartViewTime == 0 ) newStartViewTime = 12; spinStart->setSuffix( tr(":00 PM") ); } else if ( newStartViewTime == 0 ) { newStartViewTime = 12; spinStart->setSuffix( tr(":00 AM") ); } oldtime = newStartViewTime; } spinStart->setValue( newStartViewTime ); diff --git a/core/pim/datebook/datebookweek.cpp b/core/pim/datebook/datebookweek.cpp index 933e191..7503751 100644 --- a/core/pim/datebook/datebookweek.cpp +++ b/core/pim/datebook/datebookweek.cpp @@ -341,52 +341,52 @@ void DateBookWeekView::setStartOfWeek( bool bStartOnMonday ) //------------------------------------------------------------------- DateBookWeek::DateBookWeek( bool ap, bool startOnMonday, DateBookDB *newDB, QWidget *parent, const char *name ) : QWidget( parent, name ), db( newDB ), startTime( 0 ), ampm( ap ), bStartOnMonday( startOnMonday ) { setFocusPolicy(StrongFocus); QVBoxLayout *vb = new QVBoxLayout( this ); header = new DateBookWeekHeader( bStartOnMonday, this ); view = new DateBookWeekView( ampm, startOnMonday, this ); vb->addWidget( header ); vb->addWidget( view ); lblDesc = new QLabel( this, "event label" ); lblDesc->setFrameStyle( QFrame::Plain | QFrame::Box ); lblDesc->setBackgroundColor( yellow ); lblDesc->hide(); tHide = new QTimer( this ); - connect( view, SIGNAL( showDay( int ) ), this, SLOT( showDay( int ) ) ); + connect( view, SIGNAL( showDay(int) ), this, SLOT( showDay(int) ) ); connect( view, SIGNAL(signalShowEvent(const EffectiveEvent&)), this, SLOT(slotShowEvent(const EffectiveEvent&)) ); connect( view, SIGNAL(signalHideEvent()), this, SLOT(slotHideEvent()) ); - connect( header, SIGNAL( dateChanged( QDate &) ), this, SLOT( dateChanged( QDate &) ) ); + connect( header, SIGNAL( dateChanged(QDate&) ), this, SLOT( dateChanged(QDate&) ) ); connect( tHide, SIGNAL( timeout() ), lblDesc, SLOT( hide() ) ); connect( qApp, SIGNAL(weekChanged(bool)), this, SLOT(slotWeekChanged(bool)) ); connect( qApp, SIGNAL(clockChanged(bool)), this, SLOT(slotClockChanged(bool))); setDate(QDate::currentDate()); } void DateBookWeek::keyPressEvent(QKeyEvent *e) { switch(e->key()) { case Key_Up: view->scrollBy(0, -20); break; case Key_Down: view->scrollBy(0, 20); break; case Key_Left: setDate(date().addDays(-7)); break; case Key_Right: setDate(date().addDays(7)); break; default: e->ignore(); } diff --git a/core/pim/datebook/datebookweekheaderimpl.cpp b/core/pim/datebook/datebookweekheaderimpl.cpp index eaa9730..c237b2d 100644 --- a/core/pim/datebook/datebookweekheaderimpl.cpp +++ b/core/pim/datebook/datebookweekheaderimpl.cpp @@ -35,49 +35,49 @@ DateBookWeekHeader::DateBookWeekHeader( bool startOnMonday, QWidget* parent, con setBackgroundMode( PaletteButton ); labelDate->setBackgroundMode( PaletteButton ); backmonth->setPixmap( Resource::loadPixmap("fastback") ); backweek->setPixmap( Resource::loadPixmap("back") ); forwardweek->setPixmap( Resource::loadPixmap("forward") ); forwardmonth->setPixmap( Resource::loadPixmap("fastforward") ); } /* * Destroys the object and frees any allocated resources */ DateBookWeekHeader::~DateBookWeekHeader() { // no need to delete child widgets, Qt does it all for us } void DateBookWeekHeader::pickDate() { static QPopupMenu *m1 = 0; static DateBookMonth *picker = 0; if ( !m1 ) { m1 = new QPopupMenu( this ); picker = new DateBookMonth( m1, 0, TRUE ); m1->insertItem( picker ); - connect( picker, SIGNAL( dateClicked( int, int, int ) ), this, SLOT( setDate( int, int, int ) ) ); + connect( picker, SIGNAL( dateClicked(int,int,int) ), this, SLOT( setDate(int,int,int) ) ); // connect( m1, SIGNAL( aboutToHide() ), this, SLOT( gotHide() ) ); } picker->setDate( date.year(), date.month(), date.day() ); m1->popup(mapToGlobal(labelDate->pos()+QPoint(0,labelDate->height()))); picker->setFocus(); } void DateBookWeekHeader::nextMonth() { qWarning("nextMonth() " ); setDate(date.addDays(28)); } void DateBookWeekHeader::prevMonth() { qWarning("prevMonth() " ); setDate(date.addDays(-28)); } void DateBookWeekHeader::nextWeek() { qWarning("nextWeek() " ); setDate(date.addDays(7)); } void DateBookWeekHeader::prevWeek() { diff --git a/core/pim/datebook/datebookweeklst.cpp b/core/pim/datebook/datebookweeklst.cpp index 42a1753..af40143 100644 --- a/core/pim/datebook/datebookweeklst.cpp +++ b/core/pim/datebook/datebookweeklst.cpp @@ -51,49 +51,49 @@ void DateBookWeekLstHeader::setDate(const QDate &d) { /* we already have the right day -7 would lead to the same week */ dayofweek = 0; date=date.addDays(-dayofweek); calcWeek(date,week,year,bStartOnMonday); QDate start=date; QDate stop=start.addDays(6); labelDate->setText( QString::number(start.day()) + "." + Calendar::nameOfMonth( start.month() ) + "-" + QString::number(stop.day()) + "." + Calendar::nameOfMonth( stop.month()) +" ("+ tr("w")+":"+QString::number( week ) +")"); date = d; // bugfix: 0001126 - date has to be the selected date, not monday! emit dateChanged(date); } void DateBookWeekLstHeader::pickDate() { static QPopupMenu *m1 = 0; static DateBookMonth *picker = 0; if ( !m1 ) { m1 = new QPopupMenu( this ); picker = new DateBookMonth( m1, 0, TRUE ); m1->insertItem( picker ); - connect( picker, SIGNAL( dateClicked( int, int, int ) ),this, SLOT( setDate( int, int, int ) ) ); + connect( picker, SIGNAL( dateClicked(int,int,int) ),this, SLOT( setDate(int,int,int) ) ); //connect( m1, SIGNAL( aboutToHide() ), //this, SLOT( gotHide() ) ); } picker->setDate( date.year(), date.month(), date.day() ); m1->popup(mapToGlobal(labelDate->pos()+QPoint(0,labelDate->height()))); picker->setFocus(); } void DateBookWeekLstHeader::setDate(int y, int m, int d) { setDate(QDate(y,m,d)); } void DateBookWeekLstHeader::nextWeek() { setDate(date.addDays(7)); } void DateBookWeekLstHeader::prevWeek() { setDate(date.addDays(-7)); } void DateBookWeekLstHeader::nextMonth() { setDate(date.addDays(28)); } void DateBookWeekLstHeader::prevMonth() { setDate(date.addDays(-28)); @@ -214,108 +214,108 @@ DateBookWeekLstView::DateBookWeekLstView(QValueList<EffectiveEvent> &ev, QVBoxLayout *layout = new QVBoxLayout( this ); qBubbleSort(ev); QValueListIterator<EffectiveEvent> it; it=ev.begin(); int dayOrder[7]; if (bStartOnMonday) { for (int d=0; d<7; d++) dayOrder[d]=d+1; } else { for (int d=0; d<7; d++) dayOrder[d]=d; dayOrder[0]=7; } // Calculate offset to first day of week. int dayoffset=d.dayOfWeek(); if(bStartOnMonday) dayoffset--; else if( dayoffset == 7 ) dayoffset = 0; for (int i=0; i<7; i++) { // Header DateBookWeekLstDayHdr *hdr=new DateBookWeekLstDayHdr(d.addDays(i-dayoffset), bStartOnMonday,this); connect(hdr, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int))); - connect(hdr, SIGNAL(addEvent(const QDateTime &, const QDateTime &, const QString &, const QString &)), - this, SIGNAL(addEvent(const QDateTime &, const QDateTime &, const QString &, const QString &))); + connect(hdr, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)), + this, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&))); layout->addWidget(hdr); // Events while ( (*it).date().dayOfWeek() == dayOrder[i] && it!=ev.end() ) { if(!(((*it).end().hour()==0) && ((*it).end().minute()==0) && ((*it).startDate()!=(*it).date()))) { // Skip events ending at 00:00 starting at another day. DateBookWeekLstEvent *l=new DateBookWeekLstEvent(*it,weeklistviewconfig,this); layout->addWidget(l); - connect (l, SIGNAL(editEvent(const Event &)), this, SIGNAL(editEvent(const Event &))); + connect (l, SIGNAL(editEvent(const Event&)), this, SIGNAL(editEvent(const Event&))); } it++; } layout->addItem(new QSpacerItem(1,1, QSizePolicy::Minimum, QSizePolicy::Expanding)); } } DateBookWeekLstView::~DateBookWeekLstView(){} void DateBookWeekLstView::keyPressEvent(QKeyEvent *e) {e->ignore();} DateBookWeekLstDblView::DateBookWeekLstDblView(QValueList<EffectiveEvent> &ev1, QValueList<EffectiveEvent> &ev2, QDate &d, bool onM, QWidget* parent, const char* name, WFlags fl) : QWidget( parent, name, fl ) { QHBoxLayout *layout = new QHBoxLayout( this ); DateBookWeekLstView *w=new DateBookWeekLstView(ev1,d,onM,this); layout->addWidget(w); - connect (w, SIGNAL(editEvent(const Event &)), this, SIGNAL(editEvent(const Event &))); + connect (w, SIGNAL(editEvent(const Event&)), this, SIGNAL(editEvent(const Event&))); connect (w, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int))); - connect (w, SIGNAL(addEvent(const QDateTime &, const QDateTime &, const QString &,const QString &)), - this, SIGNAL(addEvent(const QDateTime &, const QDateTime &, const QString &, const QString &))); + connect (w, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)), + this, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&))); w=new DateBookWeekLstView(ev2,d.addDays(7),onM,this); layout->addWidget(w); - connect (w, SIGNAL(editEvent(const Event &)), this, SIGNAL(editEvent(const Event &))); + connect (w, SIGNAL(editEvent(const Event&)), this, SIGNAL(editEvent(const Event&))); connect (w, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int))); - connect (w, SIGNAL(addEvent(const QDateTime &, const QDateTime &, const QString &, const QString &)), - this, SIGNAL(addEvent(const QDateTime &, const QDateTime &, const QString &, const QString &))); + connect (w, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)), + this, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&))); } DateBookWeekLst::DateBookWeekLst( bool ap, bool onM, DateBookDB *newDB, QWidget *parent, const char *name ) : QWidget( parent, name ), db( newDB ), startTime( 0 ), ampm( ap ), bStartOnMonday(onM) { setFocusPolicy(StrongFocus); layout = new QVBoxLayout( this ); layout->setMargin(0); header=new DateBookWeekLstHeader(onM, this); layout->addWidget( header ); - connect(header, SIGNAL(dateChanged(QDate &)), this, SLOT(dateChanged(QDate &))); + connect(header, SIGNAL(dateChanged(QDate&)), this, SLOT(dateChanged(QDate&))); connect(header, SIGNAL(setDbl(bool)), this, SLOT(setDbl(bool))); scroll=new QScrollView(this); scroll->setResizePolicy(QScrollView::AutoOneFit); layout->addWidget(scroll); view=NULL; Config config("DateBook"); config.setGroup("Main"); dbl=config.readBoolEntry("weeklst_dbl", false); header->dbl->setOn(dbl); } DateBookWeekLst::~DateBookWeekLst(){ Config config("DateBook"); config.setGroup("Main"); config.writeEntry("weeklst_dbl", dbl); } void DateBookWeekLst::setDate(const QDate &d) { bdate=d; header->setDate(d); } void DateBookWeekLst::setDbl(bool on) { @@ -337,52 +337,52 @@ QDate DateBookWeekLst::weekDate() const // Calculate offset to first day of week. int dayoffset=d.dayOfWeek(); if(bStartOnMonday) dayoffset--; else if( dayoffset == 7 ) dayoffset = 0; return d.addDays(-dayoffset); } void DateBookWeekLst::getEvents() { QDate start = weekDate(); //date(); QDate stop = start.addDays(6); QValueList<EffectiveEvent> el = db->getEffectiveEvents(start, stop); if (view) delete view; if (dbl) { QDate start2=start.addDays(7); stop=start2.addDays(6); QValueList<EffectiveEvent> el2 = db->getEffectiveEvents(start2, stop); view=new DateBookWeekLstDblView(el,el2,start,bStartOnMonday,scroll); } else { view=new DateBookWeekLstView(el,start,bStartOnMonday,scroll); } - connect (view, SIGNAL(editEvent(const Event &)), this, SIGNAL(editEvent(const Event &))); + connect (view, SIGNAL(editEvent(const Event&)), this, SIGNAL(editEvent(const Event&))); connect (view, SIGNAL(showDate(int,int,int)), this, SIGNAL(showDate(int,int,int))); - connect (view, SIGNAL(addEvent(const QDateTime &, const QDateTime &, const QString &, const QString &)), - this, SIGNAL(addEvent(const QDateTime &, const QDateTime &, const QString &, const QString &))); + connect (view, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&)), + this, SIGNAL(addEvent(const QDateTime&,const QDateTime&,const QString&,const QString&))); scroll->addChild(view); view->show(); scroll->updateScrollBars(); } void DateBookWeekLst::dateChanged(QDate &newdate) { bdate=newdate; getEvents(); } void DateBookWeekLst::keyPressEvent(QKeyEvent *e) { switch(e->key()) { case Key_Up: scroll->scrollBy(0, -20); break; case Key_Down: scroll->scrollBy(0, 20); break; case Key_Left: header->prevWeek(); break; case Key_Right: diff --git a/core/pim/datebook/dateentryimpl.cpp b/core/pim/datebook/dateentryimpl.cpp index 018bb5a..57bcd89 100644 --- a/core/pim/datebook/dateentryimpl.cpp +++ b/core/pim/datebook/dateentryimpl.cpp @@ -169,71 +169,71 @@ void DateEntry::updateTimeEdit(bool s, bool e) { } else { if ( ehour == 0 ) ehour = 12; strEnd.sprintf( "%d:%02d AM", ehour, endTime.minute() ); } } else { strStart.sprintf( "%02d:%02d", startTime.hour(), startTime.minute() ); strEnd.sprintf( "%02d:%02d", endTime.hour(), endTime.minute() ); } if (s) comboStart->setText(strStart); if (e) comboEnd->setText(strEnd); } void DateEntry::init() { comboDescription->setInsertionPolicy(QComboBox::AtCurrent); comboLocation->setInsertionPolicy(QComboBox::AtCurrent); initCombos(); QPopupMenu *m1 = new QPopupMenu( this ); startPicker = new DateBookMonth( m1, 0, TRUE ); m1->insertItem( startPicker ); buttonStart->setPopup( m1 ); - connect( startPicker, SIGNAL( dateClicked( int, int, int ) ), - this, SLOT( startDateChanged( int, int, int ) ) ); + connect( startPicker, SIGNAL( dateClicked(int,int,int) ), + this, SLOT( startDateChanged(int,int,int) ) ); //Let start button change both start and end dates - connect( startPicker, SIGNAL( dateClicked( int, int, int ) ), - this, SLOT( endDateChanged( int, int, int ) ) ); - connect( qApp, SIGNAL( clockChanged( bool ) ), - this, SLOT( slotChangeClock( bool ) ) ); + connect( startPicker, SIGNAL( dateClicked(int,int,int) ), + this, SLOT( endDateChanged(int,int,int) ) ); + connect( qApp, SIGNAL( clockChanged(bool) ), + this, SLOT( slotChangeClock(bool) ) ); connect( qApp, SIGNAL(weekChanged(bool)), this, SLOT(slotChangeStartOfWeek(bool)) ); connect( editNote, SIGNAL(clicked()), this, SLOT(slotEditNote()) ); QPopupMenu *m2 = new QPopupMenu( this ); endPicker = new DateBookMonth( m2, 0, TRUE ); m2->insertItem( endPicker ); buttonEnd->setPopup( m2 ); - connect( endPicker, SIGNAL( dateClicked( int, int, int ) ), - this, SLOT( endDateChanged( int, int, int ) ) ); + connect( endPicker, SIGNAL( dateClicked(int,int,int) ), + this, SLOT( endDateChanged(int,int,int) ) ); - connect(timePickerStart, SIGNAL( timeChanged(const QTime &) ), - this, SLOT( startTimePicked(const QTime &) )); + connect(timePickerStart, SIGNAL( timeChanged(const QTime&) ), + this, SLOT( startTimePicked(const QTime&) )); // install eventFilters comboEnd->installEventFilter( this ); comboStart->installEventFilter( this ); } /* * Destroys the object and frees any allocated resources */ DateEntry::~DateEntry() { // no need to delete child widgets, Qt does it all for us //cout << "Del: " << comboStart->currentText() << endl; } /* * public slot */ void DateEntry::slotEditNote() { QString s; s = "<B>"+ TimeString::longDateString( startDate ) + "</B>"; // s.sprintf("<B>%d/%d</B> ", startDate.day(), startDate.month()); NoteEntry noteDlg(s+comboDescription->currentText(), noteStr, this,0,TRUE); diff --git a/core/pim/datebook/repeatentry.cpp b/core/pim/datebook/repeatentry.cpp index 7cf36da..04c3cf3 100644 --- a/core/pim/datebook/repeatentry.cpp +++ b/core/pim/datebook/repeatentry.cpp @@ -338,50 +338,50 @@ void RepeatEntry::setupMonthly() void RepeatEntry::setupYearly() { hideExtras(); lblWeekVar->hide(); spinFreq->setValue( 1 ); lblFreq->setText( tr("year(s)") ); lblFreq->show(); lblFreq->show(); showRepeatStuff(); lblVar2->show(); QString strEvery = strYearTemplate.arg( start.monthName(start.month()) ).arg( numberPlacing(start.day()) ); lblRepeat->setText( strEvery ); setupRepeatLabel( 1 ); } void RepeatEntry::init() { QPopupMenu *m1 = new QPopupMenu( this ); repeatPicker = new DateBookMonth( m1, 0, TRUE ); m1->insertItem( repeatPicker ); cmdEnd->setPopup( m1 ); cmdEnd->setPopupDelay( 0 ); - QObject::connect( repeatPicker, SIGNAL(dateClicked(int, int, int)), - this, SLOT(endDateChanged(int, int, int)) ); + QObject::connect( repeatPicker, SIGNAL(dateClicked(int,int,int)), + this, SLOT(endDateChanged(int,int,int)) ); QObject::connect( qApp, SIGNAL(weekChanged(bool)), this, SLOT(slotChangeStartOfWeek(bool)) ); listRTypeButtons.setAutoDelete( TRUE ); listRTypeButtons.append( cmdNone ); listRTypeButtons.append( cmdDay ); listRTypeButtons.append( cmdWeek ); listRTypeButtons.append( cmdMonth ); listRTypeButtons.append( cmdYear ); listExtra.setAutoDelete( TRUE ); listExtra.append( cmdExtra1 ); listExtra.append( cmdExtra2 ); listExtra.append( cmdExtra3 ); listExtra.append( cmdExtra4 ); listExtra.append( cmdExtra5 ); listExtra.append( cmdExtra6 ); listExtra.append( cmdExtra7 ); } void RepeatEntry::slotNoEnd( bool unused ) { // if the item was toggled, then go ahead and set it to the maximum date if ( unused ) { diff --git a/core/pim/datebook2/mainwindow.cpp b/core/pim/datebook2/mainwindow.cpp index 7ff2204..3937796 100644 --- a/core/pim/datebook2/mainwindow.cpp +++ b/core/pim/datebook2/mainwindow.cpp @@ -13,54 +13,54 @@ #include <qpe/qpemessagebox.h> #include <qpe/resource.h> #include "editor.h" #include "show.h" #include "templatemanager.h" #include "bookmanager.h" #include "mainwindow.h" using namespace Datebook; MainWindow::MainWindow() : OPimMainWindow( "Datebook", 0, 0 ), m_descMan( "Descriptions" ), m_locMan( "Locations" ) { setIcon( Resource::loadPixmap( "datebook_icon" ) ); initUI(); initManagers(); initView(); initConfig(); QTimer::singleShot(0, this, SLOT(populate() ) ); QCopChannel* chan = new QCopChannel( "QPE/System", this ); - connect( chan, SIGNAL( received(const QCString&, const QByteArray& ) ), - this, SLOT( slotReceive( const QCString&, const QByteArray& ) ) ); + connect( chan, SIGNAL( received(const QCString&,const QByteArray&) ), + this, SLOT( slotReceive(const QCString&,const QByteArray&) ) ); chan = new QCopChannel( "QPE/Datebook", this ); - connect( chan, SIGNAL( received(const QCString&, const QByteArray& ) ), - this, SLOT( slotReceive( const QCString&, const QByteArray& ) ) ); + connect( chan, SIGNAL( received(const QCString&,const QByteArray&) ), + this, SLOT( slotReceive(const QCString&,const QByteArray&) ) ); } MainWindow::~MainWindow() { m_tempMan.save(); m_locMan.save(); m_descMan.save(); manager()->save(); delete m_manager; } void MainWindow::doSetDocument( const QString& str ) { } void MainWindow::flush() { manager()->save(); } void MainWindow::reload() { manager()->reload(); } int MainWindow::create() { return 0; } bool MainWindow::remove( int uid ) { manager()->remove( uid ); return true; @@ -129,50 +129,50 @@ void MainWindow::initUI() { a->addTo( m_toolBar ); connect(a, SIGNAL( activated() ), this, SLOT( slotFind() ) ); a = new QAction( tr("Configure"), QString::null, 0, 0 ); a->addTo( m_popSetting ); connect(a, SIGNAL( activated() ), this, SLOT( slotConfigure() ) ); a = new QAction( tr("Configure Locations"), QString::null, 0, 0 ); a->addTo( m_popSetting ); connect(a, SIGNAL( activated() ), this, SLOT( slotConfigureLocs() ) ); a = new QAction( tr("Configure Descriptions"), QString::null, 0, 0 ); a->addTo( m_popSetting ); connect(a, SIGNAL( activated() ), this, SLOT(slotConfigureDesc() ) ); a = new QAction( tr("Configure Templates"), QString::null, 0, 0 ); a->addTo( m_popSetting ); connect(a, SIGNAL( activated() ), this, SLOT(slotConfigureTemp() ) ); connect( qApp, SIGNAL(clockChanged(bool) ), this, SLOT(slotClockChanged(bool) ) ); connect( qApp, SIGNAL(weekChanged(bool) ), this, SLOT(slotWeekChanged(bool) ) ); - connect( qApp, SIGNAL(appMessage(const QCString&, const QByteArray& ) ), - this, SLOT(slotAppMessage( const QCString&, const QByteArray& ) ) ); + connect( qApp, SIGNAL(appMessage(const QCString&,const QByteArray&) ), + this, SLOT(slotAppMessage(const QCString&,const QByteArray&) ) ); } void MainWindow::initConfig() { } void MainWindow::initView() { } void MainWindow::initManagers() { m_manager = new BookManager; m_tempMan.load(); m_locMan.load(); m_descMan.load(); setTemplateMenu(); } void MainWindow::raiseCurrentView() { } /* * populate the view */ void MainWindow::populate() { if (!manager()->isLoaded() ) diff --git a/core/pim/osearch/mainwindow.cpp b/core/pim/osearch/mainwindow.cpp index bfe95b0..8b6a5df 100644 --- a/core/pim/osearch/mainwindow.cpp +++ b/core/pim/osearch/mainwindow.cpp @@ -180,49 +180,49 @@ void MainWindow::makeMenu() //SEARCH BAR LabelEnterText = new QLabel( searchBar, "Label" ); LabelEnterText->setAutoMask( FALSE ); LabelEnterText->setText( tr( "Search for: " ) ); addToolBar( searchBar, "Search", QMainWindow::Top, TRUE ); QLineEdit *searchEdit = new QLineEdit( searchBar, "seachEdit" ); QWhatsThis::add( searchEdit, tr("Enter your search terms here") ); searchEdit->setFocus(); searchBar->setHorizontalStretchable( TRUE ); searchBar->setStretchableWidget( searchEdit ); //Search button SearchAllAction->addTo( searchBar ); //image ripped of off opie-login/loginwindow.cpp QPixmap image1( ( const char** ) image1_data ); //Clear text ClearSearchText = new QToolButton( searchBar, "ClearSearchText"); ClearSearchText->setText( tr( "" ) ); ClearSearchText->setPixmap( image1 ); - connect( searchEdit, SIGNAL( textChanged( const QString & ) ),this, SLOT( setSearch( const QString & ) ) ); + connect( searchEdit, SIGNAL( textChanged(const QString&) ),this, SLOT( setSearch(const QString&) ) ); connect( ClearSearchText, SIGNAL( clicked() ), searchEdit, SLOT( clear() ) ); } MainWindow::~MainWindow() { Config cfg( "osearch", Config::User ); cfg.setGroup( "search_settings" ); cfg.writeEntry( "caseSensitiv", actionCaseSensitiv->isOn() ); cfg.writeEntry( "wildcards", actionWildcards->isOn() ); //cfg.writeEntry( "whole_words_only", actionWholeWordsOnly->isOn() ); } void MainWindow::setCurrent(QListViewItem *item) { if (!item) return; _currentItem = (OListViewItem*)item; // _currentItem = dynamic_cast<OListViewItem*>(item); if (_currentItem->rtti() == OListViewItem::Result){ ResultItem *res = (ResultItem*)item; // ResultItem *res = dynamic_cast<ResultItem*>(item); richEdit->setText( res->toRichText() ); QIntDict<QString> acts = res->actions(); QButton *button; diff --git a/core/pim/today/plugins/addressbook/addresspluginwidget.cpp b/core/pim/today/plugins/addressbook/addresspluginwidget.cpp index c8652f3..b0d456d 100644 --- a/core/pim/today/plugins/addressbook/addresspluginwidget.cpp +++ b/core/pim/today/plugins/addressbook/addresspluginwidget.cpp @@ -16,50 +16,50 @@ * * ***************************************************************************/ #include "addresspluginwidget.h" #include <qpe/config.h> #include <opie/ocontact.h> AddressBookPluginWidget::AddressBookPluginWidget( QWidget *parent, const char* name ) : QWidget( parent, name ) { addressLabel = 0l; m_contactdb = 0l; layoutTodo = 0l; // Hä ? Nonsense ! (se) if ( m_contactdb ) { delete m_contactdb; } m_contactdb = new OContactAccess("addressplugin"); - connect( m_contactdb, SIGNAL( signalChanged( const OContactAccess * ) ), - this, SLOT( refresh( const OContactAccess * ) ) ); + connect( m_contactdb, SIGNAL( signalChanged(const OContactAccess*) ), + this, SLOT( refresh(const OContactAccess*) ) ); readConfig(); getAddress(); } AddressBookPluginWidget::~AddressBookPluginWidget() { delete m_contactdb; } void AddressBookPluginWidget::refresh( const OContactAccess* ) { qWarning(" AddressBookPluginWidget::Database was changed externally ! "); m_contactdb->reload(); getAddress(); } void AddressBookPluginWidget::reinitialize() { readConfig(); getAddress(); } void AddressBookPluginWidget::readConfig() { Config cfg( "todayaddressplugin" ); diff --git a/core/pim/today/plugins/datebook/datebookpluginwidget.cpp b/core/pim/today/plugins/datebook/datebookpluginwidget.cpp index b6707df..0820802 100644 --- a/core/pim/today/plugins/datebook/datebookpluginwidget.cpp +++ b/core/pim/today/plugins/datebook/datebookpluginwidget.cpp @@ -78,63 +78,63 @@ void DatebookPluginWidget::refresh() { */ void DatebookPluginWidget::getDates() { if ( db ) { delete db; } db = new DateBookDB; QDate date = QDate::currentDate(); QValueList<EffectiveEvent> list = db->getEffectiveEvents( date, date.addDays( m_moreDays ) ); qBubbleSort( list ); int count = 0; if ( list.count() > 0 ) { for ( QValueList<EffectiveEvent>::ConstIterator it = list.begin(); it != list.end(); ++it ) { if ( count < m_max_lines_meet ) { if ( !m_onlyLater ) { count++; DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes, m_timeExtraLine ); m_eventsList.append( l ); l->show(); - QObject::connect ( l, SIGNAL( editEvent( const Event & ) ), l, SLOT( editEventSlot( const Event & ) ) ); + QObject::connect ( l, SIGNAL( editEvent(const Event&) ), l, SLOT( editEventSlot(const Event&) ) ); } else { if ( ( QDateTime::currentDateTime() <= (*it).event().end() ) // Show events which span over many days and are not elapsed. || ( ( (*it).event().start().date() != date ) && ( QDateTime::currentDateTime() <= (*it).event().end() ) ) // Show repeated event for today that is not elapsed. || ( ( (*it).event().repeatType() != Event::NoRepeat ) && ( ( date.dayOfWeek() == (*it).date().dayOfWeek() ) && ( QTime::currentTime() < (*it).event().start().time() ) ) ) // Show repeated event for next days. || ( ( (*it).event().repeatType() != Event::NoRepeat ) && ( date.dayOfWeek() != (*it).date().dayOfWeek() ) ) ) { count++; // show only later appointments DateBookEvent *l = new DateBookEvent( *it, this, m_show_location, m_show_notes, m_timeExtraLine ); m_eventsList.append( l ); l->show(); - QObject::connect ( l, SIGNAL( editEvent( const Event & ) ), l, SLOT( editEventSlot( const Event & ) ) ); + QObject::connect ( l, SIGNAL( editEvent(const Event&) ), l, SLOT( editEventSlot(const Event&) ) ); } } } } if ( m_onlyLater && count == 0 ) { QLabel* noMoreEvents = new QLabel( this ); m_eventsList.append( noMoreEvents ); noMoreEvents->show(); noMoreEvents->setText( QObject::tr( "No more appointments today" ) ); } } else { QLabel* noEvents = new QLabel( this ); m_eventsList.append( noEvents ); noEvents->show(); noEvents->setText( QObject::tr( "No appointments today" ) ); } } diff --git a/core/pim/today/plugins/mail/mailpluginwidget.cpp b/core/pim/today/plugins/mail/mailpluginwidget.cpp index 4194270..a8e4c41 100644 --- a/core/pim/today/plugins/mail/mailpluginwidget.cpp +++ b/core/pim/today/plugins/mail/mailpluginwidget.cpp @@ -19,50 +19,50 @@ #include <qpe/qcopenvelope_qws.h> MailPluginWidget::MailPluginWidget( QWidget *parent, const char* name) : QWidget(parent, name ) { m_mailLabel = 0l; m_layout = 0l; if ( m_mailLabel ) { delete m_mailLabel; } m_mailLabel = new OClickableLabel( this ); connect( m_mailLabel, SIGNAL( clicked() ), this, SLOT( startMail() ) ); if ( m_layout ) { delete m_layout; } m_layout = new QHBoxLayout( this ); m_layout->setAutoAdd( true ); #if defined(Q_WS_QWS) #if !defined(QT_NO_COP) QCopChannel *qCopChannel = new QCopChannel( "QPE/Pim" , this ); - connect ( qCopChannel, SIGNAL( received( const QCString &, const QByteArray &) ), - this, SLOT ( channelReceived( const QCString &, const QByteArray &) ) ); + connect ( qCopChannel, SIGNAL( received(const QCString&,const QByteArray&) ), + this, SLOT ( channelReceived(const QCString&,const QByteArray&) ) ); #endif #endif readConfig(); getInfo(); } void MailPluginWidget::channelReceived( const QCString &msg, const QByteArray & data ) { QDataStream stream( data, IO_ReadOnly ); if ( msg == "outgoingMails(int)" ) { stream >> m_outgoing; } else if ( msg == "newMails(int)" ) { stream >> m_newMails; } getInfo(); } MailPluginWidget::~MailPluginWidget() { delete m_mailLabel; delete m_layout; } void MailPluginWidget::readConfig() { diff --git a/core/pim/today/today.cpp b/core/pim/today/today.cpp index 72cdfd6..812f8b5 100644 --- a/core/pim/today/today.cpp +++ b/core/pim/today/today.cpp @@ -32,50 +32,50 @@ struct TodayPlugin { TodayPlugin() : library( 0 ), iface( 0 ), guiPart( 0 ), guiBox( 0 ) {} QLibrary *library; QInterfacePtr<TodayPluginInterface> iface; TodayPluginObject *guiPart; QWidget *guiBox; QString name; bool active; bool excludeRefresh; int pos; }; static QValueList<TodayPlugin> pluginList; static QMap<QString, TodayPlugin> tempList; Today::Today( QWidget* parent, const char* name, WFlags fl ) : TodayBase( parent, name, fl ) { QObject::connect( (QObject*)ConfigButton, SIGNAL( clicked() ), this, SLOT( startConfig() ) ); QObject::connect( (QObject*)OwnerField, SIGNAL( clicked() ), this, SLOT( editCard() ) ); #if defined(Q_WS_QWS) #if !defined(QT_NO_COP) QCopChannel *todayChannel = new QCopChannel( "QPE/Today" , this ); - connect ( todayChannel, SIGNAL( received( const QCString &, const QByteArray &) ), - this, SLOT ( channelReceived( const QCString &, const QByteArray &) ) ); + connect ( todayChannel, SIGNAL( received(const QCString&,const QByteArray&) ), + this, SLOT ( channelReceived(const QCString&,const QByteArray&) ) ); #endif #endif setOwnerField(); m_refreshTimer = new QTimer( this ); connect( m_refreshTimer, SIGNAL( timeout() ), this, SLOT( refresh() ) ); m_refreshTimer->start( 15000 ); m_big_box = 0L; layout = new QVBoxLayout( this ); layout->addWidget( Frame ); layout->addWidget( OwnerField ); m_sv = new QScrollView( this ); m_sv->setResizePolicy( QScrollView::AutoOneFit ); m_sv->setHScrollBarMode( QScrollView::AlwaysOff ); m_sv->setFrameShape( QFrame::NoFrame ); layout->addWidget( m_sv ); layout->setStretchFactor( m_sv,4 ); qApp->processEvents(); loadPlugins(); diff --git a/core/pim/today/todayconfig.cpp b/core/pim/today/todayconfig.cpp index 5c51515..a6f53e1 100644 --- a/core/pim/today/todayconfig.cpp +++ b/core/pim/today/todayconfig.cpp @@ -64,49 +64,49 @@ TodayConfig::TodayConfig( QWidget* parent, const char* name, bool modal ) tab2Layout->addWidget( l ); QHBox *hbox1 = new QHBox( tab_2 ); m_appletListView = new QListView( hbox1 ); m_appletListView->addColumn( "PluginList" ); m_appletListView->header()->hide(); m_appletListView->setSorting( -1 ); QWhatsThis::add( m_appletListView, tr( "Check a checkbox to activate/deactivate a plugin or use the arrow buttons on the right to change the appearance order" ) ); QVBox *vbox1 = new QVBox( hbox1 ); new ToolButton( vbox1, tr( "Move Up" ), "up", this , SLOT( moveSelectedUp() ) ); new ToolButton( vbox1, tr( "Move Down" ), "down", this , SLOT( moveSelectedDown() ) ); tab2Layout->addWidget( hbox1 ); TabWidget3->addTab( tab_2, "pass", tr( "active/order" ) ); // Misc tab tab_3 = new QWidget( TabWidget3, "tab_3" ); QVBoxLayout *tab3Layout = new QVBoxLayout( tab_3 ); m_guiMisc = new TodayConfigMiscBase( tab_3 ); tab3Layout->addWidget( m_guiMisc ); TabWidget3->addTab( tab_3, "SettingsIcon", tr( "Misc" ) ); m_applets_changed = false; - connect ( m_appletListView , SIGNAL( clicked ( QListViewItem * ) ), this, SLOT( appletChanged ( ) ) ); + connect ( m_appletListView , SIGNAL( clicked(QListViewItem*) ), this, SLOT( appletChanged() ) ); readConfig(); QPEApplication::showDialog( this ); } /** * Autostart, uses the new (opie only) autostart method in the launcher code. * If registered against that today ist started on each resume. */ void TodayConfig::setAutoStart() { Config cfg( "today" ); cfg.setGroup( "Autostart" ); if ( m_autoStart ) { QCopEnvelope e( "QPE/System", "autoStart(QString,QString,QString)" ); e << QString( "add" ); e << QString( "today" ); e << QString( "%1" ).arg( m_autoStartTimer ); } else { QCopEnvelope e( "QPE/System", "autoStart(QString,QString)" ); e << QString( "remove" ); e << QString( "today" ); } } diff --git a/core/pim/todo/mainwindow.cpp b/core/pim/todo/mainwindow.cpp index b68aad2..a244e58 100644 --- a/core/pim/todo/mainwindow.cpp +++ b/core/pim/todo/mainwindow.cpp @@ -168,49 +168,49 @@ void MainWindow::initActions() { connect(a, SIGNAL( activated() ), this, SLOT( slotFind() ) ); a->addTo( m_options ); m_findAction = a; m_options->insertSeparator(); #endif m_completedAction = new QAction( QString::null, QWidget::tr("Show completed tasks"), 0, this, 0, TRUE ); m_completedAction->addTo( m_options ); m_completedAction->setOn( showCompleted() ); connect(m_completedAction, SIGNAL( toggled(bool) ), this, SLOT(slotShowCompleted(bool) ) ); a = new QAction( QString::null, QWidget::tr("Show only over-due tasks"), 0, this, 0, TRUE ); a->addTo( m_options ); a->setOn( showOverDue() ); connect(a, SIGNAL(toggled(bool)), this, SLOT(slotShowDue(bool) ) ); m_showDeadLineAction = new QAction( QString::null, QWidget::tr("Show task deadlines"), 0, this, 0, TRUE ); m_showDeadLineAction->addTo( m_options ); m_showDeadLineAction->setOn( showDeadline() ); - connect(m_showDeadLineAction, SIGNAL(toggled(bool) ), this, SLOT( slotShowDeadLine( bool ) ) ); + connect(m_showDeadLineAction, SIGNAL(toggled(bool) ), this, SLOT( slotShowDeadLine(bool) ) ); m_showQuickTaskAction = new QAction( QString::null, QWidget::tr("Show quick task bar"), 0, this, 0, TRUE ); m_showQuickTaskAction->addTo( m_options ); m_showQuickTaskAction->setOn( showQuickTask() ); connect(m_showQuickTaskAction, SIGNAL( toggled(bool) ), this, SLOT(slotShowQuickTask(bool) ) ); m_options->insertSeparator(); m_bar->insertItem( QWidget::tr("Data") ,m_edit ); m_bar->insertItem( QWidget::tr("Category"), m_catMenu ); m_bar->insertItem( QWidget::tr("Options"), m_options ); m_curQuick = new QuickEditImpl( this, m_quicktask ); addToolBar( (QToolBar *)m_curQuick->widget(), QWidget::tr( "QuickEdit" ), QMainWindow::Top, TRUE ); m_curQuick->signal()->connect( this, SLOT(slotQuickEntered() ) ); } /* m_curCat from Config */ void MainWindow::initConfig() { Config config( "todo" ); config.setGroup( "View" ); m_completed = config.readBoolEntry( "ShowComplete", TRUE ); m_curCat = config.readEntry( "Category", QString::null ); diff --git a/core/pim/todo/otaskeditor.cpp b/core/pim/todo/otaskeditor.cpp index ab1ce94..d1e50f7 100644 --- a/core/pim/todo/otaskeditor.cpp +++ b/core/pim/todo/otaskeditor.cpp @@ -62,29 +62,29 @@ void OTaskEditor::init() { m_stat = new TaskEditorStatus( m_tab ); m_tab->addTab( m_stat, "todo/TodoList", tr("Status") ); m_alarm = new TaskEditorAlarms( m_tab ); m_tab->addTab( m_alarm, "todo/alarm", tr("Alarms") ); // m_remind = new TaskEditorAlarms( m_tab ); // m_tab->addTab( m_remind, "todo/reminder", tr("Reminders") ); // QLabel* lbl = new QLabel( m_tab ); // lbl->setText( tr("X-Ref") ); // m_tab->addTab( lbl, "todo/xref", tr("X-Ref") ); m_rec = new OPimRecurrenceWidget( true, QDate::currentDate(), this ); m_tab->addTab( m_rec, "repeat", tr("Recurrence") ); /* signal and slots */ connect(m_overView, SIGNAL(recurranceEnabled(bool) ), m_rec, SLOT(setEnabled(bool) ) ); /* connect due date changed to the recurrence tab */ connect(m_stat, SIGNAL(dueDateChanged(const QDate&) ), - m_rec, SLOT(setStartDate(const QDate& ) ) ); + m_rec, SLOT(setStartDate(const QDate&) ) ); m_tab->setCurrentTab( m_overView ); } diff --git a/core/pim/todo/tableview.cpp b/core/pim/todo/tableview.cpp index 5bbf880..0d298f4 100644 --- a/core/pim/todo/tableview.cpp +++ b/core/pim/todo/tableview.cpp @@ -95,56 +95,56 @@ TableView::TableView( MainWindow* window, QWidget* wid ) namestr = "todo/priority"; namestr.append( QString::number( i ) ); m_pic_priority[ i - 1 ] = Resource::loadPixmap( namestr ); } setUpdatesEnabled( false ); viewport()->setUpdatesEnabled( false ); m_enablePaint = false; setNumRows(0); setNumCols(4); horizontalHeader()->setLabel( 0, QWidget::tr("C.") ); horizontalHeader()->setLabel( 1, QWidget::tr("Priority") ); horizontalHeader()->setLabel( 2, QWidget::tr("Summary" ) ); horizontalHeader()->setLabel( 3, QWidget::tr("Deadline") ); setShowDeadline( todoWindow()->showDeadline() ); setSorting( TRUE ); setSelectionMode( NoSelection ); setLeftMargin( 0 ); verticalHeader()->hide(); - connect((QTable*)this, SIGNAL( clicked( int, int, int, const QPoint& ) ), - this, SLOT( slotClicked(int, int, int, const QPoint& ) ) ); - connect((QTable*)this, SIGNAL( pressed( int, int, int, const QPoint& ) ), - this, SLOT( slotPressed(int, int, int, const QPoint& ) ) ); - connect((QTable*)this, SIGNAL(valueChanged(int, int) ), - this, SLOT( slotValueChanged(int, int) ) ); - connect((QTable*)this, SIGNAL(currentChanged(int, int) ), - this, SLOT( slotCurrentChanged(int, int) ) ); + connect((QTable*)this, SIGNAL( clicked(int,int,int,const QPoint&) ), + this, SLOT( slotClicked(int,int,int,const QPoint&) ) ); + connect((QTable*)this, SIGNAL( pressed(int,int,int,const QPoint&) ), + this, SLOT( slotPressed(int,int,int,const QPoint&) ) ); + connect((QTable*)this, SIGNAL(valueChanged(int,int) ), + this, SLOT( slotValueChanged(int,int) ) ); + connect((QTable*)this, SIGNAL(currentChanged(int,int) ), + this, SLOT( slotCurrentChanged(int,int) ) ); m_menuTimer = new QTimer( this ); connect( m_menuTimer, SIGNAL(timeout()), this, SLOT(slotShowMenu()) ); /* now let's init the config */ initConfig(); m_enablePaint = true; setUpdatesEnabled( true ); viewport()->setUpdatesEnabled( true ); viewport()->update(); setSortOrder( 0 ); setAscending( TRUE ); m_first = true; } /* a new day has started * update the day */ void TableView::newDay() { clear(); diff --git a/core/pim/todo/taskeditoralarms.cpp b/core/pim/todo/taskeditoralarms.cpp index 930c94e..a512fb0 100644 --- a/core/pim/todo/taskeditoralarms.cpp +++ b/core/pim/todo/taskeditoralarms.cpp @@ -58,50 +58,50 @@ void AlarmItem::setAlarm( const OPimAlarm& dt ) { m_type = dt.sound(); setText( 0, TimeString::dateString( m_dt.date() ) ); setText( 1, TimeString::timeString( m_dt.time() ) ); setText( 2, m_type == 0 ? QObject::tr("silent") : QObject::tr("loud") ); } AlarmItem::~AlarmItem() { } OPimAlarm AlarmItem::alarm()const{ OPimAlarm al( m_type, m_dt ); return al; } TaskEditorAlarms::TaskEditorAlarms( QWidget* parent, int, const char* name, WFlags fl ) : QWidget( parent, name, fl ) { m_date = m_type = m_time = 0; QGridLayout *layout = new QGridLayout( this, 2, 2, 4, 4 ); lstAlarms = new QListView( this ); lstAlarms->addColumn( tr("Date") ); lstAlarms->addColumn( tr("Time") ); lstAlarms->addColumn( tr("Type") ); - connect( lstAlarms, SIGNAL(clicked ( QListViewItem *, const QPoint &, int ) ), - this, SLOT(inlineEdit(QListViewItem*, const QPoint&, int ) ) ); + connect( lstAlarms, SIGNAL(clicked(QListViewItem*,const QPoint&,int) ), + this, SLOT(inlineEdit(QListViewItem*,const QPoint&,int) ) ); layout->addMultiCellWidget( lstAlarms, 0, 0, 0, 2 ); QPushButton *btn = new QPushButton( Resource::loadPixmap( "new" ), tr( "New" ), this ); //QWhatsThis::add( btn, tr( "Click here to add a new transaction." ) ); connect( btn, SIGNAL( clicked() ), this, SLOT( slotNew() ) ); layout->addWidget( btn, 1, 0 ); /* use when we've reminders too */ #if 0 btn = new QPushButton( Resource::loadPixmap( "edit" ), tr( "Edit" ), this ); //QWhatsThis::add( btn, tr( "Select a transaction and then click here to edit it." ) ); connect( btn, SIGNAL( clicked() ), this, SLOT( slotEdit() ) ); layout->addWidget( btn, 1, 1 ); #endif btn = new QPushButton( Resource::loadPixmap( "trash" ), tr( "Delete" ), this ); //QWhatsThis::add( btn, tr( "Select a checkbook and then click here to delete it." ) ); connect( btn, SIGNAL( clicked() ), this, SLOT( slotDelete() ) ); layout->addWidget( btn, 1, 2 ); } TaskEditorAlarms::~TaskEditorAlarms(){ } diff --git a/core/pim/todo/taskeditorstatus.cpp b/core/pim/todo/taskeditorstatus.cpp index 367dd58..16351e0 100644 --- a/core/pim/todo/taskeditorstatus.cpp +++ b/core/pim/todo/taskeditorstatus.cpp @@ -79,82 +79,82 @@ TaskEditorStatus::TaskEditorStatus( QWidget* parent, const char* name, WFlags f QWhatsThis::add( label, tr( "Select progress made on this task here." ) ); cmbProgress = new QComboBox( FALSE, container ); cmbProgress->insertItem( tr( "0 %" ) ); cmbProgress->insertItem( tr( "20 %" ) ); cmbProgress->insertItem( tr( "40 %" ) ); cmbProgress->insertItem( tr( "60 %" ) ); cmbProgress->insertItem( tr( "80 %" ) ); cmbProgress->insertItem( tr( "100 %" ) ); layout->addMultiCellWidget( cmbProgress, 1, 1, 1, 2 ); QWhatsThis::add( cmbProgress, tr( "Select progress made on this task here." ) ); // Start date ckbStart = new QCheckBox( tr( "Start Date:" ), container ); layout->addWidget( ckbStart, 2, 0 ); QWhatsThis::add( ckbStart, tr( "Click here to set the date this task was started." ) ); connect( ckbStart, SIGNAL( clicked() ), this, SLOT( slotStartChecked() ) ); btnStart = new QPushButton( curDateStr, container ); btnStart->setEnabled( FALSE ); layout->addMultiCellWidget( btnStart, 2, 2, 1, 2 ); QWhatsThis::add( btnStart, tr( "Click here to set the date this task was started." ) ); QPopupMenu *popup = new QPopupMenu( this ); m_startBook = new DateBookMonth( popup, 0, TRUE ); popup->insertItem( m_startBook ); btnStart->setPopup( popup ); - connect( m_startBook, SIGNAL( dateClicked( int, int, int ) ), - this, SLOT( slotStartChanged( int, int, int ) ) ); + connect( m_startBook, SIGNAL( dateClicked(int,int,int) ), + this, SLOT( slotStartChanged(int,int,int) ) ); // Due date ckbDue = new QCheckBox( tr( "Due Date:" ), container ); layout->addWidget( ckbDue, 3, 0 ); QWhatsThis::add( ckbDue, tr( "Click here to set the date this task needs to be completed by." ) ); connect( ckbDue, SIGNAL( clicked() ), this, SLOT( slotDueChecked() ) ); btnDue = new QPushButton( curDateStr, container ); btnDue->setEnabled( FALSE ); layout->addMultiCellWidget( btnDue, 3, 3, 1, 2 ); QWhatsThis::add( btnDue, tr( "Click here to set the date this task needs to be completed by." ) ); popup = new QPopupMenu( this ); m_dueBook = new DateBookMonth( popup, 0, TRUE ); popup->insertItem( m_dueBook ); btnDue->setPopup( popup ); - connect( m_dueBook, SIGNAL( dateClicked( int, int, int ) ), - this, SLOT( slotDueChanged( int, int, int ) ) ); + connect( m_dueBook, SIGNAL( dateClicked(int,int,int) ), + this, SLOT( slotDueChanged(int,int,int) ) ); // Completed ckbComp = new QCheckBox( tr( "Completed:" ), container ); layout->addWidget( ckbComp, 4, 0 ); QWhatsThis::add( ckbComp, tr( "Click here to mark this task as completed." ) ); connect( ckbComp, SIGNAL( clicked() ), this, SLOT( slotCompChecked() ) ); btnComp = new QPushButton( curDateStr, container ); btnComp->setEnabled( FALSE ); layout->addMultiCellWidget( btnComp, 4, 4, 1, 2 ); QWhatsThis::add( btnComp, tr( "Click here to set the date this task was completed." ) ); popup = new QPopupMenu( this ); m_compBook = new DateBookMonth( popup, 0, TRUE ); popup->insertItem( m_compBook ); btnComp->setPopup( popup ); - connect( m_compBook, SIGNAL( dateClicked( int, int, int ) ), - this, SLOT( slotCompChanged( int, int, int ) ) ); + connect( m_compBook, SIGNAL( dateClicked(int,int,int) ), + this, SLOT( slotCompChanged(int,int,int) ) ); QSpacerItem *spacer = new QSpacerItem( 5, 5, QSizePolicy::Minimum, QSizePolicy::MinimumExpanding ); layout->addItem( spacer, 5, 0 ); // Maintainer mode #if 0 label = new QLabel( tr( "Maintainer Mode:" ), container ); layout->addWidget( label, 6, 0 ); QWhatsThis::add( label, tr( "Click here to set the maintainer's role." ) ); cmbMaintMode = new QComboBox( FALSE, container ); cmbMaintMode->insertItem( tr( "Nothing" ) ); cmbMaintMode->insertItem( tr( "Responsible" ) ); cmbMaintMode->insertItem( tr( "Done By" ) ); cmbMaintMode->insertItem( tr( "Coordinating" ) ); // layout->addMultiCellWidget( cmbMaintMode, 6, 6, 1, 2 ); QWhatsThis::add( cmbMaintMode, tr( "Click here to set the maintainer's role." ) ); // Maintainer label = new QLabel( tr( "Maintainer:" ), container ); layout->addWidget( label, 7, 0 ); QWhatsThis::add( label, tr( "This is the name of the current task maintainer." ) ); txtMaintainer = new QLabel( tr( "test" ), container ); txtMaintainer->setTextFormat( QLabel::RichText ); layout->addWidget( txtMaintainer, 7, 1 ); diff --git a/core/qws/qcopbridge.cpp b/core/qws/qcopbridge.cpp index c0c52e8..4fd0807 100644 --- a/core/qws/qcopbridge.cpp +++ b/core/qws/qcopbridge.cpp @@ -33,70 +33,70 @@ #define _XOPEN_SOURCE #include <pwd.h> #include <sys/types.h> #include <unistd.h> #if defined(_OS_LINUX_) #include <shadow.h> #endif //#define INSECURE const int block_size = 51200; QCopBridge::QCopBridge( Q_UINT16 port, QObject *parent , const char* name ) : QServerSocket( port, 1, parent, name ), desktopChannel( 0 ), cardChannel( 0 ) { if ( !ok() ) qWarning( "Failed to bind to port %d", port ); else { #ifndef QT_NO_COP desktopChannel = new QCopChannel( "QPE/Desktop", this ); - connect( desktopChannel, SIGNAL(received(const QCString &, const QByteArray &)), - this, SLOT(desktopMessage( const QCString &, const QByteArray &)) ); + connect( desktopChannel, SIGNAL(received(const QCString&,const QByteArray&)), + this, SLOT(desktopMessage(const QCString&,const QByteArray&)) ); cardChannel = new QCopChannel( "QPE/Card", this ); - connect( cardChannel, SIGNAL(received(const QCString &, const QByteArray &)), - this, SLOT(desktopMessage( const QCString &, const QByteArray &)) ); + connect( cardChannel, SIGNAL(received(const QCString&,const QByteArray&)), + this, SLOT(desktopMessage(const QCString&,const QByteArray&)) ); #endif } sendSync = FALSE; } QCopBridge::~QCopBridge() { #ifndef QT_NO_COP delete desktopChannel; #endif } void QCopBridge::newConnection( int socket ) { QCopBridgePI *pi = new QCopBridgePI( socket, this ); openConnections.append( pi ); - connect ( pi, SIGNAL( connectionClosed( QCopBridgePI *) ), this, SLOT( connectionClosed( QCopBridgePI *) ) ); + connect ( pi, SIGNAL( connectionClosed(QCopBridgePI*) ), this, SLOT( connectionClosed(QCopBridgePI*) ) ); #ifndef QT_NO_COP QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::DisableSuspend; #endif if ( sendSync ) { pi ->startSync(); sendSync = FALSE; } } void QCopBridge::connectionClosed( QCopBridgePI *pi ) { openConnections.remove( pi ); if ( openConnections.count() == 0 ) { #ifndef QT_NO_COP QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Enable; #endif } } void QCopBridge::closeOpenConnections() { QCopBridgePI *pi; for ( pi = openConnections.first(); pi != 0; pi = openConnections.next() ) diff --git a/core/qws/transferserver.cpp b/core/qws/transferserver.cpp index 30bf438..daf63ec 100644 --- a/core/qws/transferserver.cpp +++ b/core/qws/transferserver.cpp @@ -273,61 +273,61 @@ ServerPI::ServerPI( int socket, QObject *parent , const char* name ) peeraddress = peerAddress(); #ifndef INSECURE if ( !SyncAuthentication::isAuthorized(peeraddress) ) { state = Forbidden; startTimer( 0 ); } else #endif { connect( this, SIGNAL( readyRead() ), SLOT( read() ) ); connect( this, SIGNAL( connectionClosed() ), SLOT( connectionClosed() ) ); passiv = FALSE; for ( int i = 0; i < 4; i++ ) wait[i] = FALSE; send( "220 Qtopia " QPE_VERSION " FTP Server" ); state = Wait_USER; dtp = new ServerDTP( this ); connect( dtp, SIGNAL( completed() ), SLOT( dtpCompleted() ) ); connect( dtp, SIGNAL( failed() ), SLOT( dtpFailed() ) ); - connect( dtp, SIGNAL( error( int ) ), SLOT( dtpError( int ) ) ); + connect( dtp, SIGNAL( error(int) ), SLOT( dtpError(int) ) ); directory = QDir::currentDirPath(); static int p = 1024; while ( !serversocket || !serversocket->ok() ) { delete serversocket; serversocket = new ServerSocket( ++p, this ); } - connect( serversocket, SIGNAL( newIncomming( int ) ), - SLOT( newConnection( int ) ) ); + connect( serversocket, SIGNAL( newIncomming(int) ), + SLOT( newConnection(int) ) ); } } ServerPI::~ServerPI() { } void ServerPI::connectionClosed() { // qDebug( "Debug: Connection closed" ); delete this; } void ServerPI::send( const QString& msg ) { QTextStream os( this ); os << msg << endl; //qDebug( "Reply: %s", msg.latin1() ); } void ServerPI::read() { while ( canReadLine() ) process( readLine().stripWhiteSpace() ); @@ -1025,64 +1025,64 @@ QString ServerPI::absFilePath( const QString& file ) if ( file.isEmpty() ) return file; QString filepath( file ); if ( file[0] != "/" ) filepath = directory.path() + "/" + file; return filepath; } void ServerPI::timerEvent( QTimerEvent * ) { connectionClosed(); } ServerDTP::ServerDTP( QObject *parent, const char* name) : QSocket( parent, name ), mode( Idle ), createTargzProc( 0 ), retrieveTargzProc( 0 ), gzipProc( 0 ) { connect( this, SIGNAL( connected() ), SLOT( connected() ) ); connect( this, SIGNAL( connectionClosed() ), SLOT( connectionClosed() ) ); - connect( this, SIGNAL( bytesWritten( int ) ), SLOT( bytesWritten( int ) ) ); + connect( this, SIGNAL( bytesWritten(int) ), SLOT( bytesWritten(int) ) ); connect( this, SIGNAL( readyRead() ), SLOT( readyRead() ) ); gzipProc = new OProcess( this, "gzipProc" ); createTargzProc = new OProcess( QString("tar"), this, "createTargzProc"); createTargzProc->setWorkingDirectory( QDir::rootDirPath() ); - connect( createTargzProc, SIGNAL( processExited(OProcess *) ), SLOT( targzDone() ) ); + connect( createTargzProc, SIGNAL( processExited(OProcess*) ), SLOT( targzDone() ) ); QStringList args = "tar"; args += "-xv"; retrieveTargzProc = new OProcess( args, this, "retrieveTargzProc" ); retrieveTargzProc->setWorkingDirectory( QDir::rootDirPath() ); - connect( retrieveTargzProc, SIGNAL( processExited(OProcess *) ), + connect( retrieveTargzProc, SIGNAL( processExited(OProcess*) ), SIGNAL( completed() ) ); - connect( retrieveTargzProc, SIGNAL( processExited(OProcess *) ), + connect( retrieveTargzProc, SIGNAL( processExited(OProcess*) ), SLOT( extractTarDone() ) ); } ServerDTP::~ServerDTP() { buf.close(); file.close(); createTargzProc->kill(); } void ServerDTP::extractTarDone() { qDebug("extract done"); #ifndef QT_NO_COP QCopEnvelope e( "QPE/Desktop", "restoreDone(QString)" ); e << file.name(); #endif } void ServerDTP::connected() { // send file mode switch ( mode ) { @@ -1260,121 +1260,121 @@ void ServerDTP::readyRead() QByteArray s; s.resize( bytesAvailable() ); readBlock( s.data(), bytesAvailable() ); gzipProc->writeStdin( s.data(), s.size() ); qDebug("wrote %d bytes to ungzip ", s.size() ); } // retrieve buffer mode else if ( RetrieveBuffer == mode ) { QCString s; s.resize( bytesAvailable() ); readBlock( s.data(), bytesAvailable() ); buf.writeBlock( s.data(), s.size() ); } } void ServerDTP::writeTargzBlock(OProcess *, char *buffer, int buflen) { writeBlock( buffer, buflen ); qDebug("writeTargzBlock %d", buflen); if ( !createTargzProc->isRunning() ) { qDebug("tar and gzip done"); emit completed(); mode = Idle; - disconnect( gzipProc, SIGNAL( receivedStdout(OProcess *, char *, int ) ), - this, SLOT( writeTargzBlock(OProcess *, char *, int) ) ); + disconnect( gzipProc, SIGNAL( receivedStdout(OProcess*,char*,int) ), + this, SLOT( writeTargzBlock(OProcess*,char*,int) ) ); } } void ServerDTP::targzDone() { //qDebug("targz done"); - disconnect( createTargzProc, SIGNAL( receivedStdout(OProcess *, char *, int) ), - this, SLOT( gzipTarBlock(OProcess *, char *, int) ) ); + disconnect( createTargzProc, SIGNAL( receivedStdout(OProcess*,char*,int) ), + this, SLOT( gzipTarBlock(OProcess*,char*,int) ) ); gzipProc->closeStdin(); } void ServerDTP::gzipTarBlock(OProcess *, char *buffer, int buflen) { //qDebug("gzipTarBlock"); if ( !gzipProc->isRunning() ) { //qDebug("auto start gzip proc"); gzipProc->start(OProcess::NotifyOnExit, (OProcess::Communication) ( OProcess::Stdin | OProcess::Stdout )); } gzipProc->writeStdin( buffer, buflen ); } void ServerDTP::sendFile( const QString fn, const QHostAddress& host, Q_UINT16 port ) { file.setName( fn ); mode = SendFile; connectToHost( host.toString(), port ); } void ServerDTP::sendFile( const QString fn ) { file.setName( fn ); mode = SendFile; } void ServerDTP::sendGzipFile( const QString &fn, const QStringList &archiveTargets, const QHostAddress& host, Q_UINT16 port ) { sendGzipFile( fn, archiveTargets ); connectToHost( host.toString(), port ); } void ServerDTP::sendGzipFile( const QString &fn, const QStringList &archiveTargets ) { mode = SendGzipFile; file.setName( fn ); QStringList args = "tar"; args += "-cv"; args += archiveTargets; qDebug("sendGzipFile %s", args.join(" ").latin1() ); createTargzProc->clearArguments( ); *createTargzProc << args; connect( createTargzProc, - SIGNAL( receivedStdout(OProcess *, char *, int) ), SLOT( gzipTarBlock(OProcess *, char *, int) ) ); + SIGNAL( receivedStdout(OProcess*,char*,int) ), SLOT( gzipTarBlock(OProcess*,char*,int) ) ); gzipProc->clearArguments( ); *gzipProc << "gzip"; - connect( gzipProc, SIGNAL( receivedStdout(OProcess *, char *, int) ), - SLOT( writeTargzBlock(OProcess *, char *, int) ) ); + connect( gzipProc, SIGNAL( receivedStdout(OProcess*,char*,int) ), + SLOT( writeTargzBlock(OProcess*,char*,int) ) ); } void ServerDTP::gunzipDone() { qDebug("gunzipDone"); disconnect( gzipProc, SIGNAL( processExited() ), this, SLOT( gunzipDone() ) ); retrieveTargzProc->closeStdin(); - disconnect( gzipProc, SIGNAL( receivedStdout(OProcess *, char *, int) ), - this, SLOT( tarExtractBlock(OProcess *, char *, int) ) ); + disconnect( gzipProc, SIGNAL( receivedStdout(OProcess*,char*,int) ), + this, SLOT( tarExtractBlock(OProcess*,char*,int) ) ); } void ServerDTP::tarExtractBlock(OProcess *, char *buffer, int buflen) { qDebug("tarExtractBlock"); if ( !retrieveTargzProc->isRunning() ) { qDebug("auto start ungzip proc"); if ( !retrieveTargzProc->start(OProcess::NotifyOnExit, OProcess::Stdin) ) qWarning(" failed to start tar -x process"); } retrieveTargzProc->writeStdin( buffer, buflen ); } void ServerDTP::retrieveFile( const QString fn, const QHostAddress& host, Q_UINT16 port ) { file.setName( fn ); mode = RetrieveFile; connectToHost( host.toString(), port ); } void ServerDTP::retrieveFile( const QString fn ) { file.setName( fn ); diff --git a/core/settings/button/buttonsettings.cpp b/core/settings/button/buttonsettings.cpp index 141e0f6..d80e496 100644 --- a/core/settings/button/buttonsettings.cpp +++ b/core/settings/button/buttonsettings.cpp @@ -115,49 +115,49 @@ ButtonSettings::ButtonSettings ( QWidget *parent , const char *name, bool modal lay-> addWidget ( l, i, 3, AlignLeft | AlignBottom ); bi-> m_plabel = l; l = new QLabel ( this ); l-> setFixedSize ( 16, 16 ); lay-> addWidget ( l, i + 1, 2, AlignLeft | AlignTop ); bi-> m_hicon = l; l = new QLabel ( this ); l-> setAlignment ( AlignLeft | AlignVCenter | SingleLine ); lay-> addWidget ( l, i + 1, 3, AlignLeft | AlignTop ); bi-> m_hlabel = l; i += 2; m_infos. append ( bi ); } toplay-> addStretch ( 10 ); m_last_button = 0; m_lock = false; m_timer = new QTimer ( this ); - connect ( m_timer, SIGNAL( timeout ( )), this, SLOT( keyTimeout ( ))); + connect ( m_timer, SIGNAL( timeout()), this, SLOT( keyTimeout())); updateLabels ( ); QPEApplication::grabKeyboard ( ); } ButtonSettings::~ButtonSettings ( ) { QPEApplication::ungrabKeyboard ( ); } void ButtonSettings::updateLabels ( ) { for ( QListIterator <buttoninfo> it ( m_infos ); *it; ++it ) { qCopInfo cip = ButtonUtils::inst ( )-> messageToInfo ((*it)-> m_pmsg ); (*it)-> m_picon-> setPixmap ( cip. m_icon ); (*it)-> m_plabel-> setText ( cip. m_name ); qCopInfo cih = ButtonUtils::inst ( )-> messageToInfo ((*it)-> m_hmsg ); (*it)-> m_hicon-> setPixmap ( cih. m_icon ); (*it)-> m_hlabel-> setText ( cih. m_name ); } diff --git a/core/settings/button/remapdlg.cpp b/core/settings/button/remapdlg.cpp index 7dabe68..121173a 100644 --- a/core/settings/button/remapdlg.cpp +++ b/core/settings/button/remapdlg.cpp @@ -58,49 +58,49 @@ RemapDlg::RemapDlg ( const Opie::ODeviceButton *b, bool hold, QWidget *parent, c m_map_none = new NoSortItem ( w_list, 0, tr( "No mapping" )); m_map_preset = new NoSortItem ( w_list, 1, tr( "Default" ), m_msg_preset. channel ( ), m_msg_preset. message ( )); ((NoSortItem *) m_map_preset )-> setDefault ( true ); if (m_msg. channel ( ) == "ignore") { m_map_custom = new NoSortItem ( w_list, 2, tr( "Custom" ), m_msg_preset. channel ( ), m_msg_preset. message ( )); m_current = m_map_none; } else { m_map_custom = new NoSortItem ( w_list, 2, tr( "Custom" ), m_msg. channel ( ), m_msg. message ( )); m_current = m_map_custom; } QListViewItem *it = new NoSortItem ( w_list, 3, tr( "Actions" )); ButtonUtils::inst ( )-> insertActions ( it ); it-> setOpen ( true ); m_map_show = new NoSortItem ( w_list, 4, tr( "Show" )); w_list-> setCurrentItem ( m_current ); - QTimer::singleShot ( 0, this, SLOT( delayedInit ( ))); + QTimer::singleShot ( 0, this, SLOT( delayedInit())); } RemapDlg::~RemapDlg ( ) { } void RemapDlg::delayedInit ( ) { bool b = w_list-> viewport ( )-> isUpdatesEnabled ( ); w_list-> viewport ( )-> setUpdatesEnabled ( false ); ButtonUtils::inst ( )-> insertAppLnks ( m_map_show ); w_list-> viewport ( )-> setUpdatesEnabled ( b ); m_map_show-> repaint ( ); } void RemapDlg::itemChanged ( QListViewItem *it ) { bool enabled = false; OQCopMessage m; m_current = it; diff --git a/core/settings/citytime/citytime.cpp b/core/settings/citytime/citytime.cpp index e7f0c46..721285d 100644 --- a/core/settings/citytime/citytime.cpp +++ b/core/settings/citytime/citytime.cpp @@ -88,50 +88,50 @@ CityTime::CityTime( QWidget *parent, const char* name, cmdCity7->hide(); cmdCity8->hide(); cmdCity9->hide(); } else { listCities.append( cmdCity7 ); listCities.append( cmdCity8 ); listCities.append( cmdCity9 ); listTimes.append( lblCTime7 ); listTimes.append( lblCTime8 ); listTimes.append( lblCTime9 ); lblCTime4->hide(); lblCTime5->hide(); lblCTime6->hide(); cmdCity4->hide(); cmdCity5->hide(); cmdCity6->hide(); } selWidget = frmMap->selectionWidget( this ); selWidget->hide(); CityTimeBaseLayout->addWidget( selWidget ); bAdded = true; readInTimes(); changed = FALSE; - QObject::connect( qApp, SIGNAL( clockChanged( bool ) ), - this, SLOT( changeClock( bool ) ) ); + QObject::connect( qApp, SIGNAL( clockChanged(bool) ), + this, SLOT( changeClock(bool) ) ); // now start the timer so we can update the time quickly every second timerEvent( 0 ); } CityTime::~CityTime() { if ( changed ) { Config cfg("CityTime"); cfg.setGroup("TimeZones"); QListIterator<QToolButton> itCity( listCities ); int i; bool realTzWritten = FALSE; for ( i = 0, itCity.toFirst(); i < CITIES; i++, ++itCity ) { if ( !strCityTz[i].isNull() ) { cfg.writeEntry("Zone"+QString::number(i), strCityTz[i]); cfg.writeEntry("ZoneName"+QString::number(i), itCity.current()->text()); if ( strCityTz[i] == strRealTz ) realTzWritten = TRUE; } } if ( realTzWritten ) { cfg.removeEntry("Zone"+QString::number(CITIES)); cfg.removeEntry("ZoneName"+QString::number(CITIES)); } else { diff --git a/core/settings/citytime/citytimebase.cpp b/core/settings/citytime/citytimebase.cpp index a3483cc..323929b 100644 --- a/core/settings/citytime/citytimebase.cpp +++ b/core/settings/citytime/citytimebase.cpp @@ -209,49 +209,49 @@ CityTimeBase::CityTimeBase( QWidget* parent, const char* name, WFlags ) lblCTime3 = new QLabel( buttonWidget, "lblCTime3" ); QFont lblCTime3_font( lblCTime3->font() ); lblCTime3_font.setPointSize( 10 ); lblCTime3->setFont( lblCTime3_font ); lblCTime3->setText( tr( "" ) ); lblCTime3->setAlignment( int( QLabel::AlignVCenter | QLabel::AlignRight ) ); Layout2->addWidget( lblCTime3, 2, 1 ); cmdCity9 = new QToolButton( buttonWidget, "cmdCity9" ); cmdCity9->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)5, (QSizePolicy::SizeType)1, cmdCity9->sizePolicy().hasHeightForWidth() ) ); QFont cmdCity9_font( cmdCity9->font() ); cmdCity9_font.setBold( TRUE ); cmdCity9->setFont( cmdCity9_font ); cmdCity9->setFocusPolicy( QToolButton::TabFocus ); cmdCity9->setText( tr( "" ) ); cmdCity9->setToggleButton( TRUE ); cmdCity9->setToggleButton( TRUE ); Layout2->addWidget( cmdCity9, 2, 2 ); CityTimeBaseLayout->addWidget( buttonWidget ); // signals and slots connections - connect( frmMap, SIGNAL( signalTz(const QString &, const QString &) ), this, SLOT( slotNewTz(const QString &, const QString &) ) ); + connect( frmMap, SIGNAL( signalTz(const QString&,const QString&) ), this, SLOT( slotNewTz(const QString&,const QString&) ) ); connect( cmdCity1, SIGNAL( toggled(bool) ), cmdCity2, SLOT( setDisabled(bool) ) ); connect( cmdCity1, SIGNAL( toggled(bool) ), cmdCity3, SLOT( setDisabled(bool) ) ); connect( cmdCity1, SIGNAL( toggled(bool) ), cmdCity4, SLOT( setDisabled(bool) ) ); connect( cmdCity1, SIGNAL( toggled(bool) ), cmdCity7, SLOT( setDisabled(bool) ) ); connect( cmdCity1, SIGNAL( toggled(bool) ), cmdCity8, SLOT( setDisabled(bool) ) ); connect( cmdCity2, SIGNAL( toggled(bool) ), cmdCity1, SLOT( setDisabled(bool) ) ); connect( cmdCity2, SIGNAL( toggled(bool) ), cmdCity3, SLOT( setDisabled(bool) ) ); connect( cmdCity2, SIGNAL( toggled(bool) ), cmdCity4, SLOT( setDisabled(bool) ) ); connect( cmdCity4, SIGNAL( toggled(bool) ), cmdCity7, SLOT( setDisabled(bool) ) ); connect( cmdCity2, SIGNAL( toggled(bool) ), cmdCity8, SLOT( setDisabled(bool) ) ); connect( cmdCity2, SIGNAL( toggled(bool) ), cmdCity7, SLOT( setDisabled(bool) ) ); connect( cmdCity3, SIGNAL( toggled(bool) ), cmdCity1, SLOT( setDisabled(bool) ) ); connect( cmdCity3, SIGNAL( toggled(bool) ), cmdCity2, SLOT( setDisabled(bool) ) ); connect( cmdCity3, SIGNAL( toggled(bool) ), cmdCity4, SLOT( setDisabled(bool) ) ); connect( cmdCity3, SIGNAL( toggled(bool) ), cmdCity7, SLOT( setDisabled(bool) ) ); connect( cmdCity3, SIGNAL( toggled(bool) ), cmdCity8, SLOT( setDisabled(bool) ) ); connect( cmdCity4, SIGNAL( toggled(bool) ), cmdCity1, SLOT( setDisabled(bool) ) ); connect( cmdCity4, SIGNAL( toggled(bool) ), cmdCity2, SLOT( setDisabled(bool) ) ); connect( cmdCity4, SIGNAL( toggled(bool) ), cmdCity3, SLOT( setDisabled(bool) ) ); connect( cmdCity4, SIGNAL( toggled(bool) ), cmdCity8, SLOT( setDisabled(bool) ) ); connect( cmdCity7, SIGNAL( toggled(bool) ), cmdCity1, SLOT( setDisabled(bool) ) ); connect( cmdCity7, SIGNAL( toggled(bool) ), cmdCity2, SLOT( setDisabled(bool) ) ); connect( cmdCity7, SIGNAL( toggled(bool) ), cmdCity3, SLOT( setDisabled(bool) ) ); connect( cmdCity7, SIGNAL( toggled(bool) ), cmdCity4, SLOT( setDisabled(bool) ) ); diff --git a/core/settings/citytime/zonemap.cpp b/core/settings/citytime/zonemap.cpp index b83da59..b6843d2 100644 --- a/core/settings/citytime/zonemap.cpp +++ b/core/settings/citytime/zonemap.cpp @@ -166,54 +166,54 @@ ZoneMap::ZoneMap( QWidget *parent, const char* name ) (QSizePolicy::SizeType)0, cmdZoom->sizePolicy().hasHeightForWidth() ) ); cmdZoom->setMaximumSize( cmdZoom->sizeHint() ); // probably don't need this, but just in case... cmdZoom->move( width() - cmdZoom->width(), height() - cmdZoom->height() ); lblCity = new QLabel( tr( "CITY" ), this, "City Label" ); lblCity->setMinimumSize( lblCity->sizeHint() ); lblCity->setFrameStyle( QFrame::Plain | QFrame::Box ); lblCity->setBackgroundColor( yellow ); lblCity->hide(); // A timer to make sure the label gets hidden tHide = new QTimer( this, "Label Timer" ); QObject::connect( tHide, SIGNAL( timeout() ), lblCity, SLOT( hide() ) ); QObject::connect( tHide, SIGNAL( timeout() ), this, SLOT( slotRedraw() ) ); QTimer *tUpdate = new QTimer( this, "Update Timer" ); QObject::connect( tUpdate, SIGNAL( timeout() ), this, SLOT( slotUpdate() ) ); QObject::connect( qApp, SIGNAL( timeChanged() ), this, SLOT( slotUpdate() ) ); - QObject::connect( cmdZoom, SIGNAL( toggled( bool ) ), - this, SLOT( slotZoom( bool ) ) ); - QObject::connect( &norm, SIGNAL( signalNewPoint( const QPoint& ) ), - this, SLOT( slotFindCity( const QPoint& ) ) ); - QObject::connect( qApp, SIGNAL( clockChanged( bool ) ), - this, SLOT( changeClock( bool ) ) ); + QObject::connect( cmdZoom, SIGNAL( toggled(bool) ), + this, SLOT( slotZoom(bool) ) ); + QObject::connect( &norm, SIGNAL( signalNewPoint(const QPoint&) ), + this, SLOT( slotFindCity(const QPoint&) ) ); + QObject::connect( qApp, SIGNAL( clockChanged(bool) ), + this, SLOT( changeClock(bool) ) ); // update the sun's movement every 5 minutes tUpdate->start( 5 * 60 * 1000 ); // May as well read in the timezone information too... readZones(); } ZoneMap::~ZoneMap() { } void ZoneMap::readZones( void ) { QFile fZone( strZONEINFO ); if ( !fZone.open( IO_ReadOnly ) ) { QMessageBox::warning (this, tr( "Unable to Find Timezone Info" ), tr( "<p>Unable to find any timezone information in %1" ) .arg( strZONEINFO )); exit(-1); } else { QTextStream tZone( &fZone ); while ( !tZone.atEnd() ) { QString strLine = tZone.readLine(); // only pass on lines that aren't comments @@ -445,85 +445,85 @@ void ZoneMap::resizeEvent( QResizeEvent *e ) resizeContents( drawableW, drawableH ); } } void ZoneMap::showZones( void ) const { // go through the zones in the list and just display the values... QListIterator<ZoneField> itZone( zones ); for ( itZone.toFirst(); itZone.current(); ++itZone ) { ZoneField *pZone = itZone.current(); pZone->showStructure(); } } QWidget* ZoneMap::selectionWidget( QWidget *parent) { QWidget *returnWidget = new QWidget( parent ); QVBoxLayout *layout = new QVBoxLayout( returnWidget ); QHBox *hBox = new QHBox( returnWidget ); QListView *continentView = new QListView( hBox ); continentView->addColumn( tr("Continent") ); QWhatsThis::add( continentView, tr("Select a continent/country here, then select a city") ); - connect ( continentView, SIGNAL( clicked ( QListViewItem * ) ), this, SLOT( slotGetCities( QListViewItem * ) ) ); + connect ( continentView, SIGNAL( clicked(QListViewItem*) ), this, SLOT( slotGetCities(QListViewItem*) ) ); QStringList continentList; QListIterator<ZoneField> itZone( zones ); for ( itZone.toFirst(); itZone.current(); ++itZone ) { ZoneField *pZone = itZone.current(); if ( continentList.contains( pZone->country() ) == 0 ) { QString name; QListViewItem *item; if ( !(pZone->country().length() > 24) ) { name = pZone->country().left(pZone->country().length()-1 ); } else { name = pZone->country().left( 24 ); } item = new QListViewItem( continentView, name, pZone->country() ); continentList.append( pZone->country() ); } } cityView = new QListView( hBox ); cityView->addColumn( tr("City") ); layout->addWidget( hBox ); return returnWidget; } void ZoneMap::slotGetCities( QListViewItem * contItem) { cityView->clear(); selectedCont = contItem->text( 1 ); QListIterator<ZoneField> itZone( zones ); for ( itZone.toFirst(); itZone.current(); ++itZone ) { ZoneField *pZone = itZone.current(); if ( pZone->country() == contItem->text( 1 ) ) { QListViewItem *item; item = new QListViewItem( cityView, pZone->city() ); - connect ( cityView, SIGNAL( clicked ( QListViewItem* ) ), this, SLOT( slotCitySelected( QListViewItem* ) ) ); + connect ( cityView, SIGNAL( clicked(QListViewItem*) ), this, SLOT( slotCitySelected(QListViewItem*) ) ); } } } void ZoneMap::slotCitySelected( QListViewItem *cityItem ) { if ( cityItem ) { emit signalTz( selectedCont, cityItem->text( 0 ) ); } } void ZoneMap::drawCities( QPainter *p ) { int x, y, j; // draw in the cities // for testing only as when you put it // on the small screen it looks awful and not to mention useless p->setPen( red ); QListIterator<ZoneField> itZone( zones ); for ( itZone.toFirst(), j = 0; itZone.current(); ++itZone, j++ ) { ZoneField *pZone = itZone.current(); zoneToWin( pZone->x(), pZone->y(), x, y ); if ( x > wImg ) x = x - wImg; p->drawRect( x - iCITYOFFSET, y - iCITYOFFSET, iCITYSIZE, iCITYSIZE); diff --git a/core/settings/launcher/menusettings.cpp b/core/settings/launcher/menusettings.cpp index dc8e993..2b64c47 100644 --- a/core/settings/launcher/menusettings.cpp +++ b/core/settings/launcher/menusettings.cpp @@ -49,49 +49,49 @@ MenuSettings::MenuSettings ( QWidget *parent, const char *name ) : QWidget ( parent, name ) { m_applets_changed = false; QBoxLayout *lay = new QVBoxLayout ( this, 4, 4 ); QLabel *l = new QLabel ( tr( "Load applets in O-Menu:" ), this ); lay-> addWidget ( l ); m_list = new QListView ( this ); m_list-> addColumn ( "foobar" ); m_list-> header ( )-> hide ( ); lay-> addWidget ( m_list ); m_menutabs = new QCheckBox ( tr( "Show Launcher tabs in O-Menu" ), this ); lay-> addWidget ( m_menutabs ); m_menusubpopup = new QCheckBox ( tr( "Show Applications in Subpopups" ), this ); lay-> addWidget ( m_menusubpopup ); QWhatsThis::add ( m_list, tr( "Check the applets that you want to have included in the O-Menu." )); QWhatsThis::add ( m_menutabs, tr( "Adds the contents of the Launcher Tabs as menus in the O-Menu." )); - connect ( m_list, SIGNAL( clicked ( QListViewItem * )), this, SLOT( appletChanged ( ))); + connect ( m_list, SIGNAL( clicked(QListViewItem*)), this, SLOT( appletChanged())); init ( ); } void MenuSettings::init ( ) { Config cfg ( "StartMenu" ); cfg. setGroup ( "Applets" ); QStringList exclude = cfg. readListEntry ( "ExcludeApplets", ',' ); QString path = QPEApplication::qpeDir ( ) + "/plugins/applets"; #ifdef Q_OS_MACX QStringList list = QDir ( path, "lib*.dylib" ). entryList ( ); #else QStringList list = QDir ( path, "lib*.so" ). entryList ( ); #endif /* Q_OS_MACX */ for ( QStringList::Iterator it = list. begin ( ); it != list. end ( ); ++it ) { QString name; QPixmap icon; MenuAppletInterface *iface = 0; QLibrary *lib = new QLibrary ( path + "/" + *it ); lib-> queryInterface ( IID_MenuApplet, (QUnknownInterface**) &iface ); @@ -103,49 +103,49 @@ void MenuSettings::init ( ) if ( trans-> load ( tfn )) qApp-> installTranslator ( trans ); else delete trans; name = iface-> name ( ); icon = iface-> icon ( ). pixmap ( QIconSet::Small, QIconSet::Normal ); iface-> release ( ); lib-> unload ( ); QCheckListItem *item; item = new QCheckListItem ( m_list, name, QCheckListItem::CheckBox ); if ( !icon. isNull ( )) item-> setPixmap ( 0, icon ); item-> setOn ( exclude. find ( *it ) == exclude. end ( )); m_applets [*it] = item; } else { delete lib; } } cfg. setGroup ( "Menu" ); m_menutabs->setChecked( cfg.readBoolEntry( "LauncherTabs", true ) ); m_menusubpopup->setChecked( cfg.readBoolEntry( "LauncherSubPopup", true ) ); m_menusubpopup->setEnabled( m_menutabs->isChecked() ); - connect( m_menutabs, SIGNAL( stateChanged( int ) ), m_menusubpopup, SLOT( setEnabled( bool ) ) ); + connect( m_menutabs, SIGNAL( stateChanged(int) ), m_menusubpopup, SLOT( setEnabled(bool) ) ); } void MenuSettings::appletChanged() { m_applets_changed = true; } void MenuSettings::accept ( ) { bool apps_changed = false; Config cfg ( "StartMenu" ); cfg. setGroup ( "Applets" ); if ( m_applets_changed ) { QStringList exclude; QMap <QString, QCheckListItem *>::Iterator it; for ( it = m_applets. begin ( ); it != m_applets. end ( ); ++it ) { if ( !(*it)-> isOn ( )) exclude << it. key ( ); } cfg. writeEntry ( "ExcludeApplets", exclude, ',' ); } cfg. writeEntry ( "SafeMode", false ); diff --git a/core/settings/launcher/tabdialog.cpp b/core/settings/launcher/tabdialog.cpp index f79ad40..c0d1cf2 100644 --- a/core/settings/launcher/tabdialog.cpp +++ b/core/settings/launcher/tabdialog.cpp @@ -298,150 +298,150 @@ TabDialog::TabDialog ( const QPixmap *tabicon, const QString &tabname, TabConfig m_fontuse-> setChecked ( tc. m_font_use ); m_fontselect-> setSelectedFont ( QFont ( tc. m_font_family, tc. m_font_size, tc. m_font_weight, tc. m_font_italic )); m_fontselect-> setEnabled ( m_fontuse-> isChecked ( )); fontClicked ( m_fontselect-> selectedFont ( )); QWhatsThis::add ( sample, tr( "This is a rough preview of what the currently selected Tab will look like." )); } TabDialog::~TabDialog ( ) { } QWidget *TabDialog::createFontTab ( QWidget *parent ) { QWidget *tab = new QWidget ( parent, "FontTab" ); QVBoxLayout *vertLayout = new QVBoxLayout ( tab, 3, 3 ); m_fontuse = new QCheckBox ( tr( "Use a custom font" ), tab ); vertLayout-> addWidget ( m_fontuse ); m_fontselect = new OFontSelector ( false, tab, "fontsel" ); vertLayout-> addWidget ( m_fontselect ); - connect ( m_fontuse, SIGNAL( toggled ( bool )), m_fontselect, SLOT( setEnabled ( bool ))); - connect( m_fontselect, SIGNAL( fontSelected ( const QFont & )), - this, SLOT( fontClicked ( const QFont & ))); + connect ( m_fontuse, SIGNAL( toggled(bool)), m_fontselect, SLOT( setEnabled(bool))); + connect( m_fontselect, SIGNAL( fontSelected(const QFont&)), + this, SLOT( fontClicked(const QFont&))); return tab; } QWidget *TabDialog::createBgTab ( QWidget *parent ) { QWidget *tab = new QWidget( parent, "BgTab" ); QVBoxLayout *vertLayout = new QVBoxLayout( tab, 3, 3 ); QGridLayout* gridLayout = new QGridLayout ( vertLayout ); gridLayout-> setColStretch ( 1, 10 ); QLabel* label = new QLabel( tr( "Type:" ), tab ); gridLayout-> addWidget ( label, 0, 0 ); m_bgtype = new QButtonGroup( tab, "buttongroup" ); m_bgtype-> hide ( ); m_bgtype-> setExclusive ( true ); QRadioButton *rb; rb = new QRadioButton( tr( "Ruled" ), tab, "ruled" ); m_bgtype-> insert ( rb, TabConfig::Ruled ); gridLayout-> addWidget( rb, 0, 1 ); QHBoxLayout *hb = new QHBoxLayout ( ); hb-> setSpacing ( 3 ); rb = new QRadioButton( tr( "Solid color" ), tab, "solid" ); m_bgtype-> insert ( rb, TabConfig::SolidColor ); hb-> addWidget ( rb ); hb-> addSpacing ( 10 ); m_solidcolor = new OColorButton ( tab, QColor ( m_tc. m_bg_color ) ); - connect ( m_solidcolor, SIGNAL( colorSelected ( const QColor & )), this, SLOT( bgColorClicked ( const QColor & ))); + connect ( m_solidcolor, SIGNAL( colorSelected(const QColor&)), this, SLOT( bgColorClicked(const QColor&))); hb-> addWidget ( m_solidcolor ); hb-> addStretch ( 10 ); gridLayout-> addLayout ( hb, 1, 1 ); hb = new QHBoxLayout ( ); hb-> setSpacing ( 3 ); rb = new QRadioButton( tr( "Image" ), tab, "image" ); m_bgtype-> insert ( rb, TabConfig::Image ); hb-> addWidget( rb ); hb-> addSpacing ( 10 ); m_imagebrowse = new QPushButton ( tr( "Select..." ), tab ); - connect ( m_imagebrowse, SIGNAL( clicked ( )), this, SLOT( bgImageClicked ( ))); + connect ( m_imagebrowse, SIGNAL( clicked()), this, SLOT( bgImageClicked())); hb-> addWidget ( m_imagebrowse ); hb-> addStretch ( 10 ); gridLayout-> addLayout ( hb, 2, 1 ); QPushButton *p = new QPushButton ( tr( "Default" ), tab ); - connect ( p, SIGNAL( clicked ( )), this, SLOT( bgDefaultClicked ( ))); + connect ( p, SIGNAL( clicked()), this, SLOT( bgDefaultClicked())); gridLayout-> addWidget ( p, 3, 1 ); - connect ( m_bgtype, SIGNAL( clicked ( int )), this, SLOT( bgTypeClicked ( int ))); + connect ( m_bgtype, SIGNAL( clicked(int)), this, SLOT( bgTypeClicked(int))); vertLayout-> addStretch ( 10 ); return tab; } QWidget *TabDialog::createIconTab ( QWidget *parent ) { QWidget *tab = new QWidget( parent, "IconTab" ); QVBoxLayout *vertLayout = new QVBoxLayout( tab, 3, 3 ); QGridLayout* gridLayout = new QGridLayout ( vertLayout ); gridLayout-> setColStretch ( 1, 10 ); QLabel* label = new QLabel( tr( "Size:" ), tab ); gridLayout-> addWidget ( label, 0, 0 ); m_iconsize = new QButtonGroup( tab, "buttongroup" ); m_iconsize-> hide ( ); m_iconsize-> setExclusive ( true ); QRadioButton *rb; rb = new QRadioButton( tr( "Small" ), tab, "iconsmall" ); m_iconsize-> insert ( rb, TabConfig::List ); gridLayout-> addWidget( rb, 0, 1 ); rb = new QRadioButton( tr( "Large" ), tab, "iconlarge" ); m_iconsize-> insert ( rb, TabConfig::Icon ); gridLayout-> addWidget( rb, 1, 1 ); - connect ( m_iconsize, SIGNAL( clicked ( int )), this, SLOT( iconSizeClicked ( int ))); + connect ( m_iconsize, SIGNAL( clicked(int)), this, SLOT( iconSizeClicked(int))); // vertLayout-> addSpacing ( 8 ); // gridLayout = new QGridLayout ( vertLayout ); gridLayout-> addRowSpacing ( 2, 8 ); label = new QLabel ( tr( "Color:" ), tab ); gridLayout-> addWidget ( label, 3, 0 ); m_iconcolor = new OColorButton ( tab, QColor ( m_tc. m_text_color ) ); - connect ( m_iconcolor, SIGNAL( colorSelected ( const QColor & )), this, SLOT( iconColorClicked ( const QColor & ))); + connect ( m_iconcolor, SIGNAL( colorSelected(const QColor&)), this, SLOT( iconColorClicked(const QColor&))); gridLayout-> addWidget ( m_iconcolor, 3, 1, AlignLeft ); vertLayout-> addStretch ( 10 ); return tab; } void TabDialog::iconSizeClicked ( int s ) { m_sample-> setViewMode ((TabConfig::ViewMode) s ); } void TabDialog::fontClicked ( const QFont &f ) { m_sample-> setViewFont ( f ); } void TabDialog::bgTypeClicked ( int t ) { QString s; if ( m_bgtype-> id ( m_bgtype-> selected ( )) != t ) m_bgtype-> setButton ( t ); diff --git a/core/settings/launcher/tabssettings.cpp b/core/settings/launcher/tabssettings.cpp index 17a1609..e5a7087 100644 --- a/core/settings/launcher/tabssettings.cpp +++ b/core/settings/launcher/tabssettings.cpp @@ -45,57 +45,57 @@ #include <stdlib.h> #include <qmessagebox.h> #define GLOBALID ".global." TabsSettings::TabsSettings ( QWidget *parent, const char *name ) : QWidget ( parent, name ) { QGridLayout *lay = new QGridLayout ( this, 0, 0, 4, 4 ); QLabel *l = new QLabel ( tr( "Launcher Tabs:" ), this ); lay-> addMultiCellWidget ( l, 0, 0, 0, 1 ); m_list = new QListBox ( this ); lay-> addMultiCellWidget ( m_list, 1, 4, 0, 0 ); QWhatsThis::add ( m_list, tr( "foobar" )); QPushButton *p1, *p2, *p3; p1 = new QPushButton ( tr( "New" ), this ); lay-> addWidget ( p1, 1, 1 ); - connect ( p1, SIGNAL( clicked ( )), this, SLOT( newClicked ( ))); + connect ( p1, SIGNAL( clicked()), this, SLOT( newClicked())); p2 = new QPushButton ( tr( "Edit" ), this ); lay-> addWidget ( p2, 2, 1 ); - connect ( p2, SIGNAL( clicked ( )), this, SLOT( editClicked ( ))); + connect ( p2, SIGNAL( clicked()), this, SLOT( editClicked())); p3 = new QPushButton ( tr( "Delete" ), this ); lay-> addWidget ( p3, 3, 1 ); - connect ( p3, SIGNAL( clicked ( )), this, SLOT( deleteClicked ( ))); + connect ( p3, SIGNAL( clicked()), this, SLOT( deleteClicked())); lay-> setRowStretch ( 4, 10 ); m_bigbusy = new QCheckBox( tr( "Enable big busy indicator" ), this ); lay-> addMultiCellWidget ( m_bigbusy, 5, 5, 0, 1 ); m_busyani = new QCheckBox ( tr( "Enable animated busy indicator" ), this ); lay-> addMultiCellWidget ( m_busyani, 6, 6, 0, 1 ); p1-> setEnabled ( false ); p3-> setEnabled ( false ); init ( ); QWhatsThis::add ( m_list, tr( "Select the Launcher Tab you want to edit or delete." )); QWhatsThis::add ( p1, tr( "Adds a new Tab to the Launcher." ) + QString ( "<center><br><i>not yet implemented</i><br>Please use the tabmanager</center>." )); QWhatsThis::add ( p2, tr( "Opens a new dialog to customize the select Tab." )); QWhatsThis::add ( p3, tr( "Deletes a Tab from the Launcher." ) + QString ( "<center><br><i>not yet implemented</i><br>Please use the tabmanager</center>." )); QWhatsThis::add ( m_bigbusy, tr( "Activate this, if you want a big busy indicator in the middle of the screen instead of the one in taskbar." )); QWhatsThis::add ( m_busyani, tr( "Activate this, if you want an animatedbusy indicator for starting applications in the Launcher." )); } void TabsSettings::init ( ) { diff --git a/core/settings/launcher/taskbarsettings.cpp b/core/settings/launcher/taskbarsettings.cpp index badb98f..43886c9 100644 --- a/core/settings/launcher/taskbarsettings.cpp +++ b/core/settings/launcher/taskbarsettings.cpp @@ -41,49 +41,49 @@ #include <qlabel.h> #include <qwhatsthis.h> #include <stdlib.h> TaskbarSettings::TaskbarSettings ( QWidget *parent, const char *name ) : QWidget ( parent, name ) { m_applets_changed = false; QBoxLayout *lay = new QVBoxLayout ( this, 4, 4 ); QLabel *l = new QLabel ( tr( "Load applets in Taskbar:" ), this ); lay-> addWidget ( l ); m_list = new QListView ( this ); m_list-> addColumn ( "foobar" ); m_list-> header ( )-> hide ( ); lay-> addWidget ( m_list ); QWhatsThis::add ( m_list, tr( "Check the applets that you want displayed in the Taskbar." )); - connect ( m_list, SIGNAL( clicked ( QListViewItem * )), this, SLOT( appletChanged ( ))); + connect ( m_list, SIGNAL( clicked(QListViewItem*)), this, SLOT( appletChanged())); init ( ); } void TaskbarSettings::init ( ) { Config cfg ( "Taskbar" ); cfg. setGroup ( "Applets" ); QStringList exclude = cfg. readListEntry ( "ExcludeApplets", ',' ); QString path = QPEApplication::qpeDir ( ) + "/plugins/applets"; #ifdef Q_OS_MACX QStringList list = QDir ( path, "lib*.dylib" ). entryList ( ); #else QStringList list = QDir ( path, "lib*.so" ). entryList ( ); #endif /* Q_OS_MACX */ for ( QStringList::Iterator it = list. begin ( ); it != list. end ( ); ++it ) { QString name; QPixmap icon; TaskbarNamedAppletInterface *iface = 0; qWarning("Load applet: %s", (*it).latin1() ); QLibrary *lib = new QLibrary ( path + "/" + *it ); diff --git a/core/settings/light-and-power/light.cpp b/core/settings/light-and-power/light.cpp index 4baff8e..ce45836 100644 --- a/core/settings/light-and-power/light.cpp +++ b/core/settings/light-and-power/light.cpp @@ -151,85 +151,85 @@ LightSettings::LightSettings( QWidget* parent, const char* name, WFlags ) brightness_ac-> setTickInterval ( QMAX( 16, 256 / m_bres )); brightness_ac-> setLineStep ( QMAX( 1, 256 / m_bres )); brightness_ac-> setPageStep ( QMAX( 1, 256 / m_bres )); brightness_ac-> setValue ( bright ); if (m_cres) { contr = config. readNumEntry ( "Contrast", 127); contrast_ac-> setTickInterval ( QMAX( 16, 256 / m_cres )); contrast_ac-> setLineStep ( QMAX( 1, 256 / m_cres )); contrast_ac-> setPageStep ( QMAX( 1, 256 / m_cres )); contrast_ac-> setValue ( contr ); } // light sensor auto_brightness_ac-> setChecked ( config. readBoolEntry ( "LightSensor", false )); m_sensordata_ac = config. readListEntry ( "LightSensorData", ';' ); // warnings config. setGroup ( "Warnings" ); warnintervalBox-> setValue ( config. readNumEntry ( "checkinterval", 10000 ) / 1000 ); lowSpinBox-> setValue ( config. readNumEntry ( "powerverylow", 10 ) ); criticalSpinBox-> setValue ( config. readNumEntry ( "powercritical", 5 ) ); m_resettimer = new QTimer ( this ); - connect ( m_resettimer, SIGNAL( timeout ( )), this, SLOT( resetBacklight ( ))); + connect ( m_resettimer, SIGNAL( timeout()), this, SLOT( resetBacklight())); if ( PowerStatusManager::readStatus ( ). acStatus ( ) != PowerStatus::Online ) { tabs-> setCurrentPage ( 0 ); } else { tabs-> setCurrentPage ( 1 ); } - connect ( brightness, SIGNAL( valueChanged ( int )), this, SLOT( setBacklight ( int ))); - connect ( brightness_ac, SIGNAL( valueChanged ( int )), this, SLOT( setBacklight ( int ))); + connect ( brightness, SIGNAL( valueChanged(int)), this, SLOT( setBacklight(int))); + connect ( brightness_ac, SIGNAL( valueChanged(int)), this, SLOT( setBacklight(int))); if (m_cres) { - connect ( contrast, SIGNAL( valueChanged ( int )), this, SLOT( setContrast ( int ))); - connect ( contrast_ac, SIGNAL( valueChanged ( int )), this, SLOT( setContrast ( int ))); + connect ( contrast, SIGNAL( valueChanged(int)), this, SLOT( setContrast(int))); + connect ( contrast_ac, SIGNAL( valueChanged(int)), this, SLOT( setContrast(int))); } connect( frequency, SIGNAL( activated(int) ), this, SLOT( setFrequency(int) ) ); connect( frequency_ac, SIGNAL( activated(int) ), this, SLOT( setFrequency(int) ) ); connect( closeHingeAction, SIGNAL( activated(int) ), this, SLOT( setCloseHingeAction(int) ) ); connect( closeHingeAction_ac, SIGNAL( activated(int) ), this, SLOT( setCloseHingeAction(int) ) ); } LightSettings::~LightSettings ( ) { } void LightSettings::calibrateSensor ( ) { Sensor *s = new Sensor ( m_sensordata, this ); - connect ( s, SIGNAL( viewBacklight ( int )), this, SLOT( setBacklight ( int ))); + connect ( s, SIGNAL( viewBacklight(int)), this, SLOT( setBacklight(int))); QPEApplication::execDialog( s ); delete s; } void LightSettings::calibrateSensorAC ( ) { Sensor *s = new Sensor ( m_sensordata_ac, this ); - connect ( s, SIGNAL( viewBacklight ( int )), this, SLOT( setBacklight ( int ))); + connect ( s, SIGNAL( viewBacklight(int)), this, SLOT( setBacklight(int))); QPEApplication::execDialog ( s ); delete s; } void LightSettings::setBacklight ( int bright ) { QCopEnvelope e ( "QPE/System", "setBacklight(int)" ); e << bright; if ( bright != -1 ) { m_resettimer-> stop ( ); m_resettimer-> start ( 4000, true ); } } void LightSettings::setContrast ( int contr ) { if (contr == -1) contr = m_oldcontrast; ODevice::inst ( )-> setDisplayContrast(contr); } void LightSettings::setFrequency ( int index ) { qWarning("LightSettings::setFrequency(%d)", index); diff --git a/core/settings/light-and-power/sensor.cpp b/core/settings/light-and-power/sensor.cpp index 41de851..013e655 100644 --- a/core/settings/light-and-power/sensor.cpp +++ b/core/settings/light-and-power/sensor.cpp @@ -52,51 +52,51 @@ Sensor::Sensor ( QStringList ¶ms, QWidget *parent, const char *name ) case 5: lmin = params [4]. toInt ( ); case 4: smax = params [3]. toInt ( ); case 3: smin = params [2]. toInt ( ); case 2: steps = params [1]. toInt ( ); case 1: inter = params [0]. toInt ( ) / 1000; } int xscale = ODevice::inst ( )-> lightSensorResolution ( ); int yscale = ODevice::inst ( )-> displayBrightnessResolution ( ); QVBoxLayout *lay = new QVBoxLayout ( frame ); lay-> setMargin ( 2 ); m_calib = new Calibration ( frame ); lay-> add ( m_calib ); m_calib-> setScale ( QSize ( xscale, yscale )); m_calib-> setLineSteps ( steps ); m_calib-> setInterval ( inter ); m_calib-> setStartPoint ( QPoint ( smin * xscale / 256, lmax * yscale / 256 )); m_calib-> setEndPoint ( QPoint ( smax * xscale / 256, lmin * yscale / 256 )); interval-> setValue ( inter ); linesteps-> setValue ( steps ); - connect ( interval, SIGNAL( valueChanged ( int )), m_calib, SLOT( setInterval ( int ))); - connect ( linesteps, SIGNAL( valueChanged ( int )), m_calib, SLOT( setLineSteps ( int ))); + connect ( interval, SIGNAL( valueChanged(int)), m_calib, SLOT( setInterval(int))); + connect ( linesteps, SIGNAL( valueChanged(int)), m_calib, SLOT( setLineSteps(int))); - connect ( m_calib, SIGNAL( startPointChanged ( const QPoint & )), this, SLOT( pointDrag ( const QPoint & ))); - connect ( m_calib, SIGNAL( endPointChanged ( const QPoint & )), this, SLOT( pointDrag ( const QPoint & ))); + connect ( m_calib, SIGNAL( startPointChanged(const QPoint&)), this, SLOT( pointDrag(const QPoint&))); + connect ( m_calib, SIGNAL( endPointChanged(const QPoint&)), this, SLOT( pointDrag(const QPoint&))); } void Sensor::accept ( ) { int xscale = ODevice::inst ( )-> lightSensorResolution ( ); int yscale = ODevice::inst ( )-> displayBrightnessResolution ( ); m_params. clear ( ); m_params << QString::number ( m_calib-> interval ( ) * 1000 ) << QString::number ( m_calib-> lineSteps ( )) << QString::number ( m_calib-> startPoint ( ). x ( ) * 256 / xscale ) << QString::number ( m_calib-> endPoint ( ). x ( ) * 256 / xscale ) << QString::number ( m_calib-> endPoint ( ). y ( ) * 256 / yscale ) << QString::number ( m_calib-> startPoint ( ). y ( ) * 256 / yscale ); QDialog::accept ( ); } void Sensor::pointDrag ( const QPoint &p ) { emit viewBacklight ( p. y ( )); } diff --git a/core/tools/quicklauncher/main.cpp b/core/tools/quicklauncher/main.cpp index cc411fd..1d6774c 100644 --- a/core/tools/quicklauncher/main.cpp +++ b/core/tools/quicklauncher/main.cpp @@ -65,50 +65,50 @@ void setproctitle (const char *fmt,...) { va_end(ap); i = strlen (buf); if (i > argv_lth - 2) { i = argv_lth - 2; buf[i] = '\0'; } memset(argv0[0], '\0', argv_lth); /* clear the memory area */ (void) strcpy (argv0[0], buf); argv0[1] = NULL; } #endif class QuickLauncher : public QObject { Q_OBJECT public: QuickLauncher() : QObject() { QCString ch("QPE/QuickLauncher-"); ch += QString::number(getpid()); qlChannel = new QCopChannel( ch, this); - connect( qlChannel, SIGNAL(received(const QCString&, const QByteArray&)), - this, SLOT(message(const QCString&, const QByteArray&)) ); + connect( qlChannel, SIGNAL(received(const QCString&,const QByteArray&)), + this, SLOT(message(const QCString&,const QByteArray&)) ); } static void exec( int /*argc*/, char **argv ) { QString appName = argv[0]; int sep = appName.findRev( '/' ); if ( sep > 0 ) appName = appName.mid( sep+1 ); appIface = 0; if ( loader->queryInterface(appName, IID_QtopiaApplication, (QUnknownInterface**)&appIface) == QS_OK ) { mainWindow = appIface->createMainWindow( appName ); } if ( mainWindow ) { if ( mainWindow->metaObject()->slotNames().contains("setDocument(const QString&)") ) { app->showMainDocumentWidget( mainWindow ); } else { app->showMainWidget( mainWindow ); } } else { qWarning( "Could not create application main window" ); exit(-1); } } diff --git a/development/keyview/keyview.cpp b/development/keyview/keyview.cpp index 21bbb93..93c84d9 100644 --- a/development/keyview/keyview.cpp +++ b/development/keyview/keyview.cpp @@ -20,50 +20,50 @@ Keyview::Keyview( QWidget* parent, const char* name, WFlags fl ) l = new QLabel(QString("keycode:"), this); keycode = new QLineEdit(this); keycode->setReadOnly(1); l = new QLabel(QString("modifiers:"), this); modifiers = new QLineEdit(this); modifiers->setReadOnly(1); l = new QLabel(QString("isPress:"), this); isPress = new QLineEdit(this); isPress->setReadOnly(1); l = new QLabel(QString("autoRepeat:"), this); autoRepeat = new QLineEdit(this); autoRepeat->setReadOnly(1); // spacer l = new QLabel(QString(""), this); l->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding)); KeyFilter *filter = new KeyFilter(this); QWSServer::setKeyboardFilter(filter); - connect(filter, SIGNAL(keyPressed(int, int, int, bool, bool)), - this, SLOT(updateItems(int, int, int, bool, bool))); + connect(filter, SIGNAL(keyPressed(int,int,int,bool,bool)), + this, SLOT(updateItems(int,int,int,bool,bool))); } Keyview::~Keyview() { } void Keyview::updateItems(int u, int k, int m, bool p, bool a) { unicode->setText("0x" + QString::number(u, 16)); keycode->setText("0x" + QString::number(k, 16)); modifiers->setText("0x" + QString::number(m, 16)); isPress->setText("0x" + QString::number(p, 16)); autoRepeat->setText("0x" + QString::number(a, 16)); } KeyFilter::KeyFilter(QObject * parent, const char *name) : QObject( parent, name ) { } bool KeyFilter::filter(int unicode, int keycode, int modifiers, bool isPress, bool autoRepeat) { emit keyPressed(unicode, keycode, modifiers, isPress, autoRepeat); return 0; // return 1 to stop key emiting } diff --git a/examples/main-tab/simple.cpp b/examples/main-tab/simple.cpp index 69dd00f..c5a6d5a 100644 --- a/examples/main-tab/simple.cpp +++ b/examples/main-tab/simple.cpp @@ -19,49 +19,49 @@ */ /* * The factory is used for quicklaunching * It needs a constructor ( c'tor ) with at least QWidget, const char* and WFlags as parameter and a static QString appName() matching the TARGET of the .pro * * Depending on the global quick launch setting this will create * either a main method or one for our component plugin system */ OPIE_EXPORT_APP( OApplicationFactory<MainWindow> ) MainWindow::MainWindow(QWidget *parent, const char* name, WFlags fl ) : QMainWindow( parent, name, fl ) { setCaption(tr("My MainWindow") ); initUI(); /* * Tab widget as central */ OTabWidget *tab = new OTabWidget(this); connect(tab, SIGNAL(currentChanged(QWidget*) ), - this, SLOT( slotCurrentChanged( QWidget* ) ) ); + this, SLOT( slotCurrentChanged(QWidget*) ) ); setCentralWidget( tab ); Simple1 *simple1 = new Simple1( this ); tab->addTab( simple1, "new", tr("Simple1") ); tab->setCurrentTab( tr("Simple1") ); Simple2 *simple2 = new Simple2( this ); tab->addTab( simple2, "trash", tr("Simple2") ); m_oldCurrent = simple1; connect(m_fire, SIGNAL(activated() ), simple1, SLOT(slotFire() ) ); } MainWindow::~MainWindow() { // again nothing to delete because Qt takes care } void MainWindow::setDocument( const QString& /*str*/ ) { } void MainWindow::slotCurrentChanged( QWidget *wid) { disconnect(m_fire, SIGNAL(activated() ), diff --git a/examples/simple-pim/simple.cpp b/examples/simple-pim/simple.cpp index 3e9fcd3..029e71b 100644 --- a/examples/simple-pim/simple.cpp +++ b/examples/simple-pim/simple.cpp @@ -58,52 +58,52 @@ MainWindow::MainWindow(QWidget *parent, const char* name, WFlags fl ) m_tab->addTab( m_todoView,"todo/TodoList", tr("Todos") ); m_dateView = new PIMListView(m_tab, "Datebook view" ); m_tab->addTab( m_dateView, "datebook/DateBook", tr("Events") ); /* now connect the actions */ /* * we connect the activated to our show * and on activation we will show a detailed * summary of the record */ connect(m_fire, SIGNAL(activated() ), this, SLOT(slotShow() ) ); /* * We will change the date */ connect(m_dateAction, SIGNAL(activated() ), this, SLOT(slotDate() ) ); /* * connect the show signal of the PIMListView * to a slot to show a dialog */ - connect(m_todoView, SIGNAL(showRecord(const OPimRecord& ) ), - this, SLOT(slotShowRecord(const OPimRecord& ) ) ); - connect(m_dateView, SIGNAL(showRecord(const OPimRecord& ) ), - this, SLOT(slotShowRecord(const OPimRecord& ) ) ); + connect(m_todoView, SIGNAL(showRecord(const OPimRecord&) ), + this, SLOT(slotShowRecord(const OPimRecord&) ) ); + connect(m_dateView, SIGNAL(showRecord(const OPimRecord&) ), + this, SLOT(slotShowRecord(const OPimRecord&) ) ); /* * Now comes the important lines of code for this example * We do not directly call load but delay loading until * all Events are dispatches and handled. * SO we will load once our window is mapped to screen * to achieve that we use a QTimer::singleShot * After 10 milli seconds the timer fires and on TimerEvent * out slot slotLoad will be called * Remember this a Constructor to construct your object and not * to load */ QTimer::singleShot( 10, this, SLOT(slotLoad() ) ); } MainWindow::~MainWindow() { // again nothing to delete because Qt takes care } void MainWindow::setDocument( const QString& /*str*/ ) { } @@ -168,50 +168,50 @@ void MainWindow::slotLoad() { * startup by QPEApplication. QCOP is asynchronous * * To send you'll use QCopEnevelope * */ /* * What we will do is first is get to know if either * datebook or todolist are running if so we will kindly * asked to save the data for us. * If neither are running we can load directly */ if (!QCopChannel::isRegistered("QPE/Application/todolist") && !QCopChannel::isRegistered("QPE/Application/datebook") ) { m_db.load(); m_tb.load(); return slotLoadForDay( QDate::currentDate() ); } /* * prepare our answer machine the QCopChannel * QPE/Desktop will send "flushDone(QString)" when * the flush is done it emits a signal on receive */ m_desktopChannel = new QCopChannel("QPE/Desktop"); - connect(m_desktopChannel, SIGNAL(received(const QCString&, const QByteArray& ) ), - this, SLOT(slotDesktopReceive(const QCString&, const QByteArray& ) ) ); + connect(m_desktopChannel, SIGNAL(received(const QCString&,const QByteArray&) ), + this, SLOT(slotDesktopReceive(const QCString&,const QByteArray&) ) ); /* the numberof synced channels will be set to zero */ m_synced = 0; /* * We use {} around the QCopEnvelope because it sends its * data on destruction of QCopEnvelope with */ /* check again if not present increment synced*/ if ( QCopChannel::isRegistered("QPE/Application/todolist") ) { QCopEnvelope env("QPE/Application/todolist", "flush()" ); // env << data; but we do not have any parameters here }else m_synced++; if ( QCopChannel::isRegistered("QPE/Application/datebook") ) { QCopEnvelope env("QPE/Application/datebook", "flush()" ); }else m_synced++; /* we will provide a wait scrren */ m_loading = new OWait(this, "wait screen" ); } void MainWindow::slotDesktopReceive(const QCString& cmd, const QByteArray& data ) { @@ -286,50 +286,50 @@ void MainWindow::slotShowRecord( const OPimRecord& rec) { QTextView *view = new QTextView(dia ); view->setText( rec.toRichText() ); box->addWidget( view ); /* * execute via QPEApplication * this allows QPEApplication to make a sane decision * on the size */ dia->showMaximized(); QPEApplication::execDialog( dia ); delete dia; } void MainWindow::slotDate() { /* * called by the action we will show a Popup * at the current mouse position with a DateChooser * to select the day */ qWarning("slot Date"); QPopupMenu *menu = new QPopupMenu(); /* A Month to select a date from TRUE for auto close */ DateBookMonth *month = new DateBookMonth(menu, 0, true ); - connect(month, SIGNAL(dateClicked(int, int, int) ), - this, SLOT(slotLoadForDay(int, int, int) ) ); + connect(month, SIGNAL(dateClicked(int,int,int) ), + this, SLOT(slotLoadForDay(int,int,int) ) ); menu->insertItem( month ); menu->exec( QCursor::pos() ); /* * we do not need to delete month because * we delete its parent menu */ delete menu; } /* * An anonymous namespace this symbol is only available here * so truely private */ namespace { /* not static cause namespace does that what static would do */ const int RTTI = 5050; /* * every ListView got Items. we've special pim items * holding ownership and the pointer to a pim record * it can't hold a pimrecord directly because this diff --git a/inputmethods/handwriting/qimpenhelp.cpp b/inputmethods/handwriting/qimpenhelp.cpp index a294301..0727931 100644 --- a/inputmethods/handwriting/qimpenhelp.cpp +++ b/inputmethods/handwriting/qimpenhelp.cpp @@ -142,77 +142,77 @@ HandwritingTrainer::HandwritingTrainer( QIMPenProfile *p, QWidget *parent, const charSetCombo = new QComboBox( this ); gl->addMultiCellWidget( charSetCombo, 0, 0, 0, 1 ); connect( charSetCombo, SIGNAL(activated(int)), SLOT(selectCharSet(int))); QIMPenCharSetIterator it( profile->charSets() ); for ( ; it.current(); ++it ) { charSetCombo->insertItem( it.current()->description() ); } charList = new QListBox( this ); charList->setHScrollBarMode( QListBox::AlwaysOff ); charList->setFixedWidth(80); connect( charList, SIGNAL(highlighted(int)), this, SLOT(selectChar(int)) ); gl->addWidget(charList, 1, 0); result = new QLabel( this ); result->setAlignment(AlignLeft | AlignVCenter | WordBreak); result->setText( tr( "Select a reference character from the list. Practice writing in " "the area on the right.")); gl->addMultiCellWidget(result, 1, 2, 1, 1); matcher = new QIMPenMatch( this ); matcher->setCharSet( currentSet ); connect( matcher, SIGNAL(noMatch()), this, SLOT(noMatch()) ); - connect( matcher, SIGNAL(matchedCharacters(const QIMPenCharMatchList &)), - this, SLOT(matched(const QIMPenCharMatchList &)) ); + connect( matcher, SIGNAL(matchedCharacters(const QIMPenCharMatchList&)), + this, SLOT(matched(const QIMPenCharMatchList&)) ); QHBoxLayout *hb = new QHBoxLayout(); gl->addLayout( hb, 2, 0 ); prevBtn = new QPushButton( this ); prevBtn->setPixmap( QPixmap( (const char **)left_xpm ) ); connect( prevBtn, SIGNAL(clicked()), SLOT(prevChar())); hb->addWidget( prevBtn ); nextBtn = new QPushButton( this ); nextBtn->setPixmap( QPixmap( (const char **)right_xpm ) ); connect( nextBtn, SIGNAL(clicked()), SLOT(nextChar())); hb->addWidget( nextBtn ); refPw = new QIMPenWidget( this ); refPw->setReadOnly( TRUE ); gl->addWidget( refPw, 3, 0 ); pracPw = new QIMPenWidget( this ); connect( matcher, SIGNAL(removeStroke()), pracPw, SLOT(removeStroke()) ); connect( pracPw, SIGNAL(beginStroke()), this, SLOT(beginStroke()) ); - connect( pracPw, SIGNAL(stroke( QIMPenStroke * )), - this, SLOT(strokeEntered( QIMPenStroke * )) ); + connect( pracPw, SIGNAL(stroke(QIMPenStroke*)), + this, SLOT(strokeEntered(QIMPenStroke*)) ); connect( pracPw, SIGNAL(beginStroke()), matcher, SLOT(beginStroke()) ); - connect( pracPw, SIGNAL(stroke( QIMPenStroke * )), - matcher, SLOT(strokeEntered( QIMPenStroke * )) ); + connect( pracPw, SIGNAL(stroke(QIMPenStroke*)), + matcher, SLOT(strokeEntered(QIMPenStroke*)) ); gl->addWidget( pracPw, 3, 1 ); redrawTimer = new QTimer( this ); connect( redrawTimer, SIGNAL(timeout()), this, SLOT(redrawChar()) ); redrawTimer->start( 5000 ); currentSet = 0; charSetCombo->setCurrentItem( 1 ); selectCharSet( 1 ); } HandwritingTrainer::~HandwritingTrainer() { } void HandwritingTrainer::showEvent( QShowEvent * ) { redrawChar(); redrawTimer->start( 5000 ); } void HandwritingTrainer::setCurrentChar( QIMPenChar *c ) { currentChar = c; diff --git a/inputmethods/handwriting/qimpeninput.cpp b/inputmethods/handwriting/qimpeninput.cpp index db33c9b..d073cdf 100644 --- a/inputmethods/handwriting/qimpeninput.cpp +++ b/inputmethods/handwriting/qimpeninput.cpp @@ -128,109 +128,109 @@ static char * help_xpm[] = { " .+. ", " #.# "}; /*! \class QIMPenInput qimpeninput.h Pen input widget. */ QIMPenInput::QIMPenInput( QWidget *parent, const char *name, WFlags wf ) : QFrame( parent, name, wf ), helpDlg(0), profile(0) { setFrameStyle( Box | Plain ); profileList.setAutoDelete( true ); matcher = new QIMPenMatch( this ); connect( matcher, SIGNAL(keypress(uint)), this, SLOT(keypress(uint)) ); connect( matcher, SIGNAL(erase()), this, SLOT(erase()) ); QGridLayout *gl = new QGridLayout( this, 5, 2, 1, 0 ); gl->setColStretch( 0, 1 ); wordPicker = new QIMPenWordPick( this ); - connect( wordPicker, SIGNAL(wordClicked(const QString &)), - this, SLOT(wordPicked(const QString &)) ); - connect( matcher, SIGNAL(matchedCharacters(const QIMPenCharMatchList &)), - this, SLOT(matchedCharacters(const QIMPenCharMatchList &)) ); + connect( wordPicker, SIGNAL(wordClicked(const QString&)), + this, SLOT(wordPicked(const QString&)) ); + connect( matcher, SIGNAL(matchedCharacters(const QIMPenCharMatchList&)), + this, SLOT(matchedCharacters(const QIMPenCharMatchList&)) ); connect( matcher, SIGNAL(matchedWords(const QIMPenMatch::MatchWordList&)), wordPicker, SLOT(setWords(const QIMPenMatch::MatchWordList&)) ); QFont f("smallsmooth",9); QFontInfo fi( f ); wordPicker->setFont( f ); wordPicker->setBackgroundColor( white ); gl->addMultiCellWidget( wordPicker, 0, 0, 0, 1 ); if ( !Global::fixedDawg().root() || !matcher->isWordMatchingEnabled() ) wordPicker->hide(); pw = new QIMPenWidget( this ); gl->addMultiCellWidget( pw, 1, 4, 0, 0 ); int bh = pw->sizeHint().height()/4; QPushButton *b = new QPushButton( this ); b->setFocusPolicy( NoFocus ); b->setPixmap( QPixmap( (const char **)bs_xpm ) ); b->setFixedHeight(pw->sizeHint().height()-3*bh); // left-over space goes here b->setAutoRepeat( TRUE ); gl->addWidget( b, 1, 1 ); connect( b, SIGNAL(clicked()), SLOT(backspace())); b = new QPushButton( this ); b->setFocusPolicy( NoFocus ); b->setPixmap( QPixmap( (const char **)enter_xpm ) ); b->setFixedHeight(bh); b->setAutoRepeat( TRUE ); gl->addWidget( b, 2, 1 ); connect( b, SIGNAL(clicked()), SLOT(enter())); helpBtn = new QPushButton( this ); helpBtn->setFocusPolicy( NoFocus ); helpBtn->setPixmap( QPixmap( (const char **)help_xpm ) ); helpBtn->setFixedHeight(bh); gl->addWidget( helpBtn, 3, 1 ); connect( helpBtn, SIGNAL(clicked()), SLOT(help())); QPixmap pm( (const char **)pen_xpm ); setupBtn = new QPushButton( this ); setupBtn->setFocusPolicy( NoFocus ); setupBtn->setPixmap( pm ); setupBtn->setFixedHeight(bh); gl->addWidget( setupBtn, 4, 1 ); connect( setupBtn, SIGNAL(clicked()), SLOT(setup())); connect( matcher, SIGNAL(removeStroke()), pw, SLOT(removeStroke()) ); - connect( pw, SIGNAL(changeCharSet( QIMPenCharSet * )), - matcher, SLOT(setCharSet( QIMPenCharSet * )) ); - connect( pw, SIGNAL(changeCharSet( int )), - this, SLOT(selectCharSet( int )) ); + connect( pw, SIGNAL(changeCharSet(QIMPenCharSet*)), + matcher, SLOT(setCharSet(QIMPenCharSet*)) ); + connect( pw, SIGNAL(changeCharSet(int)), + this, SLOT(selectCharSet(int)) ); connect( pw, SIGNAL(beginStroke()), matcher, SLOT(beginStroke()) ); - connect( pw, SIGNAL(stroke( QIMPenStroke * )), - this, SLOT(strokeEntered( QIMPenStroke * )) ); - connect( pw, SIGNAL(stroke( QIMPenStroke * )), - matcher, SLOT(strokeEntered( QIMPenStroke * )) ); + connect( pw, SIGNAL(stroke(QIMPenStroke*)), + this, SLOT(strokeEntered(QIMPenStroke*)) ); + connect( pw, SIGNAL(stroke(QIMPenStroke*)), + matcher, SLOT(strokeEntered(QIMPenStroke*)) ); shortcutCharSet = 0; currCharSet = 0; setupDlg = 0; profile = 0; mode = Normal; loadProfiles(); } QIMPenInput::~QIMPenInput() { delete (HandwritingHelp*) helpDlg; } QSize QIMPenInput::sizeHint() const { int fw = frameWidth(); int ps = wordPicker->isHidden() ? 0 : wordPicker->sizeHint().height(); return pw->sizeHint() + QSize( fw*2, fw*2+ps ); } void QIMPenInput::loadProfiles() { diff --git a/inputmethods/handwriting/qimpensetup.cpp b/inputmethods/handwriting/qimpensetup.cpp index d0f9ffd..d1297a9 100644 --- a/inputmethods/handwriting/qimpensetup.cpp +++ b/inputmethods/handwriting/qimpensetup.cpp @@ -80,50 +80,50 @@ static const char * const right_xpm[] = { " ... ", " .. ", " . ", " ", " "}; QIMPenSetup::QIMPenSetup( QIMPenProfile *p, QWidget *parent, const char *name, bool modal, int WFlags ) : QDialog( parent, name, modal, WFlags ), profileCombo(0), profile(p) { setCaption( tr("Setup Handwriting Input") ); QVBoxLayout *vb = new QVBoxLayout( this ); #define MULTIPROFILE #ifdef MULTIPROFILE profileList.setAutoDelete( true ); QHBoxLayout *hb = new QHBoxLayout( vb ); hb->setMargin( 6 ); QLabel *l = new QLabel( tr("Character Profile:"), this ); hb->addWidget( l ); profileCombo = new QComboBox( this ); - connect( profileCombo, SIGNAL(activated(const QString &)), - this, SLOT(selectProfile(const QString &)) ); + connect( profileCombo, SIGNAL(activated(const QString&)), + this, SLOT(selectProfile(const QString&)) ); hb->addWidget( profileCombo ); #else profileList.append( profile ); #endif qWarning("profiles: %d", profileList.count()); QTabWidget *tw = new QTabWidget( this ); vb->addWidget( tw ); pref = new QIMPenPrefBase( this ); tw->addTab( pref, tr("Preferences") ); pref->inputStyle->setExclusive( TRUE ); style = profile->style() == QIMPenProfile::ToggleCases ? 1 : 0; pref->inputStyle->setButton( style ); connect( pref->inputStyle, SIGNAL(clicked(int)), this, SLOT(styleClicked(int)) ); pref->inputStyle->setEnabled( profile->canSelectStyle() ); multiTimeout = profile->multiStrokeTimeout(); pref->multiStrokeSlider->setValue( multiTimeout ); multiTimeoutChanged( multiTimeout ); @@ -226,50 +226,50 @@ void QIMPenSetup::accept() } else { QDialog::accept(); } } //--------------------------------------------------------------------------- QIMPenInputCharDlg::QIMPenInputCharDlg( QWidget *parent, const char *name, bool modal, int WFlags) : QDialog( parent, name, modal, WFlags ) { setCaption( tr("Enter new character") ); uni = 0; QVBoxLayout *vb = new QVBoxLayout( this, 10 ); QHBoxLayout *hb = new QHBoxLayout(); vb->addLayout( hb ); QLabel *label = new QLabel( tr("Character:"), this ); hb->addWidget( label ); QComboBox *cb = new QComboBox( TRUE, this ); connect( cb, SIGNAL(activated(int)), SLOT(setSpecial(int)) ); - connect( cb, SIGNAL(textChanged(const QString &)), - SLOT(setCharacter(const QString &)) ); + connect( cb, SIGNAL(textChanged(const QString&)), + SLOT(setCharacter(const QString&)) ); addSpecial( cb ); cb->setEditText( "" ); hb->addWidget( cb ); hb = new QHBoxLayout(); vb->addLayout( hb ); QPushButton *pb = new QPushButton( "OK", this ); connect( pb, SIGNAL(clicked()), SLOT(accept())); hb->addWidget( pb ); pb = new QPushButton( "Cancel", this ); connect( pb, SIGNAL(clicked()), SLOT(reject())); hb->addWidget( pb ); cb->setFocus(); } void QIMPenInputCharDlg::addSpecial( QComboBox *cb ) { int i = 0; while ( qimpen_specialKeys[i].code != Key_unknown ) { cb->insertItem( qimpen_specialKeys[i].name ); i++; } @@ -319,50 +319,50 @@ QIMPenEdit::QIMPenEdit( QIMPenProfile *p, QWidget *parent, QVBoxLayout *tvb = new QVBoxLayout( this, 5 ); QGridLayout *gl = new QGridLayout( tvb, 4, 2 ); gl->setRowStretch( 1, 1 ); gl->addRowSpacing( 2, 35 ); gl->addRowSpacing( 3, 35 ); charSetCombo = new QComboBox( this ); gl->addMultiCellWidget( charSetCombo, 0, 0, 0, 1 ); connect( charSetCombo, SIGNAL(activated(int)), SLOT(selectCharSet(int))); QIMPenCharSetIterator it( profile->charSets() ); for ( ; it.current(); ++it ) { charSetCombo->insertItem( it.current()->description() ); } charList = new QListBox( this ); charList->setMinimumHeight( charList->sizeHint().height() ); connect( charList, SIGNAL(highlighted(int)), SLOT(selectChar(int)) ); gl->addWidget( charList, 1, 0 ); pw = new QIMPenWidget( this ); pw->setFixedHeight( 75 ); gl->addMultiCellWidget( pw, 2, 3, 0, 0 ); - connect( pw, SIGNAL(stroke(QIMPenStroke *)), - SLOT(newStroke(QIMPenStroke *)) ); + connect( pw, SIGNAL(stroke(QIMPenStroke*)), + SLOT(newStroke(QIMPenStroke*)) ); QVBoxLayout *vb = new QVBoxLayout(); gl->addLayout( vb, 1, 1 ); newBtn = new QPushButton( tr("New..."), this ); connect( newBtn, SIGNAL(clicked()), SLOT(addNewChar()) ); vb->addWidget( newBtn ); addBtn = new QPushButton( tr("Add"), this ); connect( addBtn, SIGNAL(clicked()), SLOT(addChar()) ); vb->addWidget( addBtn ); removeBtn = new QPushButton( tr("Remove"), this ); connect( removeBtn, SIGNAL(clicked()), SLOT(removeChar()) ); vb->addWidget( removeBtn ); QPushButton *pb = new QPushButton( tr("Default"), this ); connect( pb, SIGNAL(clicked()), SLOT(defaultChars()) ); vb->addWidget( pb ); QHBoxLayout *hb = new QHBoxLayout(); gl->addLayout( hb, 2, 1 ); prevBtn = new QPushButton( this ); prevBtn->setPixmap( QPixmap( (const char **)left_xpm ) ); connect( prevBtn, SIGNAL(clicked()), SLOT(prevChar())); diff --git a/inputmethods/multikey/keyboard.cpp b/inputmethods/multikey/keyboard.cpp index aec0ad3..4f4f25f 100644 --- a/inputmethods/multikey/keyboard.cpp +++ b/inputmethods/multikey/keyboard.cpp @@ -74,50 +74,50 @@ Keyboard::Keyboard(QWidget* parent, const char* _name, WFlags f) : useRepeat = config->readBoolEntry ("useRepeat", 1); delete config; setFont( QFont( familyStr, 10 ) ); picks = new KeyboardPicks( this ); picks->setFont( QFont( familyStr, 10 ) ); picks->initialise(); if (usePicks) { QObject::connect( picks, SIGNAL(key(ushort,ushort,ushort,bool,bool) ), this, SIGNAL(key(ushort,ushort,ushort,bool,bool)) ); } else picks->hide(); loadKeyboardColors(); keys = new Keys(); repeatTimer = new QTimer( this ); connect( repeatTimer, SIGNAL(timeout()), this, SLOT(repeat()) ); QCopChannel* kbdChannel = new QCopChannel("MultiKey/Keyboard", this); - connect(kbdChannel, SIGNAL(received(const QCString &, const QByteArray &)), - this, SLOT(receive(const QCString &, const QByteArray &))); + connect(kbdChannel, SIGNAL(received(const QCString&,const QByteArray&)), + this, SLOT(receive(const QCString&,const QByteArray&))); } Keyboard::~Keyboard() { if ( configdlg ) { delete configdlg; configdlg = 0; } } /* Keyboard::resizeEvent {{{1 */ void Keyboard::resizeEvent(QResizeEvent*) { int ph = picks->sizeHint().height(); picks->setGeometry( 0, 0, width(), ph ); keyHeight = (height()-(usePicks ? ph : 0))/(keys->rows()?keys->rows():1); int nk; // number of keys? if ( useLargeKeys ) { nk = 15; } else { nk = 19; } diff --git a/libopie/big-screen/example/osplitter_mail.cpp b/libopie/big-screen/example/osplitter_mail.cpp index 4eaf3a9..4356baa 100644 --- a/libopie/big-screen/example/osplitter_mail.cpp +++ b/libopie/big-screen/example/osplitter_mail.cpp @@ -7,50 +7,50 @@ #include <qpe/qpeapplication.h> #include <opie/oapplicationfactory.h> #include "../osplitter.h" #include "osplitter_mail.h" OPIE_EXPORT_APP( OApplicationFactory<ListViews> ) class Folder { int dummy; }; // ----------------------------------------------------------------- ListViews::ListViews( QWidget* p, const char* name, WFlags fl ) : QWidget( p, name, fl ) { qApp->installEventFilter( this ); m_lstFolders.setAutoDelete( true ); QHBoxLayout *lay = new QHBoxLayout(this); m_splitter = new OSplitter( Horizontal, this, "SPlitter 1" ); lay->addWidget( m_splitter ); - connect(m_splitter, SIGNAL(sizeChange(bool, const QSize& ) ), - this, SLOT(slotSizeChange(bool, const QSize& ) ) ); + connect(m_splitter, SIGNAL(sizeChange(bool,const QSize&) ), + this, SLOT(slotSizeChange(bool,const QSize&) ) ); m_overview = new QListView( m_splitter ); m_overview->header()->setClickEnabled( FALSE ); m_overview->addColumn( tr("Folder") ); m_overview->setMaximumWidth( 200 ); m_splitter->addWidget( m_overview, "zoom", tr("Folder Overview") ); m_splitter->setSizeChange( 300 ); /* OSplitter starts with the small mode */ m_messages = 0; m_message = m_attach = 0; splitti = new OSplitter( Vertical, m_splitter, "Splitti2" ); splitti->setSizeChange( 300 ); splitti->setSizePolicy( QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding ) ); QLabel *lbl = new QLabel(splitti); lbl->setTextFormat ( Qt::RichText ); lbl->setText("<br><br><b>Test Test Test</b><br><br><p>Fooooo hjhh</p>"); m_messages = new QListView( splitti ); m_messages->addColumn(" Messages "); folder1 = new QListView( splitti ); diff --git a/libopie/colordialog.cpp b/libopie/colordialog.cpp index d46da41..b2854a6 100644 --- a/libopie/colordialog.cpp +++ b/libopie/colordialog.cpp @@ -451,52 +451,52 @@ void QColorShowLabel::mousePressEvent( QMouseEvent *e ) { mousePressed = TRUE; pressPos = e->pos(); } void QColorShowLabel::mouseReleaseEvent( QMouseEvent * ) { if ( !mousePressed ) return; mousePressed = FALSE; } QColorShower::QColorShower( QWidget *parent, const char *name ) :QWidget( parent, name) { curCol = qRgb( -1, -1, -1 ); QColIntValidator *val256 = new QColIntValidator( 0, 255, this ); QColIntValidator *val360 = new QColIntValidator( 0, 360, this ); QGridLayout *gl = new QGridLayout( this, 1, 1, 2 ); gl->setMargin( 0 ); lab = new QColorShowLabel( this ); lab->setMinimumWidth( 60 ); //### gl->addMultiCellWidget(lab, 0,-1,0,0); - connect( lab, SIGNAL( colorDropped( QRgb ) ), - this, SIGNAL( newCol( QRgb ) ) ); - connect( lab, SIGNAL( colorDropped( QRgb ) ), - this, SLOT( setRgb( QRgb ) ) ); + connect( lab, SIGNAL( colorDropped(QRgb) ), + this, SIGNAL( newCol(QRgb) ) ); + connect( lab, SIGNAL( colorDropped(QRgb) ), + this, SLOT( setRgb(QRgb) ) ); hEd = new QColNumLineEdit( this ); hEd->setValidator( val360 ); QLabel *l = new QLabel( hEd, OColorDialog::tr("Hue:"), this ); l->setAlignment( AlignRight|AlignVCenter ); gl->addWidget( l, 0, 1 ); gl->addWidget( hEd, 0, 2 ); sEd = new QColNumLineEdit( this ); sEd->setValidator( val256 ); l = new QLabel( sEd, OColorDialog::tr("Sat:"), this ); l->setAlignment( AlignRight|AlignVCenter ); gl->addWidget( l, 1, 1 ); gl->addWidget( sEd, 1, 2 ); vEd = new QColNumLineEdit( this ); vEd->setValidator( val256 ); l = new QLabel( vEd, OColorDialog::tr("Val:"), this ); l->setAlignment( AlignRight|AlignVCenter ); gl->addWidget( l, 2, 1 ); gl->addWidget( vEd, 2, 2 ); rEd = new QColNumLineEdit( this ); rEd->setValidator( val256 ); diff --git a/libopie/colorpopupmenu.cpp b/libopie/colorpopupmenu.cpp index 0d66fba..03ad233 100644 --- a/libopie/colorpopupmenu.cpp +++ b/libopie/colorpopupmenu.cpp @@ -131,42 +131,42 @@ OColorPopupMenu::OColorPopupMenu( const QColor& color, QWidget* parent, const ch addColor(QColor(0, 64, 128), 4, 1); addColor(QColor(0, 0, 128), 4, 2); addColor(QColor(64, 0, 128), 4, 3); addColor(QColor(128, 0, 128), 4, 4); addColor(QColor(128, 0, 64), 4, 5); insertItem( colorPanel ); insertSeparator(); insertItem(tr("More"),this,SLOT( moreColorClicked())); /* QAction* chooseColorAction = new QAction( tr( "More" ), tr( "More..." ), 0, colorPanel, "More" ); connect( chooseColorAction, SIGNAL( activated() ), this, SLOT( moreColorClicked() ) ); chooseColorAction->addTo( this ); */ activateItemAt( 0 ); } OColorPopupMenu::~OColorPopupMenu() { } void OColorPopupMenu::addColor( const QColor& color, int row, int col ) { OColorPanelButton* panelButton = new OColorPanelButton( color, colorPanel ); - connect( panelButton, SIGNAL( selected( const QColor& ) ), this, SLOT( buttonSelected( const QColor& ) ) ); + connect( panelButton, SIGNAL( selected(const QColor&) ), this, SLOT( buttonSelected(const QColor&) ) ); colorLayout->addWidget( panelButton, row, col ); } void OColorPopupMenu::buttonSelected( const QColor& color ) { m_color = color; emit colorSelected( color ); hide(); } void OColorPopupMenu::moreColorClicked() { QColor color = OColorDialog::getColor( m_color ); m_color = color; emit colorSelected( color ); hide(); } diff --git a/libopie/ocolorbutton.cpp b/libopie/ocolorbutton.cpp index 93fe5d0..298dba2 100644 --- a/libopie/ocolorbutton.cpp +++ b/libopie/ocolorbutton.cpp @@ -32,49 +32,49 @@ #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 & ))); + 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 c0b6efa..4258d60 100644 --- a/libopie/odevice.cpp +++ b/libopie/odevice.cpp @@ -511,49 +511,49 @@ void ODevice::initButtons ( ) if ( d-> m_buttons ) return; // Simulation uses iPAQ 3660 device buttons qDebug ( "init Buttons" ); d-> m_buttons = new QValueList <ODeviceButton>; for ( uint i = 0; i < ( sizeof( ipaq_buttons ) / sizeof( i_button )); i++ ) { i_button *ib = ipaq_buttons + i; ODeviceButton b; if (( ib-> model & Model_iPAQ_H36xx ) == Model_iPAQ_H36xx ) { b. setKeycode ( ib-> code ); b. setUserText ( QObject::tr ( "Button", ib-> utext )); b. setPixmap ( Resource::loadPixmap ( ib-> pix )); b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib-> fpressedservice ), ib-> fpressedaction )); b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib-> fheldservice ), ib-> fheldaction )); d-> m_buttons-> append ( b ); } } reloadButtonMapping ( ); QCopChannel *sysch = new QCopChannel ( "QPE/System", this ); - connect ( sysch, SIGNAL( received( const QCString &, const QByteArray & )), this, SLOT( systemMessage ( const QCString &, const QByteArray & ))); + connect ( sysch, SIGNAL( received(const QCString&,const QByteArray&)), this, SLOT( systemMessage(const QCString&,const QByteArray&))); } ODevice::~ODevice ( ) { // we leak m_devicebuttons and m_cpu_frequency // but it's a singleton and it is not so importantant // -zecke delete d; } bool ODevice::setSoftSuspend ( bool /*soft*/ ) { return false; } //#include <linux/apm_bios.h> #define APM_IOC_SUSPEND OD_IO( 'A', 2 ) /** * This method will try to suspend the device * It only works if the user is the QWS Server and the apm application * is installed. * It tries to suspend and then waits some time cause some distributions @@ -1091,50 +1091,50 @@ void Yopy::initButtons ( ) if ( d-> m_buttons ) return; d-> m_buttons = new QValueList <ODeviceButton>; for (uint i = 0; i < ( sizeof( yopy_buttons ) / sizeof(yopy_button)); i++) { yopy_button *ib = yopy_buttons + i; ODeviceButton b; b. setKeycode ( ib-> code ); b. setUserText ( QObject::tr ( "Button", ib-> utext )); b. setPixmap ( Resource::loadPixmap ( ib-> pix )); b. setFactoryPresetPressedAction (OQCopMessage(makeChannel(ib->fpressedservice), ib->fpressedaction)); b. setFactoryPresetHeldAction (OQCopMessage(makeChannel(ib->fheldservice), ib->fheldaction)); d-> m_buttons-> append ( b ); } reloadButtonMapping ( ); QCopChannel *sysch = new QCopChannel("QPE/System", this); - connect(sysch, SIGNAL(received(const QCString &, const QByteArray & )), - this, SLOT(systemMessage(const QCString &, const QByteArray & ))); + connect(sysch, SIGNAL(received(const QCString&,const QByteArray&)), + this, SLOT(systemMessage(const QCString&,const QByteArray&))); } bool Yopy::suspend() { /* Opie for Yopy does not implement its own power management at the moment. The public version runs parallel to X, and relies on the existing power management features. */ return false; } bool Yopy::setDisplayBrightness(int bright) { /* The code here works, but is disabled as the current version runs parallel to X, and relies on the existing backlight demon. */ #if 0 if ( QFile::exists("/proc/sys/pm/light") ) { int fd = ::open("/proc/sys/pm/light", O_WRONLY); if (fd >= 0 ) { if (bright) ::write(fd, "1\n", 2); else ::write(fd, "0\n", 2); ::close(fd); return true; @@ -1240,49 +1240,49 @@ void iPAQ::initButtons ( ) return; if ( isQWS( ) ) QWSServer::setKeyboardFilter ( this ); d-> m_buttons = new QValueList <ODeviceButton>; for ( uint i = 0; i < ( sizeof( ipaq_buttons ) / sizeof( i_button )); i++ ) { i_button *ib = ipaq_buttons + i; ODeviceButton b; if (( ib-> model & d-> m_model ) == d-> m_model ) { b. setKeycode ( ib-> code ); b. setUserText ( QObject::tr ( "Button", ib-> utext )); b. setPixmap ( Resource::loadPixmap ( ib-> pix )); b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib-> fpressedservice ), ib-> fpressedaction )); b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib-> fheldservice ), ib-> fheldaction )); d-> m_buttons-> append ( b ); } } reloadButtonMapping ( ); QCopChannel *sysch = new QCopChannel ( "QPE/System", this ); - connect ( sysch, SIGNAL( received( const QCString &, const QByteArray & )), this, SLOT( systemMessage ( const QCString &, const QByteArray & ))); + connect ( sysch, SIGNAL( received(const QCString&,const QByteArray&)), this, SLOT( systemMessage(const QCString&,const QByteArray&))); } //#include <linux/h3600_ts.h> // including kernel headers is evil ... typedef struct { unsigned char OffOnBlink; /* 0=off 1=on 2=Blink */ unsigned char TotalTime; /* Units of 5 seconds */ unsigned char OnTime; /* units of 100m/s */ unsigned char OffTime; /* units of 100m/s */ } LED_IN; typedef struct { unsigned char mode; unsigned char pwr; unsigned char brightness; } FLITE_IN; #define LED_ON OD_IOW( 'f', 5, LED_IN ) #define FLITE_ON OD_IOW( 'f', 7, FLITE_IN ) QValueList <OLed> iPAQ::ledList ( ) const { @@ -1726,50 +1726,50 @@ void Zaurus::initButtons ( ) default: pz_buttons = z_buttons; buttoncount = ARRAY_SIZE(z_buttons); break; } for ( int i = 0; i < buttoncount; i++ ) { struct z_button *zb = pz_buttons + i; ODeviceButton b; b. setKeycode ( zb-> code ); b. setUserText ( QObject::tr ( "Button", zb-> utext )); b. setPixmap ( Resource::loadPixmap ( zb-> pix )); b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( zb-> fpressedservice ), zb-> fpressedaction )); b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( zb-> fheldservice ), zb-> fheldaction )); d-> m_buttons-> append ( b ); } reloadButtonMapping ( ); QCopChannel *sysch = new QCopChannel ( "QPE/System", this ); - connect ( sysch, SIGNAL( received( const QCString &, const QByteArray & )), - this, SLOT( systemMessage ( const QCString &, const QByteArray & ))); + connect ( sysch, SIGNAL( received(const QCString&,const QByteArray&)), + this, SLOT( systemMessage(const QCString&,const QByteArray&))); } #include <unistd.h> #include <fcntl.h> #include <sys/ioctl.h> //#include <asm/sharp_char.h> // including kernel headers is evil ... #define SHARP_DEV_IOCTL_COMMAND_START 0x5680 #define SHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) #define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START) #define SHARP_BUZ_TOUCHSOUND 1 /* touch panel sound */ #define SHARP_BUZ_KEYSOUND 2 /* key sound */ #define SHARP_BUZ_SCHEDULE_ALARM 11 /* schedule alarm */ /* --- for SHARP_BUZZER device --- */ //#define SHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) //#define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START) #define SHARP_BUZZER_SETVOLUME (SHARP_BUZZER_IOCTL_START+1) #define SHARP_BUZZER_GETVOLUME (SHARP_BUZZER_IOCTL_START+2) @@ -2277,49 +2277,49 @@ void SIMpad::initButtons ( ) return; if ( isQWS( ) ) QWSServer::setKeyboardFilter ( this ); d-> m_buttons = new QValueList <ODeviceButton>; for ( uint i = 0; i < ( sizeof( simpad_buttons ) / sizeof( s_button )); i++ ) { s_button *sb = simpad_buttons + i; ODeviceButton b; if (( sb-> model & d-> m_model ) == d-> m_model ) { b. setKeycode ( sb-> code ); b. setUserText ( QObject::tr ( "Button", sb-> utext )); b. setPixmap ( Resource::loadPixmap ( sb-> pix )); b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( sb-> fpressedservice ), sb-> fpressedaction )); b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( sb-> fheldservice ), sb-> fheldaction )); d-> m_buttons-> append ( b ); } } reloadButtonMapping ( ); QCopChannel *sysch = new QCopChannel ( "QPE/System", this ); - connect ( sysch, SIGNAL( received( const QCString &, const QByteArray & )), this, SLOT( systemMessage ( const QCString &, const QByteArray & ))); + connect ( sysch, SIGNAL( received(const QCString&,const QByteArray&)), this, SLOT( systemMessage(const QCString&,const QByteArray&))); } // SIMpad boardcontrol register CS3 #define SIMPAD_BOARDCONTROL "/proc/cs3" #define SIMPAD_VCC_5V_EN 0x0001 // For 5V PCMCIA #define SIMPAD_VCC_3V_EN 0x0002 // FOR 3.3V PCMCIA #define SIMPAD_EN1 0x0004 // This is only for EPROM's #define SIMPAD_EN0 0x0008 // Both should be enable for 3.3V or 5V #define SIMPAD_DISPLAY_ON 0x0010 #define SIMPAD_PCMCIA_BUFF_DIS 0x0020 #define SIMPAD_MQ_RESET 0x0040 #define SIMPAD_PCMCIA_RESET 0x0080 #define SIMPAD_DECT_POWER_ON 0x0100 #define SIMPAD_IRDA_SD 0x0200 // Shutdown for powersave #define SIMPAD_RS232_ON 0x0400 #define SIMPAD_SD_MEDIAQ 0x0800 // Shutdown for powersave #define SIMPAD_LED2_ON 0x1000 #define SIMPAD_IRDA_MODE 0x2000 // Fast/Slow IrDA mode #define SIMPAD_ENABLE_5V 0x4000 // Enable 5V circuit #define SIMPAD_RESET_SIMCARD 0x8000 //SIMpad touchscreen backlight strength control #define SIMPAD_BACKLIGHT_CONTROL "/proc/driver/mq200/registers/PWM_CONTROL" #define SIMPAD_BACKLIGHT_MASK 0x00a10044 @@ -2777,49 +2777,49 @@ void Jornada::initButtons ( ) if ( d-> m_buttons ) return; // Simulation uses iPAQ 3660 device buttons qDebug ( "init Buttons" ); d-> m_buttons = new QValueList <ODeviceButton>; for ( uint i = 0; i < ( sizeof( ipaq_buttons ) / sizeof( i_button )); i++ ) { i_button *ib = ipaq_buttons + i; ODeviceButton b; if (( ib-> model & Model_iPAQ_H36xx ) == Model_iPAQ_H36xx ) { b. setKeycode ( ib-> code ); b. setUserText ( QObject::tr ( "Button", ib-> utext )); b. setPixmap ( Resource::loadPixmap ( ib-> pix )); b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib-> fpressedservice ), ib-> fpressedaction )); b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib-> fheldservice ), ib-> fheldaction )); d-> m_buttons-> append ( b ); } } reloadButtonMapping ( ); QCopChannel *sysch = new QCopChannel ( "QPE/System", this ); - connect ( sysch, SIGNAL( received( const QCString &, const QByteArray & )), this, SLOT( systemMessage ( const QCString &, const QByteArray & ))); + connect ( sysch, SIGNAL( received(const QCString&,const QByteArray&)), this, SLOT( systemMessage(const QCString&,const QByteArray&))); } #endif int Jornada::displayBrightnessResolution ( ) const { } bool Jornada::setDisplayBrightness ( int bright ) { bool res = false; int fd; if ( bright > 255 ) bright = 255; if ( bright < 0 ) bright = 0; if (( fd = ::open ( "/dev/touchscreen/0", O_WRONLY )) >= 0 ) { FLITE_IN bl; bl. mode = 1; bl. pwr = bright ? 1 : 0; bl. brightness = ( bright * ( displayBrightnessResolution ( ) - 1 ) + 127 ) / 255; res = ( ::ioctl ( fd, FLITE_ON, &bl ) == 0 ); ::close ( fd ); } diff --git a/libopie/ofileselector.cpp b/libopie/ofileselector.cpp index 1ba94ae..2a6aed0 100644 --- a/libopie/ofileselector.cpp +++ b/libopie/ofileselector.cpp @@ -102,54 +102,54 @@ QString ODocumentFileView::directory()const { void ODocumentFileView::reread() { if (!m_selector) return; m_selector->setNewVisible( showNew() ); m_selector->setCloseVisible( showClose() ); m_selector->filter = currentMimeType().join(";"); m_selector->reread(); } int ODocumentFileView::fileCount()const { if (!m_selector) return -1; return m_selector->fileCount(); } DocLnk ODocumentFileView::selectedDocument()const { if (!m_selector) return DocLnk(); return m_selector->selectedDocument(); } QWidget* ODocumentFileView::widget( QWidget* parent ) { if (!m_selector ) { m_selector = new FileSelector(currentMimeType().join(";"), parent, "fileselector", showNew(), showClose() ); - QObject::connect(m_selector, SIGNAL(fileSelected( const DocLnk& ) ), + QObject::connect(m_selector, SIGNAL(fileSelected(const DocLnk&) ), selector(), SLOT(slotDocLnkBridge(const DocLnk&) ) ); QObject::connect(m_selector, SIGNAL(closeMe() ), selector(), SIGNAL(closeMe() ) ); - QObject::connect(m_selector, SIGNAL(newSelected(const DocLnk& ) ), - selector(), SIGNAL(newSelected(const DocLnk& ) ) ); + QObject::connect(m_selector, SIGNAL(newSelected(const DocLnk&) ), + selector(), SIGNAL(newSelected(const DocLnk&) ) ); } return m_selector; } /* * This is the file system view used * we use a QListView + QListViewItems for it */ OFileSelectorItem::OFileSelectorItem( QListView* view, const QPixmap& pixmap, const QString& path, const QString& date, const QString& size, const QString& dir, bool isLocked, bool isDir ) : QListViewItem( view ) { setPixmap(0, pixmap ); setText(1, path ); setText(2, size ); setText(3, date ); m_isDir = isDir; m_dir = dir; m_locked = isLocked; } @@ -367,50 +367,50 @@ int OFileViewFileListView::fileCount()const{ return m_view->childCount(); } QString OFileViewFileListView::currentDir()const{ return m_currentDir; } OFileSelector* OFileViewFileListView::selector() { return m_sel; } bool OFileViewFileListView::eventFilter (QObject *o, QEvent *e) { if ( e->type() == QEvent::KeyPress ) { QKeyEvent *k = (QKeyEvent *)e; if ( (k->key()==Key_Enter) || (k->key()==Key_Return)) { slotClicked( Qt::LeftButton,m_view->currentItem(),QPoint(0,0),0); return true; } } return false; } void OFileViewFileListView::connectSlots() { connect(m_view, SIGNAL(clicked(QListViewItem*) ), this, SLOT(slotCurrentChanged(QListViewItem*) ) ); - connect(m_view, SIGNAL(mouseButtonClicked(int, QListViewItem*, const QPoint&, int ) ), - this, SLOT(slotClicked(int, QListViewItem*, const QPoint&, int ) ) ); + connect(m_view, SIGNAL(mouseButtonClicked(int,QListViewItem*,const QPoint&,int) ), + this, SLOT(slotClicked(int,QListViewItem*,const QPoint&,int) ) ); } void OFileViewFileListView::slotCurrentChanged( QListViewItem* item) { if (!item) return; #if 0 OFileSelectorItem *sel = static_cast<OFileSelectorItem*>(item); if (!sel->isDir() ) { selector()->m_lneEdit->setText( sel->text(1) ); // if in fileselector mode we will emit selected if ( selector()->mode() == OFileSelector::FileSelector ) { qWarning("slot Current Changed"); QStringList str = QStringList::split("->", sel->text(1) ); QString path = sel->directory() + "/" + str[0].stripWhiteSpace(); emit selector()->fileSelected( path ); DocLnk lnk( path ); emit selector()->fileSelected( lnk ); } } #endif } void OFileViewFileListView::slotClicked(int button , QListViewItem* item, const QPoint&, int ) { if (!item || ( button != Qt::LeftButton) ) @@ -759,50 +759,50 @@ bool OFileSelector::eventFilter (QObject *o, QEvent *e) { return false; } /* * This will insert the MimeTypes into the Combo Box * And also connect the changed signal * * AutoMimeTyping is disabled for now. It used to reparse a dir and then set available mimetypes */ void OFileSelector::initMime() { MimeTypes::Iterator it; for ( it = m_mimeType.begin(); it != m_mimeType.end(); ++it ) { m_cmbMime->insertItem( it.key() ); } m_cmbMime->setCurrentItem( 0 ); connect( m_cmbMime, SIGNAL(activated(int) ), this, SLOT(slotMimeTypeChanged() ) ); } void OFileSelector::initViews() { m_cmbView->insertItem( QObject::tr("Documents") ); m_cmbView->insertItem( QObject::tr("Files") ); m_cmbView->insertItem( QObject::tr("All Files") ); - connect(m_cmbView, SIGNAL(activated( const QString& ) ), - this, SLOT(slotViewChange( const QString& ) ) ); + connect(m_cmbView, SIGNAL(activated(const QString&) ), + this, SLOT(slotViewChange(const QString&) ) ); m_views.insert( QObject::tr("Documents"), new ODocumentFileView(this) ); /* see above why add both */ OFileViewInterface* in = new OFileViewFileSystem( this ); m_views.insert( QObject::tr("Files"), in ); m_views.insert( QObject::tr("All Files"), in ); } /** * d'tor */ OFileSelector::~OFileSelector() { } /** * Convience function for the fileselector * make sure to delete the DocLnk * * @see DocLnk * @todo remove in ODP */ diff --git a/libopie/ofontselector.cpp b/libopie/ofontselector.cpp index 7e07008..87b7869 100644 --- a/libopie/ofontselector.cpp +++ b/libopie/ofontselector.cpp @@ -98,63 +98,63 @@ static int findItemCB ( QComboBox *box, const QString &str ) /* static same as anon. namespace */ static int qt_version ( ) { const char *qver = qVersion ( ); return ( qver [0] - '0' ) * 100 + ( qver [2] - '0' ) * 10 + ( qver [4] - '0' ); } /** * Constructs the Selector object * @param withpreview If a font preview should be given * @param parent The parent of the Font Selector * @param name The name of the object * @param fl WidgetFlags */ OFontSelector::OFontSelector ( bool withpreview, QWidget *parent, const char *name, WFlags fl ) : QWidget ( parent, name, fl ) { d = new OFontSelectorPrivate ( ); QGridLayout *gridLayout = new QGridLayout ( this, 0, 0, 4, 4 ); gridLayout->setRowStretch ( 4, 10 ); d-> m_font_family_list = new QListBox( this, "FontListBox" ); gridLayout->addMultiCellWidget( d-> m_font_family_list, 0, 4, 0, 0 ); - connect( d-> m_font_family_list, SIGNAL( highlighted( int ) ), this, SLOT( fontFamilyClicked( int ) ) ); + connect( d-> m_font_family_list, SIGNAL( highlighted(int) ), this, SLOT( fontFamilyClicked(int) ) ); QLabel *label = new QLabel( tr( "Style" ), this ); gridLayout->addWidget( label, 0, 1 ); d-> m_font_style_list = new QComboBox( this, "StyleListBox" ); - connect( d-> m_font_style_list, SIGNAL( activated( int ) ), this, SLOT( fontStyleClicked( int ) ) ); + connect( d-> m_font_style_list, SIGNAL( activated(int) ), this, SLOT( fontStyleClicked(int) ) ); gridLayout->addWidget( d-> m_font_style_list, 1, 1 ); label = new QLabel( tr( "Size" ), this ); gridLayout->addWidget( label, 2, 1 ); d-> m_font_size_list = new QComboBox( this, "SizeListBox" ); - connect( d-> m_font_size_list, SIGNAL( activated( int ) ), - this, SLOT( fontSizeClicked( int ) ) ); + connect( d-> m_font_size_list, SIGNAL( activated(int) ), + this, SLOT( fontSizeClicked(int) ) ); gridLayout->addWidget( d-> m_font_size_list, 3, 1 ); d-> m_pointbug = ( qt_version ( ) <= 233 ); if ( withpreview ) { d-> m_preview = new QMultiLineEdit ( this, "Preview" ); d-> m_preview-> setAlignment ( AlignCenter ); d-> m_preview-> setWordWrap ( QMultiLineEdit::WidgetWidth ); d-> m_preview-> setMargin ( 3 ); d-> m_preview-> setText ( tr( "The Quick Brown Fox Jumps Over The Lazy Dog" )); gridLayout-> addRowSpacing ( 5, 4 ); gridLayout-> addMultiCellWidget ( d-> m_preview, 6, 6, 0, 1 ); gridLayout-> setRowStretch ( 6, 5 ); } else d-> m_preview = 0; loadFonts ( d-> m_font_family_list ); } OFontSelector::~OFontSelector ( ) { delete d; } diff --git a/libopie/orecurrancewidget.cpp b/libopie/orecurrancewidget.cpp index d81851e..33be269 100644 --- a/libopie/orecurrancewidget.cpp +++ b/libopie/orecurrancewidget.cpp @@ -529,50 +529,50 @@ void ORecurranceWidget::setupMonthly() { showRepeatStuff(); setupRepeatLabel( 1 ); } void ORecurranceWidget::setupYearly() { hideExtras(); lblWeekVar->hide(); spinFreq->setValue( 1 ); lblFreq->setText( tr("year(s)") ); lblFreq->show(); lblFreq->show(); showRepeatStuff(); lblVar2->show(); QString strEvery = strYearTemplate.arg( start.monthName(start.month()) ).arg( numberPlacing(start.day()) ); lblRepeat->setText( strEvery ); setupRepeatLabel( 1 ); } void ORecurranceWidget::init() { QPopupMenu *m1 = new QPopupMenu( this ); repeatPicker = new DateBookMonth( m1, 0, TRUE ); m1->insertItem( repeatPicker ); cmdEnd->setPopup( m1 ); cmdEnd->setPopupDelay( 0 ); - QObject::connect( repeatPicker, SIGNAL(dateClicked(int, int, int)), - this, SLOT(endDateChanged(int, int, int)) ); + QObject::connect( repeatPicker, SIGNAL(dateClicked(int,int,int)), + this, SLOT(endDateChanged(int,int,int)) ); QObject::connect( qApp, SIGNAL(weekChanged(bool)), this, SLOT(slotChangeStartOfWeek(bool)) ); listRTypeButtons.setAutoDelete( TRUE ); listRTypeButtons.append( cmdNone ); listRTypeButtons.append( cmdDay ); listRTypeButtons.append( cmdWeek ); listRTypeButtons.append( cmdMonth ); listRTypeButtons.append( cmdYear ); listExtra.setAutoDelete( TRUE ); listExtra.append( cmdExtra1 ); listExtra.append( cmdExtra2 ); listExtra.append( cmdExtra3 ); listExtra.append( cmdExtra4 ); listExtra.append( cmdExtra5 ); listExtra.append( cmdExtra6 ); listExtra.append( cmdExtra7 ); } void ORecurranceWidget::hideExtras() { // hide the extra buttons... fraExtra->hide(); chkNoEnd->hide(); QListIterator<QToolButton> it( listExtra ); diff --git a/libopie/otabwidget.cpp b/libopie/otabwidget.cpp index 3a9a5ec..52190b2 100644 --- a/libopie/otabwidget.cpp +++ b/libopie/otabwidget.cpp @@ -49,53 +49,53 @@ OTabWidget::OTabWidget( QWidget *parent, const char *name, TabStyle s, TabPositi s = ( TabStyle ) config.readNumEntry( "TabStyle", (int) IconTab ); if ( s <= Global || s > IconList) { s = IconTab; } QString pos = config.readEntry( "TabPosition", "Top"); if ( pos == "Bottom" ) { p = Bottom; } else { p = Top; } } widgetStack = new QWidgetStack( this, "widgetstack" ); widgetStack->setFrameStyle( QFrame::NoFrame ); widgetStack->setLineWidth( style().defaultFrameWidth() ); tabBarStack = new QWidgetStack( this, "tabbarstack" ); tabBar = new OTabBar( tabBarStack, "tabbar" ); tabBarStack->addWidget( tabBar, 0 ); - connect( tabBar, SIGNAL( selected( int ) ), this, SLOT( slotTabBarSelected( int ) ) ); + connect( tabBar, SIGNAL( selected(int) ), this, SLOT( slotTabBarSelected(int) ) ); tabList = new QComboBox( false, tabBarStack, "tablist" ); tabBarStack->addWidget( tabList, 1 ); - connect( tabList, SIGNAL( activated( int ) ), this, SLOT( slotTabListSelected( int ) ) ); + connect( tabList, SIGNAL( activated(int) ), this, SLOT( slotTabListSelected(int) ) ); tabBarPosition = p; setTabStyle( s ); setTabPosition( p ); currTab= 0x0; } OTabWidget::~OTabWidget() { } void OTabWidget::addTab( QWidget *child, const QString &icon, const QString &label ) { QPixmap iconset = loadSmooth( icon ); QTab *tab = new QTab(); if ( tabBarStyle == IconTab ) { tab->label = QString::null; } else { tab->label = label; diff --git a/libopie/otimepicker.cpp b/libopie/otimepicker.cpp index 1eca7c5..11b80ed 100644 --- a/libopie/otimepicker.cpp +++ b/libopie/otimepicker.cpp @@ -152,54 +152,54 @@ void OTimePicker::setHour(int h) { QString hour; hour.sprintf("%.2d",h); QValueListIterator<OClickableLabel *> it; for (it=hourLst.begin(); it!=hourLst.end(); it++) { if ((*it)->text() == hour) (*it)->setOn(true); else (*it)->setOn(false); } tm.setHMS(h,tm.minute(),0); } /** * This is a modal Dialog. * * @param parent The parent widget * @param name The name of the object * @param fl Possible window flags */ OTimePickerDialog::OTimePickerDialog ( QWidget* parent, const char* name, WFlags fl ) : OTimePickerDialogBase (parent , name, true , fl) { - connect ( m_timePicker, SIGNAL( timeChanged( const QTime& ) ), - this, SLOT( setTime ( const QTime& ) ) ); - connect ( minuteField, SIGNAL( textChanged ( const QString& ) ), - this, SLOT ( setMinute ( const QString& ) ) ); - connect ( hourField, SIGNAL( textChanged ( const QString& ) ), - this, SLOT ( setHour ( const QString& ) ) ); + connect ( m_timePicker, SIGNAL( timeChanged(const QTime&) ), + this, SLOT( setTime(const QTime&) ) ); + connect ( minuteField, SIGNAL( textChanged(const QString&) ), + this, SLOT ( setMinute(const QString&) ) ); + connect ( hourField, SIGNAL( textChanged(const QString&) ), + this, SLOT ( setHour(const QString&) ) ); } /** * @return the time */ QTime OTimePickerDialog::time()const { return m_time; } /** * Set the time to time * @param time The time to be set */ void OTimePickerDialog::setTime( const QTime& time ) { m_time = time; m_timePicker->setHour ( time.hour() ); m_timePicker->setMinute( time.minute() ); // Set Textfields if ( time.hour() < 10 ) diff --git a/libopie/pim/ocontactaccess.cpp b/libopie/pim/ocontactaccess.cpp index 2e3ec1f..bc359f7 100644 --- a/libopie/pim/ocontactaccess.cpp +++ b/libopie/pim/ocontactaccess.cpp @@ -1,47 +1,52 @@ /* * Class to manage the Contacts. * * 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. * ===================================================================== * Info: This class could just work with a change in the header-file * of the Contact class ! Therefore our libopie only compiles * with our version of libqpe * ===================================================================== * ToDo: XML-Backend: Automatic reload if something was changed... * * * ===================================================================== * Version: $Id$ * ===================================================================== * History: * $Log$ + * Revision 1.9 2004/03/02 12:14:22 alwin + * run the optimize_connect script + * the whole cvs is tagged with "before_optimize_connect" if there are problems you + * can check the diff (but it had compiled and run here) + * * Revision 1.8 2003/05/08 13:55:09 tille * search stuff * and match, toRichText & toShortText in oevent * * Revision 1.7 2002/11/13 14:14:51 eilers * Added sorted for Contacts.. * * Revision 1.6 2002/11/01 15:10:42 eilers * Added regExp-search in database for all fields in a contact. * * Revision 1.5 2002/10/16 10:52:40 eilers * Added some docu to the interface and now using the cache infrastucture by zecke.. :) * * Revision 1.4 2002/10/14 16:21:54 eilers * Some minor interface updates * * Revision 1.3 2002/10/07 17:34:24 eilers * added OBackendFactory for advanced backend access * * Revision 1.2 2002/10/02 16:18:11 eilers * debugged and seems to work almost perfectly .. * * Revision 1.1 2002/09/27 17:11:44 eilers * Added API for accessing the Contact-Database ! It is compiling, but @@ -70,54 +75,54 @@ #include <unistd.h> #include <stdlib.h> #include "ocontactaccessbackend_xml.h" OContactAccess::OContactAccess ( const QString appname, const QString , OContactAccessBackend* end, bool autosync ): OPimAccessTemplate<OContact>( end ) { /* take care of the backend. If there is no one defined, we * will use the XML-Backend as default (until we have a cute SQL-Backend..). */ if( end == 0 ) { qWarning ("Using BackendFactory !"); end = OBackendFactory<OContactAccessBackend>::Default( "contact", appname ); } // Set backend locally and in template m_backEnd = end; OPimAccessTemplate<OContact>::setBackEnd (end); /* Connect signal of external db change to function */ QCopChannel *dbchannel = new QCopChannel( "QPE/PIM", this ); - connect( dbchannel, SIGNAL(received(const QCString &, const QByteArray &)), - this, SLOT(copMessage( const QCString &, const QByteArray &)) ); + connect( dbchannel, SIGNAL(received(const QCString&,const QByteArray&)), + this, SLOT(copMessage(const QCString&,const QByteArray&)) ); if ( autosync ){ QCopChannel *syncchannel = new QCopChannel( "QPE/Sync", this ); - connect( syncchannel, SIGNAL(received(const QCString &, const QByteArray &)), - this, SLOT(copMessage( const QCString &, const QByteArray &)) ); + connect( syncchannel, SIGNAL(received(const QCString&,const QByteArray&)), + this, SLOT(copMessage(const QCString&,const QByteArray&)) ); } } OContactAccess::~OContactAccess () { /* The user may forget to save the changed database, therefore try to * do it for him.. */ save(); // delete m_backEnd; is done by template.. } bool OContactAccess::save () { /* If the database was changed externally, we could not save the * Data. This will remove added items which is unacceptable ! * Therefore: Reload database and merge the data... */ if ( OPimAccessTemplate<OContact>::wasChangedExternally() ) reload(); bool status = OPimAccessTemplate<OContact>::save(); diff --git a/libopie/pim/opimmainwindow.cpp b/libopie/pim/opimmainwindow.cpp index 2739e26..99a0333 100644 --- a/libopie/pim/opimmainwindow.cpp +++ b/libopie/pim/opimmainwindow.cpp @@ -1,48 +1,48 @@ #include <qapplication.h> #include <qdatetime.h> #include <qcopchannel_qws.h> #include <qpe/sound.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/qpeapplication.h> #include "opimresolver.h" #include "opimmainwindow.h" OPimMainWindow::OPimMainWindow( const QString& service, QWidget* parent, const char* name, WFlags flag ) : QMainWindow( parent, name, flag ), m_rtti(-1), m_service( service ), m_fallBack(0l) { /* * let's generate our QCopChannel */ m_str = QString("QPE/"+m_service).local8Bit(); m_channel= new QCopChannel(m_str, this ); - connect(m_channel, SIGNAL(received(const QCString&, const QByteArray& ) ), - this, SLOT( appMessage( const QCString&, const QByteArray& ) ) ); - connect(qApp, SIGNAL(appMessage(const QCString&, const QByteArray& ) ), - this, SLOT( appMessage( const QCString&, const QByteArray& ) ) ); + connect(m_channel, SIGNAL(received(const QCString&,const QByteArray&) ), + this, SLOT( appMessage(const QCString&,const QByteArray&) ) ); + connect(qApp, SIGNAL(appMessage(const QCString&,const QByteArray&) ), + this, SLOT( appMessage(const QCString&,const QByteArray&) ) ); /* connect flush and reload */ connect(qApp, SIGNAL(flush() ), this, SLOT(flush() ) ); connect(qApp, SIGNAL(reload() ), this, SLOT(reload() ) ); } OPimMainWindow::~OPimMainWindow() { delete m_channel; } QCopChannel* OPimMainWindow::channel() { return m_channel; } void OPimMainWindow::doSetDocument( const QString& ) { } void OPimMainWindow::appMessage( const QCString& cmd, const QByteArray& array ) { bool needShow = false; /* * create demands to create * a new record... */ QDataStream stream(array, IO_ReadOnly); if ( cmd == "create()" ) { diff --git a/libopie2/examples/opieui/osplitter_example/osplitter_mail.cpp b/libopie2/examples/opieui/osplitter_example/osplitter_mail.cpp index a75f9dc..789496c 100644 --- a/libopie2/examples/opieui/osplitter_example/osplitter_mail.cpp +++ b/libopie2/examples/opieui/osplitter_example/osplitter_mail.cpp @@ -4,50 +4,50 @@ #include <qheader.h> #include <qlayout.h> #include <qpe/qpeapplication.h> #include <opie2/oapplicationfactory.h> #include "osplitter_mail.h" OPIE_EXPORT_APP( OApplicationFactory<ListViews> ) class Folder { int dummy; }; // ----------------------------------------------------------------- ListViews::ListViews( QWidget* p, const char* name, WFlags fl ) : QWidget( p, name, fl ) { qApp->installEventFilter( this ); m_lstFolders.setAutoDelete( true ); QHBoxLayout *lay = new QHBoxLayout(this); m_splitter = new OSplitter( Horizontal, this, "SPlitter 1" ); lay->addWidget( m_splitter ); - connect(m_splitter, SIGNAL(sizeChange(bool, const QSize& ) ), - this, SLOT(slotSizeChange(bool, const QSize& ) ) ); + connect(m_splitter, SIGNAL(sizeChange(bool,const QSize&) ), + this, SLOT(slotSizeChange(bool,const QSize&) ) ); m_overview = new QListView( m_splitter ); m_overview->header()->setClickEnabled( FALSE ); m_overview->addColumn( tr("Folder") ); m_overview->setMaximumWidth( 200 ); m_splitter->addWidget( m_overview, "zoom", tr("Folder Overview") ); m_splitter->setSizeChange( 300 ); /* OSplitter starts with the small mode */ m_messages = 0; m_message = m_attach = 0; splitti = new OSplitter( Vertical, m_splitter, "Splitti2" ); splitti->setSizeChange( 300 ); splitti->setSizePolicy( QSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding ) ); QLabel *lbl = new QLabel(splitti); lbl->setTextFormat ( Qt::RichText ); lbl->setText("<br><br><b>Test Test Test</b><br><br><p>Fooooo hjhh</p>"); m_messages = new QListView( splitti ); m_messages->addColumn(" Messages "); folder1 = new QListView( splitti ); diff --git a/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.cpp b/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.cpp index f62729c..0d8bc9f 100644 --- a/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.cpp +++ b/libopie2/examples/opieui/oversatileviewdemo/opieuidemo.cpp @@ -89,49 +89,49 @@ void OpieUIDemo::demo( int d ) { switch (d) { case ocompletionbox: demoOCompletionBox(); break; case olineedit: demoOLineEdit(); break; case ocombobox: demoOComboBox(); break; case oeditlistbox: demoOEditListBox(); break; case oselector: demoOSelector(); break; } } void OpieUIDemo::demoOCompletionBox() { qDebug( "ocompletionbox" ); OCompletionBox* box = new OCompletionBox( 0 ); box->insertItem( "This CompletionBox" ); box->insertItem( "Says 'Hello World'" ); box->insertItem( "Here are some" ); box->insertItem( "Additional Items" ); box->insertItem( "Complete Completion Box" ); - connect( box, SIGNAL( activated( const QString& ) ), this, SLOT( messageBox( const QString& ) ) ); + connect( box, SIGNAL( activated(const QString&) ), this, SLOT( messageBox(const QString&) ) ); box->popup(); } void OpieUIDemo::demoOLineEdit() { qDebug( "olineedit" ); OLineEdit *edit = new OLineEdit( 0, "lineedit" ); edit->setCompletionMode( OGlobalSettings::CompletionPopup ); OCompletion* comp = edit->completionObject(); QStringList list; list << "mickeyl@handhelds.org"; list << "mickey@tm.informatik.uni-frankfurt.de"; list << "mickey@vanille.de"; comp->setItems( list ); edit->show(); } diff --git a/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.cpp b/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.cpp index cf1e443..9db4e62 100644 --- a/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.cpp +++ b/libopie2/examples/opieui/oversatileviewdemo/oversatileviewdemo.cpp @@ -53,65 +53,65 @@ OVersatileViewDemo::OVersatileViewDemo( QWidget* parent, const char* name, WFlag QPixmap opened( "folder_opened.png" ); QPixmap closed( "folder_closed.png" ); QPixmap leaf32( "leaf32.png" ); QPixmap opened32( "folder_opened32.png" ); QPixmap closed32( "folder_closed32.png" ); vv->setDefaultPixmaps( OVersatileView::Tree, leaf, opened, closed ); vv->setDefaultPixmaps( OVersatileView::Icons, leaf32, opened32, closed32 ); OVersatileViewItem* item; OVersatileViewItem* item2; for ( int i = 0; i < 5; ++i ) { counter.sprintf( "%d", i ); item = new OVersatileViewItem( vv, "Item", "Text", "Some more", counter ); item->setRenameEnabled( true ); item2 = new OVersatileViewItem( item, "OSubitem", "123", "...", counter ); item2->setRenameEnabled( true ); } connect( vv, SIGNAL( selectionChanged() ), this, SLOT( selectionChanged() ) ); - connect( vv, SIGNAL( selectionChanged( OVersatileViewItem * ) ), this, SLOT( selectionChanged( OVersatileViewItem * ) ) ); - connect( vv, SIGNAL( currentChanged( OVersatileViewItem * ) ), this, SLOT( currentChanged( OVersatileViewItem * ) ) ); - connect( vv, SIGNAL( clicked( OVersatileViewItem * ) ), this, SLOT( clicked( OVersatileViewItem * ) ) ); - connect( vv, SIGNAL( pressed( OVersatileViewItem * ) ), this, SLOT( pressed( OVersatileViewItem * ) ) ); + connect( vv, SIGNAL( selectionChanged(OVersatileViewItem*) ), this, SLOT( selectionChanged(OVersatileViewItem*) ) ); + connect( vv, SIGNAL( currentChanged(OVersatileViewItem*) ), this, SLOT( currentChanged(OVersatileViewItem*) ) ); + connect( vv, SIGNAL( clicked(OVersatileViewItem*) ), this, SLOT( clicked(OVersatileViewItem*) ) ); + connect( vv, SIGNAL( pressed(OVersatileViewItem*) ), this, SLOT( pressed(OVersatileViewItem*) ) ); - connect( vv, SIGNAL( doubleClicked( OVersatileViewItem * ) ), this, SLOT( doubleClicked( OVersatileViewItem * ) ) ); - connect( vv, SIGNAL( returnPressed( OVersatileViewItem * ) ), this, SLOT( returnPressed( OVersatileViewItem * ) ) ); + connect( vv, SIGNAL( doubleClicked(OVersatileViewItem*) ), this, SLOT( doubleClicked(OVersatileViewItem*) ) ); + connect( vv, SIGNAL( returnPressed(OVersatileViewItem*) ), this, SLOT( returnPressed(OVersatileViewItem*) ) ); - connect( vv, SIGNAL( onItem( OVersatileViewItem * ) ), this, SLOT( onItem( OVersatileViewItem * ) ) ); + connect( vv, SIGNAL( onItem(OVersatileViewItem*) ), this, SLOT( onItem(OVersatileViewItem*) ) ); connect( vv, SIGNAL( onViewport() ), this, SLOT( onViewport() ) ); - connect( vv, SIGNAL( expanded( OVersatileViewItem * ) ), this, SLOT( expanded( OVersatileViewItem * ) ) ); - connect( vv, SIGNAL( collapsed( OVersatileViewItem * ) ), this, SLOT( collapsed( OVersatileViewItem * ) ) ); + connect( vv, SIGNAL( expanded(OVersatileViewItem*) ), this, SLOT( expanded(OVersatileViewItem*) ) ); + connect( vv, SIGNAL( collapsed(OVersatileViewItem*) ), this, SLOT( collapsed(OVersatileViewItem*) ) ); connect( vv, SIGNAL( moved() ), this, SLOT( moved() ) ); - connect( vv, SIGNAL( contextMenuRequested( OVersatileViewItem *, const QPoint&, int ) ), this, SLOT( contextMenuRequested( OVersatileViewItem *, const QPoint&, int ) ) ); + connect( vv, SIGNAL( contextMenuRequested(OVersatileViewItem*,const QPoint&,int) ), this, SLOT( contextMenuRequested(OVersatileViewItem*,const QPoint&,int) ) ); } OVersatileViewDemo::~OVersatileViewDemo() { } void OVersatileViewDemo::selectionChanged() { qDebug( "received signal selectionChanged()" ); } void OVersatileViewDemo::selectionChanged( OVersatileViewItem * item ) { qDebug( "received signal selectionChanged(OVersatileViewItem*)" ); } void OVersatileViewDemo::currentChanged( OVersatileViewItem * item ) { qDebug( "received signal currentChanged( OVersatileViewItem * )" ); } void OVersatileViewDemo::clicked( OVersatileViewItem * item ) { qDebug( "received signal clicked( OVersatileViewItem * )" ); } void OVersatileViewDemo::pressed( OVersatileViewItem * item ) diff --git a/libopie2/opiecore/device/odevice.cpp b/libopie2/opiecore/device/odevice.cpp index b8d48fe..27b0e53 100644 --- a/libopie2/opiecore/device/odevice.cpp +++ b/libopie2/opiecore/device/odevice.cpp @@ -124,49 +124,49 @@ void ODevice::systemMessage ( const QCString &msg, const QByteArray & ) { if ( msg == "deviceButtonMappingChanged()" ) { reloadButtonMapping(); } } void ODevice::init() { } /** * This method initialises the button mapping */ void ODevice::initButtons() { if ( d->m_buttons ) return; qDebug ( "init Buttons" ); d->m_buttons = new QValueList <ODeviceButton>; reloadButtonMapping(); QCopChannel *sysch = new QCopChannel ( "QPE/System", this ); - connect ( sysch, SIGNAL( received( const QCString &, const QByteArray & )), this, SLOT( systemMessage ( const QCString &, const QByteArray & ))); + connect ( sysch, SIGNAL( received(const QCString&,const QByteArray&)), this, SLOT( systemMessage(const QCString&,const QByteArray&))); } ODevice::~ODevice() { // we leak m_devicebuttons and m_cpu_frequency // but it's a singleton and it is not so importantant // -zecke delete d; } bool ODevice::setSoftSuspend ( bool /*soft*/ ) { return false; } //#include <linux/apm_bios.h> #define APM_IOC_SUSPEND OD_IO( 'A', 2 ) /** * This method will try to suspend the device * It only works if the user is the QWS Server and the apm application * is installed. * It tries to suspend and then waits some time cause some distributions diff --git a/libopie2/opiecore/device/odevice_ipaq.cpp b/libopie2/opiecore/device/odevice_ipaq.cpp index cc4b01a..8ecea1b 100644 --- a/libopie2/opiecore/device/odevice_ipaq.cpp +++ b/libopie2/opiecore/device/odevice_ipaq.cpp @@ -191,49 +191,49 @@ void iPAQ::initButtons() return; if ( isQWS( ) ) QWSServer::setKeyboardFilter ( this ); d->m_buttons = new QValueList <ODeviceButton>; for ( uint i = 0; i < ( sizeof( ipaq_buttons ) / sizeof( i_button )); i++ ) { i_button *ib = ipaq_buttons + i; ODeviceButton b; if (( ib->model & d->m_model ) == d->m_model ) { b. setKeycode ( ib->code ); b. setUserText ( QObject::tr ( "Button", ib->utext )); b. setPixmap ( Resource::loadPixmap ( ib->pix )); b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( ib->fpressedservice ), ib->fpressedaction )); b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( ib->fheldservice ), ib->fheldaction )); d->m_buttons->append ( b ); } } reloadButtonMapping(); QCopChannel *sysch = new QCopChannel ( "QPE/System", this ); - connect ( sysch, SIGNAL( received( const QCString &, const QByteArray & )), this, SLOT( systemMessage ( const QCString &, const QByteArray & ))); + connect ( sysch, SIGNAL( received(const QCString&,const QByteArray&)), this, SLOT( systemMessage(const QCString&,const QByteArray&))); } QValueList <OLed> iPAQ::ledList() const { QValueList <OLed> vl; vl << Led_Power; if ( d->m_model == Model_iPAQ_H38xx ) vl << Led_BlueTooth; return vl; } QValueList <OLedState> iPAQ::ledStateList ( OLed l ) const { QValueList <OLedState> vl; if ( l == Led_Power ) vl << Led_Off << Led_On << Led_BlinkSlow << Led_BlinkFast; else if ( l == Led_BlueTooth && d->m_model == Model_iPAQ_H38xx ) vl << Led_Off; // << Led_On << ??? return vl; } diff --git a/libopie2/opiecore/device/odevice_simpad.cpp b/libopie2/opiecore/device/odevice_simpad.cpp index 31b9297..90aca2f 100644 --- a/libopie2/opiecore/device/odevice_simpad.cpp +++ b/libopie2/opiecore/device/odevice_simpad.cpp @@ -168,49 +168,49 @@ void SIMpad::initButtons() return; if ( isQWS( ) ) QWSServer::setKeyboardFilter ( this ); d->m_buttons = new QValueList <ODeviceButton>; for ( uint i = 0; i < ( sizeof( simpad_buttons ) / sizeof( s_button )); i++ ) { s_button *sb = simpad_buttons + i; ODeviceButton b; if (( sb->model & d->m_model ) == d->m_model ) { b. setKeycode ( sb->code ); b. setUserText ( QObject::tr ( "Button", sb->utext )); b. setPixmap ( Resource::loadPixmap ( sb->pix )); b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( sb->fpressedservice ), sb->fpressedaction )); b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( sb->fheldservice ), sb->fheldaction )); d->m_buttons->append ( b ); } } reloadButtonMapping(); QCopChannel *sysch = new QCopChannel ( "QPE/System", this ); - connect ( sysch, SIGNAL( received( const QCString &, const QByteArray & )), this, SLOT( systemMessage ( const QCString &, const QByteArray & ))); + connect ( sysch, SIGNAL( received(const QCString&,const QByteArray&)), this, SLOT( systemMessage(const QCString&,const QByteArray&))); } // SIMpad boardcontrol register CS3 #define SIMPAD_BOARDCONTROL "/proc/cs3" #define SIMPAD_VCC_5V_EN 0x0001 // For 5V PCMCIA #define SIMPAD_VCC_3V_EN 0x0002 // FOR 3.3V PCMCIA #define SIMPAD_EN1 0x0004 // This is only for EPROM's #define SIMPAD_EN0 0x0008 // Both should be enable for 3.3V or 5V #define SIMPAD_DISPLAY_ON 0x0010 #define SIMPAD_PCMCIA_BUFF_DIS 0x0020 #define SIMPAD_MQ_RESET 0x0040 #define SIMPAD_PCMCIA_RESET 0x0080 #define SIMPAD_DECT_POWER_ON 0x0100 #define SIMPAD_IRDA_SD 0x0200 // Shutdown for powersave #define SIMPAD_RS232_ON 0x0400 #define SIMPAD_SD_MEDIAQ 0x0800 // Shutdown for powersave #define SIMPAD_LED2_ON 0x1000 #define SIMPAD_IRDA_MODE 0x2000 // Fast/Slow IrDA mode #define SIMPAD_ENABLE_5V 0x4000 // Enable 5V circuit #define SIMPAD_RESET_SIMCARD 0x8000 //SIMpad touchscreen backlight strength control #define SIMPAD_BACKLIGHT_CONTROL "/proc/driver/mq200/registers/PWM_CONTROL" #define SIMPAD_BACKLIGHT_MASK 0x00a10044 diff --git a/libopie2/opiecore/device/odevice_yopy.cpp b/libopie2/opiecore/device/odevice_yopy.cpp index a76f90b..d241db8 100644 --- a/libopie2/opiecore/device/odevice_yopy.cpp +++ b/libopie2/opiecore/device/odevice_yopy.cpp @@ -98,50 +98,50 @@ void Yopy::initButtons() return ; d->m_buttons = new QValueList <ODeviceButton>; for ( uint i = 0; i < ( sizeof( yopy_buttons ) / sizeof( yopy_button ) ); i++ ) { yopy_button *ib = yopy_buttons + i; ODeviceButton b; b. setKeycode ( ib->code ); b. setUserText ( QObject::tr ( "Button", ib->utext ) ); b. setPixmap ( Resource::loadPixmap ( ib->pix ) ); b. setFactoryPresetPressedAction ( OQCopMessage( makeChannel( ib->fpressedservice ), ib->fpressedaction ) ); b. setFactoryPresetHeldAction ( OQCopMessage( makeChannel( ib->fheldservice ), ib->fheldaction ) ); d->m_buttons->append ( b ); } reloadButtonMapping(); QCopChannel *sysch = new QCopChannel( "QPE/System", this ); - connect( sysch, SIGNAL( received( const QCString &, const QByteArray & ) ), - this, SLOT( systemMessage( const QCString &, const QByteArray & ) ) ); + connect( sysch, SIGNAL( received(const QCString&,const QByteArray&) ), + this, SLOT( systemMessage(const QCString&,const QByteArray&) ) ); } bool Yopy::suspend() { /* Opie for Yopy does not implement its own power management at the moment. The public version runs parallel to X, and relies on the existing power management features. */ return false; } bool Yopy::setDisplayBrightness( int bright ) { /* The code here works, but is disabled as the current version runs parallel to X, and relies on the existing backlight demon. */ #if 0 if ( QFile::exists( "/proc/sys/pm/light" ) ) { int fd = ::open( "/proc/sys/pm/light", O_WRONLY ); if ( fd >= 0 ) { if ( bright ) ::write( fd, "1\n", 2 ); diff --git a/libopie2/opiecore/device/odevice_zaurus.cpp b/libopie2/opiecore/device/odevice_zaurus.cpp index 9d23a12..8ab3cbe 100644 --- a/libopie2/opiecore/device/odevice_zaurus.cpp +++ b/libopie2/opiecore/device/odevice_zaurus.cpp @@ -231,50 +231,50 @@ void Zaurus::initButtons() default: pz_buttons = z_buttons; buttoncount = ARRAY_SIZE(z_buttons); break; } for ( int i = 0; i < buttoncount; i++ ) { struct z_button *zb = pz_buttons + i; ODeviceButton b; b. setKeycode ( zb->code ); b. setUserText ( QObject::tr ( "Button", zb->utext )); b. setPixmap ( Resource::loadPixmap ( zb->pix )); b. setFactoryPresetPressedAction ( OQCopMessage ( makeChannel ( zb->fpressedservice ), zb->fpressedaction )); b. setFactoryPresetHeldAction ( OQCopMessage ( makeChannel ( zb->fheldservice ), zb->fheldaction )); d->m_buttons->append ( b ); } reloadButtonMapping(); QCopChannel *sysch = new QCopChannel ( "QPE/System", this ); - connect ( sysch, SIGNAL( received( const QCString &, const QByteArray & )), - this, SLOT( systemMessage ( const QCString &, const QByteArray & ))); + connect ( sysch, SIGNAL( received(const QCString&,const QByteArray&)), + this, SLOT( systemMessage(const QCString&,const QByteArray&))); } #include <unistd.h> #include <fcntl.h> #include <sys/ioctl.h> //#include <asm/sharp_char.h> // including kernel headers is evil ... #define SHARP_DEV_IOCTL_COMMAND_START 0x5680 #define SHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) #define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START) #define SHARP_BUZ_TOUCHSOUND 1 /* touch panel sound */ #define SHARP_BUZ_KEYSOUND 2 /* key sound */ #define SHARP_BUZ_SCHEDULE_ALARM 11 /* schedule alarm */ /* --- for SHARP_BUZZER device --- */ //#define SHARP_BUZZER_IOCTL_START (SHARP_DEV_IOCTL_COMMAND_START) //#define SHARP_BUZZER_MAKESOUND (SHARP_BUZZER_IOCTL_START) #define SHARP_BUZZER_SETVOLUME (SHARP_BUZZER_IOCTL_START+1) #define SHARP_BUZZER_GETVOLUME (SHARP_BUZZER_IOCTL_START+2) diff --git a/libopie2/opiecore/oprocess.cpp b/libopie2/opiecore/oprocess.cpp index 0a361a1..6349c83 100644 --- a/libopie2/opiecore/oprocess.cpp +++ b/libopie2/opiecore/oprocess.cpp @@ -651,70 +651,70 @@ int OProcess::setupCommunication( Communication comm ) int OProcess::commSetupDoneP() { int ok = 1; if ( communication != NoCommunication ) { if ( communication & Stdin ) close( in[ 0 ] ); if ( communication & Stdout ) close( out[ 1 ] ); if ( communication & Stderr ) close( err[ 1 ] ); // Don't create socket notifiers and set the sockets non-blocking if // blocking is requested. if ( run_mode == Block ) return ok; if ( communication & Stdin ) { // ok &= (-1 != fcntl(in[1], F_SETFL, O_NONBLOCK)); innot = new QSocketNotifier( in[ 1 ], QSocketNotifier::Write, this ); CHECK_PTR( innot ); innot->setEnabled( false ); // will be enabled when data has to be sent - QObject::connect( innot, SIGNAL( activated( int ) ), - this, SLOT( slotSendData( int ) ) ); + QObject::connect( innot, SIGNAL( activated(int) ), + this, SLOT( slotSendData(int) ) ); } if ( communication & Stdout ) { // ok &= (-1 != fcntl(out[0], F_SETFL, O_NONBLOCK)); outnot = new QSocketNotifier( out[ 0 ], QSocketNotifier::Read, this ); CHECK_PTR( outnot ); - QObject::connect( outnot, SIGNAL( activated( int ) ), - this, SLOT( slotChildOutput( int ) ) ); + QObject::connect( outnot, SIGNAL( activated(int) ), + this, SLOT( slotChildOutput(int) ) ); if ( communication & NoRead ) suspend(); } if ( communication & Stderr ) { // ok &= (-1 != fcntl(err[0], F_SETFL, O_NONBLOCK)); errnot = new QSocketNotifier( err[ 0 ], QSocketNotifier::Read, this ); CHECK_PTR( errnot ); - QObject::connect( errnot, SIGNAL( activated( int ) ), - this, SLOT( slotChildError( int ) ) ); + QObject::connect( errnot, SIGNAL( activated(int) ), + this, SLOT( slotChildError(int) ) ); } } return ok; } int OProcess::commSetupDoneC() { int ok = 1; struct linger so; memset( &so, 0, sizeof( so ) ); if ( communication & Stdin ) close( in[ 1 ] ); if ( communication & Stdout ) close( out[ 0 ] ); if ( communication & Stderr ) close( err[ 0 ] ); if ( communication & Stdin ) ok &= dup2( in[ 0 ], STDIN_FILENO ) != -1; else { int null_fd = open( "/dev/null", O_RDONLY ); ok &= dup2( null_fd, STDIN_FILENO ) != -1; diff --git a/libopie2/opiepim/core/ocontactaccess.cpp b/libopie2/opiepim/core/ocontactaccess.cpp index c12e138..4f9b504 100644 --- a/libopie2/opiepim/core/ocontactaccess.cpp +++ b/libopie2/opiepim/core/ocontactaccess.cpp @@ -52,54 +52,54 @@ #include <stdlib.h> #include <opie2/ocontactaccessbackend_xml.h> namespace Opie { OPimContactAccess::OPimContactAccess ( const QString appname, const QString , OPimContactAccessBackend* end, bool autosync ): OPimAccessTemplate<OPimContact>( end ) { /* take care of the backend. If there is no one defined, we * will use the XML-Backend as default (until we have a cute SQL-Backend..). */ if( end == 0 ) { qWarning ("Using BackendFactory !"); end = OBackendFactory<OPimContactAccessBackend>::Default( "contact", appname ); } // Set backend locally and in template m_backEnd = end; OPimAccessTemplate<OPimContact>::setBackEnd (end); /* Connect signal of external db change to function */ QCopChannel *dbchannel = new QCopChannel( "QPE/PIM", this ); - connect( dbchannel, SIGNAL(received(const QCString &, const QByteArray &)), - this, SLOT(copMessage( const QCString &, const QByteArray &)) ); + connect( dbchannel, SIGNAL(received(const QCString&,const QByteArray&)), + this, SLOT(copMessage(const QCString&,const QByteArray&)) ); if ( autosync ){ QCopChannel *syncchannel = new QCopChannel( "QPE/Sync", this ); - connect( syncchannel, SIGNAL(received(const QCString &, const QByteArray &)), - this, SLOT(copMessage( const QCString &, const QByteArray &)) ); + connect( syncchannel, SIGNAL(received(const QCString&,const QByteArray&)), + this, SLOT(copMessage(const QCString&,const QByteArray&)) ); } } OPimContactAccess::~OPimContactAccess () { /* The user may forget to save the changed database, therefore try to * do it for him.. */ save(); // delete m_backEnd; is done by template.. } bool OPimContactAccess::save () { /* If the database was changed externally, we could not save the * Data. This will remove added items which is unacceptable ! * Therefore: Reload database and merge the data... */ if ( OPimAccessTemplate<OPimContact>::wasChangedExternally() ) reload(); bool status = OPimAccessTemplate<OPimContact>::save(); diff --git a/libopie2/opiepim/ui/opimmainwindow.cpp b/libopie2/opiepim/ui/opimmainwindow.cpp index 10ed743..40dc297 100644 --- a/libopie2/opiepim/ui/opimmainwindow.cpp +++ b/libopie2/opiepim/ui/opimmainwindow.cpp @@ -26,52 +26,52 @@ Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <qapplication.h> #include <qdatetime.h> #include <qcopchannel_qws.h> #include <qpe/sound.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/qpeapplication.h> #include <opie2/opimresolver.h> #include "opimmainwindow.h" namespace Opie { OPimMainWindow::OPimMainWindow( const QString& service, QWidget* parent, const char* name, WFlags flag ) : QMainWindow( parent, name, flag ), m_rtti(-1), m_service( service ), m_fallBack(0l) { /* * let's generate our QCopChannel */ m_str = QString("QPE/"+m_service).local8Bit(); m_channel= new QCopChannel(m_str, this ); - connect(m_channel, SIGNAL(received(const QCString&, const QByteArray& ) ), - this, SLOT( appMessage( const QCString&, const QByteArray& ) ) ); - connect(qApp, SIGNAL(appMessage(const QCString&, const QByteArray& ) ), - this, SLOT( appMessage( const QCString&, const QByteArray& ) ) ); + connect(m_channel, SIGNAL(received(const QCString&,const QByteArray&) ), + this, SLOT( appMessage(const QCString&,const QByteArray&) ) ); + connect(qApp, SIGNAL(appMessage(const QCString&,const QByteArray&) ), + this, SLOT( appMessage(const QCString&,const QByteArray&) ) ); /* connect flush and reload */ connect(qApp, SIGNAL(flush() ), this, SLOT(flush() ) ); connect(qApp, SIGNAL(reload() ), this, SLOT(reload() ) ); } OPimMainWindow::~OPimMainWindow() { delete m_channel; } QCopChannel* OPimMainWindow::channel() { return m_channel; } void OPimMainWindow::doSetDocument( const QString& ) { } void OPimMainWindow::appMessage( const QCString& cmd, const QByteArray& array ) { bool needShow = false; /* * create demands to create * a new record... */ QDataStream stream(array, IO_ReadOnly); if ( cmd == "create()" ) { diff --git a/libopie2/opiepim/ui/opimrecurrencewidget.cpp b/libopie2/opiepim/ui/opimrecurrencewidget.cpp index 569bdd5..90c1a5f 100644 --- a/libopie2/opiepim/ui/opimrecurrencewidget.cpp +++ b/libopie2/opiepim/ui/opimrecurrencewidget.cpp @@ -531,50 +531,50 @@ void OPimRecurrenceWidget::setupMonthly() { showRepeatStuff(); setupRepeatLabel( 1 ); } void OPimRecurrenceWidget::setupYearly() { hideExtras(); lblWeekVar->hide(); spinFreq->setValue( 1 ); lblFreq->setText( tr("year(s)") ); lblFreq->show(); lblFreq->show(); showRepeatStuff(); lblVar2->show(); QString strEvery = strYearTemplate.arg( start.monthName(start.month()) ).arg( numberPlacing(start.day()) ); lblRepeat->setText( strEvery ); setupRepeatLabel( 1 ); } void OPimRecurrenceWidget::init() { QPopupMenu *m1 = new QPopupMenu( this ); repeatPicker = new DateBookMonth( m1, 0, TRUE ); m1->insertItem( repeatPicker ); cmdEnd->setPopup( m1 ); cmdEnd->setPopupDelay( 0 ); - QObject::connect( repeatPicker, SIGNAL(dateClicked(int, int, int)), - this, SLOT(endDateChanged(int, int, int)) ); + QObject::connect( repeatPicker, SIGNAL(dateClicked(int,int,int)), + this, SLOT(endDateChanged(int,int,int)) ); QObject::connect( qApp, SIGNAL(weekChanged(bool)), this, SLOT(slotChangeStartOfWeek(bool)) ); listRTypeButtons.setAutoDelete( TRUE ); listRTypeButtons.append( cmdNone ); listRTypeButtons.append( cmdDay ); listRTypeButtons.append( cmdWeek ); listRTypeButtons.append( cmdMonth ); listRTypeButtons.append( cmdYear ); listExtra.setAutoDelete( TRUE ); listExtra.append( cmdExtra1 ); listExtra.append( cmdExtra2 ); listExtra.append( cmdExtra3 ); listExtra.append( cmdExtra4 ); listExtra.append( cmdExtra5 ); listExtra.append( cmdExtra6 ); listExtra.append( cmdExtra7 ); } void OPimRecurrenceWidget::hideExtras() { // hide the extra buttons... fraExtra->hide(); chkNoEnd->hide(); QListIterator<QToolButton> it( listExtra ); diff --git a/libopie2/opieui/fileselector/ofiledialog.cpp b/libopie2/opieui/fileselector/ofiledialog.cpp index 2a89c5d..e7daead 100644 --- a/libopie2/opieui/fileselector/ofiledialog.cpp +++ b/libopie2/opieui/fileselector/ofiledialog.cpp @@ -90,50 +90,50 @@ OFileDialog::OFileDialog(const QString &caption, const QString &dirName, const QString &fileName, const QMap<QString,QStringList>& mimetypes ) : QDialog( wid, "OFileDialog", true ) { // QVBoxLayout *lay = new QVBoxLayout(this); //showMaximized(); QVBoxLayout *lay = new QVBoxLayout(this ); file = new OFileSelector(this , mode, selector, dirName, fileName, mimetypes ); lay->addWidget( file ); //lay->addWidget( file ); //showFullScreen(); setCaption( caption.isEmpty() ? tr("FileDialog") : caption ); connect(file, SIGNAL(fileSelected(const QString&) ), this, SLOT(slotFileSelected(const QString&) ) ); connect(file, SIGNAL(ok() ), this, SLOT(slotSelectorOk()) ) ; connect(file, SIGNAL(dirSelected(const QString&) ), this, SLOT(slotDirSelected(const QString&) ) ); #if 0 - connect(file, SIGNAL(dirSelected(const QString &) ), - this, SLOT(slotDirSelected(const QString &) ) ); + connect(file, SIGNAL(dirSelected(const QString&) ), + this, SLOT(slotDirSelected(const QString&) ) ); #endif } /** * @returns the mimetype of the selected * currently it return QString::null */ QString OFileDialog::mimetype()const { return QString::null; } /** * @return the fileName */ QString OFileDialog::fileName()const { return file->selectedName(); } /** * return a DocLnk to the current file */ DocLnk OFileDialog::selectedDocument()const { diff --git a/libopie2/opieui/fileselector/ofileselector.cpp b/libopie2/opieui/fileselector/ofileselector.cpp index 600daff..15cadd4 100644 --- a/libopie2/opieui/fileselector/ofileselector.cpp +++ b/libopie2/opieui/fileselector/ofileselector.cpp @@ -189,54 +189,54 @@ void ODocumentFileView::reread() m_selector->reread(); } int ODocumentFileView::fileCount()const { if (!m_selector) return -1; return m_selector->fileCount(); } DocLnk ODocumentFileView::selectedDocument()const { if (!m_selector) return DocLnk(); return m_selector->selectedDocument(); } QWidget* ODocumentFileView::widget( QWidget* parent ) { if (!m_selector ) { m_selector = new FileSelector(currentMimeType().join(";"), parent, "fileselector", showNew(), showClose() ); - QObject::connect(m_selector, SIGNAL(fileSelected( const DocLnk& ) ), + QObject::connect(m_selector, SIGNAL(fileSelected(const DocLnk&) ), selector(), SLOT(slotDocLnkBridge(const DocLnk&) ) ); QObject::connect(m_selector, SIGNAL(closeMe() ), selector(), SIGNAL(closeMe() ) ); - QObject::connect(m_selector, SIGNAL(newSelected(const DocLnk& ) ), - selector(), SIGNAL(newSelected(const DocLnk& ) ) ); + QObject::connect(m_selector, SIGNAL(newSelected(const DocLnk&) ), + selector(), SIGNAL(newSelected(const DocLnk&) ) ); } return m_selector; } /* * This is the file system view used * we use a QListView + QListViewItems for it */ OFileSelectorItem::OFileSelectorItem( QListView* view, const QPixmap& pixmap, const QString& path, const QString& date, const QString& size, const QString& dir, bool isLocked, bool isDir ) : QListViewItem( view ) { setPixmap(0, pixmap ); setText(1, path ); setText(2, size ); setText(3, date ); m_isDir = isDir; m_dir = dir; m_locked = isLocked; } @@ -503,50 +503,50 @@ QString OFileViewFileListView::currentDir()const OFileSelector* OFileViewFileListView::selector() { return m_sel; } bool OFileViewFileListView::eventFilter (QObject *o, QEvent *e) { if ( e->type() == QEvent::KeyPress ) { QKeyEvent *k = (QKeyEvent *)e; if ( (k->key()==Key_Enter) || (k->key()==Key_Return)) { slotClicked( Qt::LeftButton,m_view->currentItem(),QPoint(0,0),0); return true; } } return false; } void OFileViewFileListView::connectSlots() { connect(m_view, SIGNAL(clicked(QListViewItem*) ), this, SLOT(slotCurrentChanged(QListViewItem*) ) ); - connect(m_view, SIGNAL(mouseButtonClicked(int, QListViewItem*, const QPoint&, int ) ), - this, SLOT(slotClicked(int, QListViewItem*, const QPoint&, int ) ) ); + connect(m_view, SIGNAL(mouseButtonClicked(int,QListViewItem*,const QPoint&,int) ), + this, SLOT(slotClicked(int,QListViewItem*,const QPoint&,int) ) ); } void OFileViewFileListView::slotCurrentChanged( QListViewItem* item) { if (!item) return; #if 0 OFileSelectorItem *sel = static_cast<OFileSelectorItem*>(item); if (!sel->isDir() ) { selector()->m_lneEdit->setText( sel->text(1) ); // if in fileselector mode we will emit selected if ( selector()->mode() == OFileSelector::FileSelector ) { qWarning("slot Current Changed"); QStringList str = QStringList::split("->", sel->text(1) ); QString path = sel->directory() + "/" + str[0].stripWhiteSpace(); emit selector()->fileSelected( path ); DocLnk lnk( path ); emit selector()->fileSelected( lnk ); } } @@ -958,50 +958,50 @@ bool OFileSelector::eventFilter (QObject *o, QEvent *e) * This will insert the MimeTypes into the Combo Box * And also connect the changed signal * * AutoMimeTyping is disabled for now. It used to reparse a dir and then set available mimetypes */ void OFileSelector::initMime() { MimeTypes::Iterator it; for ( it = m_mimeType.begin(); it != m_mimeType.end(); ++it ) { m_cmbMime->insertItem( it.key() ); } m_cmbMime->setCurrentItem( 0 ); connect( m_cmbMime, SIGNAL(activated(int) ), this, SLOT(slotMimeTypeChanged() ) ); } void OFileSelector::initViews() { m_cmbView->insertItem( QObject::tr("Documents") ); m_cmbView->insertItem( QObject::tr("Files") ); m_cmbView->insertItem( QObject::tr("All Files") ); - connect(m_cmbView, SIGNAL(activated( const QString& ) ), - this, SLOT(slotViewChange( const QString& ) ) ); + connect(m_cmbView, SIGNAL(activated(const QString&) ), + this, SLOT(slotViewChange(const QString&) ) ); m_views.insert( QObject::tr("Documents"), new ODocumentFileView(this) ); /* see above why add both */ OFileViewInterface* in = new OFileViewFileSystem( this ); m_views.insert( QObject::tr("Files"), in ); m_views.insert( QObject::tr("All Files"), in ); } /** * d'tor */ OFileSelector::~OFileSelector() { } /** * Convience function for the fileselector * make sure to delete the DocLnk * * @see DocLnk diff --git a/libopie2/opieui/ofontselector.cpp b/libopie2/opieui/ofontselector.cpp index 49ddeb6..f93781f 100644 --- a/libopie2/opieui/ofontselector.cpp +++ b/libopie2/opieui/ofontselector.cpp @@ -111,63 +111,63 @@ static int findItemCB( QComboBox *box, const QString &str ) /* static same as anon. namespace */ static int qt_version() { const char *qver = qVersion(); return ( qver [0] - '0' ) * 100 + ( qver [2] - '0' ) * 10 + ( qver [4] - '0' ); } /** * Constructs the Selector object * @param withpreview If a font preview should be given * @param parent The parent of the Font Selector * @param name The name of the object * @param fl WidgetFlags */ OFontSelector::OFontSelector( bool withpreview, QWidget *parent, const char *name, WFlags fl ) : QWidget ( parent, name, fl ) { d = new OFontSelectorPrivate(); QGridLayout *gridLayout = new QGridLayout( this, 0, 0, 4, 4 ); gridLayout->setRowStretch( 4, 10 ); d->m_font_family_list = new QListBox( this, "FontListBox" ); gridLayout->addMultiCellWidget( d->m_font_family_list, 0, 4, 0, 0 ); - connect( d->m_font_family_list, SIGNAL( highlighted( int ) ), this, SLOT( fontFamilyClicked( int ) ) ); + connect( d->m_font_family_list, SIGNAL( highlighted(int) ), this, SLOT( fontFamilyClicked(int) ) ); QLabel *label = new QLabel( tr( "Style" ), this ); gridLayout->addWidget( label, 0, 1 ); d->m_font_style_list = new QComboBox( this, "StyleListBox" ); - connect( d->m_font_style_list, SIGNAL( activated( int ) ), this, SLOT( fontStyleClicked( int ) ) ); + connect( d->m_font_style_list, SIGNAL( activated(int) ), this, SLOT( fontStyleClicked(int) ) ); gridLayout->addWidget( d->m_font_style_list, 1, 1 ); label = new QLabel( tr( "Size" ), this ); gridLayout->addWidget( label, 2, 1 ); d->m_font_size_list = new QComboBox( this, "SizeListBox" ); - connect( d->m_font_size_list, SIGNAL( activated( int ) ), - this, SLOT( fontSizeClicked( int ) ) ); + connect( d->m_font_size_list, SIGNAL( activated(int) ), + this, SLOT( fontSizeClicked(int) ) ); gridLayout->addWidget( d->m_font_size_list, 3, 1 ); d->m_pointbug = ( qt_version() <= 233 ); if ( withpreview ) { d->m_preview = new QMultiLineEdit ( this, "Preview" ); d->m_preview->setAlignment ( AlignCenter ); d->m_preview->setWordWrap ( QMultiLineEdit::WidgetWidth ); d->m_preview->setMargin ( 3 ); d->m_preview->setText ( tr( "The Quick Brown Fox Jumps Over The Lazy Dog" )); gridLayout->addRowSpacing ( 5, 4 ); gridLayout->addMultiCellWidget ( d->m_preview, 6, 6, 0, 1 ); gridLayout->setRowStretch ( 6, 5 ); } else d->m_preview = 0; loadFonts ( d->m_font_family_list ); } OFontSelector::~OFontSelector() { delete d; diff --git a/libopie2/opieui/otabwidget.cpp b/libopie2/opieui/otabwidget.cpp index ec6af9d..f47c90b 100644 --- a/libopie2/opieui/otabwidget.cpp +++ b/libopie2/opieui/otabwidget.cpp @@ -53,53 +53,53 @@ OTabWidget::OTabWidget( QWidget *parent, const char *name, TabStyle s, TabPositi s = ( TabStyle ) config.readNumEntry( "TabStyle", (int) IconTab ); if ( s <= Global || s > IconList) { s = IconTab; } QString pos = config.readEntry( "TabPosition", "Top"); if ( pos == "Bottom" ) { p = Bottom; } else { p = Top; } } widgetStack = new QWidgetStack( this, "widgetstack" ); widgetStack->setFrameStyle( QFrame::NoFrame ); widgetStack->setLineWidth( style().defaultFrameWidth() ); tabBarStack = new QWidgetStack( this, "tabbarstack" ); tabBar = new OTabBar( tabBarStack, "tabbar" ); tabBarStack->addWidget( tabBar, 0 ); - connect( tabBar, SIGNAL( selected( int ) ), this, SLOT( slotTabBarSelected( int ) ) ); + connect( tabBar, SIGNAL( selected(int) ), this, SLOT( slotTabBarSelected(int) ) ); tabList = new QComboBox( false, tabBarStack, "tablist" ); tabBarStack->addWidget( tabList, 1 ); - connect( tabList, SIGNAL( activated( int ) ), this, SLOT( slotTabListSelected( int ) ) ); + connect( tabList, SIGNAL( activated(int) ), this, SLOT( slotTabListSelected(int) ) ); tabBarPosition = p; setTabStyle( s ); setTabPosition( p ); currTab= 0x0; } OTabWidget::~OTabWidget() {} void OTabWidget::addTab( QWidget *child, const QString &icon, const QString &label ) { QPixmap iconset = loadSmooth( icon ); QTab *tab = new QTab(); if ( tabBarStyle == IconTab ) { tab->label = QString::null; } else { tab->label = label; } diff --git a/libopie2/opieui/otimepicker.cpp b/libopie2/opieui/otimepicker.cpp index d4712a4..66f9ce0 100644 --- a/libopie2/opieui/otimepicker.cpp +++ b/libopie2/opieui/otimepicker.cpp @@ -200,54 +200,54 @@ void OTimePicker::setHour(int h) QString hour; hour.sprintf("%.2d",h); QValueListIterator<OClickableLabel *> it; for (it=hourLst.begin(); it!=hourLst.end(); it++) { if ((*it)->text() == hour) (*it)->setOn(true); else (*it)->setOn(false); } tm.setHMS(h,tm.minute(),0); } /** * This is a modal Dialog. * * @param parent The parent widget * @param name The name of the object * @param fl Possible window flags */ OTimePickerDialog::OTimePickerDialog ( QWidget* parent, const char* name, WFlags fl ) : OTimePickerDialogBase (parent , name, true , fl) { - connect ( m_timePicker, SIGNAL( timeChanged( const QTime& ) ), - this, SLOT( setTime ( const QTime& ) ) ); - connect ( minuteField, SIGNAL( textChanged ( const QString& ) ), - this, SLOT ( setMinute ( const QString& ) ) ); - connect ( hourField, SIGNAL( textChanged ( const QString& ) ), - this, SLOT ( setHour ( const QString& ) ) ); + connect ( m_timePicker, SIGNAL( timeChanged(const QTime&) ), + this, SLOT( setTime(const QTime&) ) ); + connect ( minuteField, SIGNAL( textChanged(const QString&) ), + this, SLOT ( setMinute(const QString&) ) ); + connect ( hourField, SIGNAL( textChanged(const QString&) ), + this, SLOT ( setHour(const QString&) ) ); } /** * @return the time */ QTime OTimePickerDialog::time()const { return m_time; } /** * Set the time to time * @param time The time to be set */ void OTimePickerDialog::setTime( const QTime& time ) { m_time = time; m_timePicker->setHour ( time.hour() ); m_timePicker->setMinute( time.minute() ); // Set Textfields if ( time.hour() < 10 ) diff --git a/libopie2/opieui/oversatileview.cpp b/libopie2/opieui/oversatileview.cpp index 8839456..78154b7 100644 --- a/libopie2/opieui/oversatileview.cpp +++ b/libopie2/opieui/oversatileview.cpp @@ -149,94 +149,94 @@ OVersatileView::OVersatileView( QWidget* parent, const char* name, int mode ) #endif setViewMode( mode ); // TODO: Read last style from config // setSynchronization( true ); // TODO: Implement this // create context menu allowing to switch between the views _contextmenu = new QPopupMenu( 0, "oversatileview contextmenu" ); _contextmenu->setCaption( "Style" ); _contextmenu->setCheckable( true ); QActionGroup* ag = new QActionGroup( _contextmenu, "style option group" ); QAction* a1 = new QAction( "View Items in Icon Style", QIconSet( QPixmap( view_icon_xpm ) ), "View Icons", 0, ag, "viewicon action", true ); QAction* a2 = new QAction( "View Items in Tree Style", QIconSet( QPixmap( view_tree_xpm ) ), "View Tree", 0, ag, "viewtree action", true ); ag->addTo( _contextmenu ); if ( mode == Icons ) a1->setOn( true ); else if ( mode == Tree ) a2->setOn( true ); connect( a1, SIGNAL( activated() ), this, SLOT( setIconViewMode() ) ); connect( a2, SIGNAL( activated() ), this, SLOT( setTreeViewMode() ) ); #if (QT_VERSION >= 0x030000) - connect( _listview, SIGNAL( contextMenuRequested( QListViewItem*, const QPoint&, int ) ), this, SLOT( contextMenuRequested( QListViewItem*, const QPoint&, int ) ) ); - connect( _iconview, SIGNAL( contextMenuRequested( QIconViewItem*, const QPoint& ) ), this, SLOT( contextMenuRequested( QIconViewItem*, const QPoint& ) ) ); + connect( _listview, SIGNAL( contextMenuRequested(QListViewItem*,const QPoint&,int) ), this, SLOT( contextMenuRequested(QListViewItem*,const QPoint&,int) ) ); + connect( _iconview, SIGNAL( contextMenuRequested(QIconViewItem*,const QPoint&) ), this, SLOT( contextMenuRequested(QIconViewItem*,const QPoint&) ) ); #else - connect( _listview, SIGNAL( rightButtonPressed( QListViewItem*, const QPoint&, int ) ), this, SLOT( contextMenuRequested( QListViewItem*, const QPoint&, int ) ) ); - connect( _iconview, SIGNAL( rightButtonPressed( QIconViewItem*, const QPoint& ) ), this, SLOT( contextMenuRequested( QIconViewItem*, const QPoint& ) ) ); + connect( _listview, SIGNAL( rightButtonPressed(QListViewItem*,const QPoint&,int) ), this, SLOT( contextMenuRequested(QListViewItem*,const QPoint&,int) ) ); + connect( _iconview, SIGNAL( rightButtonPressed(QIconViewItem*,const QPoint&) ), this, SLOT( contextMenuRequested(QIconViewItem*,const QPoint&) ) ); #endif // // signal forwarders // // unfortunately we can't short-circuit all the QListView and QIconView signals // to OVersatileView signals, because the signal/slot mechanism doesn't allow // type-conversion :-( // common signals for listview connect( _listview, SIGNAL( selectionChanged() ), this, SIGNAL( selectionChanged() ) ); - connect( _listview, SIGNAL( selectionChanged( QListViewItem * ) ), this, SLOT( selectionChanged( QListViewItem * ) ) ); - connect( _listview, SIGNAL( currentChanged( QListViewItem * ) ), this, SLOT( currentChanged( QListViewItem * ) ) ); - connect( _listview, SIGNAL( clicked( QListViewItem * ) ), this, SLOT( clicked( QListViewItem * ) ) ); - connect( _listview, SIGNAL( pressed( QListViewItem * ) ), this, SLOT( pressed( QListViewItem * ) ) ); + connect( _listview, SIGNAL( selectionChanged(QListViewItem*) ), this, SLOT( selectionChanged(QListViewItem*) ) ); + connect( _listview, SIGNAL( currentChanged(QListViewItem*) ), this, SLOT( currentChanged(QListViewItem*) ) ); + connect( _listview, SIGNAL( clicked(QListViewItem*) ), this, SLOT( clicked(QListViewItem*) ) ); + connect( _listview, SIGNAL( pressed(QListViewItem*) ), this, SLOT( pressed(QListViewItem*) ) ); - connect( _listview, SIGNAL( doubleClicked( QListViewItem * ) ), this, SLOT( doubleClicked( QListViewItem * ) ) ); - connect( _listview, SIGNAL( returnPressed( QListViewItem * ) ), this, SLOT( returnPressed( QListViewItem * ) ) ); + connect( _listview, SIGNAL( doubleClicked(QListViewItem*) ), this, SLOT( doubleClicked(QListViewItem*) ) ); + connect( _listview, SIGNAL( returnPressed(QListViewItem*) ), this, SLOT( returnPressed(QListViewItem*) ) ); - connect( _listview, SIGNAL( onItem( QListViewItem * ) ), this, SLOT( onItem( QListViewItem * ) ) ); + connect( _listview, SIGNAL( onItem(QListViewItem*) ), this, SLOT( onItem(QListViewItem*) ) ); connect( _listview, SIGNAL( onViewport() ), this, SIGNAL( onViewport() ) ); // common signals for iconview connect( _iconview, SIGNAL( selectionChanged() ), this, SIGNAL( selectionChanged() ) ); - connect( _iconview, SIGNAL( selectionChanged( QIconViewItem * ) ), this, SLOT( selectionChanged( QIconViewItem * ) ) ); - connect( _iconview, SIGNAL( currentChanged( QIconViewItem * ) ), this, SLOT( currentChanged( QIconViewItem * ) ) ); - connect( _iconview, SIGNAL( clicked( QIconViewItem * ) ), this, SLOT( clicked( QIconViewItem * ) ) ); - connect( _iconview, SIGNAL( pressed( QIconViewItem * ) ), this, SLOT( pressed( QIconViewItem * ) ) ); + connect( _iconview, SIGNAL( selectionChanged(QIconViewItem*) ), this, SLOT( selectionChanged(QIconViewItem*) ) ); + connect( _iconview, SIGNAL( currentChanged(QIconViewItem*) ), this, SLOT( currentChanged(QIconViewItem*) ) ); + connect( _iconview, SIGNAL( clicked(QIconViewItem*) ), this, SLOT( clicked(QIconViewItem*) ) ); + connect( _iconview, SIGNAL( pressed(QIconViewItem*) ), this, SLOT( pressed(QIconViewItem*) ) ); - connect( _iconview, SIGNAL( doubleClicked( QIconViewItem * ) ), this, SLOT( doubleClicked( QIconViewItem * ) ) ); - connect( _iconview, SIGNAL( returnPressed( QIconViewItem * ) ), this, SLOT( returnPressed( QIconViewItem * ) ) ); + connect( _iconview, SIGNAL( doubleClicked(QIconViewItem*) ), this, SLOT( doubleClicked(QIconViewItem*) ) ); + connect( _iconview, SIGNAL( returnPressed(QIconViewItem*) ), this, SLOT( returnPressed(QIconViewItem*) ) ); - connect( _iconview, SIGNAL( onItem( QIconViewItem * ) ), this, SLOT( onItem( QIconViewItem * ) ) ); + connect( _iconview, SIGNAL( onItem(QIconViewItem*) ), this, SLOT( onItem(QIconViewItem*) ) ); connect( _iconview, SIGNAL( onViewport() ), this, SIGNAL( onViewport() ) ); // listview only signals - connect( _listview, SIGNAL( expanded( QListViewItem * ) ), this, SLOT( expanded( QListViewItem * ) ) ); - connect( _listview, SIGNAL( collapsed( QListViewItem * ) ), this, SLOT( collapsed( QListViewItem * ) ) ); + connect( _listview, SIGNAL( expanded(QListViewItem*) ), this, SLOT( expanded(QListViewItem*) ) ); + connect( _listview, SIGNAL( collapsed(QListViewItem*) ), this, SLOT( collapsed(QListViewItem*) ) ); // iconview only signals connect( _iconview, SIGNAL( moved() ), this, SIGNAL( moved() ) ); } OVersatileView::~OVersatileView() { } QPopupMenu* OVersatileView::contextMenu() const { return _contextmenu; } void OVersatileView::contextMenuRequested( QListViewItem* item, const QPoint& pos, int col ) { // can't use QObject::inherits here, because ListViewItems, beit Q, O or K, // do not inherit from QObject - assuming here the programmer is // disciplined enough to only add OVersatileViewItems to an OVersatileView popupContextMenu( static_cast<OVersatileViewItem*>( item ), pos, col ); } void OVersatileView::contextMenuRequested( QIconViewItem* item, const QPoint& pos ) |