lib

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., 51 Franklin Street, Fifth Floor,
00018  * Boston, MA 02110-1301, 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 QLabel;
00036 class QPushButton;
00037 class QSpinBox;
00038 class QStringList;
00039 class QWidget;
00040 
00041 class KColorButton;
00042 class KConfig;
00043 class KListView;
00044 class KPushButton;
00045 class KIntNumInput;
00046 
00047 KFORMULA_NAMESPACE_BEGIN
00048 
00049 
00050 class Document;
00051 
00052 class KOFORMULA_EXPORT ConfigurePage : public QObject
00053 {
00054     Q_OBJECT
00055 public:
00056 
00057     ConfigurePage( Document* document, QWidget* view, KConfig* config, QVBox* box, char* name = 0 );
00058     void apply();
00059     void slotDefault();
00060 
00061 protected:
00062 
00063     bool selectFont( QFont & );
00064 
00065 protected slots:
00066 
00067     void syntaxHighlightingClicked();
00068     void selectNewDefaultFont();
00069     void selectNewNameFont();
00070     void selectNewNumberFont();
00071     void selectNewOperatorFont();
00072 
00073     void baseSizeChanged( int value );
00074     void slotChanged();
00075 
00076 private:
00077 
00078     QPushButton* buildFontLine( QWidget* fontWidget, QGridLayout* layout, int number,
00079                                 QFont font, QString name, QLabel*& fontName );
00080 
00081     void updateFontLabel( QFont font, QLabel* label );
00082 
00083     Document* m_document;
00084     QWidget* m_view;
00085     KConfig* m_config;
00086 
00087     QFont defaultFont;
00088     QFont nameFont;
00089     QFont numberFont;
00090     QFont operatorFont;
00091 
00092     KIntNumInput* sizeSpin;
00093 
00094     QLabel* defaultFontName;
00095     QLabel* nameFontName;
00096     QLabel* numberFontName;
00097     QLabel* operatorFontName;
00098 
00099 //     KColorButton* defaultColorBtn;
00100 //     KColorButton* numberColorBtn;
00101 //     KColorButton* operatorColorBtn;
00102 //     KColorButton* emptyColorBtn;
00103 //     KColorButton* errorColorBtn;
00104     QCheckBox* syntaxHighlighting;
00105 
00106     bool m_changed;
00107 };
00108 
00109 
00110 // class MathFontsConfigurePage : public QObject
00111 // {
00112 //     Q_OBJECT
00113 // public:
00114 
00115 //     MathFontsConfigurePage( Document* document, QWidget* view, KConfig* config, QVBox* box, char* name = 0 );
00116 //     void apply();
00117 //     void slotDefault();
00118 
00119 //     QValueVector<QString>::iterator findUsedFont( QString name );
00120 
00121 // protected slots:
00122 
00123 //     void slotAddFont();
00124 //     void slotRemoveFont();
00125 //     void slotMoveUp();
00126 //     void slotMoveDown();
00127 
00128 // private:
00129 
00130 //     void setupLists( const QStringList& usedFonts );
00131 
00132 //     Document* m_document;
00133 //     QWidget* m_view;
00134 //     KConfig* m_config;
00135 
00136 //     KListView* availableFonts;
00137 //     KListView* requestedFonts;
00138 
00139 //     KPushButton* addFont;
00140 //     KPushButton* removeFont;
00141 //     KPushButton* moveUp;
00142 //     KPushButton* moveDown;
00143 
00144 //     QValueVector<QString> usedFontList;
00145 // };
00146 
00147 
00148 KFORMULA_NAMESPACE_END
00149 
00150 #endif // kfconfigpages_h
KDE Home | KDE Accessibility Home | Description of Access Keys