summaryrefslogtreecommitdiff
path: root/noncore/tools
Side-by-side diff
Diffstat (limited to 'noncore/tools') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/tools/calc2/calc.cpp4
-rw-r--r--noncore/tools/calculator/calculatorimpl.cpp2
-rw-r--r--noncore/tools/clock/clock.cpp8
-rw-r--r--noncore/tools/formatter/formatter.cpp6
-rw-r--r--noncore/tools/remote/buttondialog.cpp4
-rw-r--r--noncore/tools/remote/recorddialog.cpp6
-rw-r--r--noncore/tools/remote/topgroup.cpp2
-rw-r--r--noncore/tools/remote/topgroupconf.cpp4
8 files changed, 18 insertions, 18 deletions
diff --git a/noncore/tools/calc2/calc.cpp b/noncore/tools/calc2/calc.cpp
index f75eb69..3dcdf6e 100644
--- a/noncore/tools/calc2/calc.cpp
+++ b/noncore/tools/calc2/calc.cpp
@@ -22,50 +22,50 @@
#include <qpe/qpeapplication.h>
#include <qdir.h>
#include <qwidgetstack.h>
#include "calc.h"
#include "plugininterface.h"
calc::calc (QWidget * p, const char *n):QWidget (p, n)
{
setCaption (tr ("Calculator"));
// widgets
LCD = new QLCDNumber (this);
LCD->setMaximumSize (QSize (240, 30));
LCD->setNumDigits(12);
LCD->setSegmentStyle(QLCDNumber::Filled);
pluginWidgetStack = new QWidgetStack (this);
// layout widgets
calculatorLayout = new QVBoxLayout (this);
calculatorLayout->addWidget (LCD);
calculatorLayout->addWidget (pluginWidgetStack);
// no formatting of display for now
- connect (&engine, SIGNAL(display (double)), LCD, SLOT(display (double)));
- connect (&engine, SIGNAL(display (const QString &)), LCD, SLOT(display (const QString &)));
+ connect (&engine, SIGNAL(display(double)), LCD, SLOT(display(double)));
+ connect (&engine, SIGNAL(display(const QString&)), LCD, SLOT(display(const QString&)));
connect (&engine, SIGNAL(setBinMode()), LCD, SLOT(setBinMode()));
connect (&engine, SIGNAL(setOctMode()), LCD, SLOT(setOctMode()));
connect (&engine, SIGNAL(setDecMode()), LCD, SLOT(setDecMode()));
connect (&engine, SIGNAL(setHexMode()), LCD, SLOT(setHexMode()));
#ifndef NO_PLUGINS
// load plugins
QValueList < Plugin >::Iterator mit;
for (mit = pluginList.begin (); mit != pluginList.end (); ++mit) {
(*mit).interface->release ();
(*mit).library->unload ();
delete (*mit).library;
}
pluginList.clear ();
QString path = QPEApplication::qpeDir() + "/plugins/calculator";
QDir dir (path, "lib*.so");
QStringList list = dir.entryList ();
QStringList::Iterator it;
for (it = list.begin (); it != list.end (); ++it) {
CalcInterface *iface = 0;
QLibrary *lib = new QLibrary (path + "/" + *it);
diff --git a/noncore/tools/calculator/calculatorimpl.cpp b/noncore/tools/calculator/calculatorimpl.cpp
index 163b4da..dead03d 100644
--- a/noncore/tools/calculator/calculatorimpl.cpp
+++ b/noncore/tools/calculator/calculatorimpl.cpp
@@ -199,49 +199,49 @@ CalculatorImpl::CalculatorImpl( QWidget * parent, const char * name,
connect( &bgr_std, SIGNAL(clicked(int) ), this, SLOT(std_buttons(int)));
// change the / to a proper division signal
PushButtonDivide->setText(QChar(0xF7));
func_buttons[0] = PushButtonF1;
func_buttons[1] = PushButtonF2;
func_buttons[2] = PushButtonF3;
func_buttons[3] = PushButtonF4;
func_buttons[4] = PushButtonF5;
func_buttons[5] = PushButtonF6;
func_buttons[6] = PushButtonF7;
func_buttons[7] = PushButtonF8;
func_buttons[8] = PushButtonF9;
func_buttons[9] = PushButtonF10;
func_buttons[10] = PushButtonF11;
func_buttons[11] = PushButtonF12;
for ( int x = 0 ; x < func_button_count ; x++ ) {
QPushButton* tmpbutton = func_buttons[x];
faces << tmpbutton->text();
bgr_function.insert(tmpbutton);
}
connect( &bgr_function, SIGNAL(clicked(int) ) , this, SLOT(do_convert(int) ) );
- connect( &bgr_function, SIGNAL(clicked(int) ) , this, SLOT(std_funcs (int) ) );
+ connect( &bgr_function, SIGNAL(clicked(int) ) , this, SLOT(std_funcs(int) ) );
connect(ComboBoxFunction, SIGNAL(activated(int) ), this, SLOT(function_button(int) ) );
captions.append(tr("Standard"));
ComboBoxFunction->insertItem(captions.last());
// now add in the conversion modes
// when the menu gets done, these should be in a submenu
QString tmp = QPEApplication::qpeDir();
tmp += "etc/unit_conversion.dat";
QFile myfile(tmp);
if ( !myfile.open( IO_Translate | IO_ReadOnly ) ) {
qDebug("Data file unit_conversion.dat not found\nNo conversion features will be available\n"+tmp);
// disable the f button if no conv file available
ComboBoxFunction->setEnabled(FALSE);
}
else {
QString line, line2;
QTextStream ts(&myfile);
// first pass, see how many conversion types there are in order to allocate for them
while ( ! ts.eof() ) {
line = ts.readLine();
if ( line.contains ("STARTTYPE" ) )
diff --git a/noncore/tools/clock/clock.cpp b/noncore/tools/clock/clock.cpp
index 4d92683..118cf1f 100644
--- a/noncore/tools/clock/clock.cpp
+++ b/noncore/tools/clock/clock.cpp
@@ -100,97 +100,97 @@ Clock::Clock( QWidget * parent, const char * name, WFlags f )
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 ) ) );
+ 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" ) );
OClickableLabel *click = new 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& ) ) );
+ 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 ) ) );
+ 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();
}
diff --git a/noncore/tools/formatter/formatter.cpp b/noncore/tools/formatter/formatter.cpp
index e869317..77e1790 100644
--- a/noncore/tools/formatter/formatter.cpp
+++ b/noncore/tools/formatter/formatter.cpp
@@ -139,51 +139,51 @@ FormatterApp::FormatterApp( QWidget* parent, const char* name, WFlags fl, bool
tabLayout_2->addMultiCellWidget( fsckButton, 7, 7, 1, 1);
TextLabel3 = new QLabel( tab_2, "TextLabel3" );
TextLabel3->setText( tr( "Device" ) );
tabLayout_2->addMultiCellWidget( TextLabel3, 4, 4, 0, 1 );
QSpacerItem* spacer_3 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
tabLayout_2->addItem( spacer_3, 5, 0 );
TextLabel1 = new QLabel( tab_2, "TextLabel1" );
TextLabel1->setText( tr( "Mount Point" ) );
tabLayout_2->addMultiCellWidget( TextLabel1, 1, 1, 0, 1 );
QSpacerItem* spacer_4 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Expanding );
tabLayout_2->addItem( spacer_4, 2, 1 );
TabWidget->insertTab( tab_2, tr( "Advanced" ) );
FormatterAppLayout->addWidget( TabWidget, 0, 1 );
connect( formatPushButton ,SIGNAL(released()),this,SLOT( doFormat()) );
connect( editPushButton ,SIGNAL(released()),this,SLOT( editFstab()) );
connect( fsckButton ,SIGNAL(released()),this,SLOT( doFsck()) );
- connect( fileSystemsCombo,SIGNAL(activated(int)),this,SLOT( fsComboSelected(int ) ));
- connect( storageComboBox,SIGNAL(activated(int)),this,SLOT( storageComboSelected(int ) ));
- connect( deviceComboBox,SIGNAL(activated(int)),this,SLOT( deviceComboSelected(int ) ));
+ connect( fileSystemsCombo,SIGNAL(activated(int)),this,SLOT( fsComboSelected(int) ));
+ connect( storageComboBox,SIGNAL(activated(int)),this,SLOT( storageComboSelected(int) ));
+ connect( deviceComboBox,SIGNAL(activated(int)),this,SLOT( deviceComboSelected(int) ));
fillCombos();
}
FormatterApp::~FormatterApp()
{}
void FormatterApp::doFormat()
{
int err=0;
Output *outDlg;
QString umountS, remountS;
QString text = storageComboBox->currentText();
QString currentText = storageComboBox->currentText();
QString cmd;
QString diskDevice = currentText.right( currentText.length() - currentText.find(" -> ",0,TRUE) - 4);
QString diskName = currentText.left(currentText.find(" -> ",0,TRUE));
QString fs = fileSystemsCombo->currentText();
#if defined(QT_QWS_IPAQ) || defined(QT_QWS_SL5XXX) // lets test on something cheap
#else
currentText = diskDevice = "/dev/fd0";
umountS = "umount -v /floppy 2>&1";
diff --git a/noncore/tools/remote/buttondialog.cpp b/noncore/tools/remote/buttondialog.cpp
index 6ea4801..580f101 100644
--- a/noncore/tools/remote/buttondialog.cpp
+++ b/noncore/tools/remote/buttondialog.cpp
@@ -22,59 +22,59 @@ ButtonDialog::ButtonDialog(QString buttonName, QWidget *parent, const char*name,
QVBoxLayout *layout = new QVBoxLayout(this);
QHBoxLayout *hlayout1 = new QHBoxLayout(this);
QHBoxLayout *hlayout2 = new QHBoxLayout(this);
QHBoxLayout *hlayout3 = new QHBoxLayout(this);
layout->addSpacing(5);
layout->addLayout(hlayout1);
layout->addSpacing(5);
layout->addLayout(hlayout2);
layout->addSpacing(5);
layout->addLayout(hlayout3);
layout->addSpacing(5);
remote = new QComboBox(false, this, "remote");
QLabel *remoteLabel = new QLabel(remote, "Remote: ", this, "remoteLabel");
hlayout1->addSpacing(5);
hlayout1->addWidget(remoteLabel);
hlayout1->addSpacing(5);
hlayout1->addWidget(remote);
hlayout1->addSpacing(5);
remote->insertItem("Remote ");
remote->insertStringList(getRemotes());
- connect(remote, SIGNAL(activated(const QString &)), this, SLOT(remoteSelected(const QString&)) );
+ connect(remote, SIGNAL(activated(const QString&)), this, SLOT(remoteSelected(const QString&)) );
button = new QComboBox(false, this, "button");
QLabel *buttonLabel = new QLabel(remote, "Button: ", this, "buttonLabel");
hlayout2->addSpacing(5);
hlayout2->addWidget(buttonLabel);
hlayout2->addSpacing(5);
hlayout2->addWidget(button);
hlayout2->addSpacing(5);
button->insertItem("Button ");
- connect(button, SIGNAL(activated(const QString &)), this, SLOT(buttonSelected(const QString&)) );
+ connect(button, SIGNAL(activated(const QString&)), this, SLOT(buttonSelected(const QString&)) );
label = new QLineEdit(this, "label");
label->setText(buttonName);
QLabel *labelLabel = new QLabel(label, "Label: ", this, "labelLabel");
hlayout3->addSpacing(5);
hlayout3->addWidget(labelLabel);
hlayout3->addSpacing(5);
hlayout3->addWidget(label);
hlayout3->addSpacing(5);
}
void ButtonDialog::remoteSelected(const QString &string)
{
button->insertStringList(getButtons(string.latin1()) );
list="SEND_ONCE";
list+=string;
}
void ButtonDialog::buttonSelected(const QString &string)
{
list+=string;
}
QStringList ButtonDialog::getList()
diff --git a/noncore/tools/remote/recorddialog.cpp b/noncore/tools/remote/recorddialog.cpp
index cfab730..1ce5472 100644
--- a/noncore/tools/remote/recorddialog.cpp
+++ b/noncore/tools/remote/recorddialog.cpp
@@ -28,51 +28,51 @@ RecordDialog::RecordDialog(QWidget *parent, const char *name)
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(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*)) );
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");
}
diff --git a/noncore/tools/remote/topgroup.cpp b/noncore/tools/remote/topgroup.cpp
index 93cffbb..427cb8f 100644
--- a/noncore/tools/remote/topgroup.cpp
+++ b/noncore/tools/remote/topgroup.cpp
@@ -12,43 +12,43 @@ 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 "topgroup.h"
TopGroup::TopGroup(QWidget *parent, const char *name):QWidget(parent,name)
{
QHBoxLayout *layout = new QHBoxLayout(this, 0, -1, 0);
QPushButton *power = new QPushButton("Power",this,"power");
layout->addWidget(power);
connect(power, SIGNAL(pressed()), this->parentWidget(), SLOT(sendIR()) );
// power->setGeometry(5, 5,40, 20);
layout->addSpacing(5);
QPushButton *source = new QPushButton("Source",this,"source");
layout->addWidget(source);
connect(source, SIGNAL(pressed()), this->parentWidget(), SLOT(sendIR()) );
// source->setGeometry(50,5,40,20);
remotes = new QComboBox(false, this, "remotes");
- connect(remotes, SIGNAL(activated(const QString &)), this->parentWidget(), SLOT(remoteSelected(const QString &)) );
+ connect(remotes, SIGNAL(activated(const QString&)), this->parentWidget(), SLOT(remoteSelected(const QString&)) );
remotes->insertItem("Select Remote");
// remotes->setGeometry(135,5,95,20);
QLabel *remoteLabel = new QLabel(remotes, "Remote: ",this,"remoteLabel");
// remoteLabel->setGeometry(90,5,40,20);
remoteLabel->setAlignment(AlignRight | AlignVCenter);
layout->addWidget(remoteLabel);
layout->addWidget(remotes);
}
void TopGroup::updateRemotes(Config *cfg)
{
remotes->clear();
remotes->insertItem(QString("SelectRemote"));
cfg->setGroup("Remotes");
remotes->insertStringList(cfg->readListEntry("remoteList", ',') );
}
diff --git a/noncore/tools/remote/topgroupconf.cpp b/noncore/tools/remote/topgroupconf.cpp
index d763a3a..0419a65 100644
--- a/noncore/tools/remote/topgroupconf.cpp
+++ b/noncore/tools/remote/topgroupconf.cpp
@@ -15,56 +15,56 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "topgroupconf.h"
TopGroupConf::TopGroupConf(QWidget *parent, const char *name):QWidget(parent,name)
{
QHBoxLayout *layout = new QHBoxLayout(this);
QPushButton *power = new QPushButton("Power",this,"power");
layout->addWidget(power);
connect(power, SIGNAL(pressed()), this->parentWidget(), SLOT(buttonPressed()) );
// power->setGeometry(5, 5,40, 20);
layout->addSpacing(5);
QPushButton *source = new QPushButton("Source",this,"source");
layout->addWidget(source);
connect(source, SIGNAL(pressed()), this->parentWidget(), SLOT(buttonPressed()) );
// source->setGeometry(50,5,40,20);
remotes = new QComboBox(true, this, "remotes");
remotes->insertItem(QString("Remotes"));
layout->addWidget(remotes);
layout->setStretchFactor(remotes, 1);
- connect(remotes, SIGNAL(activated(const QString &)), this->parentWidget(), SLOT(remoteSelected(const QString &)) );
+ connect(remotes, SIGNAL(activated(const QString&)), this->parentWidget(), SLOT(remoteSelected(const QString&)) );
QPushButton *newrem = new QPushButton("New", this, "new");
layout->addWidget(newrem);
connect(newrem, SIGNAL(pressed()), this->parentWidget(), SLOT(newPressed()) );
/* remotes = new QComboBox(false, this, "remotes");
- connect(remotes, SIGNAL(activated(const QString &)), this->parentWidget(), SLOT(remoteSelected(const QString &)) );
+ connect(remotes, SIGNAL(activated(const QString&)), this->parentWidget(), SLOT(remoteSelected(const QString&)) );
remotes->insertItem("Select Remote");
// remotes->setGeometry(135,5,95,20);
QLabel *remoteLabel = new QLabel(remotes, "Remote: ",this,"remoteLabel");
// remoteLabel->setGeometry(90,5,40,20);
remoteLabel->setAlignment(AlignRight | AlignVCenter);
layout->addWidget(remoteLabel);
layout->addWidget(remotes);
*/
}
void TopGroupConf::updateRemotes(QStringList list)
{
remotes->insertStringList(list);
}
QString TopGroupConf::getRemotesText()
{
return remotes->currentText();
}