PageRenderTime 15ms CodeModel.GetById 6ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

/src/sip/twitter/twitterconfigwidget.h

http://github.com/tomahawk-player/tomahawk
C++ Header | 69 lines | 39 code | 13 blank | 17 comment | 0 complexity | 12d9c09f6a9516019b086153518acc33 MD5 | raw file
 1/* === This file is part of Tomahawk Player - <http://tomahawk-player.org> ===
 2 *
 3 *   Copyright 2010-2011, Christian Muehlhaeuser <muesli@tomahawk-player.org>
 4 *
 5 *   Tomahawk is free software: you can redistribute it and/or modify
 6 *   it under the terms of the GNU General Public License as published by
 7 *   the Free Software Foundation, either version 3 of the License, or
 8 *   (at your option) any later version.
 9 *
10 *   Tomahawk is distributed in the hope that it will be useful,
11 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
12 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 *   GNU General Public License for more details.
14 *
15 *   You should have received a copy of the GNU General Public License
16 *   along with Tomahawk. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef TWITTERCONFIGWIDGET_H
20#define TWITTERCONFIGWIDGET_H
21
22#include "sip/SipPlugin.h"
23
24#include <QTweetLib/qtweetstatus.h>
25#include <QTweetLib/qtweetdmstatus.h>
26#include <QTweetLib/qtweetuser.h>
27#include <QTweetLib/qtweetnetbase.h>
28
29#include <QWidget>
30
31class TwitterPlugin;
32
33namespace Ui {
34    class TwitterConfigWidget;
35}
36
37class TwitterConfigWidget : public QWidget
38{
39    Q_OBJECT
40
41public:
42    explicit TwitterConfigWidget( TwitterPlugin* plugin = 0, QWidget *parent = 0 );
43    ~TwitterConfigWidget();
44
45signals:
46    void twitterAuthed( bool authed );
47
48    void sizeHintChanged();
49private slots:
50    void authDeauthTwitter();
51    void startPostGotTomahawkStatus();
52    void authenticateVerifyReply( const QTweetUser &user );
53    void authenticateVerifyError( QTweetNetBase::ErrorCode code, const QString &errorMsg );
54    void postGotTomahawkStatusAuthVerifyReply( const QTweetUser &user );
55    void postGotTomahawkStatusUpdateReply( const QTweetStatus &status );
56    void postGotTomahawkDirectMessageReply( const QTweetDMStatus &status );
57    void postGotTomahawkStatusUpdateError( QTweetNetBase::ErrorCode, const QString &errorMsg );
58    void tweetComboBoxIndexChanged( int index );
59
60private:
61    void authenticateTwitter();
62    void deauthenticateTwitter();
63
64    Ui::TwitterConfigWidget *ui;
65    TwitterPlugin *m_plugin;
66    QString m_postGTtype;
67};
68
69#endif // TWITTERCONFIGWIDGET_H