diff options
Diffstat (limited to 'lib/kformula/kformuladocument.cc')
-rw-r--r-- | lib/kformula/kformuladocument.cc | 154 |
1 files changed, 77 insertions, 77 deletions
diff --git a/lib/kformula/kformuladocument.cc b/lib/kformula/kformuladocument.cc index 1b440b99..251893d1 100644 --- a/lib/kformula/kformuladocument.cc +++ b/lib/kformula/kformuladocument.cc @@ -369,7 +369,7 @@ void Document::introduceWrapper( DocumentWrapper* wrapper, bool init ) ////////////////////////////////////////////////////////////////////////////// DocumentWrapper::DocumentWrapper( TDEConfig* config, - KActionCollection* collection, + TDEActionCollection* collection, KoCommandHistory* history ) : m_document( 0 ), m_leftBracketChar( LeftRoundBracket ), @@ -434,193 +434,193 @@ void DocumentWrapper::setCommandStack( KoCommandHistory* history ) } -void DocumentWrapper::createActions( KActionCollection* collection ) +void DocumentWrapper::createActions( TDEActionCollection* collection ) { TDEGlobal::dirs()->addResourceType( "toolbar", TDEStandardDirs::kde_default("data") + "kformula/pics/" ); - m_addNegThinSpaceAction = new KAction( i18n( "Add Negative Thin Space" ), + m_addNegThinSpaceAction = new TDEAction( i18n( "Add Negative Thin Space" ), 0, this, TQT_SLOT( addNegThinSpace() ), collection, "formula_addnegthinspace") ; - m_addThinSpaceAction = new KAction( i18n( "Add Thin Space" ), + m_addThinSpaceAction = new TDEAction( i18n( "Add Thin Space" ), 0, this, TQT_SLOT( addThinSpace() ), collection, "formula_addthinspace") ; - m_addMediumSpaceAction = new KAction( i18n( "Add Medium Space" ), + m_addMediumSpaceAction = new TDEAction( i18n( "Add Medium Space" ), 0, this, TQT_SLOT( addMediumSpace() ), collection, "formula_addmediumspace" ); - m_addThickSpaceAction = new KAction( i18n( "Add Thick Space" ), + m_addThickSpaceAction = new TDEAction( i18n( "Add Thick Space" ), 0, this, TQT_SLOT( addThickSpace() ), collection, "formula_addthickspace" ); - m_addQuadSpaceAction = new KAction( i18n( "Add Quad Space" ), + m_addQuadSpaceAction = new TDEAction( i18n( "Add Quad Space" ), 0, this, TQT_SLOT( addQuadSpace() ), collection, "formula_addquadspace" ); - m_addIntegralAction = new KAction(i18n("Add Integral"), + m_addIntegralAction = new TDEAction(i18n("Add Integral"), "int", 0, this, TQT_SLOT(addIntegral()), collection, "formula_addintegral"); - m_addSumAction = new KAction(i18n("Add Sum"), + m_addSumAction = new TDEAction(i18n("Add Sum"), "sum", 0, this, TQT_SLOT(addSum()), collection, "formula_addsum"); - m_addProductAction = new KAction(i18n("Add Product"), + m_addProductAction = new TDEAction(i18n("Add Product"), "prod", 0, this, TQT_SLOT(addProduct()), collection, "formula_addproduct"); - m_addRootAction = new KAction(i18n("Add Root"), + m_addRootAction = new TDEAction(i18n("Add Root"), "sqrt", 0, this, TQT_SLOT(addRoot()), collection, "formula_addroot"); - m_addFractionAction = new KAction(i18n("Add Fraction"), + m_addFractionAction = new TDEAction(i18n("Add Fraction"), "frac", 0, this, TQT_SLOT(addFraction()), collection, "formula_addfrac"); - m_addBracketAction = new KAction(i18n("Add Bracket"), + m_addBracketAction = new TDEAction(i18n("Add Bracket"), "paren", 0, this, TQT_SLOT(addDefaultBracket()), collection,"formula_addbra"); - m_addSBracketAction = new KAction(i18n("Add Square Bracket"), + m_addSBracketAction = new TDEAction(i18n("Add Square Bracket"), "brackets", 0, this, TQT_SLOT(addSquareBracket()), collection,"formula_addsqrbra"); - m_addCBracketAction = new KAction(i18n("Add Curly Bracket"), + m_addCBracketAction = new TDEAction(i18n("Add Curly Bracket"), "math_brace", 0, this, TQT_SLOT(addCurlyBracket()), collection,"formula_addcurbra"); - m_addAbsAction = new KAction(i18n("Add Abs"), + m_addAbsAction = new TDEAction(i18n("Add Abs"), "abs", 0, this, TQT_SLOT(addLineBracket()), collection,"formula_addabsbra"); - m_addMatrixAction = new KAction(i18n("Add Matrix..."), + m_addMatrixAction = new TDEAction(i18n("Add Matrix..."), "matrix", 0, this, TQT_SLOT(addMatrix()), collection, "formula_addmatrix"); - m_addOneByTwoMatrixAction = new KAction(i18n("Add 1x2 Matrix"), + m_addOneByTwoMatrixAction = new TDEAction(i18n("Add 1x2 Matrix"), "onetwomatrix", 0, this, TQT_SLOT(addOneByTwoMatrix()), collection, "formula_add_one_by_two_matrix"); - m_addUpperLeftAction = new KAction(i18n("Add Upper Left Index"), + m_addUpperLeftAction = new TDEAction(i18n("Add Upper Left Index"), "lsup", 0, this, TQT_SLOT(addUpperLeftIndex()), collection, "formula_addupperleft"); - m_addLowerLeftAction = new KAction(i18n("Add Lower Left Index"), + m_addLowerLeftAction = new TDEAction(i18n("Add Lower Left Index"), "lsub", 0, this, TQT_SLOT(addLowerLeftIndex()), collection, "formula_addlowerleft"); - m_addUpperRightAction = new KAction(i18n("Add Upper Right Index"), + m_addUpperRightAction = new TDEAction(i18n("Add Upper Right Index"), "rsup", 0, this, TQT_SLOT(addUpperRightIndex()), collection, "formula_addupperright"); - m_addLowerRightAction = new KAction(i18n("Add Lower Right Index"), + m_addLowerRightAction = new TDEAction(i18n("Add Lower Right Index"), "rsub", 0, this, TQT_SLOT(addLowerRightIndex()), collection, "formula_addlowerright"); - m_addGenericUpperAction = new KAction(i18n("Add Upper Index"), + m_addGenericUpperAction = new TDEAction(i18n("Add Upper Index"), "gsup", /*CTRL + Key_U*/0, this, TQT_SLOT(addGenericUpperIndex()), collection, "formula_addupperindex"); - m_addGenericLowerAction = new KAction(i18n("Add Lower Index"), + m_addGenericLowerAction = new TDEAction(i18n("Add Lower Index"), "gsub", 0, this, TQT_SLOT(addGenericLowerIndex()), collection, "formula_addlowerindex"); - m_addOverlineAction = new KAction(i18n("Add Overline"), + m_addOverlineAction = new TDEAction(i18n("Add Overline"), "over", 0, this, TQT_SLOT(addOverline()), collection, "formula_addoverline"); - m_addUnderlineAction = new KAction(i18n("Add Underline"), + m_addUnderlineAction = new TDEAction(i18n("Add Underline"), "under", 0, this, TQT_SLOT(addUnderline()), collection, "formula_addunderline"); - m_addMultilineAction = new KAction(i18n("Add Multiline"), + m_addMultilineAction = new TDEAction(i18n("Add Multiline"), "multiline", 0, this, TQT_SLOT(addMultiline()), collection, "formula_addmultiline"); - m_removeEnclosingAction = new KAction(i18n("Remove Enclosing Element"), + m_removeEnclosingAction = new TDEAction(i18n("Remove Enclosing Element"), 0, this, TQT_SLOT(removeEnclosing()), collection, "formula_removeenclosing"); - m_makeGreekAction = new KAction(i18n("Convert to Greek"), + m_makeGreekAction = new TDEAction(i18n("Convert to Greek"), 0, this, TQT_SLOT(makeGreek()), collection, "formula_makegreek"); - m_appendColumnAction = new KAction( i18n( "Append Column" ), + m_appendColumnAction = new TDEAction( i18n( "Append Column" ), "inscol", 0, this, TQT_SLOT( appendColumn() ), collection, "formula_appendcolumn" ); - m_insertColumnAction = new KAction( i18n( "Insert Column" ), + m_insertColumnAction = new TDEAction( i18n( "Insert Column" ), "inscol", 0, this, TQT_SLOT( insertColumn() ), collection, "formula_insertcolumn" ); - m_removeColumnAction = new KAction( i18n( "Remove Column" ), + m_removeColumnAction = new TDEAction( i18n( "Remove Column" ), "remcol", 0, this, TQT_SLOT( removeColumn() ), collection, "formula_removecolumn" ); - m_appendRowAction = new KAction( i18n( "Append Row" ), + m_appendRowAction = new TDEAction( i18n( "Append Row" ), "insrow", 0, this, TQT_SLOT( appendRow() ), collection, "formula_appendrow" ); - m_insertRowAction = new KAction( i18n( "Insert Row" ), + m_insertRowAction = new TDEAction( i18n( "Insert Row" ), "insrow", 0, this, TQT_SLOT( insertRow() ), collection, "formula_insertrow" ); - m_removeRowAction = new KAction( i18n( "Remove Row" ), + m_removeRowAction = new TDEAction( i18n( "Remove Row" ), "remrow", 0, this, TQT_SLOT( removeRow() ), collection, "formula_removerow" ); - m_syntaxHighlightingAction = new KToggleAction(i18n("Syntax Highlighting"), + m_syntaxHighlightingAction = new TDEToggleAction(i18n("Syntax Highlighting"), 0, this, TQT_SLOT(toggleSyntaxHighlighting()), collection, "formula_syntaxhighlighting"); //m_syntaxHighlightingAction->setChecked( m_contextStyle->syntaxHighlighting() ); - m_formatBoldAction = new KToggleAction( i18n( "&Bold" ), "text_bold", + m_formatBoldAction = new TDEToggleAction( i18n( "&Bold" ), "text_bold", 0, //CTRL + Key_B, this, TQT_SLOT( textBold() ), collection, "formula_format_bold" ); - m_formatItalicAction = new KToggleAction( i18n( "&Italic" ), "text_italic", + m_formatItalicAction = new TDEToggleAction( i18n( "&Italic" ), "text_italic", 0, //CTRL + Key_I, this, TQT_SLOT( textItalic() ), collection, "formula_format_italic" ); @@ -640,7 +640,7 @@ void DocumentWrapper::createActions( KActionCollection* collection ) delimiter.append(TQString("]")); delimiter.append(TQString("}")); delimiter.append(TQString(">")); - m_leftBracket = new KSelectAction(i18n("Left Delimiter"), + m_leftBracket = new TDESelectAction(i18n("Left Delimiter"), 0, this, TQT_SLOT(delimiterLeft()), collection, "formula_typeleft"); m_leftBracket->setItems(delimiter); @@ -659,13 +659,13 @@ void DocumentWrapper::createActions( KActionCollection* collection ) delimiter.append(TQString("[")); delimiter.append(TQString("{")); delimiter.append(TQString("<")); - m_rightBracket = new KSelectAction(i18n("Right Delimiter"), + m_rightBracket = new TDESelectAction(i18n("Right Delimiter"), 0, this, TQT_SLOT(delimiterRight()), collection, "formula_typeright"); m_rightBracket->setItems(delimiter); //rightBracket->setCurrentItem(0); - m_insertSymbolAction = new KAction(i18n("Insert Symbol"), + m_insertSymbolAction = new TDEAction(i18n("Insert Symbol"), "key_enter", /*CTRL + Key_I*/0, this, TQT_SLOT(insertSymbol()), @@ -679,7 +679,7 @@ void DocumentWrapper::createActions( KActionCollection* collection ) ff.append( i18n( "Script" ) ); ff.append( i18n( "Fraktur" ) ); ff.append( i18n( "Double Struck" ) ); - m_fontFamily = new KSelectAction(i18n("Font Family"), + m_fontFamily = new TDESelectAction(i18n("Font Family"), 0, this, TQT_SLOT(fontFamily()), collection, "formula_fontfamily"); m_fontFamily->setItems( ff ); @@ -690,7 +690,7 @@ void DocumentWrapper::createActions( KActionCollection* collection ) et.append( i18n( "Operator" ) ); et.append( i18n( "Number" ) ); et.append( i18n( "Text" ) ); - m_tokenElement = new KSelectAction( i18n( "Token Type" ), + m_tokenElement = new TDESelectAction( i18n( "Token Type" ), 0, this, TQT_SLOT( tokenElement() ), collection, "formula_tokenelement" ); m_tokenElement->setItems( et ); @@ -1219,59 +1219,59 @@ void DocumentWrapper::setEnabled( bool enabled ) if ( enabled ) { getAddGenericUpperAction()-> - setShortcut( KShortcut( CTRL + Key_U ) ); + setShortcut( TDEShortcut( CTRL + Key_U ) ); getAddGenericLowerAction()-> - setShortcut( KShortcut( CTRL + Key_L ) ); + setShortcut( TDEShortcut( CTRL + Key_L ) ); getRemoveEnclosingAction()-> - setShortcut( KShortcut( CTRL + Key_R ) ); + setShortcut( TDEShortcut( CTRL + Key_R ) ); getMakeGreekAction()-> - setShortcut( KShortcut( CTRL + Key_G ) ); + setShortcut( TDEShortcut( CTRL + Key_G ) ); getInsertSymbolAction()-> - setShortcut( KShortcut( CTRL + Key_I ) ); + setShortcut( TDEShortcut( CTRL + Key_I ) ); getAddOverlineAction()-> - setShortcut( KShortcut( CTRL + SHIFT + Key_O ) ); + setShortcut( TDEShortcut( CTRL + SHIFT + Key_O ) ); getAddUnderlineAction()-> - setShortcut( KShortcut( CTRL + SHIFT + Key_U ) ); + setShortcut( TDEShortcut( CTRL + SHIFT + Key_U ) ); getAddBracketAction()-> - setShortcut( KShortcut( CTRL + SHIFT + Key_B ) ); + setShortcut( TDEShortcut( CTRL + SHIFT + Key_B ) ); getAddSBracketAction()-> - setShortcut( KShortcut( CTRL + SHIFT + Key_D ) ); + setShortcut( TDEShortcut( CTRL + SHIFT + Key_D ) ); getAddCBracketAction()-> - setShortcut( KShortcut( CTRL + SHIFT + Key_C ) ); + setShortcut( TDEShortcut( CTRL + SHIFT + Key_C ) ); getAddAbsAction()-> - setShortcut( KShortcut( CTRL + SHIFT + Key_A ) ); + setShortcut( TDEShortcut( CTRL + SHIFT + Key_A ) ); getAddFractionAction()-> - setShortcut( KShortcut( CTRL + SHIFT + Key_F ) ); + setShortcut( TDEShortcut( CTRL + SHIFT + Key_F ) ); getAddRootAction()-> - setShortcut( KShortcut( CTRL + SHIFT + Key_R ) ); + setShortcut( TDEShortcut( CTRL + SHIFT + Key_R ) ); getAddSumAction()-> - setShortcut( KShortcut( CTRL + SHIFT + Key_S ) ); + setShortcut( TDEShortcut( CTRL + SHIFT + Key_S ) ); getAddProductAction()-> - setShortcut( KShortcut( CTRL + SHIFT + Key_P ) ); + setShortcut( TDEShortcut( CTRL + SHIFT + Key_P ) ); getAddIntegralAction()-> - setShortcut( KShortcut( CTRL + SHIFT + Key_I ) ); + setShortcut( TDEShortcut( CTRL + SHIFT + Key_I ) ); getAddMatrixAction()-> - setShortcut( KShortcut( CTRL + SHIFT + Key_M ) ); + setShortcut( TDEShortcut( CTRL + SHIFT + Key_M ) ); } else { - getAddGenericUpperAction()->setShortcut( KShortcut() ); - getAddGenericLowerAction()->setShortcut( KShortcut() ); - getRemoveEnclosingAction()->setShortcut( KShortcut() ); - getMakeGreekAction()->setShortcut( KShortcut() ); - getInsertSymbolAction()->setShortcut( KShortcut() ); - getAddOverlineAction()->setShortcut( KShortcut() ); - getAddUnderlineAction()->setShortcut( KShortcut() ); - getAddBracketAction()->setShortcut( KShortcut() ); - getAddSBracketAction()->setShortcut( KShortcut() ); - getAddCBracketAction()->setShortcut( KShortcut() ); - getAddAbsAction()->setShortcut( KShortcut() ); - getAddFractionAction()->setShortcut( KShortcut() ); - getAddRootAction()->setShortcut( KShortcut() ); - getAddSumAction()->setShortcut( KShortcut() ); - getAddProductAction()->setShortcut( KShortcut() ); - getAddIntegralAction()->setShortcut( KShortcut() ); - getAddMatrixAction()->setShortcut( KShortcut() ); + getAddGenericUpperAction()->setShortcut( TDEShortcut() ); + getAddGenericLowerAction()->setShortcut( TDEShortcut() ); + getRemoveEnclosingAction()->setShortcut( TDEShortcut() ); + getMakeGreekAction()->setShortcut( TDEShortcut() ); + getInsertSymbolAction()->setShortcut( TDEShortcut() ); + getAddOverlineAction()->setShortcut( TDEShortcut() ); + getAddUnderlineAction()->setShortcut( TDEShortcut() ); + getAddBracketAction()->setShortcut( TDEShortcut() ); + getAddSBracketAction()->setShortcut( TDEShortcut() ); + getAddCBracketAction()->setShortcut( TDEShortcut() ); + getAddAbsAction()->setShortcut( TDEShortcut() ); + getAddFractionAction()->setShortcut( TDEShortcut() ); + getAddRootAction()->setShortcut( TDEShortcut() ); + getAddSumAction()->setShortcut( TDEShortcut() ); + getAddProductAction()->setShortcut( TDEShortcut() ); + getAddIntegralAction()->setShortcut( TDEShortcut() ); + getAddMatrixAction()->setShortcut( TDEShortcut() ); } } |