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

kmdi

  • kmdi
kmdichildview.h
1 //----------------------------------------------------------------------------
2 // filename : kmdichildview.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 _KMDI_CHILD_VIEW_H_
32 #define _KMDI_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 "kmdichildfrm.h"
41 
42 class KMdiChildViewPrivate;
43 
108 class KMDI_EXPORT KMdiChildView : public TQWidget
109 {
110  friend class KMdiMainFrm;
111  friend class KMdiChildFrm;
112  Q_OBJECT
113 
114  // attributes
115 protected:
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 
157 private:
161  bool m_bToolView;
162 
168  bool m_bInterruptActivation;
169 
173  bool m_bMainframesActivateViewIsPending;
174 
178  bool m_bFocusInEventIsPending;
179 
180  // methods
181 public:
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 
370 public 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 
460 protected:
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 
495 protected slots:
496  void slot_childDestroyed();
497 
498 signals:
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 
599 private:
600  KMdiChildViewPrivate *d;
601  TQWidget *m_trackChanges;
602 };
603 
604 inline 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 //_KMDICHILDVIEW_H_
614 
615 // kate: space-indent off; replace-tabs off; indent-mode csands; tab-width 4;

kmdi

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

kmdi

Skip menu "kmdi"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kmdi by doxygen 1.8.1.2
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |