• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • KDevelop Generic Shell
 

KDevelop Generic Shell

  • src
multibuffer.h
1 /*
2  * KDevelop Multiple Buffer Support
3  *
4  * Copyright (c) 2005 Adam Treat <treat@kde.org>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU Library General Public License as
8  * published by the Free Software Foundation; either version 2 of the
9  * License, or (at your option) any later version.
10  *
11  * This program 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
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public
17  * License along with this program; if not, write to the
18  * Free Software Foundation, Inc.,
19  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20  */
21 #ifndef MULTIBUFFER_H
22 #define MULTIBUFFER_H
23 
24 #include <tqpair.h>
25 #include <tqsplitter.h>
26 #include <tqguardedptr.h>
27 
28 namespace KParts
29 {
30 class Part;
31 class Factory;
32 class ReadOnlyPart;
33 }
34 
35 class KURL;
36 
37 typedef TQMap< KURL, KParts::Part* > BufferMap;
38 typedef TQMap< KParts::Part*, TQPair<int, int> > ActivationMap;
39 
40 class MultiBuffer : public TQSplitter
41 {
42  Q_OBJECT
43 
44 public:
45  MultiBuffer( TQWidget * parent = 0 );
46  virtual ~MultiBuffer();
47 
48  KParts::Part *activeBuffer() const;
49  bool hasURL( const KURL &url ) const;
50  bool hasPart( KParts::Part *part );
51  int numberOfBuffers() const;
52  bool isActivated() const;
53  void setDelayedActivation( bool delayed );
54 
55  KParts::Part* createPart( const TQString &mimeType,
56  const TQString &partType,
57  const TQString &className,
58  const TQString &preferredName = TQString() );
59 
60  KParts::Part* openURL( const KURL &url );
61  bool closeURL( const KURL &url );
62 
63  void registerURL( const KURL &url, KParts::Part *part );
64  void registerDelayedActivation( KParts::Part *part, int line, int col );
65 
66  void updateUrlForPart( KParts::Part *part, KURL url );
67 
68 public slots:
69  virtual void show();
70  virtual void setOrientation( Qt::Orientation );
71  void activePartChanged( const KURL &url );
72 
73 protected:
74  virtual void focusInEvent( TQFocusEvent *ev );
75 
76 private:
77  KParts::Part* createPart( const KURL &url );
78 
79 private:
80  BufferMap m_buffers;
81  TQGuardedPtr<KParts::Factory> m_editorFactory;
82  ActivationMap m_delayedActivation;
83  bool m_delayActivate;
84  bool m_activated;
85  TQGuardedPtr<KParts::Part> m_activeBuffer;
86 };
87 
88 #endif
89 
90 // kate: space-indent on; indent-width 4; tab-width 4; replace-tabs on
KParts
Definition: mainwindowshare.h:24

KDevelop Generic Shell

Skip menu "KDevelop Generic Shell"
  • Main Page
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

KDevelop Generic Shell

Skip menu "KDevelop Generic Shell"
  • buildtools
  •   lib
  •     base
  •     parsers
  •       autotools
  •       qmake
  •     widgets
  •   api
  • languages
  •   lib
  •     debugger
  •     designer_integration
  •     interfaces
  • lib
  •   catalog
  •   interfaces
  •     extensions
  •     external
  •     extras
  •   util
  •   widgets
  •     propeditor
  • parts
  •   documentation
  •     interfaces
  • src
  •   profileengine
  •     lib
Generated for KDevelop Generic Shell by doxygen 1.8.13
This website is maintained by Timothy Pearson.