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 _SCHEDITANNOTATEPREFS_ 00022 #define _SCHEDITANNOTATEPREFS_ 00023 //------------------------------------------------------------------- 00024 #include "colourfont.h" 00025 #include "labelini.h" 00026 #include "scheditprefs.h" 00027 //------------------------------------------------------------------- 00028 #include <qfontmetrics.h> 00029 //------------------------------------------------------------------- 00030 // class ScheditFontPrefs - being a dialog window 00031 //------------------------------------------------------------------- 00035 //------------------------------------------------------------------- 00036 class ScheditFontPrefs : public ScheditPrefs { 00037 public: 00038 typedef struct { 00039 QColor colour; 00040 QFont font; 00041 } Data; 00042 00043 private: 00044 LabelIni laColourFont; 00045 ColourFont cf; 00046 Data data; 00047 QFontMetrics fm; 00048 00049 void readPreferences ( KConfigGroup * config ); 00050 void writePreferences ( KConfigGroup * config ); 00051 00052 protected: 00053 void renderPage (); 00054 00055 public: 00056 ScheditFontPrefs (KDialogBase * dlg, 00057 QString qsTitle, 00058 QString qsKey); 00059 00060 00061 // get/set 00062 QFont getFont ( void ); 00063 void setupPainter ( QPainter& painter); 00064 QFontMetrics& getFontMetrics ( void ); 00065 }; 00066 //------------------------------------------------------------------- 00067 #endif