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 __kohighlightingtab_h__ 00021 #define __kohighlightingtab_h__ 00022 00023 #include "ui_kohighlightingtabbase.h" 00024 #include <KoTextFormat.h> 00025 00026 #include <QColor> 00027 00028 class KoHighlightingTabBase: public QWidget, public Ui::KoHighlightingTabBase 00029 { 00030 public: 00031 KoHighlightingTabBase( QWidget *parent ) : QWidget( parent ) { 00032 setupUi( this ); 00033 } 00034 }; 00035 00036 00037 class KoHighlightingTab : public KoHighlightingTabBase 00038 { 00039 Q_OBJECT 00040 00041 public: 00042 KoHighlightingTab( QWidget* parent=0, const char* name=0, Qt::WFlags fl=0 ); 00043 ~KoHighlightingTab(); 00044 00045 KoTextFormat::UnderlineType getUnderline() const; 00046 KoTextFormat::UnderlineStyle getUnderlineStyle() const; 00047 QColor getUnderlineColor() const; 00048 KoTextFormat::StrikeOutType getStrikethrough() const; 00049 KoTextFormat::StrikeOutStyle getStrikethroughStyle() const; 00050 bool getWordByWord() const; 00051 KoTextFormat::AttributeStyle getCapitalisation() const; 00052 00053 void setUnderline( KoTextFormat::UnderlineType item ); 00054 void setUnderlineStyle( KoTextFormat::UnderlineStyle item ); 00055 void setUnderlineColor( const QColor &color ); 00056 void setStrikethrough( int item ); 00057 void setStrikethroughStyle( int item ); 00058 void setWordByWord( bool state ); 00059 void setCapitalisation( int item ); 00060 00061 signals: 00062 void underlineChanged( int item ); 00063 void underlineStyleChanged( int item ); 00064 void underlineColorChanged( const QColor & ); 00065 void strikethroughChanged( int item ); 00066 void strikethroughStyleChanged( int item ); 00067 void wordByWordChanged( bool state ); 00068 void capitalisationChanged( int item ); 00069 00070 protected slots: 00071 void slotUnderlineChanged( int item ); 00072 void slotStrikethroughChanged( int item ); 00073 }; 00074 00075 #endif 00076