toolviewaccessor.h
00001 /* This file is part of the KDE libraries 00002 Copyright (C) 2003 Joseph Wenninger <jowenn@kde.org> 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License as published by the Free Software Foundation; either 00007 version 2 of the License, or (at your option) any later version. 00008 00009 This library is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 Library General Public License for more details. 00013 00014 You should have received a copy of the GNU Library General Public License 00015 along with this library; see the file COPYING.LIB. If not, write to 00016 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00017 Boston, MA 02110-1301, USA. 00018 */ 00019 00020 #ifndef _TDEMDI_TOOLVIEWACCESSOR_H_ 00021 #define _TDEMDI_TOOLVIEWACCESSOR_H_ 00022 00023 #include <tqwidget.h> 00024 #include <tqpixmap.h> 00025 #include <tqrect.h> 00026 #include <tqapplication.h> 00027 #include <tqdatetime.h> 00028 00029 #include <kdockwidget.h> 00030 00031 namespace KMDIPrivate { 00032 class GUIClient; 00033 class ToolViewAccessorPrivate; 00034 } 00035 00036 namespace KMDI { 00037 00038 class MainWindow; 00039 00040 class ToolViewAccessor : public TQObject 00041 { 00042 Q_OBJECT 00043 00044 friend class KMDI::MainWindow; 00045 friend class KMDIPrivate::GUIClient; 00046 00047 private: 00053 bool m_bInterruptActivation; 00057 bool m_bMainframesActivateViewIsPending; 00061 bool m_bFocusInEventIsPending; 00062 00063 private: 00064 ToolViewAccessor( KMDI::MainWindow *parent , TQWidget *widgetToWrap, const TQString& tabToolTip = 0, const TQString& tabCaption = 0); 00065 ToolViewAccessor( KMDI::MainWindow *parent); 00066 public: 00067 ~ToolViewAccessor(); 00068 TQWidget *wrapperWidget(); 00069 TQWidget *wrappedWidget(); 00070 void place(KDockWidget::DockPosition pos = KDockWidget::DockNone, TQWidget* pTargetWnd = 0L,int percent = 50); 00071 void placeAndShow(KDockWidget::DockPosition pos = KDockWidget::DockNone, TQWidget* pTargetWnd = 0L,int percent = 50); 00072 void show(); 00073 public slots: 00074 void setWidgetToWrap(TQWidget* widgetToWrap, const TQString& tabToolTip = 0, const TQString& tabCaption = 0); 00075 void hide(); 00076 private: 00077 KMDIPrivate::ToolViewAccessorPrivate *d; 00078 KMDI::MainWindow *mdiMainFrm; 00079 00080 protected: 00081 bool eventFilter(TQObject *o, TQEvent *e); 00082 }; 00083 00084 } 00085 00086 #endif //_TDEMDI_TOOLVIEWACCESSOR_H_ 00087 00088 // kate: space-indent on; indent-width 2; replace-tabs on;