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.
70 lines
1.4 KiB
70 lines
1.4 KiB
#ifndef FEEDBROWSER_H
|
|
#define FEEDBROWSER_H
|
|
|
|
#include <tqobject.h>
|
|
#include <dcopobject.h>
|
|
#include <kdialogbase.h>
|
|
#include <klistview.h>
|
|
|
|
class DCOPRSSIface : public TQObject, public DCOPObject
|
|
{
|
|
K_DCOP
|
|
Q_OBJECT
|
|
// TQ_OBJECT
|
|
public:
|
|
DCOPRSSIface( TQObject *tqparent, const char *name = 0 );
|
|
|
|
k_dcop:
|
|
void slotGotCategories( const TQStringList &categories );
|
|
|
|
public slots:
|
|
void getCategories( const TQString &cat = "Top" );
|
|
|
|
signals:
|
|
void gotCategories( const TQStringList &categories );
|
|
};
|
|
|
|
class CategoryItem : public TQObject, public KListViewItem
|
|
{
|
|
Q_OBJECT
|
|
// TQ_OBJECT
|
|
public:
|
|
CategoryItem( KListView *tqparent, const TQString &category );
|
|
CategoryItem( KListViewItem *tqparent, const TQString &category );
|
|
|
|
virtual void setOpen( bool open );
|
|
|
|
private slots:
|
|
void gotCategories( const TQStringList &categories );
|
|
|
|
private:
|
|
void populate();
|
|
void init();
|
|
|
|
TQString m_category;
|
|
bool m_populated;
|
|
DCOPRSSIface *m_dcopIface;
|
|
};
|
|
|
|
class FeedBrowserDlg : public KDialogBase
|
|
{
|
|
Q_OBJECT
|
|
// TQ_OBJECT
|
|
friend class CategoryItem;
|
|
public:
|
|
FeedBrowserDlg( TQWidget *tqparent, const char *name = 0 );
|
|
|
|
private slots:
|
|
void itemSelected( TQListViewItem *item );
|
|
void gotTopCategories( const TQStringList &categories );
|
|
|
|
private:
|
|
void getTopCategories();
|
|
|
|
DCOPRSSIface *m_dcopIface;
|
|
KListView *m_feedList;
|
|
};
|
|
|
|
#endif // FEEDBROWSER_H
|
|
// vim:ts=4:sw=4:noet
|