Minor fixes for push
[squawker.git] / w_timeline.cpp
blob47081230cec630d15cf41224a32feb9ae06aa832
1 #include <QtGui>
3 #include "w_timeline.h"
5 w_Timeline::w_Timeline(TwitterSocket *socket, QWidget *parent)
7 setupUi(this);
8 le_message->setFocus();
10 twitterSocket = socket;
12 // Send message button (Squawk!)
13 QObject::connect(pb_update, SIGNAL(clicked()), this, SLOT(sendUpdate()));
14 //Result of the button press
15 QObject::connect( twitterSocket, SIGNAL( result(bool,QString) ), this, SLOT( updateResult(bool, QString) ) );
17 //Refresh the timeline ever so often...
18 timer = new QTimer(this);
19 QObject::connect(timer, SIGNAL(timeout()), this, SLOT(refresh()));
20 timer->start(9000);
23 void w_Timeline::sendUpdate()
25 pb_update->setEnabled(false);
26 twitterSocket->update(le_message->text());
29 void w_Timeline::updateResult(bool error, QString errorstring)
31 pb_update->setEnabled(true);
32 le_message->clear();
33 qDebug() << "Update done:" << error;
36 void w_Timeline::refresh()
38 qDebug() << "Refreshing...";
41 void w_Timeline::refreshResult(bool error, QString errorstring)
43 qDebug() << "Refresh result:" << error;