/*
 * ViewerSettings.h
 *
 * (c) 2002 by Thorsten Scheuermann <tscheuermann@gmx.net>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 */

#ifndef VIEWERSETTINGS_H
#define VIEWERSETTINGS_H

#include "ViewerGlobals.h"
#include <qlist.h>

class Bookmark;

class ViewerSettings
{
public:
  static ViewerSettings *getInstance();

  bool allowRotation() const;
  void setAllowRotation(bool allow);
  RotationMode rotation() const;
  void setRotation(RotationMode r);
  void setCurrentBookmark(const Bookmark *bm);
  Bookmark *currentBookmark();

  QList<Bookmark>& bookmarks();

  void save();

protected:
  bool rotationAllowed;
  RotationMode rot;
  int currBookmarkIndex;

  ViewerSettings();   // should be a singleton
  void load();

private:
  static ViewerSettings *theInstance;
  static int refCount;
  static QList<Bookmark> bmList;
};

#endif
