~ubuntu-branches/ubuntu/trusty/krusader/trusty

« back to all changes in this revision

Viewing changes to krusader/Panel/dirhistoryqueue.h

  • Committer: Bazaar Package Importer
  • Author(s): Michał Zając
  • Date: 2011-08-08 13:47:36 UTC
  • mfrom: (1.2.19 upstream)
  • Revision ID: james.westby@ubuntu.com-20110808134736-8e630ivgd2c3sgg5
Tags: 1:2.4.0~beta1-0ubuntu1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#ifndef DIRHISTORYQUEUE_H
22
22
#define DIRHISTORYQUEUE_H
23
23
 
 
24
#include <QObject>
24
25
#include <QStringList>
25
26
#include <kurl.h>
 
27
#include <kconfiggroup.h>
26
28
 
27
29
class KrPanel;
28
30
 
29
 
class DirHistoryQueue
 
31
class DirHistoryQueue : public QObject
30
32
{
 
33
    Q_OBJECT
31
34
public:
32
35
    DirHistoryQueue(KrPanel *panel);
33
36
    ~DirHistoryQueue();
43
46
        return _urlQueue.count();
44
47
    }
45
48
    KUrl currentUrl();
 
49
    void setCurrentUrl(const KUrl &url);
46
50
    const KUrl& get(int pos) {
47
51
        return _urlQueue[pos];
48
52
    }
49
53
    void add(KUrl url, QString currentItem);
 
54
    void pushBack(KUrl url, QString currentItem);
50
55
    bool gotoPos(int pos);
51
56
    bool goBack();
52
57
    bool goForward();
58
63
    }
59
64
    QString currentItem(); // current item of the view
60
65
 
 
66
    void save(KConfigGroup cfg);
 
67
    bool restore(KConfigGroup cfg);
 
68
 
 
69
public slots:
 
70
    void saveCurrentItem();
 
71
 
61
72
private:
62
 
    void saveCurrentItem();
63
 
 
64
73
    KrPanel* _panel;
65
74
    int _state; // increments when we move inside the history, or a new item is added
66
75
    int _currentPos;