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.
617 lines
19 KiB
617 lines
19 KiB
15 years ago
|
//----------------------------------------------------------------------------
|
||
12 years ago
|
// filename : tdemdichildview.h
|
||
15 years ago
|
//----------------------------------------------------------------------------
|
||
|
// Project : KDE MDI extension
|
||
|
//
|
||
|
// begin : 07/1999 by Szymon Stefanek as part of kvirc
|
||
|
// (an IRC application)
|
||
|
// changes : 09/1999 by Falk Brettschneider to create an
|
||
14 years ago
|
// - 06/2000 stand-alone TQt extension set of
|
||
|
// classes and a TQt-based library
|
||
15 years ago
|
// 2000-2003 maintained by the KDevelop project
|
||
|
// patches : 02/2000 by Massimo Morin (mmorin@schedsys.com)
|
||
|
// */2000 by Lars Beikirch (Lars.Beikirch@gmx.net)
|
||
|
// 02/2001 by Eva Brucherseifer (eva@rt.e-technik.tu-darmstadt.de)
|
||
|
// 01/2003 by Jens Zurheide (jens.zurheide@gmx.de)
|
||
|
//
|
||
|
// copyright : (C) 1999-2003 by Falk Brettschneider
|
||
|
// and
|
||
|
// Szymon Stefanek (stefanek@tin.it)
|
||
13 years ago
|
// email : falkbr@tdevelop.org (Falk Brettschneider)
|
||
15 years ago
|
//----------------------------------------------------------------------------
|
||
|
//
|
||
|
//----------------------------------------------------------------------------
|
||
|
//
|
||
|
// This program is free software; you can redistribute it and/or modify
|
||
|
// it under the terms of the GNU Library General Public License as
|
||
|
// published by the Free Software Foundation; either version 2 of the
|
||
|
// License, or (at your option) any later version.
|
||
|
//
|
||
|
//----------------------------------------------------------------------------
|
||
|
#ifndef _KMDI_CHILD_VIEW_H_
|
||
|
#define _KMDI_CHILD_VIEW_H_
|
||
|
|
||
15 years ago
|
#include <tqwidget.h>
|
||
|
#include <tqpixmap.h>
|
||
|
#include <tqrect.h>
|
||
|
#include <tqapplication.h>
|
||
|
#include <tqdatetime.h>
|
||
15 years ago
|
|
||
12 years ago
|
#include "tdemdichildfrm.h"
|
||
15 years ago
|
|
||
|
class KMdiChildViewPrivate;
|
||
|
|
||
|
/**
|
||
|
* @short Base class for all your special view windows.
|
||
|
*
|
||
|
* Base class for all MDI view widgets. KMdi stores additional information in this class
|
||
|
* to handle the attach/detach mechanism and such things.
|
||
|
*
|
||
|
* All such windows 'lives' attached to a KMdiChildFrm widget
|
||
|
* managed by KMdiChildArea, or detached (managed by the window manager.)
|
||
14 years ago
|
* So remember that the KMdiChildView::parent pointer may change, and may be 0L, too.
|
||
15 years ago
|
*
|
||
|
* There are 2 possibilities for you to put your widgets under MDI control:
|
||
|
*
|
||
|
* Either you inherit all the views from KMdiChildView:
|
||
|
* \code
|
||
|
* class MyMdiWidget : public KMdiChildView
|
||
|
* { .... };
|
||
|
* ...
|
||
|
* MyMdiWidget w;
|
||
|
* mainframe->addWindow(w, flags);
|
||
|
* \endcode
|
||
|
*
|
||
|
* or you wrap them by a KMdiChildView somehow like this:
|
||
|
*
|
||
|
* \code
|
||
15 years ago
|
* void DocViewMan::addKMdiFrame(TQWidget* pNewView, bool bShow, const TQPixmap& icon)
|
||
15 years ago
|
* {
|
||
|
* // cover it by a KMdi childview and add that MDI system
|
||
|
* KMdiChildView* pMDICover = new KMdiChildView( pNewView->caption());
|
||
|
* pMDICover->setIcon(icon);
|
||
|
* m_MDICoverList.append( pMDICover);
|
||
13 years ago
|
* TQBoxLayout* pLayout = new TQHBoxLayout( pMDICover, 0, -1, "layout");
|
||
15 years ago
|
* pNewView->reparent( pMDICover, TQPoint(0,0));
|
||
15 years ago
|
* pLayout->addWidget( pNewView);
|
||
|
* pMDICover->setName( pNewView->name());
|
||
|
* // captions
|
||
15 years ago
|
* TQString shortName = pNewView->caption();
|
||
15 years ago
|
* int length = shortName.length();
|
||
14 years ago
|
* shortName = shortName.right(length - (shortName.findRev('/') +1));
|
||
15 years ago
|
* pMDICover->setTabCaption( shortName);
|
||
|
* pMDICover->setCaption(pNewView->caption());
|
||
|
*
|
||
|
* // fake a viewActivated to update the currentEditView/currentBrowserView pointers _before_ adding to MDI control
|
||
|
* slot_viewActivated( pMDICover);
|
||
|
*
|
||
|
* // take it under MDI mainframe control (note: this triggers also a setFocus())
|
||
|
* int flags;
|
||
|
* if (bShow) {
|
||
|
* flags = KMdi::StandardAdd;
|
||
|
* }
|
||
|
* else {
|
||
|
* flags = KMdi::Hide;
|
||
|
* }
|
||
|
* // set the accelerators for Toplevel MDI mode (each toplevel window needs its own accels
|
||
15 years ago
|
* connect( m_pParent, TQT_SIGNAL(childViewIsDetachedNow(TQWidget*)), this, TQT_SLOT(initKeyAccel(TQWidget*)) );
|
||
15 years ago
|
*
|
||
|
* m_pParent->addWindow( pMDICover, flags);
|
||
|
* // correct the default settings of KMdi ('cause we haven't a tab order for subwidget focuses)
|
||
|
* pMDICover->setFirstFocusableChildWidget(0L);
|
||
|
* pMDICover->setLastFocusableChildWidget(0L);
|
||
|
* }
|
||
|
* \endcode
|
||
|
*
|
||
|
*/
|
||
|
|
||
14 years ago
|
class KMDI_EXPORT KMdiChildView : public TQWidget
|
||
15 years ago
|
{
|
||
|
friend class KMdiMainFrm;
|
||
|
friend class KMdiChildFrm;
|
||
|
Q_OBJECT
|
||
13 years ago
|
|
||
15 years ago
|
|
||
|
// attributes
|
||
|
protected:
|
||
|
/**
|
||
|
* See KMdiChildView::caption
|
||
|
*/
|
||
15 years ago
|
TQString m_szCaption;
|
||
15 years ago
|
|
||
|
/**
|
||
|
* See KMdiChildView::tabCaption
|
||
|
*/
|
||
15 years ago
|
TQString m_sTabCaption;
|
||
15 years ago
|
|
||
|
/**
|
||
|
* See KMdiChildView::focusedChildWidget
|
||
|
*/
|
||
15 years ago
|
TQWidget* m_focusedChildWidget;
|
||
15 years ago
|
|
||
|
/**
|
||
|
* See KMdiChildView::setFirstFocusableChildWidget
|
||
|
*/
|
||
15 years ago
|
TQWidget* m_firstFocusableChildWidget;
|
||
15 years ago
|
|
||
|
/**
|
||
|
* See KMdiChildView::setLastFocusableChildWidget
|
||
|
*/
|
||
15 years ago
|
TQWidget* m_lastFocusableChildWidget;
|
||
15 years ago
|
|
||
|
/**
|
||
|
* Every child view window has an temporary ID in the Window menu of the main frame.
|
||
|
*/
|
||
|
int m_windowMenuID;
|
||
|
|
||
|
/**
|
||
|
* Holds a temporary information about if the MDI view state has changed but is not processed yet (pending state).
|
||
|
* For example it could be that a 'maximize' is pending, if this variable is true.
|
||
|
*/
|
||
|
bool m_stateChanged;
|
||
|
|
||
|
/**
|
||
|
* Holds the time when this view was activated (not only displayed) for the last time.
|
||
|
*/
|
||
15 years ago
|
TQDateTime m_time;
|
||
15 years ago
|
|
||
|
private:
|
||
|
/**
|
||
|
* Internally used as indicator whether this KMdiChildView is treated as document view or as tool view.
|
||
|
*/
|
||
|
bool m_bToolView;
|
||
|
|
||
|
/**
|
||
|
* Internally used by KMdiMainFrm to store a temporary information that the method
|
||
|
* activate() is unnecessary and that it can by escaped.
|
||
|
* This saves from unnecessary calls when activate is called directly.
|
||
|
*/
|
||
|
bool m_bInterruptActivation;
|
||
|
|
||
|
/**
|
||
|
* Internally used to prevent cycles between KMdiMainFrm::activateView() and KMdiChildView::activate().
|
||
|
*/
|
||
|
bool m_bMainframesActivateViewIsPending;
|
||
|
|
||
|
/**
|
||
|
* Internally used to check if there is a focus in event pending
|
||
|
*/
|
||
|
bool m_bFocusInEventIsPending;
|
||
|
|
||
|
// methods
|
||
|
public:
|
||
|
/**
|
||
|
* Constructor
|
||
|
*/
|
||
14 years ago
|
KMdiChildView( const TQString& caption, TQWidget* parentWidget = 0L, const char* name = 0L, WFlags f = 0 );
|
||
15 years ago
|
|
||
|
/**
|
||
|
* Constructor
|
||
|
* sets "Unnamed" as default caption
|
||
|
*/
|
||
14 years ago
|
KMdiChildView( TQWidget* parentWidget = 0L, const char* name = 0L, WFlags f = 0 );
|
||
15 years ago
|
|
||
|
/**
|
||
|
* Destructor
|
||
|
*/
|
||
|
~KMdiChildView();
|
||
|
|
||
|
/**
|
||
|
* This method does the same as focusInEvent(). That's why it is a replacement for the setFocus() call. It makes
|
||
|
* sense if you for instance want to focus (I mean raise and activate) this view although the real focus is
|
||
|
* in another toplevel widget. focusInEvent() will never get called in that case and your setFocus() call for this
|
||
|
* widget would fail without any effect.
|
||
|
* Use this method with caution, it always raises the view and pushes the taskbar button. Also when the focus is
|
||
|
* still on another MDI view in the same toplevel window where this is located!
|
||
|
*/
|
||
|
void activate();
|
||
|
|
||
|
/**
|
||
|
* Memorizes the first focusable child widget of this widget
|
||
|
*/
|
||
15 years ago
|
void setFirstFocusableChildWidget( TQWidget* );
|
||
15 years ago
|
|
||
|
/**
|
||
|
* Memorizes the last focusable child widget of this widget
|
||
|
*/
|
||
15 years ago
|
void setLastFocusableChildWidget( TQWidget* );
|
||
15 years ago
|
|
||
|
/**
|
||
|
* Returns the current focused child widget of this widget
|
||
|
*/
|
||
15 years ago
|
TQWidget* focusedChildWidget();
|
||
15 years ago
|
|
||
|
/**
|
||
|
* Returns true if the MDI view is a child window within the MDI mainframe widget
|
||
|
* or false if the MDI view is in toplevel mode
|
||
|
*/
|
||
|
bool isAttached() const { return ( mdiParent() != 0L ); }
|
||
|
|
||
|
/**
|
||
|
* Returns the caption of the child window (different from the caption on the button in the taskbar)
|
||
|
*/
|
||
15 years ago
|
const TQString& caption() const { return m_szCaption; }
|
||
15 years ago
|
|
||
|
/**
|
||
|
* Returns the caption of the button on the taskbar
|
||
|
*/
|
||
15 years ago
|
const TQString& tabCaption() const { return m_sTabCaption; }
|
||
15 years ago
|
|
||
|
/**
|
||
|
* Sets the window caption string...
|
||
|
* Calls updateButton on the taskbar button if it has been set.
|
||
|
*/
|
||
15 years ago
|
virtual void setCaption( const TQString& szCaption );
|
||
15 years ago
|
|
||
|
/**
|
||
|
* Sets the caption of the button referring to this window
|
||
|
*/
|
||
15 years ago
|
virtual void setTabCaption( const TQString& caption );
|
||
15 years ago
|
|
||
|
/**
|
||
|
* Sets the caption of both the window and the button on the taskbar
|
||
|
*/
|
||
15 years ago
|
virtual void setMDICaption( const TQString &caption );
|
||
15 years ago
|
|
||
|
/**
|
||
14 years ago
|
* Returns the KMdiChildFrm parent widget (or 0 if the window is not attached)
|
||
15 years ago
|
*/
|
||
|
KMdiChildFrm *mdiParent() const;
|
||
|
|
||
|
/**
|
||
|
* Tells if the window is minimized when attached to the Mdi manager,
|
||
|
* or if it is VISIBLE when 'floating'.
|
||
|
*/
|
||
|
bool isMinimized() const;
|
||
|
|
||
|
/**
|
||
|
* Tells if the window is minimized when attached to the Mdi manager,
|
||
|
* otherwise returns false.
|
||
|
*/
|
||
|
bool isMaximized() const;
|
||
|
|
||
|
/**
|
||
13 years ago
|
* Returns the geometry of this MDI child window as TQWidget::geometry() does.
|
||
15 years ago
|
*/
|
||
15 years ago
|
TQRect internalGeometry() const;
|
||
15 years ago
|
|
||
|
/**
|
||
13 years ago
|
* Sets the geometry of the client area of this MDI child window. The
|
||
15 years ago
|
* top left position of the argument is the position of the top left point
|
||
14 years ago
|
* of the client area in its parent coordinates and the arguments width
|
||
15 years ago
|
* and height is the width and height of the client area. Please note: This
|
||
15 years ago
|
* differs from the behavior of TQWidget::setGeometry()!
|
||
15 years ago
|
*/
|
||
15 years ago
|
void setInternalGeometry( const TQRect& newGeomety );
|
||
15 years ago
|
|
||
|
/**
|
||
13 years ago
|
* Returns the frame geometry of this window or of the parent if there is any...
|
||
15 years ago
|
*/
|
||
15 years ago
|
TQRect externalGeometry() const;
|
||
15 years ago
|
|
||
|
/**
|
||
13 years ago
|
* Sets the geometry of the frame of this MDI child window. The top left
|
||
15 years ago
|
* position of the argument is the position of the top left point of the
|
||
14 years ago
|
* frame in its parent coordinates and the arguments width and height is
|
||
15 years ago
|
* the width and height of the widget frame. Please note: This differs
|
||
15 years ago
|
* from the behavior of TQWidget::setGeometry()!
|
||
15 years ago
|
*/
|
||
15 years ago
|
void setExternalGeometry( const TQRect& newGeomety );
|
||
15 years ago
|
|
||
|
/**
|
||
|
* You should override this function in the derived class.
|
||
|
*/
|
||
15 years ago
|
virtual TQPixmap* myIconPtr();
|
||
15 years ago
|
|
||
|
/**
|
||
|
* Minimizes this window when it is attached to the Mdi manager.
|
||
|
* Otherwise has no effect
|
||
|
*/
|
||
|
virtual void minimize( bool bAnimate );
|
||
|
|
||
|
/**
|
||
|
* Maximizes this window when it is attached to the Mdi manager.
|
||
|
* Otherwise has no effect
|
||
|
*/
|
||
|
virtual void maximize( bool bAnimate );
|
||
|
|
||
|
/**
|
||
13 years ago
|
* Returns the geometry that will be restored by calling restore().
|
||
15 years ago
|
*/
|
||
15 years ago
|
TQRect restoreGeometry();
|
||
15 years ago
|
|
||
|
/**
|
||
13 years ago
|
* Sets the geometry that will be restored by calling restore().
|
||
15 years ago
|
*/
|
||
15 years ago
|
void setRestoreGeometry( const TQRect& newRestGeo );
|
||
15 years ago
|
|
||
|
/**
|
||
|
* Switches interposing in event loop of all current child widgets off.
|
||
|
*/
|
||
|
void removeEventFilterForAllChildren();
|
||
|
|
||
|
/**
|
||
|
* Internally used for setting an ID for the 'Window' menu entry
|
||
|
*/
|
||
|
void setWindowMenuID( int id );
|
||
|
|
||
|
/**
|
||
|
* Sets the minimum size of the widget to w by h pixels.
|
||
|
* It extends it base clase method in a way that the minimum size of
|
||
|
* its childframe (if there is one) will be set, additionally.
|
||
|
*/
|
||
|
virtual void setMinimumSize ( int minw, int minh );
|
||
|
|
||
|
/**
|
||
|
* Sets the maximum size of the widget to w by h pixels.
|
||
|
* It extends it base clase method in a way that the maximum size of
|
||
|
* its childframe (if there is one) will be set, additionally.
|
||
|
*/
|
||
|
virtual void setMaximumSize ( int maxw, int maxh );
|
||
|
|
||
|
/**
|
||
|
* Returns if this is added as MDI tool-view
|
||
|
*/
|
||
|
inline bool isToolView() const { return m_bToolView; }
|
||
|
|
||
|
/**
|
||
|
* Remember the current time
|
||
|
*/
|
||
|
inline void updateTimeStamp()
|
||
|
{
|
||
13 years ago
|
m_time.setDate( TQDate::currentDate() );
|
||
15 years ago
|
m_time.setTime( TQTime::currentTime() );
|
||
15 years ago
|
}
|
||
|
|
||
|
/**
|
||
|
* Recall a previously remembered time, i.e. the value of m_time
|
||
|
*/
|
||
15 years ago
|
inline const TQDateTime& getTimeStamp() const { return m_time; }
|
||
15 years ago
|
|
||
|
public slots:
|
||
|
/**
|
||
|
* Attaches this window to the Mdi manager.
|
||
|
* It calls the KMdiMainFrm attachWindow function , so if you have a pointer
|
||
|
* to this KMdiMainFrm you'll be faster calling that function.
|
||
|
*/
|
||
|
virtual void attach();
|
||
|
|
||
|
/**
|
||
|
* Detaches this window from the Mdi manager.
|
||
|
* It calls the KMdiMainFrm detachWindow function , so if you have a pointer
|
||
|
* to this KMdiMainFrm you'll be faster calling that function.
|
||
|
*/
|
||
|
virtual void detach();
|
||
|
|
||
|
/**
|
||
|
* Mimimizes the MDI view. If attached, the covering childframe widget is minimized (only a mini widget
|
||
|
* showing the caption bar and the system buttons will remain visible). If detached, it will use the
|
||
15 years ago
|
* minimize of the underlying system ( TQWidget::showMinimized ).
|
||
15 years ago
|
*/
|
||
|
virtual void minimize();
|
||
|
|
||
|
/**
|
||
|
* Maximizes the MDI view. If attached, this widget will fill the whole MDI view area widget. The system buttons
|
||
|
* move to the main menubar (if set by KMdiMainFrm::setMenuForSDIModeSysButtons ).
|
||
15 years ago
|
* If detached, it will use the minimize of the underlying system ( TQWidget::showMaximized ).
|
||
15 years ago
|
*/
|
||
|
virtual void maximize();
|
||
|
|
||
|
/**
|
||
|
* Restores this window to its normal size. Also known as 'normalize'.
|
||
|
*/
|
||
|
virtual void restore();
|
||
|
|
||
|
/**
|
||
|
* Internally called, if KMdiMainFrm::attach is called.
|
||
|
* Actually, only the caption of the covering childframe is set.
|
||
|
*/
|
||
|
virtual void youAreAttached( KMdiChildFrm *lpC );
|
||
|
|
||
|
/**
|
||
|
* Internally called, if KMdiMainFrm::detach is called.
|
||
|
* Some things for going toplevel will be done here.
|
||
|
*/
|
||
|
virtual void youAreDetached();
|
||
|
|
||
|
/**
|
||
|
* Called if someone click on the "Window" menu item for this child frame window
|
||
|
*/
|
||
|
virtual void slot_clickedInWindowMenu();
|
||
|
|
||
|
/**
|
||
|
* Called if someone click on the "Dock/Undock..." menu item for this child frame window
|
||
|
*/
|
||
|
virtual void slot_clickedInDockMenu();
|
||
|
|
||
|
/**
|
||
14 years ago
|
* Calls TQWidget::show but also for it's parent widget if attached
|
||
15 years ago
|
*/
|
||
|
virtual void show();
|
||
|
|
||
|
/**
|
||
14 years ago
|
* Calls TQWidget::hide() or it's parent widget hide() if attached
|
||
15 years ago
|
*/
|
||
|
virtual void hide();
|
||
|
|
||
|
/**
|
||
14 years ago
|
* Calls TQWidget::raise() or it's parent widget raise() if attached
|
||
15 years ago
|
*/
|
||
|
virtual void raise();
|
||
|
|
||
|
/**
|
||
|
* Overridden from its base class method. Emits a signal KMdiChildView::isMinimizedNow , additionally.
|
||
|
* Note that this method is not used by an external windows manager call on system minimizing.
|
||
|
*/
|
||
|
virtual void showMinimized();
|
||
|
|
||
|
/**
|
||
|
* Overridden from its base class method. Emits a signal KMdiChildView::isMaximizedNow , additionally.
|
||
|
* Note that this method is not used by an external windows manager call on system maximizing.
|
||
|
*/
|
||
|
virtual void showMaximized();
|
||
|
|
||
|
/**
|
||
|
* Overridden from its base class method. Emits a signal KMdiChildView::isRestoredNow , additionally.
|
||
|
* Note that this method is not used by an external windows manager call on system normalizing.
|
||
|
*/
|
||
|
virtual void showNormal();
|
||
|
|
||
|
|
||
|
protected:
|
||
|
/**
|
||
|
* Ignores the event and calls KMdiMainFrm::childWindowCloseRequest instead. This is because the
|
||
|
* mainframe has control over the views. Therefore the MDI view has to request the mainframe for a close.
|
||
|
*/
|
||
15 years ago
|
virtual void closeEvent( TQCloseEvent *e );
|
||
15 years ago
|
|
||
|
/**
|
||
14 years ago
|
* It only catches TQEvent::KeyPress events there. If a TQt::Key_Tab is pressed, the internal MDI focus
|
||
15 years ago
|
* handling is called. That means if the last focusable child widget of this is called, it will jump to the
|
||
|
* first focusable child widget of this.
|
||
|
* See KMdiChildView::setFirstFocusableChildWidget and KMdiChildView::lastFirstFocusableChildWidget
|
||
|
*/
|
||
15 years ago
|
virtual bool eventFilter( TQObject *obj, TQEvent *e );
|
||
15 years ago
|
|
||
|
/**
|
||
|
* If attached, the childframe will be activated and the MDI taskbar button will be pressed. Additionally, the
|
||
|
* memorized old focused child widget of this is focused again.
|
||
|
* Sends the focusInEventOccurs signal before changing the focus and the
|
||
|
* gotFocus signal after changing the focus.
|
||
|
*/
|
||
15 years ago
|
virtual void focusInEvent( TQFocusEvent *e );
|
||
15 years ago
|
|
||
|
/**
|
||
|
* Send the lostFocus signal
|
||
|
*/
|
||
15 years ago
|
virtual void focusOutEvent( TQFocusEvent *e );
|
||
15 years ago
|
|
||
|
/**
|
||
|
* Internally used for the minimize/maximize/restore mechanism when in attach mode.
|
||
|
*/
|
||
15 years ago
|
virtual void resizeEvent( TQResizeEvent *e );
|
||
15 years ago
|
|
||
15 years ago
|
void trackIconAndCaptionChanges( TQWidget *view );
|
||
15 years ago
|
|
||
|
protected slots:
|
||
|
void slot_childDestroyed();
|
||
|
|
||
|
signals:
|
||
|
/**
|
||
|
* Internally used by KMdiChildView::attach to send it as command to the mainframe.
|
||
|
*/
|
||
|
void attachWindow( KMdiChildView*, bool );
|
||
|
|
||
|
/**
|
||
|
* Internally used by KMdiChildView::detach to send it as command to the mainframe.
|
||
|
*/
|
||
|
void detachWindow( KMdiChildView*, bool );
|
||
|
|
||
|
/**
|
||
|
* Is sent when this MDI child view is going to receive focus (before actually changing the focus).
|
||
|
* Internally used to send information to the mainframe that this MDI child view is focused.
|
||
|
* See KMdiChildView::focusInEvent
|
||
|
*/
|
||
|
void focusInEventOccurs( KMdiChildView* );
|
||
|
|
||
|
/**
|
||
|
* Is sent when this MDI child has received the focus (after actually changing the focus).
|
||
|
* See KMdiChildView::focusInEvent
|
||
|
*/
|
||
|
void gotFocus( KMdiChildView* );
|
||
|
|
||
|
/**
|
||
|
* Is sent when this MDI child was set to the activate view of all MDI views (after actually changing the focus).
|
||
|
* See KMdiChildView::activate
|
||
|
*/
|
||
|
void activated( KMdiChildView* );
|
||
|
|
||
|
/** Is sent when this MDI child view has lost the focus (after actually changing the focus).
|
||
|
* See KMdiChildView::focusOutEvent
|
||
|
*/
|
||
|
void lostFocus( KMdiChildView* );
|
||
|
|
||
|
/** Is sent when this MDI child view was deactivated (after actually changing the focus).
|
||
|
* See KMdiChildView::focusOutEvent
|
||
|
*/
|
||
|
void deactivated( KMdiChildView* );
|
||
|
|
||
|
/**
|
||
|
* Internally used to send information to the mainframe that this MDI child view wants to be closed.
|
||
|
* See KMdiChildView::closeEvent and KMdiMainFrm::closeWindow
|
||
|
*/
|
||
|
void childWindowCloseRequest( KMdiChildView* );
|
||
|
|
||
|
/**
|
||
|
* Emitted when the window caption is changed via KMdiChildView::setCaption or KMdiChildView::setMDICaption
|
||
|
*/
|
||
15 years ago
|
void windowCaptionChanged( const TQString& );
|
||
15 years ago
|
|
||
|
/**
|
||
|
* Emitted when the window caption is changed via KMdiChildView::setTabCaption or KMdiChildView::setMDICaption
|
||
|
*/
|
||
15 years ago
|
void tabCaptionChanged( const TQString& );
|
||
15 years ago
|
|
||
|
/**
|
||
|
* Internally used to send information to the mainframe that this MDI view is maximized now.
|
||
|
* Usually, the mainframe switches system buttons.
|
||
|
*/
|
||
|
void mdiParentNowMaximized( bool );
|
||
|
|
||
|
/**
|
||
|
* Is automatically emitted when slot_clickedInWindowMenu is called
|
||
|
*/
|
||
|
void clickedInWindowMenu( int );
|
||
|
|
||
|
/**
|
||
|
* Is automatically emitted when slot_clickedInDockMenu is called
|
||
|
*/
|
||
|
void clickedInDockMenu( int );
|
||
|
|
||
|
/**
|
||
|
* Signals this has been maximized
|
||
|
*/
|
||
|
void isMaximizedNow();
|
||
|
|
||
|
/**
|
||
|
* Signals this has been minimized
|
||
|
*/
|
||
|
void isMinimizedNow();
|
||
|
|
||
|
/**
|
||
|
* Signals this has been restored (normalized)
|
||
|
*/
|
||
|
void isRestoredNow();
|
||
|
|
||
|
/**
|
||
|
* Signals this has been attached
|
||
|
*/
|
||
|
void isAttachedNow();
|
||
|
|
||
|
/**
|
||
|
* Signals this has been detached
|
||
|
*/
|
||
|
void isDetachedNow();
|
||
|
|
||
15 years ago
|
void iconUpdated( TQWidget*, TQPixmap );
|
||
|
void captionUpdated( TQWidget*, const TQString& );
|
||
15 years ago
|
|
||
|
|
||
|
private:
|
||
|
KMdiChildViewPrivate *d;
|
||
15 years ago
|
TQWidget *m_trackChanges;
|
||
15 years ago
|
};
|
||
|
|
||
|
inline KMdiChildFrm *KMdiChildView::mdiParent() const
|
||
|
{
|
||
14 years ago
|
TQWidget * pw = parentWidget();
|
||
15 years ago
|
if ( pw != 0L )
|
||
|
if ( pw->inherits( "KMdiChildFrm" ) )
|
||
|
return ( KMdiChildFrm * ) pw;
|
||
|
return 0L;
|
||
|
}
|
||
|
|
||
|
#endif //_KMDICHILDVIEW_H_
|
||
|
|
||
14 years ago
|
// kate: space-indent off; replace-tabs off; indent-mode csands; tab-width 4;
|