• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdemdi
 

tdemdi

  • tdemdi
tdemdichildview.h
1//----------------------------------------------------------------------------
2// filename : tdemdichildview.h
3//----------------------------------------------------------------------------
4// Project : KDE MDI extension
5//
6// begin : 07/1999 by Szymon Stefanek as part of kvirc
7// (an IRC application)
8// changes : 09/1999 by Falk Brettschneider to create an
9// - 06/2000 stand-alone Qt extension set of
10// classes and a Qt-based library
11// 2000-2003 maintained by the KDevelop project
12// patches : 02/2000 by Massimo Morin (mmorin@schedsys.com)
13// */2000 by Lars Beikirch (Lars.Beikirch@gmx.net)
14// 02/2001 by Eva Brucherseifer (eva@rt.e-technik.tu-darmstadt.de)
15// 01/2003 by Jens Zurheide (jens.zurheide@gmx.de)
16//
17// copyright : (C) 1999-2003 by Falk Brettschneider
18// and
19// Szymon Stefanek (stefanek@tin.it)
20// email : falkbr@kdevelop.org (Falk Brettschneider)
21//----------------------------------------------------------------------------
22//
23//----------------------------------------------------------------------------
24//
25// This program is free software; you can redistribute it and/or modify
26// it under the terms of the GNU Library General Public License as
27// published by the Free Software Foundation; either version 2 of the
28// License, or (at your option) any later version.
29//
30//----------------------------------------------------------------------------
31#ifndef _TDEMDI_CHILD_VIEW_H_
32#define _TDEMDI_CHILD_VIEW_H_
33
34#include <tqwidget.h>
35#include <tqpixmap.h>
36#include <tqrect.h>
37#include <tqapplication.h>
38#include <tqdatetime.h>
39
40#include "tdemdichildfrm.h"
41
42class KMdiChildViewPrivate;
43
108class KMDI_EXPORT KMdiChildView : public TQWidget
109{
110 friend class KMdiMainFrm;
111 friend class KMdiChildFrm;
112 TQ_OBJECT
113
114 // attributes
115protected:
119 TQString m_szCaption;
120
124 TQString m_sTabCaption;
125
129 TQWidget* m_focusedChildWidget;
130
134 TQWidget* m_firstFocusableChildWidget;
135
139 TQWidget* m_lastFocusableChildWidget;
140
144 int m_windowMenuID;
145
150 bool m_stateChanged;
151
155 TQDateTime m_time;
156
157private:
161 bool m_bToolView;
162
168 bool m_bInterruptActivation;
169
173 bool m_bMainframesActivateViewIsPending;
174
178 bool m_bFocusInEventIsPending;
179
180 // methods
181public:
185 KMdiChildView( const TQString& caption, TQWidget* parentWidget = 0L, const char* name = 0L, WFlags f = 0 );
186
191 KMdiChildView( TQWidget* parentWidget = 0L, const char* name = 0L, WFlags f = 0 );
192
196 ~KMdiChildView();
197
206 void activate();
207
211 void setFirstFocusableChildWidget( TQWidget* );
212
216 void setLastFocusableChildWidget( TQWidget* );
217
221 TQWidget* focusedChildWidget();
222
227 bool isAttached() const { return ( mdiParent() != 0L ); }
228
232 const TQString& caption() const { return m_szCaption; }
233
237 const TQString& tabCaption() const { return m_sTabCaption; }
238
243 virtual void setCaption( const TQString& szCaption );
244
248 virtual void setTabCaption( const TQString& caption );
249
253 virtual void setMDICaption( const TQString &caption );
254
258 KMdiChildFrm *mdiParent() const;
259
264 bool isMinimized() const;
265
270 bool isMaximized() const;
271
275 TQRect internalGeometry() const;
276
284 void setInternalGeometry( const TQRect& newGeomety );
285
289 TQRect externalGeometry() const;
290
298 void setExternalGeometry( const TQRect& newGeomety );
299
303 virtual TQPixmap* myIconPtr();
304
309 virtual void minimize( bool bAnimate );
310
315 virtual void maximize( bool bAnimate );
316
320 TQRect restoreGeometry();
321
325 void setRestoreGeometry( const TQRect& newRestGeo );
326
330 void removeEventFilterForAllChildren();
331
335 void setWindowMenuID( int id );
336
342 virtual void setMinimumSize ( int minw, int minh );
343
349 virtual void setMaximumSize ( int maxw, int maxh );
350
354 inline bool isToolView() const { return m_bToolView; }
355
359 inline void updateTimeStamp()
360 {
361 m_time.setDate( TQDate::currentDate() );
362 m_time.setTime( TQTime::currentTime() );
363 }
364
368 inline const TQDateTime& getTimeStamp() const { return m_time; }
369
370public slots:
376 virtual void attach();
377
383 virtual void detach();
384
390 virtual void minimize();
391
397 virtual void maximize();
398
402 virtual void restore();
403
408 virtual void youAreAttached( KMdiChildFrm *lpC );
409
414 virtual void youAreDetached();
415
419 virtual void slot_clickedInWindowMenu();
420
424 virtual void slot_clickedInDockMenu();
425
429 virtual void show();
430
434 virtual void hide();
435
439 virtual void raise();
440
445 virtual void showMinimized();
446
451 virtual void showMaximized();
452
457 virtual void showNormal();
458
459
460protected:
465 virtual void closeEvent( TQCloseEvent *e );
466
473 virtual bool eventFilter( TQObject *obj, TQEvent *e );
474
481 virtual void focusInEvent( TQFocusEvent *e );
482
486 virtual void focusOutEvent( TQFocusEvent *e );
487
491 virtual void resizeEvent( TQResizeEvent *e );
492
493 void trackIconAndCaptionChanges( TQWidget *view );
494
495protected slots:
496 void slot_childDestroyed();
497
498signals:
502 void attachWindow( KMdiChildView*, bool );
503
507 void detachWindow( KMdiChildView*, bool );
508
514 void focusInEventOccurs( KMdiChildView* );
515
520 void gotFocus( KMdiChildView* );
521
526 void activated( KMdiChildView* );
527
531 void lostFocus( KMdiChildView* );
532
536 void deactivated( KMdiChildView* );
537
542 void childWindowCloseRequest( KMdiChildView* );
543
547 void windowCaptionChanged( const TQString& );
548
552 void tabCaptionChanged( const TQString& );
553
558 void mdiParentNowMaximized( bool );
559
563 void clickedInWindowMenu( int );
564
568 void clickedInDockMenu( int );
569
573 void isMaximizedNow();
574
578 void isMinimizedNow();
579
583 void isRestoredNow();
584
588 void isAttachedNow();
589
593 void isDetachedNow();
594
595 void iconUpdated( TQWidget*, TQPixmap );
596 void captionUpdated( TQWidget*, const TQString& );
597
598
599private:
600 KMdiChildViewPrivate *d;
601 TQWidget *m_trackChanges;
602};
603
604inline KMdiChildFrm *KMdiChildView::mdiParent() const
605{
606 TQWidget * pw = parentWidget();
607 if ( pw != 0L )
608 if ( pw->inherits( "KMdiChildFrm" ) )
609 return ( KMdiChildFrm * ) pw;
610 return 0L;
611}
612
613#endif //_TDEMDI_CHILD_VIEW_H_
KMdiChildFrm
Internal class.
Definition: tdemdichildfrm.h:131
KMdiChildFrm::resizeEvent
virtual void resizeEvent(TQResizeEvent *)
Reimplemented from the base class.
Definition: tdemdichildfrm.cpp:982
KMdiChildFrm::setRestoreGeometry
void setRestoreGeometry(const TQRect &newRestGeo)
Sets the geometry that will be restored by calling restore().
Definition: tdemdichildfrm.cpp:680
KMdiChildFrm::eventFilter
virtual bool eventFilter(TQObject *, TQEvent *)
Reimplemented from the base class.
Definition: tdemdichildfrm.cpp:1077
KMdiChildFrm::caption
const TQString & caption()
Gets the caption of this mdi child.
Definition: tdemdichildfrm.h:230
KMdiChildFrm::setMinimumSize
virtual void setMinimumSize(int minw, int minh)
Sets the minimum size of the widget to w by h pixels.
Definition: tdemdichildfrm.cpp:1217
KMdiChildFrm::restoreGeometry
TQRect restoreGeometry() const
Returns the geometry that will be restored by calling restore().
Definition: tdemdichildfrm.cpp:673
KMdiChildFrm::setCaption
void setCaption(const TQString &text)
Sets the caption of this window.
Definition: tdemdichildfrm.cpp:687
KMdiChildView
Base class for all your special view windows.
Definition: tdemdichildview.h:109
KMdiChildView::gotFocus
void gotFocus(KMdiChildView *)
Is sent when this MDI child has received the focus (after actually changing the focus).
KMdiChildView::m_szCaption
TQString m_szCaption
See KMdiChildView::caption.
Definition: tdemdichildview.h:119
KMdiChildView::m_lastFocusableChildWidget
TQWidget * m_lastFocusableChildWidget
See KMdiChildView::setLastFocusableChildWidget.
Definition: tdemdichildview.h:139
KMdiChildView::attachWindow
void attachWindow(KMdiChildView *, bool)
Internally used by KMdiChildView::attach to send it as command to the mainframe.
KMdiChildView::lostFocus
void lostFocus(KMdiChildView *)
Is sent when this MDI child view has lost the focus (after actually changing the focus).
KMdiChildView::mdiParentNowMaximized
void mdiParentNowMaximized(bool)
Internally used to send information to the mainframe that this MDI view is maximized now.
KMdiChildView::mdiParent
KMdiChildFrm * mdiParent() const
Returns the KMdiChildFrm parent widget (or 0 if the window is not attached)
Definition: tdemdichildview.h:604
KMdiChildView::m_time
TQDateTime m_time
Holds the time when this view was activated (not only displayed) for the last time.
Definition: tdemdichildview.h:155
KMdiChildView::deactivated
void deactivated(KMdiChildView *)
Is sent when this MDI child view was deactivated (after actually changing the focus).
KMdiChildView::isDetachedNow
void isDetachedNow()
Signals this has been detached.
KMdiChildView::clickedInWindowMenu
void clickedInWindowMenu(int)
Is automatically emitted when slot_clickedInWindowMenu is called.
KMdiChildView::activated
void activated(KMdiChildView *)
Is sent when this MDI child was set to the activate view of all MDI views (after actually changing th...
KMdiChildView::m_stateChanged
bool m_stateChanged
Holds a temporary information about if the MDI view state has changed but is not processed yet (pendi...
Definition: tdemdichildview.h:150
KMdiChildView::m_windowMenuID
int m_windowMenuID
Every child view window has an temporary ID in the Window menu of the main frame.
Definition: tdemdichildview.h:144
KMdiChildView::isAttachedNow
void isAttachedNow()
Signals this has been attached.
KMdiChildView::getTimeStamp
const TQDateTime & getTimeStamp() const
Recall a previously remembered time, i.e.
Definition: tdemdichildview.h:368
KMdiChildView::m_sTabCaption
TQString m_sTabCaption
See KMdiChildView::tabCaption.
Definition: tdemdichildview.h:124
KMdiChildView::isAttached
bool isAttached() const
Returns true if the MDI view is a child window within the MDI mainframe widget or false if the MDI vi...
Definition: tdemdichildview.h:227
KMdiChildView::m_firstFocusableChildWidget
TQWidget * m_firstFocusableChildWidget
See KMdiChildView::setFirstFocusableChildWidget.
Definition: tdemdichildview.h:134
KMdiChildView::windowCaptionChanged
void windowCaptionChanged(const TQString &)
Emitted when the window caption is changed via KMdiChildView::setCaption or KMdiChildView::setMDICapt...
KMdiChildView::isMaximizedNow
void isMaximizedNow()
Signals this has been maximized.
KMdiChildView::tabCaption
const TQString & tabCaption() const
Returns the caption of the button on the taskbar.
Definition: tdemdichildview.h:237
KMdiChildView::detachWindow
void detachWindow(KMdiChildView *, bool)
Internally used by KMdiChildView::detach to send it as command to the mainframe.
KMdiChildView::childWindowCloseRequest
void childWindowCloseRequest(KMdiChildView *)
Internally used to send information to the mainframe that this MDI child view wants to be closed.
KMdiChildView::isToolView
bool isToolView() const
Returns if this is added as MDI tool-view.
Definition: tdemdichildview.h:354
KMdiChildView::clickedInDockMenu
void clickedInDockMenu(int)
Is automatically emitted when slot_clickedInDockMenu is called.
KMdiChildView::caption
const TQString & caption() const
Returns the caption of the child window (different from the caption on the button in the taskbar)
Definition: tdemdichildview.h:232
KMdiChildView::isMinimizedNow
void isMinimizedNow()
Signals this has been minimized.
KMdiChildView::isRestoredNow
void isRestoredNow()
Signals this has been restored (normalized)
KMdiChildView::tabCaptionChanged
void tabCaptionChanged(const TQString &)
Emitted when the window caption is changed via KMdiChildView::setTabCaption or KMdiChildView::setMDIC...
KMdiChildView::focusInEventOccurs
void focusInEventOccurs(KMdiChildView *)
Is sent when this MDI child view is going to receive focus (before actually changing the focus).
KMdiChildView::m_focusedChildWidget
TQWidget * m_focusedChildWidget
See KMdiChildView::focusedChildWidget.
Definition: tdemdichildview.h:129
KMdiChildView::updateTimeStamp
void updateTimeStamp()
Remember the current time.
Definition: tdemdichildview.h:359
KMdiMainFrm
Base class for all your special main frames.
Definition: tdemdimainfrm.h:240

tdemdi

Skip menu "tdemdi"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdemdi

Skip menu "tdemdi"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdemdi by doxygen 1.9.4
This website is maintained by Timothy Pearson.