home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2009 February / PCWFEB09.iso / Software / Linux / SLAX 6.0.8 / slax-6.0.8.iso / slax / base / 006-devel.lzm / usr / include / kate / viewmanager.h < prev   
Encoding:
C/C++ Source or Header  |  2005-10-10  |  2.0 KB  |  90 lines

  1. /* This file is part of the KDE project
  2.    Copyright (C) 2001 Christoph Cullmann <cullmann@kde.org>
  3.  
  4.    This library is free software; you can redistribute it and/or
  5.    modify it under the terms of the GNU Library General Public
  6.    License version 2 as published by the Free Software Foundation.
  7.  
  8.    This library is distributed in the hope that it will be useful,
  9.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  10.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  11.    Library General Public License for more details.
  12.  
  13.    You should have received a copy of the GNU Library General Public License
  14.    along with this library; see the file COPYING.LIB.  If not, write to
  15.    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  16.    Boston, MA 02110-1301, USA.
  17. */
  18.  
  19. #ifndef _KATE_VIEWMANAGER_INCLUDE_
  20. #define _KATE_VIEWMANAGER_INCLUDE_
  21.  
  22. #include <qobject.h>
  23. #include <kurl.h>
  24.  
  25. namespace Kate
  26. {
  27.  
  28. class View;
  29.  
  30. /**
  31.  * Interface to the viewmanager
  32.  */
  33. class KDE_EXPORT ViewManager : public QObject
  34. {
  35.   friend class PrivateViewManager;
  36.  
  37.   Q_OBJECT
  38.  
  39.   public:
  40.     /**
  41.      * Construtor, should not interest, internal usage
  42.      */
  43.     ViewManager (void *viewManager);
  44.     
  45.     /**
  46.      * Desctructor
  47.      */
  48.     virtual ~ViewManager ();
  49.       
  50.   public slots: /*these are slots for kjs*/
  51.     /**
  52.      * Returns a pointer to the currently active view
  53.      * @return View active view
  54.      */
  55.     Kate::View *activeView ();
  56.  
  57.     /**
  58.      * Activates the view with the corresponding documentNumber
  59.      * @param documentNumber the document's number
  60.      */
  61.     void activateView ( uint documentNumber );
  62.  
  63.     /**
  64.      * Opens the file pointed to by URL
  65.      * @param url url to the file
  66.      */
  67.     void openURL (const KURL &url);     
  68.  
  69.   #undef signals
  70.   #define signals public
  71.   signals:
  72.   #undef signals
  73.   #define signals protected   
  74.  
  75.     /**
  76.      * Active view has changed
  77.      */
  78.     void viewChanged ();
  79.     
  80.   private:
  81.     /**
  82.      * REALLY PRIVATE ;)
  83.      */
  84.     class PrivateViewManager *d;
  85. };
  86.  
  87. }
  88.  
  89. #endif
  90.