/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. #ifndef TWITTERCONFIGWIDGET_H
  19. #define TWITTERCONFIGWIDGET_H
  20. #include "sip/SipPlugin.h"
  21. #include <QTweetLib/qtweetstatus.h>
  22. #include <QTweetLib/qtweetdmstatus.h>
  23. #include <QTweetLib/qtweetuser.h>
  24. #include <QTweetLib/qtweetnetbase.h>
  25. #include <QWidget>
  26. class TwitterPlugin;
  27. namespace Ui {
  28. class TwitterConfigWidget;
  29. }
  30. class TwitterConfigWidget : public QWidget
  31. {
  32. Q_OBJECT
  33. public:
  34. explicit TwitterConfigWidget( TwitterPlugin* plugin = 0, QWidget *parent = 0 );
  35. ~TwitterConfigWidget();
  36. signals:
  37. void twitterAuthed( bool authed );
  38. void sizeHintChanged();
  39. private slots:
  40. void authDeauthTwitter();
  41. void startPostGotTomahawkStatus();
  42. void authenticateVerifyReply( const QTweetUser &user );
  43. void authenticateVerifyError( QTweetNetBase::ErrorCode code, const QString &errorMsg );
  44. void postGotTomahawkStatusAuthVerifyReply( const QTweetUser &user );
  45. void postGotTomahawkStatusUpdateReply( const QTweetStatus &status );
  46. void postGotTomahawkDirectMessageReply( const QTweetDMStatus &status );
  47. void postGotTomahawkStatusUpdateError( QTweetNetBase::ErrorCode, const QString &errorMsg );
  48. void tweetComboBoxIndexChanged( int index );
  49. private:
  50. void authenticateTwitter();
  51. void deauthenticateTwitter();
  52. Ui::TwitterConfigWidget *ui;
  53. TwitterPlugin *m_plugin;
  54. QString m_postGTtype;
  55. };
  56. #endif // TWITTERCONFIGWIDGET_H