Reverse line order in Log(View)
[nomnom.git] / src / Video.h
blob00dc052107daf71673ae022f5b956ccdaa17efd7
1 /*
2 * Copyright (C) 2010 Toni Gundogdu.
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 #ifndef nomnom_video_h
19 #define nomnom_video_h
21 #include <QPointer>
22 #include <QRegExp>
23 #include <QHash>
25 class QLabel;
27 class Video : public QObject
29 Q_OBJECT
30 public:
31 enum Detail
32 { Link=0, Title, PageURL, ID, Format, Length, Suffix, ContentType, Host };
33 public:
34 Video ();
35 Video (const Video&);
36 Video& operator=(const Video&);
37 public:
38 bool fromJSON (const QString&, QString&);
39 QVariant get (Detail) const;
40 void set (Detail, const QString&);
41 private:
42 // Details.
43 QString _id;
44 QString _title;
45 QString _pageURL;
46 QString _link;
47 QString _format;
48 qint64 _length;
49 QString _suffix;
50 QString _ctype;
51 QString _host;
54 class VideoException
56 public:
57 VideoException (const QString&);
58 const QString& what() const;
59 private:
60 QString errmsg;
63 #endif
65 // vim: set ts=2 sw=2 tw=72 expandtab: