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

sublime

mainwindow.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 SUBLIMEMAINWINDOW_H
00020 #define SUBLIMEMAINWINDOW_H
00021 
00022 #include <QtCore/QList>
00023 #include <kparts/mainwindow.h>
00024 
00025 #include "sublimeexport.h"
00026 
00027 class QDockWidget;
00028 
00029 namespace Sublime {
00030 
00031 class Area;
00032 class View;
00033 class Controller;
00034 class MainWindowOperator;
00035 
00047 class SUBLIME_EXPORT MainWindow: public KParts::MainWindow {
00048 Q_OBJECT
00049 public:
00051     explicit MainWindow(Controller *controller, Qt::WindowFlags flags = KDE_DEFAULT_WINDOWFLAGS);
00052     ~MainWindow();
00053 
00055     QList<View*> toolDocks() const;
00057     Area *area() const;
00059     Controller *controller() const;
00060 
00062     View *activeView();
00064     View *activeToolView();
00065 
00070     void enableAreaSettingsSave();
00071 
00072 public slots:
00074     void activateView(Sublime::View *view);
00075 
00076 Q_SIGNALS:
00078     void areaCleared(Sublime::Area*);
00080     void areaChanged(Sublime::Area*);
00082     void activeViewChanged(Sublime::View*);
00084     void activeToolViewChanged(Sublime::View*);
00086     void settingsLoaded();
00087 
00088 protected:
00089 public: // FIXME?
00092     virtual void saveSettings();
00095     virtual void loadSettings();
00096 
00098     virtual bool queryClose();
00099 
00100 private:
00101     Q_PRIVATE_SLOT(d, void viewAdded(Sublime::AreaIndex*, Sublime::View*))
00102     Q_PRIVATE_SLOT(d, void aboutToRemoveView(Sublime::AreaIndex*, Sublime::View*))
00103     Q_PRIVATE_SLOT(d, void toolViewAdded(Sublime::View*, Sublime::Position))
00104     Q_PRIVATE_SLOT(d, void raiseToolView(Sublime::View*))
00105     Q_PRIVATE_SLOT(d, void aboutToRemoveToolView(Sublime::View*, Sublime::Position))
00106     Q_PRIVATE_SLOT(d, void toolViewMoved(Sublime::View*, Sublime::Position))
00107 
00108     //Inherit MainWindowOperator to access four methods below
00110     void setArea(Area *area);
00112     void clearArea();
00114     void setActiveView(Sublime::View *view);
00116     void setActiveToolView(View *view);
00118     void setStatusIcon(View* view, const QIcon& icon);
00119 
00120     void resizeEvent(QResizeEvent* event);
00121 
00122     void saveGeometry(KConfigGroup &config);
00123     void loadGeometry(const KConfigGroup &config);
00124 
00125     struct MainWindowPrivate *const d;
00126     friend class MainWindowOperator;
00127     friend class MainWindowPrivate;
00128 };
00129 
00130 }
00131 
00132 
00133 #endif
00134 

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