lib

KoFontDia.h

00001 /* This file is part of the KDE project
00002    Copyright (C)  2001,2002,2003 Montel Laurent <lmontel@mandrakesoft.com>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License as published by the Free Software Foundation; either
00007    version 2 of the License, or (at your option) any later version.
00008 
00009    This library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this library; see the file COPYING.LIB.  If not, write to
00016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #ifndef __kofontdia_h__
00021 #define __kofontdia_h__
00022 
00023 #include <kfontdialog.h>
00024 #include <qtabwidget.h>
00025 #include <KoTextFormat.h>
00026 #include <qcheckbox.h>
00027 #include <koffice_export.h>
00028 
00029 #include "KoFontTab.h"
00030 #include "KoHighlightingTab.h"
00031 #include "KoDecorationTab.h"
00032 #include "KoLayoutTab.h"
00033 #include "KoLanguageTab.h"
00034 
00035 #include "KoFontDiaPreview.h"
00036 
00037 #include <kspell2/broker.h>
00038 
00039 class QComboBox;
00040 
00041 
00042 class KOTEXT_EXPORT KoFontDia : public KDialogBase
00043 {
00044     Q_OBJECT
00045 public:
00046 
00049     KoFontDia( const KoTextFormat& initialFormat,
00050                KSpell2::Broker::Ptr broker = 0,
00051                QWidget* parent = 0, const char* name = 0 );
00052 
00053     int changedFlags() const { return m_changedFlags; }
00054 
00055     KoTextFormat newFormat() const;
00056 
00057 protected slots:
00058     void slotReset();
00059     virtual void slotApply();
00060     virtual void slotOk();
00061     void slotFontFamilyChanged();
00062     void slotFontBoldChanged();
00063     void slotFontItalicChanged();
00064     void slotFontSizeChanged();
00065     void slotFontColorChanged( const QColor& color );
00066     void slotBackgroundColorChanged( const QColor& color );
00067     void slotCapitalisationChanged( int item );
00068     void slotUnderlineChanged( int item );
00069     void slotUnderlineStyleChanged( int item );
00070     void slotUnderlineColorChanged( const QColor &color );
00071     void slotStrikethroughChanged( int item );
00072     void slotStrikethroughStyleChanged( int item );
00073     void slotWordByWordChanged( bool state );
00074     void slotShadowDistanceChanged( double distance );
00075     void slotShadowDirectionChanged( int direction );
00076     void slotShadowColorChanged( const QColor &color );
00077     void slotSubSuperChanged();
00078     void slotOffsetChanged( int offset );
00079     void slotRelativeSizeChanged( double relativeSize );
00080     void slotHyphenationChanged( bool state );
00081     void slotLanguageChanged( int );
00082 
00083 signals:
00084     void applyFont();
00085 
00086 private:
00087     void init();
00088 
00089     KoTextFormat m_initialFormat;
00090     KoFontTab *fontTab;
00091     KoHighlightingTab *highlightingTab;
00092     KoDecorationTab *decorationTab;
00093     KoLayoutTab *layoutTab;
00094     KoLanguageTab *languageTab;
00095     KoFontDiaPreview *fontDiaPreview;
00096 
00097     int m_changedFlags;
00098 
00099 };
00100 
00101 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys