#ifndef _SmartScrollArea_h__
#define _SmartScrollArea_h__

#include <QScrollArea>

/**
 * For some reason, switching tabs in MainWindow often resets
 * scroll bars... Well, not anymore.
 */
class SmartScrollArea : public QScrollArea {

    Q_OBJECT

    int hPos;
    int vPos;

  public:
    SmartScrollArea();
    virtual ~SmartScrollArea();

  public slots:
    void restoreLastPosition();

  private slots:
    void saveHorizontalPosition();
    void saveVerticalPosition();
};

#endif
