TDE network applications
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

feedbrowser.h 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #ifndef FEEDBROWSER_H
  2. #define FEEDBROWSER_H
  3. #include <tqobject.h>
  4. #include <dcopobject.h>
  5. #include <kdialogbase.h>
  6. #include <tdelistview.h>
  7. class DCOPRSSIface : public TQObject, public DCOPObject
  8. {
  9. K_DCOP
  10. Q_OBJECT
  11. //
  12. public:
  13. DCOPRSSIface( TQObject *parent, const char *name = 0 );
  14. k_dcop:
  15. void slotGotCategories( const TQStringList &categories );
  16. public slots:
  17. void getCategories( const TQString &cat = "Top" );
  18. signals:
  19. void gotCategories( const TQStringList &categories );
  20. };
  21. class CategoryItem : public TQObject, public TDEListViewItem
  22. {
  23. Q_OBJECT
  24. //
  25. public:
  26. CategoryItem( TDEListView *parent, const TQString &category );
  27. CategoryItem( TDEListViewItem *parent, const TQString &category );
  28. virtual void setOpen( bool open );
  29. private slots:
  30. void gotCategories( const TQStringList &categories );
  31. private:
  32. void populate();
  33. void init();
  34. TQString m_category;
  35. bool m_populated;
  36. DCOPRSSIface *m_dcopIface;
  37. };
  38. class FeedBrowserDlg : public KDialogBase
  39. {
  40. Q_OBJECT
  41. //
  42. friend class CategoryItem;
  43. public:
  44. FeedBrowserDlg( TQWidget *parent, const char *name = 0 );
  45. private slots:
  46. void itemSelected( TQListViewItem *item );
  47. void gotTopCategories( const TQStringList &categories );
  48. private:
  49. void getTopCategories();
  50. DCOPRSSIface *m_dcopIface;
  51. TDEListView *m_feedList;
  52. };
  53. #endif // FEEDBROWSER_H
  54. // vim:ts=4:sw=4:noet