Changeset View
Changeset View
Standalone View
Standalone View
krusader/Panel/dirhistoryqueue.h
Show All 32 Lines | |||||
33 | class DirHistoryQueue : public QObject | 33 | class DirHistoryQueue : public QObject | ||
34 | { | 34 | { | ||
35 | Q_OBJECT | 35 | Q_OBJECT | ||
36 | public: | 36 | public: | ||
37 | DirHistoryQueue(KrPanel *panel); | 37 | DirHistoryQueue(KrPanel *panel); | ||
38 | ~DirHistoryQueue(); | 38 | ~DirHistoryQueue(); | ||
39 | 39 | | |||
40 | void clear(); | 40 | void clear(); | ||
41 | int state() { | | |||
42 | return _state; | | |||
43 | } | | |||
44 | int currentPos() { | 41 | int currentPos() { | ||
45 | return _currentPos; | 42 | return _currentPos; | ||
46 | } | 43 | } | ||
47 | int count() { | 44 | int count() { | ||
48 | return _urlQueue.count(); | 45 | return _urlQueue.count(); | ||
49 | } | 46 | } | ||
50 | QUrl currentUrl(); | 47 | QUrl currentUrl(); | ||
51 | void setCurrentUrl(const QUrl &url); | 48 | void setCurrentUrl(const QUrl &url); | ||
Show All 16 Lines | |||||
68 | void save(KConfigGroup cfg); | 65 | void save(KConfigGroup cfg); | ||
69 | bool restore(KConfigGroup cfg); | 66 | bool restore(KConfigGroup cfg); | ||
70 | 67 | | |||
71 | public slots: | 68 | public slots: | ||
72 | void saveCurrentItem(); | 69 | void saveCurrentItem(); | ||
73 | 70 | | |||
74 | private: | 71 | private: | ||
75 | KrPanel* _panel; | 72 | KrPanel* _panel; | ||
76 | int _state; // increments when we move inside the history, or a new item is added | | |||
77 | int _currentPos; | 73 | int _currentPos; | ||
78 | QList<QUrl> _urlQueue; | 74 | QList<QUrl> _urlQueue; | ||
79 | QStringList _currentItems; | 75 | QStringList _currentItems; | ||
80 | }; | 76 | }; | ||
81 | 77 | | |||
82 | #endif | 78 | #endif |