/***************************************************************************
                           filesidestyle.h
                           -------------------
    copyright            : (C) 2004 by Jos van den Oever
    email                : jos@vandenoever.info
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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 FILESIDESTYLE_H
#define FILESIDESYTLE_H

#include "sidestyle.h"
#include <QtCore/QStringList>
#include <QtCore/QMap>
#include <vector>
class QDir;

class FileSideStyle : public SideStyle {
private:
	QMap<QString, QString> styledirs;
	std::vector<const Q3Picture *> c1;
	std::vector<const Q3Picture *> c2;
	std::vector<const Q3Picture *> c4;
	void freeimages();
	void readDirs(const QString &dir);
	bool checkDir(const QDir &d) const;
	bool checkFile(const QString &f) const;
	void loadDir(const QDir &d);
	void loadFile(const QString &f, bool);
public:
	FileSideStyle();
	QStringList getStyles();
	~FileSideStyle();
	const Q3Picture *getC4Picture(ushort i) const;
	const Q3Picture *getC2Picture(ushort i) const;
	const Q3Picture *getC1Picture(ushort i) const;
	short amount(Symmetry) const;
	void loadStyle(const QString &s);
};

#endif
