• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • KDevelop Platform Libraries
  • Sitemap
  • Contact Us
 

sublime

controller.h

00001 /***************************************************************************
00002  *   Copyright 2006-2007 Alexander Dymo  <adymo@kdevelop.org>       *
00003  *                                                                         *
00004  *   This program is free software; you can redistribute it and/or modify  *
00005  *   it under the terms of the GNU Library General Public License as       *
00006  *   published by the Free Software Foundation; either version 2 of the    *
00007  *   License, or (at your option) any later version.                       *
00008  *                                                                         *
00009  *   This program is distributed in the hope that it will be useful,       *
00010  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00011  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00012  *   GNU General Public License for more details.                          *
00013  *                                                                         *
00014  *   You should have received a copy of the GNU Library General Public     *
00015  *   License along with this program; if not, write to the                 *
00016  *   Free Software Foundation, Inc.,                                       *
00017  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
00018  ***************************************************************************/
00019 #ifndef SUBLIMECONTROLLER_H
00020 #define SUBLIMECONTROLLER_H
00021 
00022 #include <QtCore/QObject>
00023 
00024 #include "sublimedefs.h"
00025 #include "sublimeexport.h"
00026 
00027 #include "mainwindowoperator.h"
00028 
00029 
00030 namespace Sublime {
00031 
00032 class Area;
00033 class AreaIndex;
00034 class Document;
00035 class MainWindow;
00036 
00089 class SUBLIME_EXPORT Controller: public QObject, public MainWindowOperator {
00090     Q_OBJECT
00091 public:
00092     Controller(QObject *parent = 0);
00093     ~Controller();
00094 
00096     void addDefaultArea(Area *area);
00097 
00099     const QList<Area*> &defaultAreas() const;
00100 
00102     Area *defaultArea(const QString &id);
00103 
00108     void addMainWindow(MainWindow* mainWindow);
00109 
00112     const QList<MainWindow*> &mainWindows() const;
00113 
00116    const QList<Area*> &areas(int mainWindow) const;
00117 
00120     Area *area(int mainWindow, const QString& id);
00121 
00123     void showArea(Area *area, MainWindow *mainWindow);
00124 
00126     void showArea(const QString& areaTypeId, MainWindow *mainWindow);
00127 
00131     void resetCurrentArea(MainWindow *mainWindow);
00132     
00135     const QList<Area*> &allAreas() const;
00136 
00138     const QList<Document*> &documents() const;
00139 
00140     void setStatusIcon(Document* document, const QIcon& icon);
00141 
00142 public Q_SLOTS:
00143     //@todo adymo: this should not be a part of public API
00145     void areaReleased();
00147     void areaReleased(Sublime::Area *area);
00148 
00149 protected:
00150     bool eventFilter(QObject *obj, QEvent *ev);
00151     void showAreaInternal(Area* area, MainWindow *mainWindow);
00152 
00153 private Q_SLOTS:
00154     void notifyToolViewRemoved(Sublime::View *view, Sublime::Position);
00155     void notifyToolViewAdded(Sublime::View *view, Sublime::Position);
00156     void notifyViewRemoved(Sublime::AreaIndex*, Sublime::View *view);
00157     void notifyViewAdded(Sublime::AreaIndex*, Sublime::View *view);
00158 
00159 Q_SIGNALS:
00160     void aboutToRemoveToolView(Sublime::View*);
00161     void toolViewAdded(Sublime::View*);
00162     void aboutToRemoveView(Sublime::View*);
00163     void viewAdded(Sublime::View*);
00164     void toolViewMoved(Sublime::View*);
00165 
00166 private:
00167     void init();
00168     Q_PRIVATE_SLOT(d, void removeArea(QObject*))
00169     Q_PRIVATE_SLOT(d, void removeDocument(QObject*))
00170 
00171     
00173     void addDocument(Document *document);
00174 
00175     struct ControllerPrivate *const d;
00176 
00177     friend class Area;
00178     friend class Document;
00179 
00180 };
00181 
00182 }
00183 
00184 #endif
00185 

sublime

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

KDevelop Platform Libraries

Skip menu "KDevelop Platform Libraries"
  • interfaces
  • language
  •   codegen
  •   duchain
  •   editor
  • outputview
  •     interfaces
  • project
  • shell
  • sublime
  • util
  • vcs
Generated for KDevelop Platform Libraries by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal