Subversion Repositories Scribus

Rev

Rev 12337 | Blame | Compare with Previous | Last modification | View Log | RSS feed

//
// C++ Interface: styleslibrary
//
// Description:
//
//
// Author: Pierre Marchand, <pierremarc@oep-h.com> (C) 2008
//
// Copyright: See COPYING file that comes with this distribution
//
//

#ifndef STYLESLIBRARY_H
#define STYLESLIBRARY_H

#include "linestyle.h"
#include "charstyle.h"
#include "paragraphstyle.h"

/** Because I’m tired running after contexts everywhere, i’ll maintain
    a dumb Styles map which can be queried from anywhere to fetch a style
 */


class SCRIBUS_API StylesLibrary : private QMap<QString, Style*>
{
        static StylesLibrary *instance;
        static StylesLibrary* getThis();
        StylesLibrary();
        ~StylesLibrary(){};
       
       
        public:
                static void Add(const QString& uuid, Style* style);
                static void Remove(const QString& uuid);
                static Style* BaseStyle(const QString& uuid);
                static LineStyle* Line(const QString& uuid);
                static CharStyle* Char(const QString& uuid);
                static ParagraphStyle* Paragraph(const QString& uuid);
                static QString Find(const QString& dName);
                static int Count();
               
};

#endif