TDE core libraries
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.

dockmainwindow.h 2.6KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /* This file is part of the KDE project
  2. Copyright (C) 2000 Falk Brettschneider <gigafalk@yahoo.com>
  3. (C) 1999 Simon Hausmann <hausmann@kde.org>
  4. (C) 1999 David Faure <faure@kde.org>
  5. This library is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU Library General Public
  7. License as published by the Free Software Foundation; either
  8. version 2 of the License, or (at your option) any later version.
  9. This library is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. Library General Public License for more details.
  13. You should have received a copy of the GNU Library General Public License
  14. along with this library; see the file COPYING.LIB. If not, write to
  15. the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  16. Boston, MA 02110-1301, USA.
  17. */
  18. #ifndef __DOCKMAINWINDOW_H
  19. #define __DOCKMAINWINDOW_H
  20. #include <tqptrlist.h>
  21. #include <tdeaction.h>
  22. #include <kdockwidget.h>
  23. #include <tdeparts/part.h>
  24. class TQString;
  25. namespace KParts
  26. {
  27. class DockMainWindowPrivate;
  28. /**
  29. * A KPart-aware main window with ability for docking widgets, whose user interface is described in XML.
  30. *
  31. * Inherit your main dock-window from this class
  32. * and don't forget to call setXMLFile() in the inherited constructor.
  33. *
  34. * It implements all internal interfaces in the case of a KDockMainWindow as host:
  35. * the builder and servant interface (for menu merging).
  36. */
  37. class TDEPARTS_EXPORT DockMainWindow : public KDockMainWindow, virtual public PartBase
  38. {
  39. Q_OBJECT
  40. public:
  41. /**
  42. * Constructor, same signature as KDockMainWindow.
  43. */
  44. DockMainWindow( TQWidget* parent = 0L, const char *name = 0L, WFlags f = (WFlags)WDestructiveClose );
  45. /**
  46. * Destructor.
  47. */
  48. virtual ~DockMainWindow();
  49. protected slots:
  50. /**
  51. * Create the GUI (by merging the host's and the active part's)
  52. *
  53. * Called on startup and whenever the active part changes.
  54. * For this you need to connect this slot to the
  55. * PartManager::activePartChanged() signal
  56. * @param part The active part (set to 0L if no part).
  57. */
  58. void createGUI( KParts::Part * part );
  59. /**
  60. * Called when the active part wants to change the statusbar message.
  61. * Reimplement if your dock-mainwindow has a complex statusbar
  62. * (with several items)
  63. */
  64. virtual void slotSetStatusBarText( const TQString & );
  65. protected:
  66. virtual void createShellGUI( bool create = true );
  67. private:
  68. DockMainWindowPrivate *d;
  69. };
  70. }
  71. #endif