summaryrefslogtreecommitdiff
path: root/noncore/todayplugins
Side-by-side diff
Diffstat (limited to 'noncore/todayplugins') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/todayplugins/fortune/fortunepluginwidget.cpp4
-rw-r--r--noncore/todayplugins/stockticker/stockticker/helpwindow.cpp16
-rw-r--r--noncore/todayplugins/stockticker/stockticker/inputDialog.cpp2
-rw-r--r--noncore/todayplugins/weather/weatherpluginwidget.cpp2
4 files changed, 12 insertions, 12 deletions
diff --git a/noncore/todayplugins/fortune/fortunepluginwidget.cpp b/noncore/todayplugins/fortune/fortunepluginwidget.cpp
index b210fa9..e6a0d09 100644
--- a/noncore/todayplugins/fortune/fortunepluginwidget.cpp
+++ b/noncore/todayplugins/fortune/fortunepluginwidget.cpp
@@ -43,42 +43,42 @@ FortunePluginWidget::~FortunePluginWidget() {
}
}
/**
* Get the fortunes
*/
void FortunePluginWidget::getFortune() {
QVBoxLayout* layoutFortune = new QVBoxLayout( this );
if ( fortune ) {
delete fortune;
}
fortune = new OTicker( this );
// fortune->setReadOnly( TRUE );
// fortune->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ) );
fortune->setText( QString("Obtaining fortune...") );
layoutFortune->addWidget( fortune );
fortuneProcess = new OProcess();
*fortuneProcess << "fortune";
- connect(fortuneProcess, SIGNAL(receivedStdout(OProcess*, char*, int ) ),
- this, SLOT(slotStdOut(OProcess*, char*, int) ) );
+ connect(fortuneProcess, SIGNAL(receivedStdout(OProcess*,char*,int) ),
+ this, SLOT(slotStdOut(OProcess*,char*,int) ) );
if(!fortuneProcess->start(OProcess::NotifyOnExit, OProcess::AllOutput) ) {
qWarning("could not start :(");
fortune->setText( QString("Failed to obtain fortune.") );
delete fortuneProcess;
fortuneProcess = 0;
}
}
void FortunePluginWidget::slotStdOut( OProcess* proc, char* buf, int len )
{
QCString s( buf, len );
s.replace( QRegExp("\n"), "" );
fortune->setText( s );
}
diff --git a/noncore/todayplugins/stockticker/stockticker/helpwindow.cpp b/noncore/todayplugins/stockticker/stockticker/helpwindow.cpp
index 2274402..db662e8 100644
--- a/noncore/todayplugins/stockticker/stockticker/helpwindow.cpp
+++ b/noncore/todayplugins/stockticker/stockticker/helpwindow.cpp
@@ -22,119 +22,119 @@ HelpWindow::HelpWindow( const QString& home_, const QString& _path, QWidget* par
{
readHistory();
readBookmarks();
browser = new QTextBrowser( this );
QStringList Strlist;
Strlist.append( home_);
browser->mimeSourceFactory()->setFilePath( Strlist );
browser->setFrameStyle( QFrame::Panel | QFrame::Sunken );
connect( browser, SIGNAL( textChanged() ),
this, SLOT( textChanged() ) );
setCentralWidget( browser );
if ( !home_.isEmpty() )
////////////////////////////////
browser->setSource( home_ );
////////////////////////////////
- connect( browser, SIGNAL( highlighted( const QString&) ),
- statusBar(), SLOT( message( const QString&)) );
+ connect( browser, SIGNAL( highlighted(const QString&) ),
+ statusBar(), SLOT( message(const QString&)) );
setGeometry( 0,0,236,280);
QPopupMenu* file = new QPopupMenu( this );
// file->insertItem( tr("&New Window"), this, SLOT( newWindow() ), ALT | Key_N );
file->insertItem( tr("&Open File"), this, SLOT( openFile() ), ALT | Key_O );
// file->insertItem( tr("&Print"), this, SLOT( print() ), ALT | Key_P );
file->insertSeparator();
file->insertItem( tr("&Close"), this, SLOT( close() ), ALT | Key_Q );
// file->insertItem( tr("E&xit"), qApp, SLOT( closeAllWindows() ), ALT | Key_X );
// The same three icons are used twice each.
////F FIXME
QString pixs=(QDir::homeDirPath ()) +"/Applications/gutenbrowser/pix/";
QIconSet icon_back( QPixmap(pixs+"back.png") );
QIconSet icon_forward( QPixmap(pixs+"forward.png") );
QIconSet icon_home( QPixmap(pixs+"home.png") );
QPopupMenu* go = new QPopupMenu( this );
backwardId = go->insertItem( icon_back, tr("&Backward"), browser, SLOT( backward() ), ALT | Key_Left );
forwardId = go->insertItem( icon_forward, tr("&Forward"), browser, SLOT( forward() ), ALT | Key_Right );
go->insertItem( icon_home, tr("&Home"), browser, SLOT( home() ) );
hist = new QPopupMenu( this );
QStringList::Iterator it = history.begin();
for ( ; it != history.end(); ++it )
mHistory[ hist->insertItem( *it ) ] = *it;
- connect( hist, SIGNAL( activated( int ) ), this, SLOT( histChosen( int ) ) );
+ connect( hist, SIGNAL( activated(int) ), this, SLOT( histChosen(int) ) );
bookm = new QPopupMenu( this );
bookm->insertItem( tr( "Add Bookmark" ), this, SLOT( addBookmark() ) );
bookm->insertSeparator();
QStringList::Iterator it2 = bookmarks.begin();
for ( ; it2 != bookmarks.end(); ++it2 )
mBookmarks[ bookm->insertItem( *it2 ) ] = *it2;
- connect( bookm, SIGNAL( activated( int ) ),
- this, SLOT( bookmChosen( int ) ) );
+ connect( bookm, SIGNAL( activated(int) ),
+ this, SLOT( bookmChosen(int) ) );
menuBar()->insertItem( tr("&File"), file );
menuBar()->insertItem( tr("&Go"), go );
menuBar()->insertItem( tr( "History" ), hist );
menuBar()->insertItem( tr( "Bookmarks" ), bookm );
// menuBar()->insertSeparator();
// menuBar()->insertItem( tr("&Help"), help );
menuBar()->setItemEnabled( forwardId, FALSE);
menuBar()->setItemEnabled( backwardId, FALSE);
- connect( browser, SIGNAL( backwardAvailable( bool ) ), this, SLOT( setBackwardAvailable( bool ) ) );
- connect( browser, SIGNAL( forwardAvailable( bool ) ), this, SLOT( setForwardAvailable( bool ) ) );
+ connect( browser, SIGNAL( backwardAvailable(bool) ), this, SLOT( setBackwardAvailable(bool) ) );
+ connect( browser, SIGNAL( forwardAvailable(bool) ), this, SLOT( setForwardAvailable(bool) ) );
QToolBar* toolbar = new QToolBar( this );
addToolBar( toolbar, "Toolbar");
QToolButton* button;
button = new QToolButton( icon_back, tr("Backward"), "", browser, SLOT(backward()), toolbar );
connect( browser, SIGNAL( backwardAvailable(bool) ), button, SLOT( setEnabled(bool) ) );
button->setEnabled( FALSE );
button = new QToolButton( icon_forward, tr("Forward"), "", browser, SLOT(forward()), toolbar );
connect( browser, SIGNAL( forwardAvailable(bool) ), button, SLOT( setEnabled(bool) ) );
button->setEnabled( FALSE );
button = new QToolButton( icon_home, tr("Home"), "", browser, SLOT(home()), toolbar );
toolbar->addSeparator();
pathCombo = new QComboBox( TRUE, toolbar );
- connect( pathCombo, SIGNAL( activated( const QString & ) ), this, SLOT( pathSelected( const QString & ) ) );
+ connect( pathCombo, SIGNAL( activated(const QString&) ), this, SLOT( pathSelected(const QString&) ) );
toolbar->setStretchableWidget( pathCombo );
// pathCombo->setMaximumWidth(190);
// setRightJustification( TRUE );
// setDockEnabled( Left, FALSE );
// setDockEnabled( Right, FALSE );
pathCombo->insertItem( home_ );
browser->setFocus();
}
void HelpWindow::setBackwardAvailable( bool b)
{
menuBar()->setItemEnabled( backwardId, b);
}
void HelpWindow::setForwardAvailable( bool b)
{
menuBar()->setItemEnabled( forwardId, b);
}
diff --git a/noncore/todayplugins/stockticker/stockticker/inputDialog.cpp b/noncore/todayplugins/stockticker/stockticker/inputDialog.cpp
index 73f8bb3..64798f4 100644
--- a/noncore/todayplugins/stockticker/stockticker/inputDialog.cpp
+++ b/noncore/todayplugins/stockticker/stockticker/inputDialog.cpp
@@ -42,48 +42,48 @@ InputDialog::InputDialog( )
connect(LineEdit1,SIGNAL(returnPressed()),this,SLOT(doLookup()));
QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Expanding );
layout->addItem( spacer, 8, 0 );
}
InputDialog::~InputDialog() {
}
void InputDialog::doLookup() {
// http://finance.yahoo.com/l?m=&s=siemens&t=
QString url = "\"http://finance.yahoo.com/l?m=&s="+LineEdit1->text()+"\"";
QString tempHtml = "/tmp/stockticker.html";
QString cmd = "wget -O "+tempHtml+" "+url;
qDebug(cmd);
/*
OProcess proc;
proc << "/usr/bin/wget";
proc<<"-O"<< tempHtml<< url;
- connect( &proc, SIGNAL( processExited( OProcess *)),this, SLOT( showBrowser(OProcess *)));
+ connect( &proc, SIGNAL( processExited(OProcess*)),this, SLOT( showBrowser(OProcess*)));
proc.start( OProcess::NotifyOnExit);
*/
system(cmd.latin1());
HelpWindow *StockLookup = new HelpWindow( tempHtml,".",this, "SymbolLookup");
StockLookup->setCaption("Symbol");
StockLookup->showMaximized();
StockLookup->show();
LineEdit1->text();
}
void InputDialog::showBrowser(OProcess*) {
qDebug("BLAH");
QString tempHtml = "/tmp/stockticker.html";
HelpWindow *StockLookup = new HelpWindow( tempHtml,".",this, "SymbolLookup");
StockLookup->setCaption("Symbol");
StockLookup->showMaximized();
StockLookup->show();
LineEdit1->text();
}
diff --git a/noncore/todayplugins/weather/weatherpluginwidget.cpp b/noncore/todayplugins/weather/weatherpluginwidget.cpp
index 4491b91..15d1c6e 100644
--- a/noncore/todayplugins/weather/weatherpluginwidget.cpp
+++ b/noncore/todayplugins/weather/weatherpluginwidget.cpp
@@ -84,49 +84,49 @@ void WeatherPluginWidget::retreiveData()
location = config.readEntry( "Location", "" );
useMetric = config.readBoolEntry( "Metric", TRUE );
frequency = config.readNumEntry( "Frequency", 5 );
startTimer( frequency * 60000 );
localFile = "/tmp/";
localFile.append( location );
localFile.append( ".TXT" );
remoteFile = "http://weather.noaa.gov/pub/data/observations/metar/stations/";
remoteFile.append( location );
remoteFile.append( ".TXT" );
QFile file( localFile );
if ( file.exists() )
{
file.remove();
}
OProcess *proc = new OProcess;
*proc << "wget" << "-q" << remoteFile << "-O" << localFile;
- connect( proc, SIGNAL( processExited( OProcess * ) ), this, SLOT( dataRetrieved( OProcess * ) ) );
+ connect( proc, SIGNAL( processExited(OProcess*) ), this, SLOT( dataRetrieved(OProcess*) ) );
proc->start();
}
void WeatherPluginWidget::displayWeather()
{
weatherData = QString::null;
QFile file( localFile );
if ( file.size() > 0 && file.open( IO_ReadOnly ) )
{
QTextStream data( &file );
while ( !data.eof() )
{
weatherData.append( data.readLine() );
}
file.close();
weatherData = weatherData.simplifyWhiteSpace();
QString tmpstr;
tmpstr.append( tr( "Temp: " ) );
getTemp( weatherData );
tmpstr.append( dataStr );