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

tdeparts

  • tdeparts
partmanager.h
1 // -*- mode: c++; c-basic-offset: 2 -*-
2 /* This file is part of the KDE project
3  Copyright (C) 1999 Simon Hausmann <hausmann@kde.org>
4  (C) 1999 David Faure <faure@kde.org>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License as published by the Free Software Foundation; either
9  version 2 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Library General Public License for more details.
15 
16  You should have received a copy of the GNU Library General Public License
17  along with this library; see the file COPYING.LIB. If not, write to
18  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  Boston, MA 02110-1301, USA.
20 */
21 #ifndef __kpartmanager_h__
22 #define __kpartmanager_h__
23 
24 #include <tqobject.h>
25 #include <tqwidget.h>
26 #include <tqptrlist.h>
27 
28 #include <tdelibs_export.h>
29 
30 class TDEInstance;
31 
32 namespace KParts
33 {
34 
35 class Part;
36 
37 class PartManagerPrivate;
38 
50 class TDEPARTS_EXPORT PartManager : public TQObject
51 {
52  Q_OBJECT
53  TQ_ENUMS( SelectionPolicy )
54  TQ_PROPERTY( SelectionPolicy selectionPolicy READ selectionPolicy WRITE setSelectionPolicy )
55  TQ_PROPERTY( bool allowNestedParts READ allowNestedParts WRITE setAllowNestedParts )
56  TQ_PROPERTY( bool ignoreScrollBars READ ignoreScrollBars WRITE setIgnoreScrollBars )
57 public:
59  enum SelectionPolicy { Direct, TriState };
60 
67  enum Reason { ReasonLeftClick = 100, ReasonMidClick, ReasonRightClick, NoReason };
68 
77  PartManager( TQWidget * parent, const char * name = 0L );
87  PartManager( TQWidget * topLevel, TQObject *parent, const char *name = 0 );
88  virtual ~PartManager();
89 
93  void setSelectionPolicy( SelectionPolicy policy );
97  SelectionPolicy selectionPolicy() const;
98 
111  void setAllowNestedParts( bool allow );
115  bool allowNestedParts() const;
116 
125  void setIgnoreScrollBars( bool ignore );
129  bool ignoreScrollBars() const;
130 
136  void setActivationButtonMask( short int buttonMask );
140  short int activationButtonMask() const;
141 
145  virtual bool eventFilter( TQObject *obj, TQEvent *ev );
146 
154  virtual void addPart( Part *part, bool setActive = true );
155 
161  virtual void removePart( Part *part );
162 
168  virtual void replacePart( Part * oldPart, Part * newPart, bool setActive = true );
169 
178  virtual void setActivePart( Part *part, TQWidget *widget = 0L );
179 
183  virtual Part *activePart() const;
184 
188  virtual TQWidget *activeWidget() const;
189 
198  virtual void setSelectedPart( Part *part, TQWidget *widget = 0L );
199 
203  virtual Part *selectedPart() const;
204 
208  virtual TQWidget *selectedWidget() const;
209 
213  const TQPtrList<Part> *parts() const;
214 
222  void addManagedTopLevelWidget( const TQWidget *topLevel );
227  void removeManagedTopLevelWidget( const TQWidget *topLevel );
228 
234  int reason() const;
235 
236 signals:
241  void partAdded( KParts::Part *part );
246  void partRemoved( KParts::Part *part );
251  void activePartChanged( KParts::Part *newPart );
252 
253 protected:
259  virtual void setActiveInstance( TDEInstance * instance );
260 
261 protected slots:
265  void slotObjectDestroyed();
266 
270  void slotWidgetDestroyed();
271 
275  void slotManagedTopLevelWidgetDestroyed();
276 private:
277  Part * findPartFromWidget( TQWidget * widget, const TQPoint &pos );
278  Part * findPartFromWidget( TQWidget * widget );
279 
280 protected:
281  virtual void virtual_hook( int id, void* data );
282 private:
283  PartManagerPrivate *d;
284 };
285 
286 }
287 
288 #endif
289 
KParts::Part
Base class for parts.
Definition: part.h:181
KParts::PartManager::Reason
Reason
This extends TQFocusEvent::Reason with the non-focus-event reasons for partmanager to activate a part...
Definition: partmanager.h:67
KParts::PartManager::SelectionPolicy
SelectionPolicy
Selection policy. The default policy of a PartManager is Direct.
Definition: partmanager.h:59
KParts::PartManager
The part manager is an object which knows about a collection of parts (even nested ones) and handles ...
Definition: partmanager.h:50
KParts
Definition: browserextension.cpp:64
TDEInstance

tdeparts

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

tdeparts

Skip menu "tdeparts"
  • 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 tdeparts by doxygen 1.8.11
This website is maintained by Timothy Pearson.