File indexing completed on 2024-04-28 04:32:01

0001 /*
0002  * Copyright (C) 2010-2015 by Stephen Allewell
0003  * steve.allewell@gmail.com
0004  *
0005  * This program is free software; you can redistribute it and/or modify
0006  * it under the terms of the GNU General Public License as published by
0007  * the Free Software Foundation; either version 2 of the License, or
0008  * (at your option) any later version.
0009  */
0010 
0011 #ifndef FlossScheme_H
0012 #define FlossScheme_H
0013 
0014 #include <QColor>
0015 #include <QList>
0016 #include <QListIterator>
0017 #include <QString>
0018 
0019 // wrap include to silence unused-parameter warning from Magick++ include file
0020 #pragma GCC diagnostic push
0021 #pragma GCC diagnostic ignored "-Wunused-parameter"
0022 #pragma GCC diagnostic ignored "-Wsuggest-override"
0023 #include <Magick++.h>
0024 #pragma GCC diagnostic pop
0025 
0026 #include "Floss.h"
0027 
0028 class FlossScheme
0029 {
0030 public:
0031     FlossScheme();
0032     ~FlossScheme();
0033 
0034     Floss *convert(const QColor &color);
0035     Floss *find(const QString &name) const;
0036     Floss *find(const QColor &color) const;
0037     QString schemeName() const;
0038     QString path() const;
0039     const QList<Floss *> &flosses() const;
0040 
0041     void addFloss(Floss *floss);
0042     void clearScheme();
0043     Magick::Image *createImageMap();
0044     void setSchemeName(const QString &name);
0045     void setPath(const QString &name);
0046 
0047 private:
0048     QString m_schemeName;
0049     QString m_path;
0050     QList<Floss *> m_flosses;
0051     Magick::Image *m_map;
0052 };
0053 
0054 #endif // FlossScheme_H