-rw-r--r-- | noncore/tools/clock/clock.cpp | 3 | ||||
-rw-r--r-- | noncore/tools/clock/main.cpp | 2 | ||||
-rw-r--r-- | noncore/tools/clock/setAlarm.cpp | 3 | ||||
-rw-r--r-- | noncore/tools/euroconv/main.cpp | 4 | ||||
-rw-r--r-- | noncore/tools/formatter/formatter.cpp | 2 | ||||
-rw-r--r-- | noncore/tools/formatter/main.cpp | 2 | ||||
-rw-r--r-- | noncore/tools/opie-sh/config.in | 2 | ||||
-rw-r--r-- | noncore/tools/remote/config.in | 2 | ||||
-rw-r--r-- | noncore/tools/remote/recorddialog.cpp | 8 | ||||
-rw-r--r-- | noncore/tools/remote/recorddialog.h | 8 | ||||
-rw-r--r-- | noncore/tools/remote/remote.pro | 2 |
11 files changed, 24 insertions, 14 deletions
diff --git a/noncore/tools/clock/clock.cpp b/noncore/tools/clock/clock.cpp index b780675..485354b 100644 --- a/noncore/tools/clock/clock.cpp +++ b/noncore/tools/clock/clock.cpp @@ -1,276 +1,277 @@ /********************************************************************** ** Copyright (C) 2000 Trolltech AS. All rights reserved. ** ** This file is part of 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. ** **********************************************************************/ // changes added and Copyright (C) by L. J. Potter <ljp@llornkcor.com> 2002 #include "clock.h" #include "setAlarm.h" #include <qpe/qpeapplication.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/config.h> #include <qpe/timestring.h> #include <qpe/alarmserver.h> #include <qpe/sound.h> #include <qpe/resource.h> #include <qsound.h> #include <qtimer.h> #include <opie2/oclickablelabel.h> #include <qlcdnumber.h> #include <qslider.h> #include <qlabel.h> #include <qlayout.h> #include <qtimer.h> #include <qpushbutton.h> #include <qradiobutton.h> #include <qbuttongroup.h> #include <qpainter.h> #include <qmessagebox.h> #include <qdatetime.h> #include <math.h> #include <unistd.h> #include <sys/types.h> #include <pthread.h> const double deg2rad = 0.017453292519943295769; // pi/180 const int sw_prec = 2; +using namespace Opie::Ui; void startPlayer() { Config config( "qpe" ); config.setGroup( "Time" ); sleep(15); QCopEnvelope e( "QPE/Application/opieplayer", "setDocument(QString)" ); e << config.readEntry( "mp3File", "" ); } static void toggleScreenSaver( bool on ) { QCopEnvelope e( "QPE/System", "setScreenSaverMode(int)" ); e << ( on ? QPEApplication::Enable : QPEApplication::DisableSuspend ); } Clock::Clock( QWidget * parent, const char * name, WFlags f ) : QVBox( parent, name , f ) { setSpacing( 4 ); setMargin( 1 ); snoozeBtn = new QPushButton ( this ); snoozeBtn->setText( tr( "Snooze" ) ); aclock = new AnalogClock( this ); aclock->display( QTime::currentTime() ); aclock->setLineWidth( 2 ); QHBox *hb = new QHBox( this ); hb->setMargin( 0 ); QWidget *space = new QWidget( hb ); lcd = new QLCDNumber( hb ); lcd->setSegmentStyle( QLCDNumber::Flat ); lcd->setFrameStyle( QFrame::NoFrame ); lcd->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ) ); lcd->setFixedHeight( 23 ); ampmLabel = new QLabel( tr( "PM" ), hb ); ampmLabel->setFont( QFont( "Helvetica", 14, QFont::Bold ) ); ampmLabel->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Preferred ) ); ampmLabel->setAlignment( AlignLeft | AlignBottom ); space = new QWidget( hb ); date = new QLabel( this ); date->setAlignment( AlignHCenter | AlignVCenter ); date->setFont( QFont( "Helvetica", 14, QFont::Bold ) ); date->setText( TimeString::longDateString( QDate::currentDate() ) ); QWidget *controls = new QWidget( this ); QGridLayout *gl = new QGridLayout( controls, 3, 2, 6, 4 ); QButtonGroup *grp = new QButtonGroup( controls ); grp->setRadioButtonExclusive( true ); grp->hide(); clockRB = new QRadioButton ( tr( "Clock" ), controls ); gl->addWidget( clockRB, 0, 0 ); grp->insert( clockRB ); swatchRB = new QRadioButton ( tr( "Stopwatch" ), controls ); gl->addWidget( swatchRB, 1, 0 ); grp->insert( swatchRB ); connect( grp, SIGNAL( clicked(int) ), this, SLOT( modeSelect(int) ) ); grp->setButton( 0 ); set = new QPushButton ( controls ); set->setMaximumSize( 50, 30 ); gl->addWidget( set , 0, 1 ); set->setText( tr( "Start" ) ); set->setEnabled( FALSE ); grp->insert( set ); reset = new QPushButton ( controls ); gl->addWidget( reset, 1, 1 ); reset->setText( tr( "Reset" ) ); reset->setEnabled( FALSE ); grp->insert( reset ); alarmOffBtn = new QPushButton ( controls ); gl->addWidget( alarmOffBtn, 0, 2 ); alarmBtn = new QPushButton ( controls ); gl->addWidget( alarmBtn, 1, 2 ); alarmBtn->setText( tr( "Set Alarm" ) ); - Opie::OClickableLabel *click = new Opie::OClickableLabel( controls, "label" ); + OClickableLabel *click = new Opie::Ui::OClickableLabel( controls, "label" ); click->setText( tr( "Set date and time." ) ); gl->addMultiCellWidget( click, 3, 3, 0, 2, AlignHCenter ); connect( click, SIGNAL( clicked() ), this, SLOT( slotAdjustTime() ) ); connect( set , SIGNAL( pressed() ), SLOT( slotSet() ) ); connect( reset, SIGNAL( clicked() ), SLOT( slotReset() ) ); connect( alarmBtn, SIGNAL( clicked() ), SLOT( slotSetAlarm() ) ); connect( snoozeBtn, SIGNAL( clicked() ), SLOT( slotSnooze() ) ); connect( alarmOffBtn, SIGNAL( clicked() ), SLOT( slotToggleAlarm() ) ); connect( qApp, SIGNAL( appMessage(const QCString&,const QByteArray&) ), this, SLOT( appMessage(const QCString&,const QByteArray&) ) ); t = new QTimer( this ); connect( t, SIGNAL( timeout() ), SLOT( updateClock() ) ); t->start( 1000 ); connect( qApp, SIGNAL( timeChanged() ), SLOT( updateClock() ) ); swatch_running = FALSE; swatch_totalms = 0; connect( qApp, SIGNAL( clockChanged(bool) ), this, SLOT( changeClock(bool) ) ); Config config( "qpe" ); config.setGroup( "Time" ); ampm = config.readBoolEntry( "AMPM", TRUE ); QString tmp = config.readEntry( "clockAlarmHour", "" ); bool ok; hour = tmp.toInt( &ok, 10 ); tmp = config.readEntry( "clockAlarmMinute", "" ); minute = tmp.toInt( &ok, 10 ); if ( config.readEntry( "clockAlarmSet", "FALSE" ) == "TRUE" ) { alarmOffBtn->setText( tr( "Alarm Is On" ) ); alarmBool = TRUE; snoozeBtn->show(); } else { alarmOffBtn->setText( tr( "Alarm Is Off" ) ); alarmBool = FALSE; snoozeBtn->hide(); } QTimer::singleShot( 0, this, SLOT( updateClock() ) ); Config cfg( "Clock" ); cfg.setGroup( "Mode" ); int mode = cfg.readBoolEntry( "clockMode"); setSwatchMode( mode); modeSelect( mode); } Clock::~Clock() { toggleScreenSaver( true ); } void Clock::updateClock() { if ( clockRB->isChecked() ) { QTime tm = QDateTime::currentDateTime().time(); QString s; if ( ampm ) { int hour = tm.hour(); if ( hour == 0 ) hour = 12; if ( hour > 12 ) hour -= 12; s.sprintf( "%2d%c%02d", hour, ':', tm.minute() ); ampmLabel->setText( ( tm.hour() >= 12 ) ? "PM" : "AM" ); ampmLabel->show(); } else { s.sprintf( "%2d%c%02d", tm.hour(), ':', tm.minute() ); ampmLabel->hide(); } lcd->display( s ); lcd->repaint( FALSE ); aclock->display( QTime::currentTime() ); date->setText( TimeString::longDateString( QDate::currentDate() ) ); } else { QTime swatch_time; QString lcdtext; int totalms = swatch_totalms; if ( swatch_running ) totalms += swatch_start.elapsed(); swatch_time = QTime( 0, 0, 0 ).addMSecs( totalms ); QString d = swatch_running ? QString( " " ) : QString::number( totalms % 1000 + 1000 ); lcdtext = swatch_time.toString() + "." + d.right( 3 ).left( sw_prec ); lcd->display( lcdtext ); lcd->repaint( FALSE ); aclock->display( swatch_time ); date->setText( TimeString::longDateString( QDate::currentDate() ) ); } } void Clock::changeClock( bool a ) { ampm = a; updateClock(); } void Clock::clearClock( void ) { lcd->display( QTime( 0, 0, 0 ).toString() ); aclock->display( QTime( 0, 0, 0 ) ); } void Clock::startSWatch() { if(swatch_running) { stopSWatch(); return; } qDebug("startSWatch()"); swatch_start.start(); diff --git a/noncore/tools/clock/main.cpp b/noncore/tools/clock/main.cpp index 89dd1bd..237d9f0 100644 --- a/noncore/tools/clock/main.cpp +++ b/noncore/tools/clock/main.cpp @@ -1,26 +1,28 @@ /********************************************************************** ** Copyright (C) 2000 Trolltech AS. All rights reserved. ** ** This file is part of 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 "clock.h" #include <opie2/oapplicationfactory.h> +using namespace Opie::Core; +using namespace Opie::Core; OPIE_EXPORT_APP( OApplicationFactory<Clock> ) diff --git a/noncore/tools/clock/setAlarm.cpp b/noncore/tools/clock/setAlarm.cpp index 6fec5a0..9d5fc49 100644 --- a/noncore/tools/clock/setAlarm.cpp +++ b/noncore/tools/clock/setAlarm.cpp @@ -1,223 +1,224 @@ /*************************************************************************** // setAlarm.cpp - description // ------------------- // Created: Wed Mar 13 19:47:24 2002 // copyright : (C) 2002 by ljp // email : ljp@llornkcor.com // *************************************************************************** * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * ***************************************************************************/ #include "setAlarm.h" #include <opie2/ofileselector.h> #include <opie2/ofiledialog.h> #include <qpe/config.h> #include <qpe/qpeapplication.h> #include <qstring.h> #include <qlabel.h> #include <qlcdnumber.h> #include <qpushbutton.h> #include <qradiobutton.h> #include <qslider.h> #include <qlayout.h> #include <qvariant.h> #include <qtooltip.h> #include <qwhatsthis.h> #include <qbuttongroup.h> #include <qcheckbox.h> +using namespace Opie::Ui; Set_Alarm::Set_Alarm( QWidget* parent, const char* name, bool modal, WFlags fl ) : QDialog( parent, name, modal, fl ) { if ( !name ) setName( "Set_Alarm" ); resize( 240, 101 ); setMaximumSize( QSize( 240, 320 ) ); move(0,45); setCaption( tr( "Set Alarm" ) ); connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); Set_AlarmLayout = new QGridLayout( this ); Set_AlarmLayout->setSpacing( 6 ); Set_AlarmLayout->setMargin( 11 ); TextLabel1 = new QLabel( this, "TextLabel1" ); TextLabel1->setText( tr( "Hour" ) ); Set_AlarmLayout->addWidget( TextLabel1, 0, 0 ); TextLabel2 = new QLabel( this, "TextLabel2" ); TextLabel2->setText( tr( "Minute" ) ); Set_AlarmLayout->addMultiCellWidget( TextLabel2, 0, 0, 1, 2 ); Hour_Slider = new QSlider( this, "Hour_Slider" ); Hour_Slider->setPageStep( 1); Hour_Slider->setOrientation( QSlider::Horizontal ); connect(Hour_Slider, SIGNAL( valueChanged(int)),this,SLOT(slotChangeHour(int))); Set_AlarmLayout->addWidget( Hour_Slider, 2, 0 ); Hour_LCDNumber = new QLCDNumber( this, "Hour_LCDNumber" ); Hour_LCDNumber->setFrameShape( QLCDNumber::Box ); Hour_LCDNumber->setFrameShadow( QLCDNumber::Plain ); Hour_LCDNumber->setSegmentStyle( QLCDNumber::Flat ); Set_AlarmLayout->addWidget( Hour_LCDNumber, 1, 0 ); Minute_Slider = new QSlider( this, "Minute_Slider" ); Minute_Slider->setMaxValue( 59); Minute_Slider->setPageStep( 1); Minute_Slider->setOrientation( QSlider::Horizontal ); connect(Minute_Slider, SIGNAL( valueChanged(int)),this,SLOT(slotChangeMinute(int))); Set_AlarmLayout->addMultiCellWidget( Minute_Slider, 2, 2, 1, 2 ); Minute_LCDNumber = new QLCDNumber( this, "Minute_LCDNumber" ); Minute_LCDNumber->setFrameShape( QLCDNumber::Box ); Minute_LCDNumber->setFrameShadow( QLCDNumber::Plain ); Minute_LCDNumber->setSegmentStyle( QLCDNumber::Flat ); Set_AlarmLayout->addMultiCellWidget( Minute_LCDNumber, 1, 1, 1, 2 ); Am_RadioButton = new QRadioButton( this, "Am_RadioButton" ); Am_RadioButton->setText( tr( "AM" ) ); Am_RadioButton->setChecked(TRUE); connect( Am_RadioButton, SIGNAL(toggled(bool)),this,SLOT( amButtonToggled(bool))); Set_AlarmLayout->addMultiCellWidget( Am_RadioButton, 0, 1, 3, 4 ); Pm_RadioButton = new QRadioButton( this, "Pm_RadioButton" ); Pm_RadioButton->setText( tr( "PM" ) ); connect( Pm_RadioButton, SIGNAL(toggled(bool)),this,SLOT( pmButtonToggled(bool))); Set_AlarmLayout->addMultiCellWidget(Pm_RadioButton, 1, 2, 3, 4 ); useMp3Check = new QCheckBox ( tr( "mp3 alarm" ), this ); useMp3Check-> setFocusPolicy ( QWidget::NoFocus ); Set_AlarmLayout->addMultiCellWidget( useMp3Check, 2, 3, 3, 4 ); TextLabel3 = new QLabel( this, "TextLabel3" ); TextLabel3->setText( tr( "Snooze Delay\n(minutes)" ) ); Set_AlarmLayout->addMultiCellWidget( TextLabel3, 3, 3, 0, 1 ); Snooze_LCDNumber = new QLCDNumber( this, "Snooze_LCDNumber" ); Snooze_LCDNumber->setFrameShape( QLCDNumber::Box ); Snooze_LCDNumber->setFrameShadow( QLCDNumber::Plain ); Snooze_LCDNumber->setSegmentStyle( QLCDNumber::Flat ); Set_AlarmLayout->addMultiCellWidget( Snooze_LCDNumber, 3, 3, 1, 2 ); SnoozeSlider = new QSlider( this, "SnoozeSlider" ); SnoozeSlider->setMaxValue( 60 ); SnoozeSlider->setOrientation( QSlider::Horizontal ); connect(SnoozeSlider, SIGNAL( valueChanged(int)),this,SLOT(slotChangeSnooze(int))); Set_AlarmLayout->addMultiCellWidget( SnoozeSlider, 4, 4, 1, 2 ); Config config( "qpe" ); config.setGroup("Time"); bool ok; bool ampm = config.readBoolEntry( "AMPM", TRUE ); QString alarmHour=config.readEntry("clockAlarmHour","8"); int i_alarmHour = alarmHour.toInt(&ok,10); QString alarmMinute=config.readEntry("clockAlarmMinute","0"); QString snoozeTime=config.readEntry("clockAlarmSnooze","0"); if(ampm) { Hour_Slider->setMaxValue( 12); Hour_Slider->setMinValue( 1); if( i_alarmHour > 12) { i_alarmHour = i_alarmHour - 12; Pm_RadioButton->setChecked(TRUE); } else if ( i_alarmHour == 0 ) { i_alarmHour = 12; } Hour_Slider->setValue( i_alarmHour ); Minute_Slider->setValue( alarmMinute.toInt(&ok,10) ); SnoozeSlider->setValue( snoozeTime.toInt(&ok,10) ); } else { Hour_Slider->setMaxValue( 23); Hour_Slider->setMinValue( 0); Hour_Slider->setValue( i_alarmHour); Minute_Slider->setValue( alarmMinute.toInt(&ok,10) ); SnoozeSlider->setValue( snoozeTime.toInt(&ok,10) ); Am_RadioButton->hide(); Pm_RadioButton->hide(); } if( config.readBoolEntry("mp3Alarm") ) useMp3Check->setChecked(true); // signals and slots connections connect(useMp3Check,SIGNAL(toggled(bool)),this,SLOT(slotChangemp3CkeckBox(bool))); } Set_Alarm::~Set_Alarm() { } void Set_Alarm::slotChangeHour(int hour) { Hour_LCDNumber->display(hour); } void Set_Alarm::slotChangeMinute(int minute) { Minute_LCDNumber->display(minute); } void Set_Alarm::slotChangeSnooze(int minute) { Snooze_LCDNumber->display(minute); } void Set_Alarm::amButtonToggled(bool b) { if ( b) Pm_RadioButton->setChecked(FALSE); } void Set_Alarm::pmButtonToggled(bool b) { if (b) Am_RadioButton->setChecked(FALSE); } void Set_Alarm::cleanUp() { } void Set_Alarm::slotChangemp3CkeckBox(bool b) { Config config( "qpe" ); config.setGroup("Time"); if(b) { QMap<QString, QStringList> map; map.insert(tr("All"), QStringList() ); QStringList text; text << "audio/*"; map.insert(tr("Audio"), text ); - QString str = Opie::OFileDialog::getOpenFileName( 2,"/", QString::null, map);//,"", "*", this ); + QString str = OFileDialog::getOpenFileName( 2,"/", QString::null, map);//,"", "*", this ); // QString str = Opie::OFileDialog::getOpenFileName( 2,"/");//,"", "*", this ); if(!str.isEmpty() ) { qDebug(str); config.writeEntry("mp3Alarm",1); config.writeEntry("mp3File",str); } } else { config.writeEntry("mp3Alarm",0); config.writeEntry("mp3File",""); } } diff --git a/noncore/tools/euroconv/main.cpp b/noncore/tools/euroconv/main.cpp index b765a5e..d5f6c7f 100644 --- a/noncore/tools/euroconv/main.cpp +++ b/noncore/tools/euroconv/main.cpp @@ -1,37 +1,39 @@ /**************************************************************************** * +using namespace Opie::Core; +using namespace Opie::Core; * File: main.cpp * * Description: main file for OPIE Euroconv aapp * * * Authors: Eric Santonacci <Eric.Santonacci@talc.fr> * * Requirements: Qt * * ***************************************************************************/ #include <qpe/qpeapplication.h> #include <qvbox.h> #include "calcdisplay.h" #include "calckeypad.h" -#include <opie/oapplicationfactory.h> +#include <opie2/oapplicationfactory.h> struct Layout : QVBox{ static QString appName() { return QString::fromLatin1("euroconv"); } Layout(QWidget *p, const char* n, WFlags) :QVBox(0,"fond" ) { LCDDisplay *lcd = new LCDDisplay(this, "lcd"); KeyPad *num = new KeyPad(lcd, this, "keypad"); setCaption( QObject::tr("Euroconv") ); }; }; OPIE_EXPORT_APP( OApplicationFactory<Layout> ) diff --git a/noncore/tools/formatter/formatter.cpp b/noncore/tools/formatter/formatter.cpp index 77e1790..4204d73 100644 --- a/noncore/tools/formatter/formatter.cpp +++ b/noncore/tools/formatter/formatter.cpp @@ -1,142 +1,142 @@ /**************************************************************************** ** formatter.cpp ** ** Copyright: Thu Apr 11 11:01:13 2002 ** by: L. J. Potter ** ****************************************************************************/ #include "formatter.h" #include "inputDialog.h" #include "output.h" /* OPIE */ -#include <qpe/qpetoolbar.h> +#include <qtoolbar.h> #include <qpe/qpeapplication.h> #include <qpe/resource.h> #include <qpe/config.h> #include <qpe/mimetype.h> #include <qpe/qcopenvelope_qws.h> #include <qpe/storage.h> /* QT */ #include <qmenubar.h> #include <qmultilineedit.h> #include <qstring.h> #include <qlist.h> #include <qstringlist.h> #include <qdir.h> #include <qfile.h> #include <qtstream.h> #include <qcombobox.h> #include <qpopupmenu.h> #include <qmessagebox.h> #include <qregexp.h> #include <qlabel.h> #include <qlineedit.h> #include <qpushbutton.h> #include <qtabwidget.h> #include <qwidget.h> #include <qlayout.h> #include <qvariant.h> /* STD */ #include <unistd.h> #include <stdio.h> #include <stdlib.h> #include <sys/vfs.h> #include <mntent.h> #include <string.h> #include <errno.h> #define BLANK ' ' #define DELIMITER '#' /* Blah blah blah blah */ FormatterApp::FormatterApp( QWidget* parent, const char* name, WFlags fl, bool modal ) : QMainWindow( parent, name, fl ) // : QDialog( parent, name, modal, fl ) { if ( !name ) setName( "FormatterApp" ); connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) ); setCaption( tr( "Formatter" ) ); FormatterAppLayout = new QGridLayout( this ); FormatterAppLayout->setSpacing( 2); FormatterAppLayout->setMargin( 2 ); TabWidget = new QTabWidget( this, "TabWidget" ); tab = new QWidget( TabWidget, "tab" ); tabLayout = new QGridLayout( tab ); tabLayout->setSpacing( 3); tabLayout->setMargin( 2); storageComboBox = new QComboBox( FALSE, tab, "storageComboBox" ); storageComboBox->setMaximumWidth(220); tabLayout->addMultiCellWidget( storageComboBox, 0, 0, 0, 1); TextLabel4 = new QLabel( tab, "TextLabel4" ); TextLabel4->setText( tr( "Storage Type" ) ); tabLayout->addMultiCellWidget( TextLabel4, 1, 1, 0, 1); TextLabel2 = new QLabel( tab, "TextLabel2" ); TextLabel2->setText( tr( "File Systems" ) ); tabLayout->addMultiCellWidget( TextLabel2, 4, 4, 0, 1); fileSystemsCombo = new QComboBox( FALSE, tab, "fileSystemsCombo" ); fileSystemsCombo->setMaximumWidth(220); tabLayout->addMultiCellWidget( fileSystemsCombo, 3, 3, 0, 1); QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Minimum ); tabLayout->addItem( spacer, 2, 0 ); formatPushButton = new QPushButton( tab, "formatPushButton" ); formatPushButton->setText( tr( "Format" ) ); formatPushButton->setMaximumWidth(170); tabLayout->addMultiCellWidget( formatPushButton, 6, 6, 0, 1); QSpacerItem* spacer_2 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Minimum ); tabLayout->addItem( spacer_2, 5, 0 ); TabWidget->insertTab( tab, tr( "Main" ) ); tab_2 = new QWidget( TabWidget, "tab_2" ); tabLayout_2 = new QGridLayout( tab_2 ); tabLayout_2->setSpacing(3); tabLayout_2->setMargin(2); mountPointLineEdit = new QLineEdit( tab_2, "mountPointLineEdit" ); tabLayout_2->addMultiCellWidget( mountPointLineEdit, 0, 0, 0, 1); deviceComboBox = new QComboBox( FALSE, tab_2, "deviceComboBox" ); tabLayout_2->addMultiCellWidget( deviceComboBox, 3, 3, 0, 1); TextLabel5 = new QLabel( tab_2, "TextLabel5" ); TextLabel5->setText( tr( "CAUTION:\n" "Changing parameters on this\n" "page may cause your system\n" "to stop functioning properly!" ) );//idiot message tabLayout_2->addMultiCellWidget( TextLabel5, 6, 6, 0, 1); editPushButton = new QPushButton( tab_2, "editPushButton" ); editPushButton->setText( tr( "Edit fstab" ) ); editPushButton->setMaximumWidth(100); tabLayout_2->addMultiCellWidget( editPushButton, 7, 7, 0, 0 ); fsckButton = new QPushButton( tab_2, "fsckPushButton" ); fsckButton->setText( tr( "Check Disk" ) ); fsckButton->setMaximumWidth(100); tabLayout_2->addMultiCellWidget( fsckButton, 7, 7, 1, 1); TextLabel3 = new QLabel( tab_2, "TextLabel3" ); diff --git a/noncore/tools/formatter/main.cpp b/noncore/tools/formatter/main.cpp index bdd4a2c..d47479e 100644 --- a/noncore/tools/formatter/main.cpp +++ b/noncore/tools/formatter/main.cpp @@ -1,18 +1,20 @@ /*************************************************************************** + main.cpp - description ------------------- begin : March 10, 2002 copyright : (C) 2002 by llornkcor email : ljp@llornkcor.com * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * ***************************************************************************/ #include "formatter.h" #include <opie2/oapplicationfactory.h> +using namespace Opie::Core; OPIE_EXPORT_APP( OApplicationFactory<FormatterApp> ) diff --git a/noncore/tools/opie-sh/config.in b/noncore/tools/opie-sh/config.in index 614ac8b..b3ca373 100644 --- a/noncore/tools/opie-sh/config.in +++ b/noncore/tools/opie-sh/config.in @@ -1,4 +1,4 @@ config OPIE-SH boolean "opie-sh (qdialog frontend allows you to write dialogs from shell scripts)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE + depends ( LIBQPE || LIBQPE-X11 ) diff --git a/noncore/tools/remote/config.in b/noncore/tools/remote/config.in index 3b70590..2a42c58 100644 --- a/noncore/tools/remote/config.in +++ b/noncore/tools/remote/config.in @@ -1,4 +1,4 @@ config REMOTE boolean "opie-remote (remote control using irda, frontent to lirc)" default "y" - depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE + depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIECORE2 diff --git a/noncore/tools/remote/recorddialog.cpp b/noncore/tools/remote/recorddialog.cpp index 1ce5472..a9c4c61 100644 --- a/noncore/tools/remote/recorddialog.cpp +++ b/noncore/tools/remote/recorddialog.cpp @@ -1,82 +1,84 @@ /* Opie-Remote. emulates remote controlls on an iPaq (and maybe a Zaurus) in Opie. Copyright (C) 2002 Thomas Stephens This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #include "recorddialog.h" +using namespace Opie::Core; +using namespace Opie::Core; RecordDialog::RecordDialog(QWidget *parent, const char *name) :QDialog(parent, name) { QVBoxLayout *layout = new QVBoxLayout(this); QHBoxLayout *hlayout = new QHBoxLayout(this); layout->insertSpacing(0,5); output = new QTextView("Please enter the name of the new remote, and press Return\n", 0, this, "output"); layout->insertWidget(-1, output); layout->insertSpacing(-1, 5); layout->insertLayout(-1, hlayout); layout->insertSpacing(-1, 5); hlayout->insertSpacing(0, 5); input = new QLineEdit(this, "input"); hlayout->insertWidget(-1, input, 1); hlayout->insertSpacing(-1, 5); QPushButton *ret = new QPushButton("Return", this, "return"); hlayout->insertWidget(-1, ret); hlayout->insertSpacing(-1, 5); connect(ret, SIGNAL(clicked()), this, SLOT(retPressed()) ); where = 0; record = new OProcess; } void RecordDialog::retPressed() { printf("RecordDialog::retPressed: ret pressed\n"); if(where == 0) { - connect(record, SIGNAL(receivedStdout(OProcess*,char*,int)), this, SLOT(incoming(OProcess*,char*,int)) ); - connect(record, SIGNAL(receivedStderr(OProcess*,char*,int)), this, SLOT(incoming(OProcess*,char*,int)) ); - connect(record, SIGNAL(processExited(OProcess*)), this, SLOT(done(OProcess*)) ); + connect(record, SIGNAL(receivedStdout(Opie::Core::OProcess*,char*,int)), this, SLOT(incoming(Opie::Core::OProcess*,char*,int)) ); + connect(record, SIGNAL(receivedStderr(Opie::Core::OProcess*,char*,int)), this, SLOT(incoming(Opie::Core::OProcess*,char*,int)) ); + connect(record, SIGNAL(processExited(Opie::Core::OProcess*)), this, SLOT(done(Opie::Core::OProcess*)) ); printf("RecordDialog::retPressed: starting irrecord\n"); QString file = "/tmp/" + input->text(); *record<<"irrecord"<<file.latin1(); if(!record->start(OProcess::NotifyOnExit, OProcess::AllOutput)) { QMessageBox *mb = new QMessageBox("Error!", "Could not start irrecord. You must<br>use an lirc ipkg that includes<br>irrecord", QMessageBox::NoIcon, QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton); mb->exec(); return; } // record->resume(); where = 1; } } void RecordDialog::incoming(OProcess *proc, char *buffer, int len) { // output->setText(output->text() + QString(buffer).truncate(len-1)); printf("RecordDialog::incoming: got text from irrecord\n"); } void RecordDialog::done(OProcess *proc) { } diff --git a/noncore/tools/remote/recorddialog.h b/noncore/tools/remote/recorddialog.h index e4dcae6..46a82ce 100644 --- a/noncore/tools/remote/recorddialog.h +++ b/noncore/tools/remote/recorddialog.h @@ -1,49 +1,49 @@ /* Opie-Remote. emulates remote controlls on an iPaq (and maybe a Zaurus) in Opie. Copyright (C) 2002 Thomas Stephens This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #ifndef RecordDialog_H #define RecordDialog_H #include <qdialog.h> #include <qtextview.h> #include <qlineedit.h> #include <qpushbutton.h> #include <qwidget.h> #include <qlayout.h> #include <qmessagebox.h> #include <stdio.h> -#include <opie/oprocess.h> +#include <opie2/oprocess.h> class RecordDialog : public QDialog { Q_OBJECT public: RecordDialog(QWidget *parent=0, const char *name=0); public slots: void retPressed(); - void incoming(OProcess *proc, char *buffer, int len); - void done(OProcess *proc); + void incoming(Opie::Core::OProcess *proc, char *buffer, int len); + void done(Opie::Core::OProcess *proc); private: QTextView *output; QLineEdit *input; - OProcess *record; + Opie::Core::OProcess *record; int where; }; #endif diff --git a/noncore/tools/remote/remote.pro b/noncore/tools/remote/remote.pro index 660c7f7..8b3e4be 100644 --- a/noncore/tools/remote/remote.pro +++ b/noncore/tools/remote/remote.pro @@ -1,11 +1,11 @@ TEMPLATE =app CONFIG +=qt warn_on release DESTDIR =$(OPIEDIR)/bin HEADERS = remotetab.h learntab.h configtab.h topgroup.h dvdgroup.h channelgroup.h vcrgroup.h buttondialog.h topgroupconf.h dvdgroupconf.h channelgroupconf.h vcrgroupconf.h mainview.h recorddialog.h helptab.h SOURCES =remote.cpp remotetab.cpp learntab.cpp configtab.cpp topgroup.cpp dvdgroup.cpp channelgroup.cpp vcrgroup.cpp buttondialog.cpp topgroupconf.cpp dvdgroupconf.cpp channelgroupconf.cpp vcrgroupconf.cpp mainview.cpp recorddialog.cpp helptab.cpp INCLUDEPATH +=$(OPIEDIR)/include DEPENDPATH +=$(OPIEDIR)/include -LIBS +=-lqpe -lopie +LIBS +=-lqpe -lopiecore2 TARGET = remote include ( $(OPIEDIR)/include.pro ) |