lib Library API Documentation

kformulaconfigpage.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2001 Andrea Rizzi <rizzi@kde.org>
00003                   Ulrich Kuettler <ulrich.kuettler@mailbox.tu-dresden.de>
00004 
00005    This library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Library General Public
00007    License as published by the Free Software Foundation; either
00008    version 2 of the License, or (at your option) any later version.
00009 
00010    This library 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 GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00018    Boston, MA 02111-1307, USA.
00019 */
00020 
00021 #ifndef kfconfigpages_h
00022 #define kfconfigpages_h
00023 
00024 #include <qfont.h>
00025 #include <qvaluevector.h>
00026 
00027 #include <kdialogbase.h>
00028 
00029 #include "kformuladefs.h"
00030 
00031 class QButtonGroup;
00032 class QCheckBox;
00033 class QColor;
00034 class QGridLayout;
00035 class QGroupBox;
00036 class QLabel;
00037 class QPushButton;
00038 class QRadioButton;
00039 class QSpinBox;
00040 class QStringList;
00041 class QWidget;
00042 
00043 class KColorButton;
00044 class KConfig;
00045 class KListView;
00046 class KPushButton;
00047 class KIntNumInput;
00048 
00049 KFORMULA_NAMESPACE_BEGIN
00050 
00051 
00052 class Document;
00053 
00054 class KOFORMULA_EXPORT ConfigurePage : public QObject
00055 {
00056     Q_OBJECT
00057 public:
00058 
00059     ConfigurePage( Document* document, QWidget* view, KConfig* config, QVBox* box, char* name = 0 );
00060     void apply();
00061     void slotDefault();
00062 
00063 protected:
00064 
00065     bool selectFont( QFont & );
00066 
00067 protected slots:
00068 
00069     void syntaxHighlightingClicked();
00070     void selectNewDefaultFont();
00071     void selectNewNameFont();
00072     void selectNewNumberFont();
00073     void selectNewOperatorFont();
00074 
00075     void baseSizeChanged( int value );
00076     void slotChanged();
00077 
00078 private:
00079 
00080     QPushButton* buildFontLine( QWidget* fontWidget, QGridLayout* layout, int number,
00081                                 QFont font, QString name, QLabel*& fontName );
00082 
00083     void updateFontLabel( QFont font, QLabel* label );
00084 
00085     Document* m_document;
00086     QWidget* m_view;
00087     KConfig* m_config;
00088 
00089     QFont defaultFont;
00090     QFont nameFont;
00091     QFont numberFont;
00092     QFont operatorFont;
00093 
00094     KIntNumInput* sizeSpin;
00095 
00096     QLabel* defaultFontName;
00097     QLabel* nameFontName;
00098     QLabel* numberFontName;
00099     QLabel* operatorFontName;
00100 
00101 //     KColorButton* defaultColorBtn;
00102 //     KColorButton* numberColorBtn;
00103 //     KColorButton* operatorColorBtn;
00104 //     KColorButton* emptyColorBtn;
00105 //     KColorButton* errorColorBtn;
00106     QCheckBox* syntaxHighlighting;
00107 //     QGroupBox* hlBox;
00108 
00109     QButtonGroup* styleBox;
00110     QRadioButton* symbolStyle;
00111     QRadioButton* esstixStyle;
00112     QRadioButton* cmStyle;
00113 
00114     bool m_changed;
00115 };
00116 
00117 
00118 // class MathFontsConfigurePage : public QObject
00119 // {
00120 //     Q_OBJECT
00121 // public:
00122 
00123 //     MathFontsConfigurePage( Document* document, QWidget* view, KConfig* config, QVBox* box, char* name = 0 );
00124 //     void apply();
00125 //     void slotDefault();
00126 
00127 //     QValueVector<QString>::iterator findUsedFont( QString name );
00128 
00129 // protected slots:
00130 
00131 //     void slotAddFont();
00132 //     void slotRemoveFont();
00133 //     void slotMoveUp();
00134 //     void slotMoveDown();
00135 
00136 // private:
00137 
00138 //     void setupLists( const QStringList& usedFonts );
00139 
00140 //     Document* m_document;
00141 //     QWidget* m_view;
00142 //     KConfig* m_config;
00143 
00144 //     KListView* availableFonts;
00145 //     KListView* requestedFonts;
00146 
00147 //     KPushButton* addFont;
00148 //     KPushButton* removeFont;
00149 //     KPushButton* moveUp;
00150 //     KPushButton* moveDown;
00151 
00152 //     QValueVector<QString> usedFontList;
00153 // };
00154 
00155 
00156 KFORMULA_NAMESPACE_END
00157 
00158 #endif // kfconfigpages_h
KDE Logo
This file is part of the documentation for lib Library Version 1.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Mon Feb 13 09:39:56 2006 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003