summaryrefslogtreecommitdiffstats
path: root/kformula/kformula_view.cc
diff options
context:
space:
mode:
Diffstat (limited to 'kformula/kformula_view.cc')
-rw-r--r--kformula/kformula_view.cc64
1 files changed, 32 insertions, 32 deletions
diff --git a/kformula/kformula_view.cc b/kformula/kformula_view.cc
index f109de69..7dbabc00 100644
--- a/kformula/kformula_view.cc
+++ b/kformula/kformula_view.cc
@@ -20,10 +20,10 @@
class KPrinter;
-#include <qpainter.h>
-#include <qpopupmenu.h>
-#include <qtextedit.h>
-#include <qtimer.h>
+#include <tqpainter.h>
+#include <tqpopupmenu.h>
+#include <tqtextedit.h>
+#include <tqtimer.h>
#include <kaction.h>
#include <kdebug.h>
@@ -48,7 +48,7 @@ class KPrinter;
bool KFormulaPartView::first_window = true;
-KFormulaPartView::KFormulaPartView(KFormulaDoc* _doc, QWidget* _parent, const char* _name)
+KFormulaPartView::KFormulaPartView(KFormulaDoc* _doc, TQWidget* _parent, const char* _name)
: KoView( _doc, _parent, _name ), m_pDoc(_doc)
{
setInstance(KFormulaFactory::global());
@@ -60,13 +60,13 @@ KFormulaPartView::KFormulaPartView(KFormulaDoc* _doc, QWidget* _parent, const ch
m_dcop = 0;
dcopObject(); // build it
- scrollview = new QScrollView(this, "scrollview");
+ scrollview = new TQScrollView(this, "scrollview");
formulaWidget = new KFormulaWidget(_doc->getFormula(), scrollview->viewport(), "formulaWidget");
scrollview->addChild(formulaWidget);
scrollview->viewport()->setFocusProxy( scrollview );
- scrollview->viewport()->setFocusPolicy( WheelFocus );
- scrollview->setFocusPolicy( NoFocus );
+ scrollview->viewport()->setFocusPolicy( TQ_WheelFocus );
+ scrollview->setFocusPolicy( TQ_NoFocus );
formulaWidget->setFocus();
// Nice parts start in read only mode.
@@ -76,14 +76,14 @@ KFormulaPartView::KFormulaPartView(KFormulaDoc* _doc, QWidget* _parent, const ch
KFormula::Document* document = m_pDoc->getDocument();
// copy&paste
- cutAction = KStdAction::cut(document->wrapper(), SLOT(cut()), actionCollection());
- copyAction = KStdAction::copy(document->wrapper(), SLOT(copy()), actionCollection());
- pasteAction = KStdAction::paste(document->wrapper(), SLOT(paste()), actionCollection());
+ cutAction = KStdAction::cut(document->wrapper(), TQT_SLOT(cut()), actionCollection());
+ copyAction = KStdAction::copy(document->wrapper(), TQT_SLOT(copy()), actionCollection());
+ pasteAction = KStdAction::paste(document->wrapper(), TQT_SLOT(paste()), actionCollection());
cutAction->setEnabled(false);
copyAction->setEnabled(false);
// tip of the day
- KStdAction::tipOfDay( this, SLOT( slotShowTip() ), actionCollection() );
+ KStdAction::tipOfDay( TQT_TQOBJECT(this), TQT_SLOT( slotShowTip() ), actionCollection() );
// elements
addBracketAction = document->wrapper()->getAddBracketAction();
@@ -101,55 +101,55 @@ KFormulaPartView::KFormulaPartView(KFormulaDoc* _doc, QWidget* _parent, const ch
addGenericLowerAction = document->wrapper()->getAddGenericLowerAction();
removeEnclosingAction = document->wrapper()->getRemoveEnclosingAction();
- (void) KStdAction::selectAll(formulaWidget, SLOT(slotSelectAll()), actionCollection());
+ (void) KStdAction::selectAll(TQT_TQOBJECT(formulaWidget), TQT_SLOT(slotSelectAll()), actionCollection());
//------------------------ Settings menu
- KStdAction::preferences( this, SLOT(configure()), actionCollection(), "configure" );
+ KStdAction::preferences( TQT_TQOBJECT(this), TQT_SLOT(configure()), actionCollection(), "configure" );
// font stuff
// KFontAction* actionElement_Text_Font = new KFontAction(i18n( "Font Family" ),0,
// actionCollection(),"textfont");
-// connect( actionElement_Text_Font, SIGNAL( activated( const QString& ) ), this, SLOT( fontSelected( const QString& ) ) );
+// connect( actionElement_Text_Font, TQT_SIGNAL( activated( const TQString& ) ), TQT_TQOBJECT(this), TQT_SLOT( fontSelected( const TQString& ) ) );
KFontSizeAction* actionTextSize = new KFontSizeAction(i18n( "Size" ),0,
actionCollection(),"formula_textsize");
actionTextSize->setFontSize( m_pDoc->getFormula()->fontSize() );
- connect( actionTextSize, SIGNAL( fontSizeChanged( int ) ), this, SLOT( sizeSelected( int ) ) );
- connect( formula, SIGNAL( baseSizeChanged( int ) ), actionTextSize, SLOT( setFontSize( int ) ) );
+ connect( actionTextSize, TQT_SIGNAL( fontSizeChanged( int ) ), TQT_TQOBJECT(this), TQT_SLOT( sizeSelected( int ) ) );
+ connect( formula, TQT_SIGNAL( baseSizeChanged( int ) ), actionTextSize, TQT_SLOT( setFontSize( int ) ) );
// KToggleAction* actionElement_Text_Bold = new KToggleAction(i18n( "Bold" ),
// "bold",
// 0,
// actionCollection(),"textbold");
-// connect( actionElement_Text_Bold, SIGNAL( toggled( bool ) ), this, SLOT( bold( bool ) ) );
+// connect( actionElement_Text_Bold, TQT_SIGNAL( toggled( bool ) ), TQT_TQOBJECT(this), TQT_SLOT( bold( bool ) ) );
// KToggleAction* actionElement_Text_Italic = new KToggleAction(i18n( "Italic" ),
// "italic",
// 0,
// actionCollection(),"textitalic");
-// connect( actionElement_Text_Italic, SIGNAL( toggled( bool ) ), this, SLOT( italic( bool ) ) );
+// connect( actionElement_Text_Italic, TQT_SIGNAL( toggled( bool ) ), TQT_TQOBJECT(this), TQT_SLOT( italic( bool ) ) );
// KToggleAction* actionElement_Text_Under = new KToggleAction(i18n( "Underlined" ),
// "underl",
// 0,
// actionCollection(),"textunder");
-// connect(actionElement_Text_Under, SIGNAL( toggled( bool ) ), this, SLOT( underline( bool ) ) );
+// connect(actionElement_Text_Under, TQT_SIGNAL( toggled( bool ) ), TQT_TQOBJECT(this), TQT_SLOT( underline( bool ) ) );
formulaStringAction = new KAction( i18n( "Edit Formula String..." ),
0,
- this, SLOT( formulaString() ),
+ TQT_TQOBJECT(this), TQT_SLOT( formulaString() ),
actionCollection(), "formula_formulastring" );
// notify on cursor change
- connect(formulaWidget, SIGNAL(cursorChanged(bool, bool)),
- this, SLOT(cursorChanged(bool, bool)));
+ connect(formulaWidget, TQT_SIGNAL(cursorChanged(bool, bool)),
+ TQT_TQOBJECT(this), TQT_SLOT(cursorChanged(bool, bool)));
- connect( formula, SIGNAL( statusMsg( const QString& ) ),
- this, SLOT( slotActionStatusText( const QString& ) ) );
+ connect( formula, TQT_SIGNAL( statusMsg( const TQString& ) ),
+ TQT_TQOBJECT(this), TQT_SLOT( slotActionStatusText( const TQString& ) ) );
if ( !_doc->isEmbedded() && first_window ) {
- QTimer::singleShot( 200, this, SLOT(slotShowTipOnStart()) );
+ TQTimer::singleShot( 200, TQT_TQOBJECT(this), TQT_SLOT(slotShowTipOnStart()) );
first_window = false;
}
}
@@ -169,7 +169,7 @@ DCOPObject* KFormulaPartView::dcopObject()
}
-void KFormulaPartView::focusInEvent(QFocusEvent*)
+void KFormulaPartView::focusInEvent(TQFocusEvent*)
{
formulaWidget->setFocus();
}
@@ -185,7 +185,7 @@ void KFormulaPartView::slotShowTipOnStart() {
}
void KFormulaPartView::slotShowTip() {
- KTipDialog::showTip( this, QString::null, true );
+ KTipDialog::showTip( this, TQString(), true );
}
@@ -206,7 +206,7 @@ void KFormulaPartView::setEnabled(bool enabled)
removeEnclosingAction->setEnabled(enabled);
}
-void KFormulaPartView::resizeEvent( QResizeEvent * )
+void KFormulaPartView::resizeEvent( TQResizeEvent * )
{
scrollview->setGeometry(0, 0, width(), height());
}
@@ -263,11 +263,11 @@ void KFormulaPartView::sizeSelected( int size )
formulaWidget->setFocus();
}
-QStringList KFormulaPartView::readFormulaString( QString text )
+TQStringList KFormulaPartView::readFormulaString( TQString text )
{
FormulaStringParser parser( document()->getDocument()->getSymbolTable(), text );
- QDomDocument formula = parser.parse();
- QStringList errorList = parser.errorList();
+ TQDomDocument formula = parser.parse();
+ TQStringList errorList = parser.errorList();
//if ( errorList.count() == 0 ) {
formulaView()->slotSelectAll();
document()->getFormula()->paste( formula, i18n( "Read Formula String" ) );