#include <tdemdichildview.h>
Inherits TQWidget.
Public Slots | |
virtual void | attach () |
virtual void | detach () |
virtual void | minimize () |
virtual void | maximize () |
virtual void | restore () |
virtual void | youAreAttached (KMdiChildFrm *lpC) |
virtual void | youAreDetached () |
virtual void | slot_clickedInWindowMenu () |
virtual void | slot_clickedInDockMenu () |
virtual void | show () |
virtual void | hide () |
virtual void | raise () |
virtual void | showMinimized () |
virtual void | showMaximized () |
virtual void | showNormal () |
Signals | |
void | attachWindow (KMdiChildView *, bool) |
void | detachWindow (KMdiChildView *, bool) |
void | focusInEventOccurs (KMdiChildView *) |
void | gotFocus (KMdiChildView *) |
void | activated (KMdiChildView *) |
void | lostFocus (KMdiChildView *) |
void | deactivated (KMdiChildView *) |
void | childWindowCloseRequest (KMdiChildView *) |
void | windowCaptionChanged (const TQString &) |
void | tabCaptionChanged (const TQString &) |
void | mdiParentNowMaximized (bool) |
void | clickedInWindowMenu (int) |
void | clickedInDockMenu (int) |
void | isMaximizedNow () |
void | isMinimizedNow () |
void | isRestoredNow () |
void | isAttachedNow () |
void | isDetachedNow () |
void | iconUpdated (TQWidget *, TQPixmap) |
void | captionUpdated (TQWidget *, const TQString &) |
Public Member Functions | |
KMdiChildView (const TQString &caption, TQWidget *parentWidget=0L, const char *name=0L, WFlags f=0) | |
KMdiChildView (TQWidget *parentWidget=0L, const char *name=0L, WFlags f=0) | |
~KMdiChildView () | |
void | activate () |
void | setFirstFocusableChildWidget (TQWidget *) |
void | setLastFocusableChildWidget (TQWidget *) |
TQWidget * | focusedChildWidget () |
bool | isAttached () const |
const TQString & | caption () const |
const TQString & | tabCaption () const |
virtual void | setCaption (const TQString &szCaption) |
virtual void | setTabCaption (const TQString &caption) |
virtual void | setMDICaption (const TQString &caption) |
KMdiChildFrm * | mdiParent () const |
bool | isMinimized () const |
bool | isMaximized () const |
TQRect | internalGeometry () const |
void | setInternalGeometry (const TQRect &newGeomety) |
TQRect | externalGeometry () const |
void | setExternalGeometry (const TQRect &newGeomety) |
virtual TQPixmap * | myIconPtr () |
virtual void | minimize (bool bAnimate) |
virtual void | maximize (bool bAnimate) |
TQRect | restoreGeometry () |
void | setRestoreGeometry (const TQRect &newRestGeo) |
void | removeEventFilterForAllChildren () |
void | setWindowMenuID (int id) |
virtual void | setMinimumSize (int minw, int minh) |
virtual void | setMaximumSize (int maxw, int maxh) |
bool | isToolView () const |
void | updateTimeStamp () |
const TQDateTime & | getTimeStamp () const |
Protected Slots | |
void | slot_childDestroyed () |
Protected Member Functions | |
virtual void | closeEvent (TQCloseEvent *e) |
virtual bool | eventFilter (TQObject *obj, TQEvent *e) |
virtual void | focusInEvent (TQFocusEvent *e) |
virtual void | focusOutEvent (TQFocusEvent *e) |
virtual void | resizeEvent (TQResizeEvent *e) |
void | trackIconAndCaptionChanges (TQWidget *view) |
Protected Attributes | |
TQString | m_szCaption |
TQString | m_sTabCaption |
TQWidget * | m_focusedChildWidget |
TQWidget * | m_firstFocusableChildWidget |
TQWidget * | m_lastFocusableChildWidget |
int | m_windowMenuID |
bool | m_stateChanged |
TQDateTime | m_time |
Friends | |
class | KMdiMainFrm |
class | KMdiChildFrm |
Detailed Description
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.) So remember that the KMdiChildView::parent pointer may change, and may be 0L, too.
There are 2 possibilities for you to put your widgets under MDI control:
Either you inherit all the views from KMdiChildView:
or you wrap them by a KMdiChildView somehow like this:
Definition at line 108 of file tdemdichildview.h.
Constructor & Destructor Documentation
◆ KMdiChildView() [1/2]
KMdiChildView::KMdiChildView | ( | const TQString & | caption, |
TQWidget * | parentWidget = 0L , |
||
const char * | name = 0L , |
||
WFlags | f = 0 |
||
) |
Constructor.
Definition at line 47 of file tdemdichildview.cpp.
◆ KMdiChildView() [2/2]
KMdiChildView::KMdiChildView | ( | TQWidget * | parentWidget = 0L , |
const char * | name = 0L , |
||
WFlags | f = 0 |
||
) |
Constructor sets "Unnamed" as default caption.
Definition at line 76 of file tdemdichildview.cpp.
◆ ~KMdiChildView()
KMdiChildView::~KMdiChildView | ( | ) |
Destructor.
Definition at line 100 of file tdemdichildview.cpp.
Member Function Documentation
◆ activate()
void KMdiChildView::activate | ( | ) |
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!
Definition at line 420 of file tdemdichildview.cpp.
◆ activated
|
signal |
Is sent when this MDI child was set to the activate view of all MDI views (after actually changing the focus).
◆ attach
|
virtualslot |
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.
Definition at line 294 of file tdemdichildview.cpp.
◆ attachWindow
|
signal |
Internally used by KMdiChildView::attach to send it as command to the mainframe.
◆ caption()
|
inline |
Returns the caption of the child window (different from the caption on the button in the taskbar)
Definition at line 232 of file tdemdichildview.h.
◆ childWindowCloseRequest
|
signal |
Internally used to send information to the mainframe that this MDI child view wants to be closed.
◆ clickedInDockMenu
|
signal |
Is automatically emitted when slot_clickedInDockMenu is called.
◆ clickedInWindowMenu
|
signal |
Is automatically emitted when slot_clickedInWindowMenu is called.
◆ closeEvent()
|
protectedvirtual |
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.
Definition at line 387 of file tdemdichildview.cpp.
◆ deactivated
|
signal |
Is sent when this MDI child view was deactivated (after actually changing the focus).
◆ detach
|
virtualslot |
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.
Definition at line 301 of file tdemdichildview.cpp.
◆ detachWindow
|
signal |
Internally used by KMdiChildView::detach to send it as command to the mainframe.
◆ eventFilter()
|
protectedvirtual |
It only catches TQEvent::KeyPress events there.
If a TQt::Key_Tab is pressed, the internal MDI focus 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
Definition at line 522 of file tdemdichildview.cpp.
◆ externalGeometry()
TQRect KMdiChildView::externalGeometry | ( | ) | const |
Returns the frame geometry of this window or of the parent if there is any...
Definition at line 183 of file tdemdichildview.cpp.
◆ focusedChildWidget()
TQWidget * KMdiChildView::focusedChildWidget | ( | ) |
Returns the current focused child widget of this widget.
Definition at line 662 of file tdemdichildview.cpp.
◆ focusInEvent()
|
protectedvirtual |
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.
Definition at line 402 of file tdemdichildview.cpp.
◆ focusInEventOccurs
|
signal |
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
◆ focusOutEvent()
|
protectedvirtual |
Send the lostFocus signal.
Definition at line 460 of file tdemdichildview.cpp.
◆ getTimeStamp()
|
inline |
Recall a previously remembered time, i.e.
the value of m_time
Definition at line 368 of file tdemdichildview.h.
◆ gotFocus
|
signal |
Is sent when this MDI child has received the focus (after actually changing the focus).
◆ hide
|
virtualslot |
Calls TQWidget::hide() or it's parent widget hide() if attached.
Definition at line 756 of file tdemdichildview.cpp.
◆ internalGeometry()
TQRect KMdiChildView::internalGeometry | ( | ) | const |
Returns the geometry of this MDI child window as TQWidget::geometry() does.
Definition at line 113 of file tdemdichildview.cpp.
◆ isAttached()
|
inline |
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.
Definition at line 227 of file tdemdichildview.h.
◆ isAttachedNow
|
signal |
Signals this has been attached.
◆ isDetachedNow
|
signal |
Signals this has been detached.
◆ isMaximized()
bool KMdiChildView::isMaximized | ( | ) | const |
Tells if the window is minimized when attached to the Mdi manager, otherwise returns false.
Definition at line 318 of file tdemdichildview.cpp.
◆ isMaximizedNow
|
signal |
Signals this has been maximized.
◆ isMinimized()
bool KMdiChildView::isMinimized | ( | ) | const |
Tells if the window is minimized when attached to the Mdi manager, or if it is VISIBLE when 'floating'.
Definition at line 308 of file tdemdichildview.cpp.
◆ isMinimizedNow
|
signal |
Signals this has been minimized.
◆ isRestoredNow
|
signal |
Signals this has been restored (normalized)
◆ isToolView()
|
inline |
Returns if this is added as MDI tool-view.
Definition at line 354 of file tdemdichildview.h.
◆ lostFocus
|
signal |
Is sent when this MDI child view has lost the focus (after actually changing the focus).
◆ maximize [1/2]
|
virtualslot |
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 ). If detached, it will use the minimize of the underlying system ( TQWidget::showMaximized ).
Definition at line 269 of file tdemdichildview.cpp.
◆ maximize() [2/2]
|
virtual |
Maximizes this window when it is attached to the Mdi manager.
Otherwise has no effect
Definition at line 248 of file tdemdichildview.cpp.
◆ mdiParent()
|
inline |
Returns the KMdiChildFrm parent widget (or 0 if the window is not attached)
Definition at line 604 of file tdemdichildview.h.
◆ mdiParentNowMaximized
|
signal |
Internally used to send information to the mainframe that this MDI view is maximized now.
Usually, the mainframe switches system buttons.
◆ minimize [1/2]
|
virtualslot |
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 minimize of the underlying system ( TQWidget::showMinimized ).
Definition at line 241 of file tdemdichildview.cpp.
◆ minimize() [2/2]
|
virtual |
Minimizes this window when it is attached to the Mdi manager.
Otherwise has no effect
Definition at line 221 of file tdemdichildview.cpp.
◆ myIconPtr()
|
virtual |
You should override this function in the derived class.
Definition at line 395 of file tdemdichildview.cpp.
◆ raise
|
virtualslot |
Calls TQWidget::raise() or it's parent widget raise() if attached.
Definition at line 766 of file tdemdichildview.cpp.
◆ removeEventFilterForAllChildren()
void KMdiChildView::removeEventFilterForAllChildren | ( | ) |
Switches interposing in event loop of all current child widgets off.
Definition at line 648 of file tdemdichildview.cpp.
◆ resizeEvent()
|
protectedvirtual |
Internally used for the minimize/maximize/restore mechanism when in attach mode.
Definition at line 468 of file tdemdichildview.cpp.
◆ restore
|
virtualslot |
Restores this window to its normal size.
Also known as 'normalize'.
Definition at line 328 of file tdemdichildview.cpp.
◆ restoreGeometry()
TQRect KMdiChildView::restoreGeometry | ( | ) |
Returns the geometry that will be restored by calling restore().
Definition at line 276 of file tdemdichildview.cpp.
◆ setCaption()
|
virtual |
Sets the window caption string...
Calls updateButton on the taskbar button if it has been set.
Definition at line 373 of file tdemdichildview.cpp.
◆ setExternalGeometry()
void KMdiChildView::setExternalGeometry | ( | const TQRect & | newGeomety | ) |
Sets the geometry of the frame of this MDI child window.
The top left position of the argument is the position of the top left point of the frame in its parent coordinates and the arguments width and height is the width and height of the widget frame. Please note: This differs from the behavior of TQWidget::setGeometry()!
Definition at line 190 of file tdemdichildview.cpp.
◆ setFirstFocusableChildWidget()
void KMdiChildView::setFirstFocusableChildWidget | ( | TQWidget * | firstFocusableChildWidget | ) |
Memorizes the first focusable child widget of this widget.
Definition at line 667 of file tdemdichildview.cpp.
◆ setInternalGeometry()
void KMdiChildView::setInternalGeometry | ( | const TQRect & | newGeomety | ) |
Sets the geometry of the client area of this MDI child window.
The top left position of the argument is the position of the top left point of the client area in its parent coordinates and the arguments width and height is the width and height of the client area. Please note: This differs from the behavior of TQWidget::setGeometry()!
Definition at line 136 of file tdemdichildview.cpp.
◆ setLastFocusableChildWidget()
void KMdiChildView::setLastFocusableChildWidget | ( | TQWidget * | lastFocusableChildWidget | ) |
Memorizes the last focusable child widget of this widget.
Definition at line 672 of file tdemdichildview.cpp.
◆ setMaximumSize()
|
virtual |
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.
Definition at line 727 of file tdemdichildview.cpp.
◆ setMDICaption()
|
virtual |
Sets the caption of both the window and the button on the taskbar.
Definition at line 684 of file tdemdichildview.cpp.
◆ setMinimumSize()
|
virtual |
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.
Definition at line 715 of file tdemdichildview.cpp.
◆ setRestoreGeometry()
void KMdiChildView::setRestoreGeometry | ( | const TQRect & | newRestGeo | ) |
Sets the geometry that will be restored by calling restore().
Definition at line 286 of file tdemdichildview.cpp.
◆ setTabCaption()
|
virtual |
Sets the caption of the button referring to this window.
Set a new value of the task bar button caption
Definition at line 678 of file tdemdichildview.cpp.
◆ setWindowMenuID()
void KMdiChildView::setWindowMenuID | ( | int | id | ) |
Internally used for setting an ID for the 'Window' menu entry.
sets an ID
Definition at line 691 of file tdemdichildview.cpp.
◆ show
|
virtualslot |
Calls TQWidget::show but also for it's parent widget if attached.
Definition at line 746 of file tdemdichildview.cpp.
◆ showMaximized
|
virtualslot |
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.
Definition at line 262 of file tdemdichildview.cpp.
◆ showMinimized
|
virtualslot |
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.
Definition at line 234 of file tdemdichildview.cpp.
◆ showNormal
|
virtualslot |
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.
Definition at line 342 of file tdemdichildview.cpp.
◆ slot_clickedInDockMenu
|
virtualslot |
Called if someone click on the "Dock/Undock..." menu item for this child frame window.
called if someone click on the "Dock/Undock..." menu item for this child frame window
Definition at line 708 of file tdemdichildview.cpp.
◆ slot_clickedInWindowMenu
|
virtualslot |
Called if someone click on the "Window" menu item for this child frame window.
called if someone click on the "Window" menu item for this child frame window
Definition at line 699 of file tdemdichildview.cpp.
◆ tabCaption()
|
inline |
Returns the caption of the button on the taskbar.
Definition at line 237 of file tdemdichildview.h.
◆ tabCaptionChanged
|
signal |
Emitted when the window caption is changed via KMdiChildView::setTabCaption or KMdiChildView::setMDICaption.
◆ updateTimeStamp()
|
inline |
Remember the current time.
Definition at line 359 of file tdemdichildview.h.
◆ windowCaptionChanged
|
signal |
Emitted when the window caption is changed via KMdiChildView::setCaption or KMdiChildView::setMDICaption.
◆ youAreAttached
|
virtualslot |
Internally called, if KMdiMainFrm::attach is called.
Actually, only the caption of the covering childframe is set.
Definition at line 350 of file tdemdichildview.cpp.
◆ youAreDetached
|
virtualslot |
Internally called, if KMdiMainFrm::detach is called.
Some things for going toplevel will be done here.
Definition at line 358 of file tdemdichildview.cpp.
Member Data Documentation
◆ m_firstFocusableChildWidget
|
protected |
See KMdiChildView::setFirstFocusableChildWidget.
Definition at line 134 of file tdemdichildview.h.
◆ m_focusedChildWidget
|
protected |
See KMdiChildView::focusedChildWidget.
Definition at line 129 of file tdemdichildview.h.
◆ m_lastFocusableChildWidget
|
protected |
See KMdiChildView::setLastFocusableChildWidget.
Definition at line 139 of file tdemdichildview.h.
◆ m_sTabCaption
|
protected |
See KMdiChildView::tabCaption.
Definition at line 124 of file tdemdichildview.h.
◆ m_stateChanged
|
protected |
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.
Definition at line 150 of file tdemdichildview.h.
◆ m_szCaption
|
protected |
Definition at line 119 of file tdemdichildview.h.
◆ m_time
|
protected |
Holds the time when this view was activated (not only displayed) for the last time.
Definition at line 155 of file tdemdichildview.h.
◆ m_windowMenuID
|
protected |
Every child view window has an temporary ID in the Window menu of the main frame.
Definition at line 144 of file tdemdichildview.h.
The documentation for this class was generated from the following files: