File indexing completed on 2024-05-12 05:46:38

0001 /*
0002  * Copyright 2014 Manuel Riecke <spell1337@gmail.com>
0003  *
0004  * Permission to use, copy, modify, and distribute this software
0005  * and its documentation for any purpose and without fee is hereby
0006  * granted, provided that the above copyright notice appear in all
0007  * copies and that both that the copyright notice and this
0008  * permission notice and warranty disclaimer appear in supporting
0009  * documentation, and that the name of the author not be used in
0010  * advertising or publicity pertaining to distribution of the
0011  * software without specific, written prior permission.
0012  *
0013  * The author disclaim all warranties with regard to this
0014  * software, including all implied warranties of merchantability
0015  * and fitness.  In no event shall the author be liable for any
0016  * special, indirect or consequential damages or any damages
0017  * whatsoever resulting from loss of use, data or profits, whether
0018  * in an action of contract, negligence or other tortious action,
0019  * arising out of or in connection with the use or performance of
0020  * this software.
0021  */
0022 
0023 #pragma once
0024 
0025 #include <QColor>
0026 #include "indexcolorpalette.h"
0027 
0028 struct PaletteGeneratorConfig
0029 {
0030     QColor colors[4][4];
0031     bool   colorsEnabled[4][4];
0032     int    gradientSteps[3];
0033     int    inbetweenRampSteps;
0034     bool   diagonalGradients;
0035 
0036     PaletteGeneratorConfig();
0037     QByteArray toByteArray();
0038     void fromByteArray(const QByteArray& str);
0039     IndexColorPalette generate();
0040 };