recents.hpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef QVLC_RECENTS_H_
00025 #define QVLC_RECENTS_H_
00026
00027 #include "qt4.hpp"
00028
00029 #include <QObject>
00030 class QStringList;
00031 class QRegExp;
00032 class QSignalMapper;
00033
00034 #define RECENTS_LIST_SIZE 10
00035
00036 class RecentsMRL : public QObject
00037 {
00038 Q_OBJECT
00039
00040 public:
00041 static RecentsMRL* getInstance( intf_thread_t* p_intf )
00042 {
00043 if(!instance)
00044 instance = new RecentsMRL( p_intf );
00045 return instance;
00046 }
00047 static void killInstance()
00048 {
00049 delete instance;
00050 instance = NULL;
00051 }
00052
00053 void addRecent( const QString & );
00054 QStringList recents();
00055
00056 QSignalMapper *signalMapper;
00057
00058 private:
00059 RecentsMRL( intf_thread_t* _p_intf );
00060 virtual ~RecentsMRL();
00061
00062 static RecentsMRL *instance;
00063
00064 intf_thread_t *p_intf;
00065 QStringList *stack;
00066 QRegExp *filter;
00067 bool isActive;
00068
00069 void load();
00070 void save();
00071 public slots:
00072 void clear();
00073 };
00074
00075 #endif