1 /***************************************************************************
2 * Copyright (C) 2005 by Jorge Cuadrado *
3 * kuadrosxx@gmail.com *
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. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
21 #ifndef COMPONENTSPALETTES_H
22 #define COMPONENTSPALETTES_H
26 #include <QStackedWidget>
27 #include <QVBoxLayout>
30 #include "cellscolor.h"
31 #include "paletteparser.h"
34 namespace Components
{
37 * @author Jorge Cuadrado <kuadrosxx@gmail.com>
39 class Palettes
: public QFrame
43 Palettes(QWidget
*parent
= 0);
45 void readPaletteFile(const QString
&file
);
46 void setBrush(const QBrush
& b
);
55 void fillDefaultColors();
56 void addDefaultColor(int i
, int j
, const QColor
&);
57 void fillNamedColor();
58 void readPalettes(const QString
&paletteDir
);
59 void addPalette(CellsColor
*palette
);
66 void selectColor(const QBrush
&);
69 virtual void addCurrentColor();
70 virtual void removeCurrentColor();
71 virtual void addPalette(const QString
& name
, const QList
<QBrush
> & brushes
, bool editable
);
72 void changeColor(QTableWidgetItem*/
*, QTableWidgetItem
**/
);