summaryrefslogtreecommitdiffstats
path: root/libkdepim/komposer/plugins
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:53:50 +0000
commit7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch)
tree8474f9b444b2756228600050f07a7ff25de532b2 /libkdepim/komposer/plugins
parentf587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff)
downloadtdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz
tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'libkdepim/komposer/plugins')
-rw-r--r--libkdepim/komposer/plugins/default/defaulteditor.cpp120
-rw-r--r--libkdepim/komposer/plugins/default/defaulteditor.h12
2 files changed, 66 insertions, 66 deletions
diff --git a/libkdepim/komposer/plugins/default/defaulteditor.cpp b/libkdepim/komposer/plugins/default/defaulteditor.cpp
index d08fbee5..b8abf17b 100644
--- a/libkdepim/komposer/plugins/default/defaulteditor.cpp
+++ b/libkdepim/komposer/plugins/default/defaulteditor.cpp
@@ -39,19 +39,19 @@
#include <kreplacedialog.h>
#include <kreplace.h>
-#include <qtextedit.h>
-#include <qwidget.h>
+#include <tqtextedit.h>
+#include <tqwidget.h>
typedef KGenericFactory<DefaultEditor> DefaultEditorFactory;
K_EXPORT_COMPONENT_FACTORY( libkomposer_defaulteditor,
DefaultEditorFactory( "komposer_defaulteditor" ) )
-DefaultEditor::DefaultEditor( QObject *parent, const char *name, const QStringList &args )
+DefaultEditor::DefaultEditor( TQObject *parent, const char *name, const TQStringList &args )
: Editor( parent, name, args ), m_textEdit( 0 )
{
setInstance( DefaultEditorFactory::instance() );
- m_textEdit = new QTextEdit( 0 );
+ m_textEdit = new TQTextEdit( 0 );
createActions( actionCollection() );
@@ -63,7 +63,7 @@ DefaultEditor::~DefaultEditor()
}
-QWidget*
+TQWidget*
DefaultEditor::widget()
{
return m_textEdit;
@@ -76,18 +76,18 @@ DefaultEditor::text() const
}
void
-DefaultEditor::setText( const QString &text )
+DefaultEditor::setText( const TQString &text )
{
m_textEdit->setText( text );
}
void
-DefaultEditor::changeSignature( const QString &sig )
+DefaultEditor::changeSignature( const TQString &sig )
{
- QString text = m_textEdit->text();
+ TQString text = m_textEdit->text();
int sigStart = text.findRev( "-- " );
- QString sigText = QString( "-- \n%1" ).arg( sig );
+ TQString sigText = TQString( "-- \n%1" ).arg( sig );
text.replace( sigStart, text.length(), sigText );
}
@@ -98,71 +98,71 @@ DefaultEditor::createActions( KActionCollection *ac )
//
// File Actions
//
- (void) KStdAction::open( this, SLOT(open()), ac );
- (void) KStdAction::openRecent( this, SLOT(openURL(const KURL &)), ac );
- (void) KStdAction::save( this, SLOT(save()), ac );
- (void) KStdAction::saveAs( this, SLOT(saveAs()), ac );
+ (void) KStdAction::open( this, TQT_SLOT(open()), ac );
+ (void) KStdAction::openRecent( this, TQT_SLOT(openURL(const KURL &)), ac );
+ (void) KStdAction::save( this, TQT_SLOT(save()), ac );
+ (void) KStdAction::saveAs( this, TQT_SLOT(saveAs()), ac );
//
// Edit Actions
//
- KAction *actionUndo = KStdAction::undo( m_textEdit, SLOT(undo()), ac );
+ KAction *actionUndo = KStdAction::undo( m_textEdit, TQT_SLOT(undo()), ac );
actionUndo->setEnabled( false );
- connect( m_textEdit, SIGNAL(undoAvailable(bool)),
- actionUndo, SLOT(setEnabled(bool)) );
+ connect( m_textEdit, TQT_SIGNAL(undoAvailable(bool)),
+ actionUndo, TQT_SLOT(setEnabled(bool)) );
- KAction *actionRedo = KStdAction::redo( m_textEdit, SLOT(redo()), ac );
+ KAction *actionRedo = KStdAction::redo( m_textEdit, TQT_SLOT(redo()), ac );
actionRedo->setEnabled( false );
- connect( m_textEdit, SIGNAL(redoAvailable(bool)),
- actionRedo, SLOT(setEnabled(bool)) );
+ connect( m_textEdit, TQT_SIGNAL(redoAvailable(bool)),
+ actionRedo, TQT_SLOT(setEnabled(bool)) );
- KAction *action_cut = KStdAction::cut( m_textEdit, SLOT(cut()), ac );
+ KAction *action_cut = KStdAction::cut( m_textEdit, TQT_SLOT(cut()), ac );
action_cut->setEnabled( false );
- connect( m_textEdit, SIGNAL(copyAvailable(bool)),
- action_cut, SLOT(setEnabled(bool)) );
+ connect( m_textEdit, TQT_SIGNAL(copyAvailable(bool)),
+ action_cut, TQT_SLOT(setEnabled(bool)) );
- KAction *action_copy = KStdAction::copy( m_textEdit, SLOT(copy()), ac );
+ KAction *action_copy = KStdAction::copy( m_textEdit, TQT_SLOT(copy()), ac );
action_copy->setEnabled( false );
- connect( m_textEdit, SIGNAL(copyAvailable(bool)),
- action_copy, SLOT(setEnabled(bool)) );
+ connect( m_textEdit, TQT_SIGNAL(copyAvailable(bool)),
+ action_copy, TQT_SLOT(setEnabled(bool)) );
- (void) KStdAction::print( this, SLOT(print()), ac );
+ (void) KStdAction::print( this, TQT_SLOT(print()), ac );
- (void) KStdAction::paste( m_textEdit, SLOT(paste()), ac );
+ (void) KStdAction::paste( m_textEdit, TQT_SLOT(paste()), ac );
(void) new KAction( i18n( "C&lear" ), 0,
- m_textEdit, SLOT(removeSelectedText()),
+ m_textEdit, TQT_SLOT(removeSelectedText()),
ac, "edit_clear" );
- (void) KStdAction::selectAll( m_textEdit, SLOT(selectAll()), ac );
+ (void) KStdAction::selectAll( m_textEdit, TQT_SLOT(selectAll()), ac );
//
// View Actions
//
- (void) KStdAction::zoomIn( m_textEdit, SLOT(zoomIn()), ac );
- (void) KStdAction::zoomOut( m_textEdit, SLOT(zoomOut()), ac );
+ (void) KStdAction::zoomIn( m_textEdit, TQT_SLOT(zoomIn()), ac );
+ (void) KStdAction::zoomOut( m_textEdit, TQT_SLOT(zoomOut()), ac );
//
// Character Formatting
//
m_actionBold = new KToggleAction( i18n("&Bold"), "text_bold", CTRL+Key_B,
ac, "format_bold" );
- connect( m_actionBold, SIGNAL(toggled(bool)),
- m_textEdit, SLOT(setBold(bool)) );
+ connect( m_actionBold, TQT_SIGNAL(toggled(bool)),
+ m_textEdit, TQT_SLOT(setBold(bool)) );
m_actionItalic = new KToggleAction( i18n("&Italic"), "text_italic", CTRL+Key_I,
ac, "format_italic" );
- connect( m_actionItalic, SIGNAL(toggled(bool)),
- m_textEdit, SLOT(setItalic(bool) ));
+ connect( m_actionItalic, TQT_SIGNAL(toggled(bool)),
+ m_textEdit, TQT_SLOT(setItalic(bool) ));
m_actionUnderline = new KToggleAction( i18n("&Underline"), "text_under", CTRL+Key_U,
ac, "format_underline" );
- connect( m_actionUnderline, SIGNAL(toggled(bool)),
- m_textEdit, SLOT(setUnderline(bool)) );
+ connect( m_actionUnderline, TQT_SIGNAL(toggled(bool)),
+ m_textEdit, TQT_SLOT(setUnderline(bool)) );
(void) new KAction( i18n("Text &Color..."), "colorpicker", 0,
- this, SLOT(formatColor()),
+ this, TQT_SLOT(formatColor()),
ac, "format_color" );
//
@@ -170,37 +170,37 @@ DefaultEditor::createActions( KActionCollection *ac )
//
m_actionFont = new KFontAction( i18n("&Font"), 0,
ac, "format_font" );
- connect( m_actionFont, SIGNAL(activated(const QString &)),
- m_textEdit, SLOT(setFamily(const QString &)) );
+ connect( m_actionFont, TQT_SIGNAL(activated(const TQString &)),
+ m_textEdit, TQT_SLOT(setFamily(const TQString &)) );
m_actionFontSize = new KFontSizeAction( i18n("Font &Size"), 0,
ac, "format_font_size" );
- connect( m_actionFontSize, SIGNAL(fontSizeChanged(int)),
- m_textEdit, SLOT(setPointSize(int)) );
+ connect( m_actionFontSize, TQT_SIGNAL(fontSizeChanged(int)),
+ m_textEdit, TQT_SLOT(setPointSize(int)) );
//
// Alignment
//
m_actionAlignLeft = new KToggleAction( i18n("Align &Left"), "text_left", 0,
ac, "format_align_left" );
- connect( m_actionAlignLeft, SIGNAL(toggled(bool)),
- this, SLOT(setAlignLeft(bool)) );
+ connect( m_actionAlignLeft, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(setAlignLeft(bool)) );
m_actionAlignCenter = new KToggleAction( i18n("Align &Center"), "text_center", 0,
ac, "format_align_center" );
- connect( m_actionAlignCenter, SIGNAL(toggled(bool)),
- this, SLOT(setAlignCenter(bool)) );
+ connect( m_actionAlignCenter, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(setAlignCenter(bool)) );
m_actionAlignRight = new KToggleAction( i18n("Align &Right"), "text_right", 0,
ac, "format_align_right" );
- connect( m_actionAlignRight, SIGNAL(toggled(bool)),
- this, SLOT(setAlignRight(bool)) );
+ connect( m_actionAlignRight, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(setAlignRight(bool)) );
m_actionAlignJustify = new KToggleAction( i18n("&Justify"), "text_block", 0,
ac, "format_align_justify" );
- connect( m_actionAlignJustify, SIGNAL(toggled(bool)),
- this, SLOT(setAlignJustify(bool)) );
+ connect( m_actionAlignJustify, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(setAlignJustify(bool)) );
m_actionAlignLeft->setExclusiveGroup( "alignment" );
m_actionAlignCenter->setExclusiveGroup( "alignment" );
@@ -210,19 +210,19 @@ DefaultEditor::createActions( KActionCollection *ac )
//
// Tools
//
- (void) KStdAction::spelling( this, SLOT(checkSpelling()), ac );
+ (void) KStdAction::spelling( this, TQT_SLOT(checkSpelling()), ac );
//
// Setup enable/disable
//
updateActions();
- connect( m_textEdit, SIGNAL(currentFontChanged(const QFont &)),
- this, SLOT( updateFont() ) );
- connect( m_textEdit, SIGNAL(currentFontChanged(const QFont &)),
- this, SLOT(updateCharFmt()) );
- connect( m_textEdit, SIGNAL(cursorPositionChanged(int, int)),
- this, SLOT(updateAligment()) );
+ connect( m_textEdit, TQT_SIGNAL(currentFontChanged(const TQFont &)),
+ this, TQT_SLOT( updateFont() ) );
+ connect( m_textEdit, TQT_SIGNAL(currentFontChanged(const TQFont &)),
+ this, TQT_SLOT(updateCharFmt()) );
+ connect( m_textEdit, TQT_SIGNAL(cursorPositionChanged(int, int)),
+ this, TQT_SLOT(updateAligment()) );
}
void
@@ -275,10 +275,10 @@ DefaultEditor::updateFont()
void
DefaultEditor::formatColor()
{
- QColor col;
+ TQColor col;
int s = KColorDialog::getColor( col, m_textEdit->color(), m_textEdit );
- if ( s != QDialog::Accepted )
+ if ( s != TQDialog::Accepted )
return;
m_textEdit->setColor( col );
@@ -343,7 +343,7 @@ DefaultEditor::saveAs()
void
DefaultEditor::checkSpelling()
{
- QString s;
+ TQString s;
if ( m_textEdit->hasSelectedText() )
s = m_textEdit->selectedText();
else
diff --git a/libkdepim/komposer/plugins/default/defaulteditor.h b/libkdepim/komposer/plugins/default/defaulteditor.h
index 18f47d14..158109e1 100644
--- a/libkdepim/komposer/plugins/default/defaulteditor.h
+++ b/libkdepim/komposer/plugins/default/defaulteditor.h
@@ -35,14 +35,14 @@ class DefaultEditor : public Komposer::Editor
{
Q_OBJECT
public:
- DefaultEditor( QObject *parent, const char *name, const QStringList &args );
+ DefaultEditor( TQObject *parent, const char *name, const TQStringList &args );
~DefaultEditor();
- virtual QWidget *widget();
- virtual QString text() const;
+ virtual TQWidget *widget();
+ virtual TQString text() const;
public slots:
- virtual void setText( const QString &txt );
- virtual void changeSignature( const QString &txt );
+ virtual void setText( const TQString &txt );
+ virtual void changeSignature( const TQString &txt );
/**
* Displays a file dialog and loads the selected file.
@@ -99,7 +99,7 @@ protected slots:
void updateAligment();
private:
- QTextEdit *m_textEdit;
+ TQTextEdit *m_textEdit;
KToggleAction *m_actionBold;
KToggleAction *m_actionItalic;