diff options
Diffstat (limited to 'lib/kotext/KoFontDia.cpp')
-rw-r--r-- | lib/kotext/KoFontDia.cpp | 116 |
1 files changed, 58 insertions, 58 deletions
diff --git a/lib/kotext/KoFontDia.cpp b/lib/kotext/KoFontDia.cpp index 39d6017f..7373ec0e 100644 --- a/lib/kotext/KoFontDia.cpp +++ b/lib/kotext/KoFontDia.cpp @@ -19,8 +19,8 @@ #include "KoFontDia.h" -#include <qvbox.h> -#include <qhbox.h> +#include <tqvbox.h> +#include <tqhbox.h> #include "KoRichText.h" @@ -28,79 +28,79 @@ #include <klocale.h> #include <kdebug.h> -#include <qgroupbox.h> -#include <qpushbutton.h> -#include <qtabwidget.h> -#include <qlabel.h> -#include <qcombobox.h> -#include <qradiobutton.h> -#include <qcheckbox.h> +#include <tqgroupbox.h> +#include <tqpushbutton.h> +#include <tqtabwidget.h> +#include <tqlabel.h> +#include <tqcombobox.h> +#include <tqradiobutton.h> +#include <tqcheckbox.h> #include <knuminput.h> #include <KoGlobal.h> -#include <qvgroupbox.h> -#include <qvbox.h> -#include <qhgroupbox.h> -#include <qhbuttongroup.h> +#include <tqvgroupbox.h> +#include <tqvbox.h> +#include <tqhgroupbox.h> +#include <tqhbuttongroup.h> #include <kcolorbutton.h> #include <kiconloader.h> KoFontDia::KoFontDia( const KoTextFormat& initialFormat, - KSpell2::Broker::Ptr broker, QWidget* parent, const char* name ) - : KDialogBase( parent, name, true, + KSpell2::Broker::Ptr broker, TQWidget* tqparent, const char* name ) + : KDialogBase( tqparent, name, true, i18n("Select Font"), Ok|Cancel|User1|Apply, Ok ), m_initialFormat(initialFormat), m_changedFlags(KoTextFormat::NoFlags) { setButtonText( KDialogBase::User1, i18n("&Reset") ); - QVBox *mainWidget = new QVBox( this ); - QHBox *mainHBox = new QHBox( mainWidget ); + TQVBox *mainWidget = new TQVBox( this ); + TQHBox *mainHBox = new TQHBox( mainWidget ); - QTabWidget *fontTabWidget = new QTabWidget( mainHBox ); + TQTabWidget *fontTabWidget = new TQTabWidget( mainHBox ); // Font tab fontTab = new KoFontTab( KFontChooser::SmoothScalableFonts, this ); fontTabWidget->addTab( fontTab, i18n( "Font" ) ); - connect( fontTab, SIGNAL( familyChanged() ), this, SLOT( slotFontFamilyChanged() ) ); - connect( fontTab, SIGNAL( boldChanged() ), this, SLOT( slotFontBoldChanged() ) ); - connect( fontTab, SIGNAL( italicChanged() ), this, SLOT( slotFontItalicChanged() ) ); - connect( fontTab, SIGNAL( sizeChanged() ), this, SLOT( slotFontSizeChanged() ) ); + connect( fontTab, TQT_SIGNAL( familyChanged() ), this, TQT_SLOT( slotFontFamilyChanged() ) ); + connect( fontTab, TQT_SIGNAL( boldChanged() ), this, TQT_SLOT( slotFontBoldChanged() ) ); + connect( fontTab, TQT_SIGNAL( italicChanged() ), this, TQT_SLOT( slotFontItalicChanged() ) ); + connect( fontTab, TQT_SIGNAL( sizeChanged() ), this, TQT_SLOT( slotFontSizeChanged() ) ); //Highlighting tab highlightingTab = new KoHighlightingTab( this ); fontTabWidget->addTab( highlightingTab, i18n( "Highlighting" ) ); - connect( highlightingTab, SIGNAL( underlineChanged( int ) ), this, SLOT( slotUnderlineChanged( int ) ) ); - connect( highlightingTab, SIGNAL( underlineStyleChanged( int ) ), this, SLOT( slotUnderlineStyleChanged( int ) ) ); - connect( highlightingTab, SIGNAL( underlineColorChanged( const QColor & ) ), this, SLOT( slotUnderlineColorChanged( const QColor & ) ) ); - connect( highlightingTab, SIGNAL( strikethroughChanged( int ) ), this, SLOT( slotStrikethroughChanged( int ) ) ); - connect( highlightingTab, SIGNAL( strikethroughStyleChanged( int ) ), this, SLOT( slotStrikethroughStyleChanged( int ) ) ); - connect( highlightingTab, SIGNAL( wordByWordChanged( bool ) ), this, SLOT( slotWordByWordChanged( bool ) ) ); - connect( highlightingTab, SIGNAL( capitalisationChanged( int ) ), this, SLOT( slotCapitalisationChanged( int ) ) ); + connect( highlightingTab, TQT_SIGNAL( underlineChanged( int ) ), this, TQT_SLOT( slotUnderlineChanged( int ) ) ); + connect( highlightingTab, TQT_SIGNAL( underlineStyleChanged( int ) ), this, TQT_SLOT( slotUnderlineStyleChanged( int ) ) ); + connect( highlightingTab, TQT_SIGNAL( underlineColorChanged( const TQColor & ) ), this, TQT_SLOT( slotUnderlineColorChanged( const TQColor & ) ) ); + connect( highlightingTab, TQT_SIGNAL( strikethroughChanged( int ) ), this, TQT_SLOT( slotStrikethroughChanged( int ) ) ); + connect( highlightingTab, TQT_SIGNAL( strikethroughStyleChanged( int ) ), this, TQT_SLOT( slotStrikethroughStyleChanged( int ) ) ); + connect( highlightingTab, TQT_SIGNAL( wordByWordChanged( bool ) ), this, TQT_SLOT( slotWordByWordChanged( bool ) ) ); + connect( highlightingTab, TQT_SIGNAL( capitalisationChanged( int ) ), this, TQT_SLOT( slotCapitalisationChanged( int ) ) ); //Decoratio tab decorationTab = new KoDecorationTab( this ); fontTabWidget->addTab( decorationTab, i18n( "Decoration" ) ); - connect( decorationTab, SIGNAL( fontColorChanged( const QColor& ) ), this, SLOT( slotFontColorChanged( const QColor& ) ) ); - connect( decorationTab, SIGNAL( backgroundColorChanged( const QColor& ) ), this, SLOT( slotBackgroundColorChanged( const QColor& ) ) ); - connect( decorationTab, SIGNAL( shadowColorChanged( const QColor& ) ), this, SLOT( slotShadowColorChanged( const QColor& ) ) ); - connect( decorationTab, SIGNAL( shadowDistanceChanged( double ) ), this, SLOT( slotShadowDistanceChanged( double ) ) ); - connect( decorationTab, SIGNAL( shadowDirectionChanged( int ) ), this, SLOT( slotShadowDirectionChanged( int ) ) ); + connect( decorationTab, TQT_SIGNAL( fontColorChanged( const TQColor& ) ), this, TQT_SLOT( slotFontColorChanged( const TQColor& ) ) ); + connect( decorationTab, TQT_SIGNAL( backgroundColorChanged( const TQColor& ) ), this, TQT_SLOT( slotBackgroundColorChanged( const TQColor& ) ) ); + connect( decorationTab, TQT_SIGNAL( shadowColorChanged( const TQColor& ) ), this, TQT_SLOT( slotShadowColorChanged( const TQColor& ) ) ); + connect( decorationTab, TQT_SIGNAL( shadowDistanceChanged( double ) ), this, TQT_SLOT( slotShadowDistanceChanged( double ) ) ); + connect( decorationTab, TQT_SIGNAL( shadowDirectionChanged( int ) ), this, TQT_SLOT( slotShadowDirectionChanged( int ) ) ); //Layout tab - layoutTab = new KoLayoutTab( true, this ); - fontTabWidget->addTab( layoutTab, i18n( "Layout" ) ); - connect( layoutTab, SIGNAL( subSuperScriptChanged() ), this, SLOT( slotSubSuperChanged() ) );; - connect( layoutTab, SIGNAL( offsetChanged( int ) ), this, SLOT( slotOffsetChanged( int ) ) ); - connect( layoutTab, SIGNAL( relativeSizeChanged( double ) ), this, SLOT( slotRelativeSizeChanged( double ) ) ); - connect( layoutTab, SIGNAL( hyphenationChanged( bool ) ), this, SLOT( slotHyphenationChanged( bool ) ) ); + tqlayoutTab = new KoLayoutTab( true, this ); + fontTabWidget->addTab( tqlayoutTab, i18n( "Layout" ) ); + connect( tqlayoutTab, TQT_SIGNAL( subSuperScriptChanged() ), this, TQT_SLOT( slotSubSuperChanged() ) );; + connect( tqlayoutTab, TQT_SIGNAL( offsetChanged( int ) ), this, TQT_SLOT( slotOffsetChanged( int ) ) ); + connect( tqlayoutTab, TQT_SIGNAL( relativeSizeChanged( double ) ), this, TQT_SLOT( slotRelativeSizeChanged( double ) ) ); + connect( tqlayoutTab, TQT_SIGNAL( hyphenationChanged( bool ) ), this, TQT_SLOT( slotHyphenationChanged( bool ) ) ); //Language tab languageTab = new KoLanguageTab( broker, this ); fontTabWidget->addTab( languageTab, i18n( "Language" ) ); - connect( languageTab, SIGNAL( languageChanged() ), this, SLOT( slotLanguageChanged() ) ); + connect( languageTab, TQT_SIGNAL( languageChanged() ), this, TQT_SLOT( slotLanguageChanged() ) ); //Related properties List View //relatedPropertiesListView = new KListView( mainHBox ); @@ -115,7 +115,7 @@ KoFontDia::KoFontDia( const KoTextFormat& initialFormat, void KoFontDia::init() { - connect( this, SIGNAL( user1Clicked() ), this, SLOT(slotReset()) ); + connect( this, TQT_SIGNAL( user1Clicked() ), this, TQT_SLOT(slotReset()) ); slotReset(); } @@ -123,7 +123,7 @@ void KoFontDia::init() KoTextFormat KoFontDia::newFormat() const { return KoTextFormat( fontTab->getSelection(), - layoutTab->getSubSuperScript(), + tqlayoutTab->getSubSuperScript(), decorationTab->getTextColor(), decorationTab->getBackgroundColor(), highlightingTab->getUnderlineColor(), @@ -133,10 +133,10 @@ KoTextFormat KoFontDia::newFormat() const highlightingTab->getStrikethroughStyle(), highlightingTab->getCapitalisation(), languageTab->getLanguage(), - layoutTab->getRelativeTextSize(), - layoutTab->getOffsetFromBaseline(), + tqlayoutTab->getRelativeTextSize(), + tqlayoutTab->getOffsetFromBaseline(), highlightingTab->getWordByWord(), - layoutTab->getAutoHyphenation(), + tqlayoutTab->getAutoHyphenation(), decorationTab->getShadowDistanceX(), decorationTab->getShadowDistanceY(), decorationTab->getShadowColor() @@ -167,8 +167,8 @@ void KoFontDia::slotReset() decorationTab->setTextColor( m_initialFormat.color() ); decorationTab->setBackgroundColor( m_initialFormat.textBackgroundColor() ); decorationTab->setShadow( m_initialFormat.shadowDistanceX(), m_initialFormat.shadowDistanceY(), m_initialFormat.shadowColor() ); - layoutTab->setSubSuperScript( m_initialFormat.vAlign(), m_initialFormat.offsetFromBaseLine(), m_initialFormat.relativeTextSize() ); - layoutTab->setAutoHyphenation( m_initialFormat.hyphenation() ); + tqlayoutTab->setSubSuperScript( m_initialFormat.vAlign(), m_initialFormat.offsetFromBaseLine(), m_initialFormat.relativeTextSize() ); + tqlayoutTab->setAutoHyphenation( m_initialFormat.hyphenation() ); languageTab->setLanguage( m_initialFormat.language() ); } @@ -196,13 +196,13 @@ void KoFontDia::slotFontSizeChanged() fontDiaPreview->setFont( fontTab->getSelection() ); } -void KoFontDia::slotFontColorChanged( const QColor& color ) +void KoFontDia::slotFontColorChanged( const TQColor& color ) { m_changedFlags |= KoTextFormat::Color; fontDiaPreview->setFontColor( color ); } -void KoFontDia::slotBackgroundColorChanged( const QColor& color ) +void KoFontDia::slotBackgroundColorChanged( const TQColor& color ) { m_changedFlags |= KoTextFormat::TextBackgroundColor; fontDiaPreview->setBackgroundColor( color ); @@ -217,21 +217,21 @@ void KoFontDia::slotCapitalisationChanged( int item ) void KoFontDia::slotUnderlineChanged( int item ) { m_changedFlags |= KoTextFormat::ExtendUnderLine; - if ( !item ) fontDiaPreview->setUnderlining( item, 0, Qt::black, false ); + if ( !item ) fontDiaPreview->setUnderlining( item, 0, TQt::black, false ); else fontDiaPreview->setUnderlining( item, highlightingTab->getUnderlineStyle(), highlightingTab->getUnderlineColor(), highlightingTab->getWordByWord() ); } void KoFontDia::slotUnderlineStyleChanged( int item ) { m_changedFlags |= KoTextFormat::ExtendUnderLine; - if ( !highlightingTab->getUnderline() ) fontDiaPreview->setUnderlining( 0, 0, Qt::black, false ); + if ( !highlightingTab->getUnderline() ) fontDiaPreview->setUnderlining( 0, 0, TQt::black, false ); else fontDiaPreview->setUnderlining( highlightingTab->getUnderline(), item, highlightingTab->getUnderlineColor(), highlightingTab->getWordByWord() ); } -void KoFontDia::slotUnderlineColorChanged( const QColor &color ) +void KoFontDia::slotUnderlineColorChanged( const TQColor &color ) { m_changedFlags |= KoTextFormat::ExtendUnderLine; - if ( !highlightingTab->getUnderline() ) fontDiaPreview->setUnderlining( 0, 0, Qt::black, false ); + if ( !highlightingTab->getUnderline() ) fontDiaPreview->setUnderlining( 0, 0, TQt::black, false ); else fontDiaPreview->setUnderlining( highlightingTab->getUnderline(), highlightingTab->getUnderlineStyle(), color, highlightingTab->getWordByWord() ); } @@ -267,7 +267,7 @@ void KoFontDia::slotShadowDirectionChanged( int ) fontDiaPreview->setShadow( decorationTab->getShadowDistanceX(), decorationTab->getShadowDistanceY(), decorationTab->getShadowColor() ); } -void KoFontDia::slotShadowColorChanged( const QColor & ) +void KoFontDia::slotShadowColorChanged( const TQColor & ) { m_changedFlags |= KoTextFormat::ShadowText; fontDiaPreview->setShadow( decorationTab->getShadowDistanceX(), decorationTab->getShadowDistanceY(), decorationTab->getShadowColor() ); @@ -276,19 +276,19 @@ void KoFontDia::slotShadowColorChanged( const QColor & ) void KoFontDia::slotSubSuperChanged() { m_changedFlags |= KoTextFormat::VAlign; - fontDiaPreview->setSubSuperscript( layoutTab->getSubSuperScript(), layoutTab->getOffsetFromBaseline(), layoutTab->getRelativeTextSize() ); + fontDiaPreview->setSubSuperscript( tqlayoutTab->getSubSuperScript(), tqlayoutTab->getOffsetFromBaseline(), tqlayoutTab->getRelativeTextSize() ); } void KoFontDia::slotOffsetChanged( int offset ) { m_changedFlags |= KoTextFormat::OffsetFromBaseLine; - fontDiaPreview->setSubSuperscript( layoutTab->getSubSuperScript(), offset, layoutTab->getRelativeTextSize() ); + fontDiaPreview->setSubSuperscript( tqlayoutTab->getSubSuperScript(), offset, tqlayoutTab->getRelativeTextSize() ); } void KoFontDia::slotRelativeSizeChanged( double relativeSize ) { m_changedFlags |= KoTextFormat::VAlign; - fontDiaPreview->setSubSuperscript( layoutTab->getSubSuperScript(), layoutTab->getOffsetFromBaseline(), relativeSize ); + fontDiaPreview->setSubSuperscript( tqlayoutTab->getSubSuperScript(), tqlayoutTab->getOffsetFromBaseline(), relativeSize ); } void KoFontDia::slotHyphenationChanged( bool ) |