TDE base libraries and programs
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.

konq_run.h 2.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /* This file is part of the KDE project
  2. Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
  3. This library is free software; you can redistribute it and/or
  4. modify it under the terms of the GNU Library General Public
  5. License as published by the Free Software Foundation; either
  6. version 2 of the License, or (at your option) any later version.
  7. This library is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  10. Library General Public License for more details.
  11. You should have received a copy of the GNU Library General Public License
  12. along with this library; see the file COPYING.LIB. If not, write to
  13. the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  14. Boston, MA 02110-1301, USA.
  15. */
  16. #ifndef __kfm_run_h__
  17. #define __kfm_run_h__
  18. #include <tdeparts/browserrun.h>
  19. #include <tqguardedptr.h>
  20. #include <kservice.h>
  21. #include "konq_openurlrequest.h"
  22. class KonqMainWindow;
  23. class KonqView;
  24. class KonqRun : public KParts::BrowserRun
  25. {
  26. Q_OBJECT
  27. public:
  28. /**
  29. * Create a KonqRun instance, associated to the main view and an
  30. * optionnal child view.
  31. */
  32. KonqRun( KonqMainWindow* mainWindow, KonqView *childView,
  33. const KURL &url, const KonqOpenURLRequest & req = KonqOpenURLRequest(),
  34. bool trustedSource = false );
  35. virtual ~KonqRun();
  36. /**
  37. * Returns true if we found the servicetype for the given url.
  38. */
  39. bool foundMimeType() const { return m_bFoundMimeType; }
  40. KonqView *childView() const { return m_pView; }
  41. const TQString & typedURL() const { return m_req.typedURL; }
  42. KURL mailtoURL() const { return m_mailto; }
  43. protected:
  44. virtual void foundMimeType( const TQString & _type );
  45. virtual void handleError( TDEIO::Job * job );
  46. virtual void init();
  47. virtual void scanFile();
  48. protected slots:
  49. void slotRedirection( TDEIO::Job *, const KURL& );
  50. protected:
  51. TQGuardedPtr<KonqMainWindow> m_pMainWindow;
  52. TQGuardedPtr<KonqView> m_pView;
  53. bool m_bFoundMimeType;
  54. KonqOpenURLRequest m_req;
  55. KURL m_mailto;
  56. };
  57. #endif