3 #include "w_timeline.h"
5 w_Timeline::w_Timeline(TwitterSocket
*socket
, QWidget
*parent
)
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()));
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);
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
;