KOffice – TDE office suite
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

kfconfig.cc 2.7KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /* This file is part of the KDE project
  2. Copyright (C) 2001 Andrea Rizzi <rizzi@kde.org>
  3. Ulrich Kuettler <ulrich.kuettler@mailbox.tu-dresden.de>
  4. This library is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU Library General Public
  6. License as published by the Free Software Foundation; either
  7. version 2 of the License, or (at your option) any later version.
  8. This library is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  11. Library General Public License for more details.
  12. You should have received a copy of the GNU Library General Public License
  13. along with this library; see the file COPYING.LIB. If not, write to
  14. the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  15. * Boston, MA 02110-1301, USA.
  16. */
  17. #include <kdebug.h>
  18. #include <kiconloader.h>
  19. #include <kinstance.h>
  20. #include <tdelocale.h>
  21. #include "kfconfig.h"
  22. #include "kformula_factory.h"
  23. #include "kformula_doc.h"
  24. #include "kformula_view.h"
  25. KFConfig::KFConfig( KFormulaPartView* parent )
  26. : KDialogBase( KDialogBase::IconList, i18n( "Configure KFormula" ),
  27. KDialogBase::Ok | KDialogBase::Apply | KDialogBase::Cancel | KDialogBase::Default,
  28. KDialogBase::Ok, parent )
  29. {
  30. //kdDebug( 40000 ) << "KFConfig::KFConfig" << endl;
  31. TQVBox* page1 = addVBoxPage( i18n( "Formula" ), i18n( "Formula Settings" ),
  32. BarIcon( "kformula", TDEIcon::SizeMedium ) );
  33. _page = new KFormula::ConfigurePage( parent->document()->getDocument(), this,
  34. KFormulaFactory::global()->config(),
  35. page1 );
  36. // TQVBox* page2 = addVBoxPage( i18n( "Math Fonts" ), i18n( "Math Fonts Settings" ),
  37. // BarIcon( "kformula", TDEIcon::SizeMedium ) );
  38. // _mathFontPage = new KFormula::MathFontsConfigurePage( parent->document()->getDocument(), this,
  39. // KFormulaFactory::global()->config(),
  40. // page2 );
  41. connect( this, TQT_SIGNAL( okClicked() ), this, TQT_SLOT( slotApply() ) );
  42. }
  43. void KFConfig::slotApply()
  44. {
  45. // _mathFontPage->apply();
  46. // The "normal" page triggers the recalc and must be called last
  47. // for this reason.
  48. _page->apply();
  49. }
  50. void KFConfig::slotDefault()
  51. {
  52. switch(activePageIndex())
  53. {
  54. case 0:
  55. _page->slotDefault();
  56. break;
  57. // case 1:
  58. // _mathFontPage->slotDefault();
  59. // break;
  60. default:
  61. break;
  62. }
  63. }
  64. #include "kfconfig.moc"