1
/***************************************************************************
2
* Copyright (C) 2003 by Stephen Allewell *
3
* stephen@mirramar.fsnet.co.uk *
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU General Public License as published by *
7
* the Free Software Foundation; either version 2 of the License, or *
8
* (at your option) any later version. *
9
***************************************************************************/
11
#ifndef SCHEMEMANAGER_H
12
#define SCHEMEMANAGER_H
15
#include <qstringlist.h>
16
#include "flossscheme.h"
18
/** Manages the global and user specific schemes.
19
Schemes are stored as XML and loaded at application startup.
20
The scheme list can be refreshed if a user stores a new scheme
21
@author Stephen P. Allewell
27
/** Create a new scheme
28
@return Pointer to the new FlossScheme, will return NULL if
29
a scheme already exists with this name, or if it could not
31
@param schemeName The name of the scheme to create
33
FlossScheme* createScheme(QString schemeName);
34
/** Read a scheme file
35
@return Pointer to the FlossScheme read,
36
will return NULL if the read failed or a scheme
37
has previously been read by this name, ie if a calibrated
38
scheme was read first.
39
@param name The name of the file (scheme) to be read.
41
FlossScheme* readScheme(QString name);
42
/** write the scheme to a user writable directory.
43
@return TRUE if successful, FALSE if no writable directory found.
44
@param name The name of the scheme to be written.
46
bool writeScheme(QString name);
47
/** Get a list of the currently loaded scheme names.
48
@return @ref QStringList containing the names of the avialable schemes.
50
QStringList schemes();
51
/** Get a pointer to a FlossScheme
52
@return pointer to the FlossScheme,
53
will return NULL if the scheme is not available.
54
@param name The name of the scheme.
56
FlossScheme* scheme(QString name);
62
typedef QMap<QString,QColor> CalibratedColor;
63
QPtrList<FlossScheme> m_flossSchemes;