TDE graphics utilities
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.

faxmultipage.cpp 3.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. /***************************************************************************
  2. * Copyright (C) 2005 by Stefan Kebekus *
  3. * kebekus@kde.org *
  4. * *
  5. * This program is free software; you can redistribute it and/or modify *
  6. * it under the terms of the GNU General Public License as published by *
  7. * the Free Software Foundation; either version 2 of the License, or *
  8. * (at your option) any later version. *
  9. * *
  10. * This program is distributed in the hope that it will be useful, *
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of *
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
  13. * GNU General Public License for more details. *
  14. * *
  15. * You should have received a copy of the GNU General Public License *
  16. * along with this program; if not, write to the *
  17. * Free Software Foundation, Inc., *
  18. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
  19. ***************************************************************************/
  20. #include <config.h>
  21. #include <tdefiledialog.h>
  22. #include <tdeparts/genericfactory.h>
  23. #include "faxmultipage.h"
  24. typedef KParts::GenericFactory<FaxMultiPage> FaxMultiPageFactory;
  25. K_EXPORT_COMPONENT_FACTORY(kfaxviewpart, FaxMultiPageFactory)
  26. FaxMultiPage::FaxMultiPage(TQWidget *parentWidget, const char *widgetName, TQObject *parent,
  27. const char *name, const TQStringList&)
  28. : KMultiPage(parentWidget, widgetName, parent, name), faxRenderer(parentWidget)
  29. {
  30. /* This is tdeparts wizardry that cannot be understood by man. Simply
  31. change the names to match your implementation. */
  32. setInstance(FaxMultiPageFactory::instance());
  33. faxRenderer.setName("Fax renderer");
  34. setXMLFile("kfaxview.rc");
  35. /* It is very important that this method is called in the
  36. constructor. Otherwise tdemultipage does not know how to render
  37. files, and crashes may result. */
  38. setRenderer(&faxRenderer);
  39. }
  40. FaxMultiPage::~FaxMultiPage()
  41. {
  42. ;
  43. }
  44. TDEAboutData* FaxMultiPage::createAboutData()
  45. {
  46. /* You obviously want to change this to match your setup */
  47. TDEAboutData* about = new TDEAboutData("kfaxview", I18N_NOOP("KFaxView"), "0.1",
  48. I18N_NOOP("KViewshell Fax Plugin."),
  49. TDEAboutData::License_GPL,
  50. "Stefan Kebekus",
  51. I18N_NOOP("This program previews fax (g3) files."));
  52. about->addAuthor ("Stefan Kebekus",
  53. I18N_NOOP("Current Maintainer."),
  54. "kebekus@kde.org",
  55. "http://www.mi.uni-koeln.de/~kebekus");
  56. return about;
  57. }
  58. TQStringList FaxMultiPage::fileFormats() const
  59. {
  60. /* This list is used in the file selection dialog when the file is
  61. saved */
  62. TQStringList r;
  63. r << i18n("*.g3|Fax (g3) file (*.g3)");
  64. return r;
  65. }
  66. #include "faxmultipage.moc"