~ubuntu-branches/debian/sid/smplayer/sid

« back to all changes in this revision

Viewing changes to src/recents.h

  • Committer: Bazaar Package Importer
  • Author(s): Maia Kozheva
  • Date: 2009-03-31 23:05:43 UTC
  • mto: (1.1.9 upstream) (3.1.2 squeeze)
  • mto: This revision was merged to the branch mainline in revision 14.
  • Revision ID: james.westby@ubuntu.com-20090331230543-nsklbxenl2hf2n6h
Tags: upstream-0.6.7
ImportĀ upstreamĀ versionĀ 0.6.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*  smplayer, GUI front-end for mplayer.
2
 
    Copyright (C) 2006-2008 Ricardo Villalba <rvm@escomposlinux.org>
 
2
    Copyright (C) 2006-2009 Ricardo Villalba <rvm@escomposlinux.org>
3
3
 
4
4
    This program is free software; you can redistribute it and/or modify
5
5
    it under the terms of the GNU General Public License as published by
20
20
#define _RECENTS_H_
21
21
 
22
22
#include <QStringList>
23
 
#include <QObject>
24
23
 
25
 
class Recents : public QObject
 
24
class Recents
26
25
{
27
 
        Q_OBJECT
28
26
 
29
27
public:
30
 
        Recents(QObject* parent = 0);
31
 
        ~Recents();
32
 
 
33
 
        void add(QString s);
34
 
        int count();
35
 
        QString item(int n);
36
 
 
37
 
        void setMaxItems(int n) { max_items = n; };
38
 
        int maxItems() { return max_items; };
39
 
 
40
 
        void save();
41
 
        void load();
42
 
 
43
 
        void list();
44
 
 
45
 
public slots:
46
 
        void clear();
47
 
 
48
 
private:
 
28
        Recents();
 
29
        virtual ~Recents();
 
30
 
 
31
        virtual void clear();
 
32
 
 
33
        virtual void addItem(QString s);
 
34
        virtual QString item(int n);
 
35
 
 
36
        virtual int count();
 
37
 
 
38
        virtual void setMaxItems(int n_items);
 
39
        virtual int maxItems() { return max_items; };
 
40
 
 
41
        virtual void fromStringList(QStringList list);
 
42
        virtual QStringList toStringList();
 
43
 
 
44
        virtual void list();
 
45
 
 
46
protected:
 
47
        int max_items;
49
48
        QStringList l;
50
 
        int max_items;
51
49
};
52
50
 
53
51
#endif