-
Notifications
You must be signed in to change notification settings - Fork 0
/
cachecontent.h
62 lines (58 loc) · 1.84 KB
/
cachecontent.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#ifndef CACHECONTENT_H
#define CACHECONTENT_H
#include <QDeclarativeItem>
#include <QString>
#include <QFile>
#include <QFileInfo>
#include <QIODevice>
#include <QTextStream>
#include <QtNetwork>
#include <QByteArray>
#include <QImage>
#include <QClipboard>
#include <QInputContext>
#include "settings.h"
class CacheContent : public QDeclarativeItem
{
Q_OBJECT
public:
explicit CacheContent(Settings *new_set,QDeclarativeItem *parent = 0);
~CacheContent();
private:
QFile file;
QNetworkAccessManager *manager;
QString imageName,content,m_sid,prefix,coding;
QImage image;
int count;
Settings *setting;
bool m_isChache;
void disposeHref(QString &string,int i=0);
void disposeLetvVideo(QString &string,int i=0);
void disposeYoukuVideo(QString &string,int i=0);
//void disposeSwfVideo(QString &string, int i=0);
bool m_canclePost;
QString queue[50];
int queue_begin,queue_end;
private slots:
void replyFinished(QNetworkReply* replys);
signals:
void content_image(const QString string);
public slots:
void editContent();
void saveTitle(const QString sid,QString string);
QString getTitle(const QString sid,const QString string);
void saveContent(const QString sid,QString string);
void getContent_image(const QString sid);
QString getContent_noImage(const QString sid);
void setClipboard(const QString string);
void canclePost();
bool inQueue(const QString sid);
QString OutQueue();
#ifdef Q_OS_HARMATTAN
bool clearCache(QString dirPath ="/home/user/ithome/cache", bool deleteSelf=false , bool deleteHidden= false);
#else
bool clearCache(QString dirPath ="./cache", bool deleteSelf=false , bool deleteHidden= false);
#endif
QString getContent_text(const QString sid);
};
#endif // CACHECONTENT_H