home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / kmditoolviewaccessor.h < prev    next >
Encoding:
C/C++ Source or Header  |  2005-09-10  |  2.7 KB  |  87 lines

  1. //----------------------------------------------------------------------------
  2. //    filename             : kmditoolviewaccessor.h
  3. //----------------------------------------------------------------------------
  4. //    Project              : KDE MDI extension
  5. //
  6. //    begin                : 08/2003       by Joseph Wenninger (jowenn@kde.org)
  7. //    changes              : ---
  8. //    patches              : ---
  9. //
  10. //    copyright            : (C) 2003 by Joseph Wenninger (jowenn@kde.org)
  11. //----------------------------------------------------------------------------
  12. //
  13. //----------------------------------------------------------------------------
  14. //
  15. //    This program is free software; you can redistribute it and/or modify
  16. //    it under the terms of the GNU Library General Public License as
  17. //    published by the Free Software Foundation; either version 2 of the
  18. //    License, or (at your option) any later version.
  19. //
  20. //----------------------------------------------------------------------------
  21. #ifndef _KMDITOOLVIEWACCESSOR_H_
  22. #define _KMDITOOLVIEWACCESSOR_H_
  23.  
  24. #include <qwidget.h>
  25. #include <qpixmap.h>
  26. #include <qrect.h>
  27. #include <qapplication.h>
  28. #include <qdatetime.h>
  29.  
  30. #include <kdockwidget.h>
  31.  
  32. namespace KMDIPrivate
  33. {
  34. class KMDIGUIClient;
  35. }
  36.  
  37.  
  38. class KMDI_EXPORT KMdiToolViewAccessor : public QObject
  39. {
  40.     Q_OBJECT
  41.  
  42.  
  43.     friend class KMdiMainFrm;
  44.     friend class KMDIPrivate::KMDIGUIClient;
  45.  
  46. private:
  47.     /**
  48.     * Internally used by KMdiMainFrm to store a temporary information that the method
  49.     * activate() is unnecessary and that it can by escaped.
  50.     * This saves from unnecessary calls when activate is called directly.
  51.     */
  52.     bool m_bInterruptActivation;
  53.     /**
  54.     * Internally used to prevent cycles between KMdiMainFrm::activateView() and KMdiChildView::activate().
  55.     */
  56.     bool m_bMainframesActivateViewIsPending;
  57.     /**
  58.     *
  59.     */
  60.     bool m_bFocusInEventIsPending;
  61.  
  62. private:
  63.     KMdiToolViewAccessor( class KMdiMainFrm *parent , QWidget *widgetToWrap, const QString& tabToolTip = 0, const QString& tabCaption = 0 );
  64.     KMdiToolViewAccessor( class KMdiMainFrm *parent );
  65. public:
  66.     ~KMdiToolViewAccessor();
  67.     QWidget *wrapperWidget();
  68.     QWidget *wrappedWidget();
  69.     void place( KDockWidget::DockPosition pos = KDockWidget::DockNone, QWidget* pTargetWnd = 0L, int percent = 50 );
  70.     void placeAndShow( KDockWidget::DockPosition pos = KDockWidget::DockNone, QWidget* pTargetWnd = 0L, int percent = 50 );
  71.     void show();
  72. public slots:
  73.     void setWidgetToWrap( QWidget* widgetToWrap, const QString& tabToolTip = 0, const QString& tabCaption = 0 );
  74.     void hide();
  75. private:
  76.     class KMdiToolViewAccessorPrivate *d;
  77.     class KMdiMainFrm *mdiMainFrm;
  78.  
  79. protected:
  80.     bool eventFilter( QObject *o, QEvent *e );
  81. };
  82.  
  83.  
  84. #endif //_KMDITOOLVIEWACCESSOR_H_ 
  85. // kate: space-indent off; tab-width 4; replace-tabs off; indent-mode csands;
  86.  
  87.