moved history navigation to its own class

This commit is contained in:
Luis Ángel San Martín
2014-11-17 12:51:41 +01:00
parent ab81cebf92
commit 3b08d75d15
5 changed files with 408 additions and 361 deletions

View File

@ -0,0 +1,31 @@
#ifndef YACREADER_HISTORY_CONTROLLER_H
#define YACREADER_HISTORY_CONTROLLER_H
#include <QObject>
#include <QModelIndex>
class YACReaderHistoryController : public QObject
{
Q_OBJECT
public:
explicit YACReaderHistoryController(QObject *parent = 0);
signals:
void enabledForward(bool enabled);
void enabledBackward(bool enabled);
void modelIndexSelected(QModelIndex mi);
public slots:
void clear();
void backward();
void forward();
void updateHistory(const QModelIndex & mi);
protected:
int currentFolderNavigation;
QList<QModelIndex> history;
};
#endif // YACREADER_HISTORY_CONTROLLER_H