00001 /*************************************************************************** 00002 * Copyright (C) 2013 by James Fuller,,, * 00003 * james@slakware12 * 00004 * * 00005 * This program is free software; you can redistribute it and/or modify * 00006 * it under the terms of the GNU General Public License as published by * 00007 * the Free Software Foundation; either version 2 of the License, or * 00008 * (at your option) any later version. * 00009 * * 00010 * This program is distributed in the hope that it will be useful, * 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00013 * GNU General Public License for more details. * 00014 * * 00015 * You should have received a copy of the GNU General Public License * 00016 * along with this program; if not, write to the * 00017 * Free Software Foundation, Inc., * 00018 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 00019 ***************************************************************************/ 00020 //------------------------------------------------------------------- 00021 #ifndef DOSCOLOURBOX_H 00022 #define DOSCOLOURBOX_H 00023 //------------------------------------------------------------------- 00024 #include <qvaluelist.h> 00025 #include <qptrlist.h> 00026 #include <qwidget.h> 00027 //------------------------------------------------------------------- 00028 #include <kcolordialog.h> 00029 //------------------------------------------------------------------- 00030 #include "labelini.h" 00031 //------------------------------------------------------------------- 00032 class KConfigGroup; 00033 //------------------------------------------------------------------- 00041 class DosColourBox : public KColorCells { 00042 private: 00043 typedef QValueList<QColor> ColourList; 00044 typedef QPtrList<DosColourBox> DlgList; 00045 00046 LabelIni * label; 00047 00048 static ColourList colourList; 00049 static DlgList dlgList; 00050 00051 public: 00052 00053 DosColourBox(QWidget * parent, const char * name, LabelIni * label); 00054 00055 ~DosColourBox(); 00056 static void updateColourList (void ); 00057 void shortAndWide ( void ); 00058 void square ( void ); 00059 00060 static bool updateColour(unsigned int uiIndex, QColor colour); 00061 static bool updateAllColours (QValueList<QColor> list); 00062 QColor& getColour (); 00063 void setSelected(int); 00064 QSize minimumSize(); 00065 void write ( KConfigGroup * config, QString sKey = "" ); 00066 void read ( KConfigGroup * config, QString sKey = "" ); 00067 }; 00068 //------------------------------------------------------------------- 00069 #endif