2
This file is part of choqoK, the KDE Twitter client
4
Copyright (C) 2008 Mehrdad Momeny <mehrdad.momeny@gmail.com>
6
This program is free software; you can redistribute it and/or modify
7
it under the terms of the GNU General Public License as published by
8
the Free Software Foundation; either version 3 of the License, or
9
(at your option) any later version.
2
This file is part of choqoK, the KDE mono-blogging client
4
Copyright (C) 2008-2009 Mehrdad Momeny <mehrdad.momeny@gmail.com>
6
This program is free software; you can redistribute it and/or
7
modify it under the terms of the GNU General Public License as
8
published by the Free Software Foundation; either version 2 of
9
the License or (at your option) version 3 or any later version
10
accepted by the membership of KDE e.V. (or its successor approved
11
by the membership of KDE e.V.), which shall act as a proxy
12
defined in Section 14 of version 3 of the license.
11
15
This program is distributed in the hope that it will be useful,
12
16
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
18
GNU General Public License for more details.
16
20
You should have received a copy of the GNU General Public License
17
along with this program; if not, write to the Free Software
18
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21
along with this program; if not, see http://www.gnu.org/licenses/
21
24
#ifndef STATUSWIDGET_H
26
#include <ui_status_base.h>
29
#include <ui_statuswidget_base.h>
27
30
#include "datacontainers.h"
28
31
#include "constants.h"
29
#define UPDATEINTERVAL 2*60000
30
#define COLOROFFSET 20
34
@author Mehrdad Momeny <mehrdad.momeny@gmail.com>
37
@author Mehrdad Momeny <mehrdad.momeny@gmail.com>
36
class StatusWidget : public QFrame, public Ui_StatusBase
39
class StatusWidget : public QFrame, public Ui_StatusWidgetBase
40
enum Notify{ WithNotify=0, WithoutNotify};
42
explicit StatusWidget(const Account *account, QWidget *parent = 0);
43
enum Notify { WithNotify = 0, WithoutNotify};
45
explicit StatusWidget( const Account *account, QWidget *parent = 0 );
46
static QString formatDateTime(const QDateTime &time);
48
Status currentStatus() const;
49
void setCurrentStatus(const Status newStatus);
50
void setUserImage(const QString &imgPath);
51
void setUserImage(const QPixmap *image);
52
void setUnread(Notify notifyType);
54
void updateFavoriteUi();
49
QString formatDateTime( const QDateTime &time );
51
Status currentStatus() const;
52
void setCurrentStatus( const Status newStatus );
53
void setUserImage( const QString &imgPath );
54
void setUserImage( const QPixmap *image );
55
void setUnread( Notify notifyType );
57
void updateFavoriteUi();
58
void sigReply(QString &userName, uint statusId);
59
void sigDestroy(uint statusId);
60
void sigFavorite(uint statusId, bool isFavorite);
61
void sigReply( const QString &userName, uint statusId );
62
void sigDestroy( uint statusId );
63
void sigFavorite( uint statusId, bool isFavorite );
63
void setFavorite(bool isFavorite);
65
void requestDestroy();
67
void userImageLocalPathFetched(const QString &remotePath, const QString &localPath);
66
void setFavorite( bool isFavorite );
68
void requestDestroy();
70
void userImageLocalPathFetched( const QString &remotePath, const QString &localPath );
71
void missingStatusReceived( uint statusId, Status status );
71
QString prepareStatus(const QString &text, const int &replyStatusId);
73
QString generateSign();
77
Status mCurrentStatus;
75
QString prepareStatus( const QString &text );
77
QString generateSign();
78
QString regenerateSign();
82
Status mCurrentStatus;
79
84
const Account *mCurrentAccount;