KDevelop API Documentation

newmainwindow.h

Go to the documentation of this file.
00001 /***************************************************************************
00002   newmainwindow.h
00003                              -------------------
00004     begin                : 22 Dec 2002
00005     copyright            : (C) 2002 by the KDevelop team
00006     email                : team@kdevelop.org
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 #ifndef _NEWMAINWINDOW_H_
00018 #define _NEWMAINWINDOW_H_
00019 
00020 
00021 #include <kmdimainfrm.h>
00022 #include <kparts/mainwindow.h>
00023 
00024 #include <qdatetime.h>
00025 #include <qmap.h>
00026 #include <qguardedptr.h>
00027 
00028 #include <kdevpartcontroller.h>
00029 #include "kdevmainwindow.h"
00030 
00031 class MainWindowShare;
00032 
00033 class NewMainWindow : public KMdiMainFrm, public KDevMainWindow
00034 {
00035   Q_OBJECT
00036 
00037 public:
00038 
00039   NewMainWindow(QWidget* parent=0, const char *name=0, KMdi::MdiMode = KMdi::IDEAlMode );
00040   ~NewMainWindow();
00041 
00042   void embedPartView(QWidget *view, const QString &title, const QString &toolTip);
00043   void embedSelectView(QWidget *view, const QString &title, const QString &toolTip);
00044   void embedSelectViewRight ( QWidget* view, const QString& title, const QString &toolTip);
00045   void embedOutputView(QWidget *view, const QString &title, const QString &toolTip);
00046   void embedView( KDockWidget::DockPosition pos, QWidget *view, const QString &name, const QString &toolTip);
00047 
00048   void removeView(QWidget *view);
00049   void setViewAvailable(QWidget *pView, bool bEnabled);
00050 
00051   void raiseView(QWidget *view);
00052   void lowerView(QWidget *view);
00053   void lowerAllViews();
00054 
00055   void loadSettings();
00056 
00057   void prepareToCloseViews();
00058   void guiRestoringFinished();
00059   
00061   virtual void childWindowCloseRequest( KMdiChildView * );
00062   
00063   KMainWindow *main();
00064 
00065   void init();
00066 
00067   void setUserInterfaceMode(const QString& uiMode);
00068   
00069   //This is needed because KMdiMainFrame::tabWidgetVisibility() is protected (for
00070   //whatever reason) and this value is needed in EditorProxy
00071   KMdi::TabWidgetVisibility getTabWidgetVisibility() { return tabWidgetVisibility(); }
00072   
00073 public slots:
00074 
00075   void createGUI(KParts::Part *part);
00076   void raiseEditor();
00077 
00079   void storeOutputViewTab();
00080 
00082   void restoreOutputViewTab();
00083 
00085   void projectOpened();
00086   
00088   void setCaption( const QString &);
00089   
00090 signals:
00091   void currentChanged( QWidget* widget );
00092   void sigCloseWindow( const QWidget* widget );
00093 
00094 private slots:
00095   void slotViewActivated(KMdiChildView* child);
00096   void slotCoreInitialized();
00097   void slotPartURLChanged( KParts::ReadOnlyPart *);
00098   void documentChangedState( const KURL &, DocumentState );
00099   void fillWindowMenu();
00100   void openURL( int );
00101   void tabMoved(int from, int to);
00102   void tabContext(QWidget*,const QPoint &);  
00103   void tabContextActivated(int);    
00104    
00105 //  void loadMDISettings();
00106 
00107 private:
00108 
00109     KDockWidget::DockPosition recallToolViewPosition( const QString & widgetName, KDockWidget::DockPosition defaultPos );
00110     void rememberToolViewPosition( const QString & widgetName, KDockWidget::DockPosition pos );
00111     struct ToolViewData
00112     {
00113         ToolViewData() {}
00114         ToolViewData( KDockWidget::DockPosition pos, QString n, QString t ) 
00115             : position(pos), name(n), toolTip(t) {}
00116 
00117         KDockWidget::DockPosition position;
00118         QString name;
00119         QString toolTip;
00120     };
00121 
00122     QMap<QWidget*,ToolViewData> m_availableToolViews;
00123     QMap<QWidget*,ToolViewData> m_unAvailableToolViews;
00124 
00125   virtual bool queryClose();
00126   virtual bool queryExit();
00127 
00128   void createStatusBar();
00129   void createFramework();
00130   void createActions();
00131 
00132   void saveSettings();
00133 
00134   void moveRelativeTab(int);
00135   
00136   KAction *m_raiseEditor;
00137 
00138   QValueList< QPair< int, KURL > > m_windowList;
00139   MainWindowShare*   m_pMainWindowShare;
00140   
00141   bool openNewTabAfterCurrent;
00142   bool showTabIcons;
00143 
00144   KURL m_currentTabURL;
00145 };
00146 
00147 
00148 #endif
KDE Logo
This file is part of the documentation for KDevelop Version 3.1.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Feb 22 09:22:42 2005 by doxygen 1.3.9.1 written by Dimitri van Heesch, © 1997-2003