1 /*
2  * Copyright (C) 2010-2015 by Stephen Allewell
3  * steve.allewell@gmail.com
4  *
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  */
10 
11 
12 #ifndef FlossScheme_H
13 #define FlossScheme_H
14 
15 
16 #include <QColor>
17 #include <QList>
18 #include <QListIterator>
19 #include <QString>
20 
21 // wrap include to silence unused-parameter warning from Magick++ include file
22 #pragma GCC diagnostic push
23 #pragma GCC diagnostic ignored "-Wunused-parameter"
24 #include <Magick++.h>
25 #pragma GCC diagnostic pop
26 
27 #include "Floss.h"
28 
29 
30 class FlossScheme
31 {
32 public:
33     FlossScheme();
34     ~FlossScheme();
35 
36     Floss *convert(const QColor &color);
37     Floss *find(const QString &name) const;
38     Floss *find(const QColor &color) const;
39     QString schemeName() const;
40     QString path() const;
41     const QList<Floss *> &flosses() const;
42 
43     void addFloss(Floss *floss);
44     void clearScheme();
45     Magick::Image *createImageMap();
46     void setSchemeName(const QString &name);
47     void setPath(const QString &name);
48 
49 private:
50     QString     m_schemeName;
51     QString     m_path;
52     QList<Floss *>  m_flosses;
53     Magick::Image   *m_map;
54 };
55 
56 #endif // FlossScheme_H
57