rsschannel.h 531 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef RSSCHANNEL_H
  2. #define RSSCHANNEL_H
  3. #include <QObject>
  4. #include "synchttpobject.h"
  5. #include <QDebug>
  6. #include <QtXml/QDomDocument>
  7. #include <QtXml/QDomElement>
  8. struct RssInfo
  9. {
  10. QString title;
  11. QString content;
  12. };
  13. class RssChannel : public QObject
  14. {
  15. Q_OBJECT
  16. public:
  17. explicit RssChannel(QObject* parent = nullptr);
  18. QString url() const;
  19. void setUrl(const QString& url);
  20. void openUrl(const QString& url);
  21. QList<RssInfo> items;
  22. signals:
  23. private:
  24. QString m_url;
  25. };
  26. #endif // RSSCHANNEL_H